|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
Modes, functionals and normalisations of one port; built by Scattering from the setup.
More...
#include <waveguide_port.hpp>
Public Member Functions | |
| PortModes (const fespace::NedelecDofMap< Dim > &dofs, mesh::Tag facet_tag, const materials::MaterialMap &materials, Real omega, Index num_modes, int extra_order=2, const std::vector< mesh::Tag > &pmc_tags={}) | |
| const std::vector< PortMode > & | modes () const noexcept |
| Index | num_modes () const noexcept |
| const Vector & | functional (Index m) const |
| Complex | normalisation (Index m) const |
| \( N_m = \int_\Gamma \hat e_m\cdot\hat w_m \). | |
| std::vector< Complex > | coefficients (const Vector &e) const |
| Coefficients \( c_m = q_m^\top e / N_m = a_m + b_m \) of a discrete field. | |
| const std::vector< Index > & | dofs () const noexcept |
| DoFs touched by the port (sorted). | |
| Complex | trace (Index m, Real s) const |
| Real | profile (Index m, Real s) const |
| 2D: \( h_m(s) \) (the H_z profile) at the port coordinate s. | |
| Eigen::Matrix< Complex, Dim, 1 > | transverse_field (Index m, const Point< Dim > &x) const |
| Real | length () const noexcept |
| const Point< Dim > & | origin () const noexcept |
| Origin of the port frame; 2D: the start of the port coordinate (s increases along t'). | |
| const Point< Dim > & | tangent () const noexcept |
| 2D: the unit tangent t' of the port coordinate; 3D: the first frame vector t₁. | |
| const Point< Dim > & | tangent2 () const noexcept |
| 3D: the second frame vector t₂ (t₁ × t₂ = n); 2D: unused. | |
| const Point< Dim > & | normal () const noexcept |
| const mesh::Mesh< 2 > * | section () const noexcept |
| 3D: the extracted cross-section mesh in frame coordinates (u, v); nothing in 2D. | |
Modes, functionals and normalisations of one port; built by Scattering from the setup.
| hpfem::physics::PortModes< Dim >::PortModes | ( | const fespace::NedelecDofMap< Dim > & | dofs, |
| mesh::Tag | facet_tag, | ||
| const materials::MaterialMap & | materials, | ||
| Real | omega, | ||
| Index | num_modes, | ||
| int | extra_order = 2, |
||
| const std::vector< mesh::Tag > & | pmc_tags = {} |
||
| ) |
Solves the cross-section problem of the facets tagged facet_tag with the materials of their inside cells at ω and keeps num_modes modes (3D: at most the guided ones). Quadrature on the port of degree 2p + extra_order. pmc_tags: see WaveguidePort::pmc_tags (3D only).
| InvalidArgument | for a tag without boundary facets, a lossy material on the port, facets not on one straight line (2D) / plane (3D), ω ≤ 0, num_modes < 1 or the port tag among pmc_tags; NotImplemented for pmc_tags in 2D; Error if the 3D mode solver does not converge. |
| std::vector< Complex > hpfem::physics::PortModes< Dim >::coefficients | ( | const Vector & | e | ) | const |
Coefficients \( c_m = q_m^\top e / N_m = a_m + b_m \) of a discrete field.
|
inlinenoexcept |
DoFs touched by the port (sorted).
|
inline |
\( q_m \): the functional \( \int_\Gamma\phi_i\cdot\hat w_m \) on the DoF map (full size; nonzero on the port DoFs only).
|
inlinenoexcept |
2D: length of the port line; 3D: twice the largest distance of a port vertex from the vertex centroid.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
\( N_m = \int_\Gamma \hat e_m\cdot\hat w_m \).
|
inlinenoexcept |
|
inlinenoexcept |
Origin of the port frame; 2D: the start of the port coordinate (s increases along t').
| Real hpfem::physics::PortModes< Dim >::profile | ( | Index | m, |
| Real | s | ||
| ) | const |
2D: \( h_m(s) \) (the H_z profile) at the port coordinate s.
| InvalidArgument | in 3D. |
|
inlinenoexcept |
3D: the extracted cross-section mesh in frame coordinates (u, v); nothing in 2D.
|
inlinenoexcept |
2D: the unit tangent t' of the port coordinate; 3D: the first frame vector t₁.
|
inlinenoexcept |
3D: the second frame vector t₂ (t₁ × t₂ = n); 2D: unused.
| Complex hpfem::physics::PortModes< Dim >::trace | ( | Index | m, |
| Real | s | ||
| ) | const |
2D: tangential trace \( \hat e_m(s) \) of mode m at the port coordinate s ∈ [0, length].
| InvalidArgument | in 3D. |
| Eigen::Matrix< Complex, Dim, 1 > hpfem::physics::PortModes< Dim >::transverse_field | ( | Index | m, |
| const Point< Dim > & | x | ||
| ) | const |
Tangential electric field \( \hat e_m \) of mode m at the point x on the port (3D: the mode of the cross-section mapped into the frame; 2D: \( \hat e_m t' \)).
| InvalidArgument | if x does not lie on the port. |