fdtdx.compute_pole_coefficients_per_axis

fdtdx.compute_pole_coefficients_per_axis#

fdtdx.compute_pole_coefficients_per_axis(poles, dt)[source]#

Compute the per-axis discrete-time ADE recurrence coefficients.

For each pole and grid axis, returns (c1, c2, c3) with (D = 1 + gamma dt / 2)

\[c_1 = \frac{2 - \omega_0^2 \Delta t^2}{D}, \quad c_2 = -\frac{1 - \gamma \Delta t / 2}{D}, \quad c_3 = \frac{K \Delta t^2}{D},\]

where K = coupling_sq is the E coupling of the unified ODE:

\(p_p^{n+1} = c_1 p_p^n + c_2 p_p^{n-1} + c_3 E^n\).

For isotropic poles the three axis columns are identical.

Parameters:
  • poles (tuple[Pole, ...]) – Tuple of poles (may be empty).

  • dt (float) – Simulation time step (seconds).

Return type:

tuple[ndarray, ndarray, ndarray]

Returns:

Three numpy arrays of shape (len(poles), 3) with c1, c2, c3 per pole and axis. For an empty pole tuple, returns three (0, 3) arrays.