[docs] more docs cleanup
This commit is contained in:
parent
dc92d4a79d
commit
ff278e6fa1
6 changed files with 22 additions and 23 deletions
|
|
@ -64,11 +64,11 @@ def e_full(
|
||||||
epsilon: Vectorized dielectric constant
|
epsilon: Vectorized dielectric constant
|
||||||
mu: Vectorized magnetic permeability (default 1 everywhere).
|
mu: Vectorized magnetic permeability (default 1 everywhere).
|
||||||
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
||||||
as containing a perfect electrical conductor (PEC).
|
as containing a perfect electrical conductor (PEC).
|
||||||
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
||||||
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
||||||
as containing a perfect magnetic conductor (PMC).
|
as containing a perfect magnetic conductor (PMC).
|
||||||
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Sparse matrix containing the wave operator.
|
Sparse matrix containing the wave operator.
|
||||||
|
|
@ -148,11 +148,11 @@ def h_full(
|
||||||
epsilon: Vectorized dielectric constant
|
epsilon: Vectorized dielectric constant
|
||||||
mu: Vectorized magnetic permeability (default 1 everywhere)
|
mu: Vectorized magnetic permeability (default 1 everywhere)
|
||||||
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
||||||
as containing a perfect electrical conductor (PEC).
|
as containing a perfect electrical conductor (PEC).
|
||||||
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
||||||
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
||||||
as containing a perfect magnetic conductor (PMC).
|
as containing a perfect magnetic conductor (PMC).
|
||||||
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Sparse matrix containing the wave operator.
|
Sparse matrix containing the wave operator.
|
||||||
|
|
@ -217,11 +217,11 @@ def eh_full(
|
||||||
epsilon: Vectorized dielectric constant
|
epsilon: Vectorized dielectric constant
|
||||||
mu: Vectorized magnetic permeability (default 1 everywhere)
|
mu: Vectorized magnetic permeability (default 1 everywhere)
|
||||||
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
pec: Vectorized mask specifying PEC cells. Any cells where `pec != 0` are interpreted
|
||||||
as containing a perfect electrical conductor (PEC).
|
as containing a perfect electrical conductor (PEC).
|
||||||
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
The PEC is applied per-field-component (i.e. `pec.size == epsilon.size`)
|
||||||
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
||||||
as containing a perfect magnetic conductor (PMC).
|
as containing a perfect magnetic conductor (PMC).
|
||||||
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Sparse matrix containing the wave operator.
|
Sparse matrix containing the wave operator.
|
||||||
|
|
@ -267,8 +267,8 @@ def e2h(
|
||||||
dxes: Grid parameters `[dx_e, dx_h]` as described in `meanas.fdmath.types`
|
dxes: Grid parameters `[dx_e, dx_h]` as described in `meanas.fdmath.types`
|
||||||
mu: Vectorized magnetic permeability (default 1 everywhere)
|
mu: Vectorized magnetic permeability (default 1 everywhere)
|
||||||
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
pmc: Vectorized mask specifying PMC cells. Any cells where `pmc != 0` are interpreted
|
||||||
as containing a perfect magnetic conductor (PMC).
|
as containing a perfect magnetic conductor (PMC).
|
||||||
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
The PMC is applied per-field-component (i.e. `pmc.size == epsilon.size`)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Sparse matrix for converting E to H.
|
Sparse matrix for converting E to H.
|
||||||
|
|
@ -483,4 +483,3 @@ def e_boundary_source(
|
||||||
# (numpy.roll(mask, +1, axis=2) != mask))
|
# (numpy.roll(mask, +1, axis=2) != mask))
|
||||||
|
|
||||||
return sparse.diags_array(jmask.astype(int)) @ full
|
return sparse.diags_array(jmask.astype(int)) @ full
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ def solve_mode(
|
||||||
axis: Propagation axis (0=x, 1=y, 2=z)
|
axis: Propagation axis (0=x, 1=y, 2=z)
|
||||||
polarity: Propagation direction (+1 for +ve, -1 for -ve)
|
polarity: Propagation direction (+1 for +ve, -1 for -ve)
|
||||||
slices: `epsilon[tuple(slices)]` is used to select the portion of the grid to use
|
slices: `epsilon[tuple(slices)]` is used to select the portion of the grid to use
|
||||||
as the waveguide cross-section. `slices[axis]` must select exactly one item.
|
as the waveguide cross-section. `slices[axis]` must select exactly one item.
|
||||||
epsilon: Dielectric constant
|
epsilon: Dielectric constant
|
||||||
mu: Magnetic permeability (default 1 everywhere)
|
mu: Magnetic permeability (default 1 everywhere)
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ def solve_mode(
|
||||||
- `E`: full-grid electric field for the solved mode
|
- `E`: full-grid electric field for the solved mode
|
||||||
- `H`: full-grid magnetic field for the solved mode
|
- `H`: full-grid magnetic field for the solved mode
|
||||||
- `wavenumber`: propagation constant corrected for the discretized
|
- `wavenumber`: propagation constant corrected for the discretized
|
||||||
propagation axis
|
propagation axis
|
||||||
- `wavenumber_2d`: propagation constant of the reduced 2D eigenproblem
|
- `wavenumber_2d`: propagation constant of the reduced 2D eigenproblem
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
|
||||||
|
|
@ -216,13 +216,13 @@ def solve_modes(
|
||||||
of the bent waveguide with the specified mode number.
|
of the bent waveguide with the specified mode number.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
mode_number: Number of the mode, 0-indexed
|
mode_numbers: Mode numbers to solve, 0-indexed.
|
||||||
omega: Angular frequency of the simulation
|
omega: Angular frequency of the simulation
|
||||||
dxes: Grid parameters [dx_e, dx_h] as described in meanas.fdmath.types.
|
dxes: Grid parameters [dx_e, dx_h] as described in meanas.fdmath.types.
|
||||||
The first coordinate is assumed to be r, the second is y.
|
The first coordinate is assumed to be r, the second is y.
|
||||||
epsilon: Dielectric constant
|
epsilon: Dielectric constant
|
||||||
rmin: Radius of curvature for the simulation. This should be the minimum value of
|
rmin: Radius of curvature for the simulation. This should be the minimum value of
|
||||||
r within the simulation domain.
|
r within the simulation domain.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
e_xys: NDArray of vfdfield_t specifying fields. First dimension is mode number.
|
e_xys: NDArray of vfdfield_t specifying fields. First dimension is mode number.
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ def cross(
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
B: List `[Bx, By, Bz]` of sparse matrices corresponding to the x, y, z
|
B: List `[Bx, By, Bz]` of sparse matrices corresponding to the x, y, z
|
||||||
portions of the operator on the left side of the cross product.
|
portions of the operator on the left side of the cross product.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Sparse matrix corresponding to (B x), where x is the cross product.
|
Sparse matrix corresponding to (B x), where x is the cross product.
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ def vec(
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
f: A vector field, e.g. `[f_x, f_y, f_z]` where each `f_` component is a 1- to
|
f: A vector field, e.g. `[f_x, f_y, f_z]` where each `f_` component is a 1- to
|
||||||
3-D ndarray (`f_*` should all be the same size). Doesn't fail with `f=None`.
|
3-D ndarray (`f_*` should all be the same size). Doesn't fail with `f=None`.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
1D ndarray containing the linearized field (or `None`)
|
1D ndarray containing the linearized field (or `None`)
|
||||||
|
|
@ -123,4 +123,3 @@ def unvec(
|
||||||
if v is None:
|
if v is None:
|
||||||
return None
|
return None
|
||||||
return v.reshape((nvdim, *shape), order='C') # type: ignore
|
return v.reshape((nvdim, *shape), order='C') # type: ignore
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ docs = [
|
||||||
"mkdocs-print-site-plugin>=2.3",
|
"mkdocs-print-site-plugin>=2.3",
|
||||||
"pymdown-extensions>=10.7",
|
"pymdown-extensions>=10.7",
|
||||||
"htmlark>=1.0",
|
"htmlark>=1.0",
|
||||||
|
"ruff>=0.6",
|
||||||
]
|
]
|
||||||
examples = [
|
examples = [
|
||||||
"matplotlib>=3.10.8",
|
"matplotlib>=3.10.8",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue