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, c4) 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{a \Delta t^2 - b \Delta t}{D}, \quad c_4 = \frac{b \Delta t}{D},\]

where a = coupling_sq is the E coupling and b = coupling_edot is the dE/dt coupling. The recurrence uses a forward difference for the dE/dt term so it stays compatible with the reversible time stepping:

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

For isotropic poles the three axis columns are identical. For Lorentz and Drude poles b = 0, so c4 = 0 and c3 reduces to the classic \(K \Delta t^2 / D\).

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

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

Return type:

tuple[ndarray, ndarray, ndarray, ndarray]

Returns:

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