pml#
Functions related to perfectly matched layers.
Copyright (c) Meta Platforms, Inc. and affiliates.
- class fmmax.pml.PMLParams(num_x: int, num_y: int, a_max: float = 4.0, p: float = 4.0, sigma_max: float = 1.0)[source]#
Stores parameters that define perfectly matched layers.
- num_x#
The number of grid points occupied by the PML, in the x-direction.
- Type:
int
- num_y#
The number of grid points occupied by the PML, in the y-direction.
- Type:
int
- a_max#
The strength parameter for uniaxial PML.
- Type:
float
- p#
The exponent parameter for uniaxial PML.
- Type:
float
- sigma_max#
The conductivity parameter for uniaxial PML.
- Type:
float
- fmmax.pml.apply_uniaxial_pml(permittivity: Array, pml_params: PMLParams) Tuple[Tuple[Array, Array, Array, Array, Array], Tuple[Array, Array, Array, Array, Array]] [source]#
Generate the permittivity and permeability tensor elements for uniaxial pml.
The PML assumes that the unit cell has primitive lattice vectors u and v which are parallel to x and y axes, respectively.
This function is appropriate for isotropic nonmagnetic media, but the permittivities and permeabilities generated are anisotropic.
- Parameters:
permittivity – isotropic permittivity
pml_params – The parameters defining the perfectly matched layer dimensions and absorption characteristics.
- Returns:
The permittivity and permeability tensor elements, `(
(eps_xx, eps_xy, eps_yx, eps_yy, eps_zz), (mu_xx, mu_xy, mu_yx, mu_yy, mu_zz),
)`.