TM_Polar_FDFD#
- class TM_Polar_FDFD(omega, geometry)[source]#
Bases:
Maxwell_Polar_FDFDTM polarization FDFD solver in polar coordinates.
Solves the scalar Helmholtz equation for Ez field.
- Parameters:
omega (complex)
geometry (PolarFDFDGeometry)
- All attributes from Maxwell_Polar_FDFD, plus
- M0#
Vacuum Maxwell operator (Laplacian - omega^2).
- Type:
sp.csr_array
Methods Summary
get_GaaInv(A_mask[, chigrid])Compute the inverse Green's function on region A, G_{AA}^{-1}.
get_TM_Gba(design_mask, observe_mask)Compute vacuum Green's function from design to observation region.
get_TM_dipole_field(ir, iphi[, chigrid])Get the field from a point dipole source at grid location (ir, iphi).
get_TM_field(sourcegrid[, chigrid])Solve for the TM field given a source distribution.
Get coordinate grid arrays.
Methods Documentation
- get_GaaInv(A_mask, chigrid=None)[source]#
Compute the inverse Green’s function on region A, G_{AA}^{-1}.
Uses the Woodbury identity for block inversion.
Convention: J_A = GaaInv @ E_A
- Parameters:
A_mask (BoolGrid) – Boolean mask for design region A.
chigrid (ComplexGrid, optional) – Material susceptibility. Default is vacuum.
- Returns:
GaaInv (sp.csc_array) – Inverse Green’s function on region A.
M (sp.csc_array) – Full Maxwell operator used.
- Return type:
tuple[csc_array, csc_array]
- get_TM_Gba(design_mask, observe_mask)[source]#
Compute vacuum Green’s function from design to observation region.
Convention: E_obs = (i/ω) * G_ba @ J This means it is a propagator (i.e., it already contains its integral). Thus, G is scaled so we do not need to modify the field by areas before applying it.
- Parameters:
design_mask (BoolGrid) – Boolean mask for source/design region (shape Nr x Nphi).
observe_mask (BoolGrid) – Boolean mask for observation region (shape Nr x Nphi).
- Returns:
G_ba – Green’s function matrix (N_obs x N_design).
- Return type:
ComplexArray
- get_TM_dipole_field(ir, iphi, chigrid=None)[source]#
Get the field from a point dipole source at grid location (ir, iphi).
- Parameters:
ir (int) – Radial grid index.
iphi (int) – Azimuthal grid index.
chigrid (ComplexGrid, optional) – Material susceptibility. Default is vacuum.
- Returns:
Ez – Electric field solution.
- Return type:
ComplexArray
- get_TM_field(sourcegrid, chigrid=None)[source]#
Solve for the TM field given a source distribution.
- Parameters:
sourcegrid (ComplexGrid) – Current source distribution (shape: Nphi * Nr or (Nphi, Nr)).
chigrid (ComplexGrid, optional) – Material susceptibility distribution. Default is vacuum.
- Returns:
Ez – Electric field solution (flattened).
- Return type:
ComplexArray
- get_symmetric_grids()[source]#
Get coordinate grid arrays.
- Returns:
phi_grid (FloatNDArray) – Azimuthal coordinates for the sector.
r_grid (FloatNDArray) – Radial coordinates.
phi_grid_full (FloatNDArray) – Azimuthal coordinates for full circle (for plotting).
- Return type:
tuple[ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]], ndarray[tuple[int, …], dtype[float64]]]