fmm#
Functions related to layer eigenmode calculation for the FMM algorithm.
Copyright (c) Meta Platforms, Inc. and affiliates.
- class fmmax.fmm.LayerSolveResult(wavelength: Array, in_plane_wavevector: Array, primitive_lattice_vectors: LatticeVectors, expansion: Expansion, eigenvalues: Array, eigenvectors: Array, z_permittivity_matrix: Array, inverse_z_permittivity_matrix: Array, z_permeability_matrix: Array, inverse_z_permeability_matrix: Array, transverse_permeability_matrix: Array, tangent_vector_field: Tuple[Array, Array] | None)[source]#
Stores the result of a layer eigensolve.
This eigenvalue problem is specified in equation 28 of [2012 Liu].
- wavelength#
The wavelength for the solve.
- Type:
jax.Array
- in_plane_wavevector#
The in-plane wavevector for the solve.
- Type:
jax.Array
- primitive_lattice_vectors#
The primitive vectors for the real-space lattice.
- expansion#
The expansion used for the eigensolve.
- Type:
- eigenvalues#
The layer eigenvalues.
- Type:
jax.Array
- eigenvectors#
The layer eigenvectors.
- Type:
jax.Array
- z_permittivity_matrix#
The fourier-transformed zz-component of permittivity.
- Type:
jax.Array
- inverse_z_permittivity_matrix#
The fourier-transformed inverse of zz-component of permittivity.
- Type:
jax.Array
- z_permeability_matrix#
The fourier-transformed zz-component of permeability.
- Type:
jax.Array
- inverse_z_permeability_matrix#
The fourier-transformed inverse of zz-component of permeability.
- Type:
jax.Array
- transverse_permeability_matrix#
The transverse permeability matrix, needed to calculate the omega-script-k matrix from equation 26 of [2012 Liu]. This is needed to generate the layer scattering matrix.
- Type:
jax.Array
- tangent_vector_field#
The tangent vector field (tx, ty) used to compute the transverse permittivity matrix, if a vector FMM formulation is used. If the FFT formulation is used, the vector field is None.
- Type:
Tuple[jax.Array, jax.Array] | None
- property omega_script_k_matrix#
Compute omega-script-k matrix from equation 26 of [2012 Liu].
- fmmax.fmm.eigensolve_anisotropic_media(wavelength: Array, in_plane_wavevector: Array, primitive_lattice_vectors: LatticeVectors, permittivity_xx: Array, permittivity_xy: Array, permittivity_yx: Array, permittivity_yy: Array, permittivity_zz: Array, expansion: Expansion, formulation: Formulation | Callable[[Array, Expansion, LatticeVectors], Tuple[Array, Array]]) LayerSolveResult [source]#
Performs the eigensolve for a layer with anisotropic permittivity.
This function performs either a uniform-layer or patterned-layer eigensolve, depending on the shape of the trailing dimensions of a given layer permittivity. When the final two dimensions have shape (1, 1), the layer is treated as uniform. Otherwise, it is patterned.
- Parameters:
wavelength – The free space wavelength of the excitation.
in_plane_wavevector – (kx0, ky0).
primitive_lattice_vectors – The primitive vectors for the real-space lattice.
permittivity_xx – The xx-component of the permittivity tensor, with shape (…, nx, ny).
permittivity_xy – The xy-component of the permittivity tensor.
permittivity_yx – The yx-component of the permittivity tensor.
permittivity_yy – The yy-component of the permittivity tensor.
permittivity_zz – The zz-component of the permittivity tensor.
expansion – The field expansion to be used.
formulation – Specifies the formulation to be used, or a callable which computes the tangent vector field for a custom vector FMM formulation.
- Returns:
The LayerSolveResult.
- fmmax.fmm.eigensolve_general_anisotropic_media(wavelength: Array, in_plane_wavevector: Array, primitive_lattice_vectors: LatticeVectors, permittivity_xx: Array, permittivity_xy: Array, permittivity_yx: Array, permittivity_yy: Array, permittivity_zz: Array, permeability_xx: Array, permeability_xy: Array, permeability_yx: Array, permeability_yy: Array, permeability_zz: Array, expansion: Expansion, formulation: Formulation | Callable[[Array, Expansion, LatticeVectors], Tuple[Array, Array]], vector_field_source: Array | None = None) LayerSolveResult [source]#
Performs the eigensolve for a general anistropic layer.
Here, “general” refers to the fact that the layer material can be magnetic, i.e. the permeability and permittivity can be specified.
This function performs either a uniform-layer or patterned-layer eigensolve, depending on the shape of the trailing dimensions of a given layer permittivity. When the final two dimensions have shape (1, 1), the layer is treated as uniform. Otherwise, it is patterned.
- Parameters:
wavelength – The free space wavelength of the excitation.
in_plane_wavevector – (kx0, ky0).
primitive_lattice_vectors – The primitive vectors for the real-space lattice.
permittivity_xx – The xx-component of the permittivity tensor, with shape (…, nx, ny).
permittivity_xy – The xy-component of the permittivity tensor.
permittivity_yx – The yx-component of the permittivity tensor.
permittivity_yy – The yy-component of the permittivity tensor.
permittivity_zz – The zz-component of the permittivity tensor.
permeability_xx – The xx-component of the permeability tensor.
permeability_xy – The xy-component of the permeability tensor.
permeability_yx – The yx-component of the permeability tensor.
permeability_yy – The yy-component of the permeability tensor.
permeability_zz – The zz-component of the permeability tensor.
expansion – The field expansion to be used.
formulation – Specifies the formulation to be used, or a callable which computes the tangent vector field for a custom vector FMM formulation.
vector_field_source – Optional array used to calculate the vector field for vector formulations of the FMM. If not specified, (permittivity_xx + permittivity_yy) / 2 is used. Ignored for the FFT formulation. Should have shape matching the permittivities and permeabilities.
- Returns:
The LayerSolveResult.
- fmmax.fmm.eigensolve_isotropic_media(wavelength: Array, in_plane_wavevector: Array, primitive_lattice_vectors: LatticeVectors, permittivity: Array, expansion: Expansion, formulation: Formulation | Callable[[Array, Expansion, LatticeVectors], Tuple[Array, Array]]) LayerSolveResult [source]#
Performs the eigensolve for a layer with isotropic permittivity.
This function performs either a uniform-layer or patterned-layer eigensolve, depending on the shape of the trailing dimensions of a given layer permittivity. When the final two dimensions have shape (1, 1), the layer is treated as uniform. Otherwise, it is patterned.
- Parameters:
wavelength – The free space wavelength of the excitation.
in_plane_wavevector – (kx0, ky0).
primitive_lattice_vectors – The primitive vectors for the real-space lattice.
permittivity – The permittivity array.
expansion – The field expansion to be used.
formulation – Specifies the formulation to be used, or a callable which computes the tangent vector field for a custom vector FMM formulation.
- Returns:
The LayerSolveResult.