- emg3d.core.gauss_seidel_y(ex, ey, ez, sx, sy, sz, eta_x, eta_y, eta_z, zeta, hx, hy, hz, nu)#
Gauss-Seidel method with line relaxation in y-direction.
The resulting system A x = b to solve consists of n unknowns (x-vector), and the corresponding matrix A is a banded matrix with the main diagonal and five upper and lower diagonals:
.-0 |X|\ 0 0-.-0 left: middle: right: \|X|\ (not used) 0-.-0 0- .- 0 \|X|\ \ |X |\ 0-.-0 0 \|X| 0-. . 1*1, - 4*1, | 1*4, X 4*4, \ 4*4 upper or lower
The matrix A is complex and symmetric (A = A^T), and therefore only the main diagonal and the lower five off-diagonals are required.
The right-hand-side b has length 5*ny-4 (ny even).
The matrix A has length of b and 1+2*5 diagonals; we use for it an array of length 6*len(b).
The values are computed in rows of 5 lines, with the indicated middle and left matrices as indicated in the above scheme. These blocks are filled into the main matrix A and vector b, and subsequently solved with a non-standard Cholesky factorisation implemented in
solve. Tangential components at the boundaries are assumed to be zero (PEC boundaries).
Note: The smoothing with linerelaxation in y-direction is carried out in reversed lexicographical order, in order to improve speed (memory access). All other smoothers (
gauss_seidel_z) use lexicographical order.
The result is stored in the provided electric field components
- ex, ey, ezndarray
Electric fields in x-, y-, and z-directions (
- sx, sy, szndarray
Source fields in x-, y-, and z-directions (
- eta_x, eta_y, eta_z, zetandarray
Volume-averaged model parameters (
- hx, hy, hzndarray
Cell widths in x-, y-, and z-directions (
Number of Gauss-Seidel iterations.