  We present a finite-element approach for computing the aggregate scattering
matrix of a network of linear coherent scatterers. These might be optical
scatterers or more general scattering coins studied in quantum walk theory.
While techniques exist for two-dimensional lattices of feed-forward scatterers,
the present approach is applicable to any network configuration of any
collection of scatterers. Unlike traditional finite-element methods in optics,
this method does not directly solve Maxwell's equations; instead it is used to
assemble and solve a linear, coupled scattering problem that emerges after
Maxwell's equations are abstracted within the scattering matrix method. With
this approach, a global unitary is assembled corresponding to one time step of
the quantum walk on the network. After applying the relevant boundary
conditions to this global matrix, the problem becomes non-unitary, and
possesses a steady-state solution which is the output scattering state. We
provide an algorithm to obtain this steady-state solution exactly using a
matrix inversion, yielding the scattering state without requiring a direct
calculation of the eigenspectrum. The approach is then numerically validated on
a coupled-cavity interferometer example that possesses a known, closed-form
solution. Finally, the method is shown to be a generalization of the Redheffer
star product, which describes scatterers on one-dimensional lattices (2-regular
graphs) and is often applied to the design of thin-film optics, making the
current approach an invaluable tool for the design and validation of
high-dimensional phase-reprogrammable optical devices and study of quantum
walks on arbitrary graphs.
