hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions | Variables
hpfem::assembly Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  AssembledSystem
 
struct  AxisymmetricElasticForm
 Coefficients of one meridian cell; the eigenstrains are Voigt vectors (rr, zz, θθ, γ_rz). More...
 
struct  AxisymmetricForm
 
struct  AxisymmetricSystem
 
struct  ConicalElement
 
struct  ConicalForm
 
struct  ConicalSystem
 
class  DirichletElimination
 
struct  DofValues
 DoFs (sorted, unique) with values. More...
 
struct  ElasticForm
 Coefficients of one cell; an empty function means zero (the stiffness is required). More...
 
struct  ElementContribution
 Element matrix and load vector of one cell in H1Basis function order. More...
 
struct  EntitySet
 
struct  ErrorNorms
 Errors of the discrete function with coefficient vector u_h against (u, ∇u). More...
 
struct  HcurlErrorNorms
 Errors of the discrete field against (E, curl E). More...
 
struct  MaxwellElement
 Element stiffness, mass and load of one cell in NedelecBasis function order. More...
 
struct  MaxwellForm
 
struct  MaxwellSystem
 
class  PeriodicLocator
 
struct  PeriodicPair
 
struct  QuadratureRule
 
struct  ScalarForm
 Coefficients of the scalar form; an empty function means zero. More...
 
class  SparseAssembler
 
class  StaticCondensation
 

Typedefs

using AxisymmetricTensorField = std::function< Eigen::Matrix< Complex, 3, 1 >(const Point< 2 > &)>
 Diagonal tensor in cylindrical components (r, φ, z) as a function of the meridian point.
 
using AxisymmetricFormFactory = std::function< AxisymmetricForm(Index)>
 
using ConicalTensor = Eigen::Matrix< Complex, 3, 3 >
 Physical 3×3 tensor in Cartesian components (x, y, z).
 
using ConicalTensorField = std::function< ConicalTensor(const Point< 2 > &)>
 Tensor as a function of the point.
 
using ConicalSourceField = std::function< Eigen::Matrix< Complex, 3, 1 >(const Point< 2 > &)>
 Vector in the scaled components (x, y, v) as a function of the point (sources).
 
using ConicalFormFactory = std::function< ConicalForm(Index)>
 
using DirichletData = DofValues
 Constrained DoFs (sorted, unique) and their prescribed values.
 
template<int Dim>
using VoigtMatrix = Eigen::Matrix< Complex, kVoigtSize< Dim >, kVoigtSize< Dim > >
 
template<int Dim>
using VoigtVector = Eigen::Matrix< Complex, kVoigtSize< Dim >, 1 >
 
template<int Dim>
using ComplexTensor = Eigen::Matrix< Complex, Dim, Dim >
 
template<int Dim>
using ElasticFormFactory = std::function< ElasticForm< Dim >(Index)>
 
using AxisymmetricVoigtMatrix = Eigen::Matrix< Complex, 4, 4 >
 
using AxisymmetricVoigtVector = Eigen::Matrix< Complex, 4, 1 >
 
using AxisymmetricElasticFormFactory = std::function< AxisymmetricElasticForm(Index)>
 
template<int Dim>
using ScalarField = std::function< Complex(const Point< Dim > &)>
 
template<int Dim>
using VectorField = std::function< Eigen::Matrix< Complex, Dim, 1 >(const Point< Dim > &)>
 
template<int Dim>
using TensorField = std::function< Eigen::Matrix< Complex, Dim, Dim >(const Point< Dim > &)>
 
template<int Dim>
using ReferenceScalarField = std::function< Complex(const Point< Dim > &xi, const Point< Dim > &x)>
 
template<int Dim>
using ScalarFormFactory = std::function< ScalarForm< Dim >(Index)>
 
template<int Dim>
using ScalarSampler = std::function< Complex(Index cell, const Point< Dim > &xi, const Point< Dim > &x)>
 
template<int Dim>
using VectorSampler = std::function< ComplexVector< Dim >(Index cell, const Point< Dim > &xi, const Point< Dim > &x)>
 
template<int Dim>
using ComplexVector = Eigen::Matrix< Complex, Dim, 1 >
 
template<int Dim>
using ComplexCurl = Eigen::Matrix< Complex, Dim==2 ? 1 :3, 1 >
 Curl of a physical field: scalar (1-vector) in 2D, 3-vector in 3D.
 
template<int Dim>
using PermittivityTensor = Eigen::Matrix< Complex, Dim, Dim >
 Permittivity tensor ε (Dim × Dim) and inverse permeability tensor acting on curls.
 
template<int Dim>
using InversePermeabilityTensor = Eigen::Matrix< Complex, Dim==2 ? 1 :3, Dim==2 ? 1 :3 >
 
template<int Dim>
using CurlTensorField = std::function< InversePermeabilityTensor< Dim >(const Point< Dim > &)>
 
template<int Dim>
using ComplexVectorField = std::function< ComplexVector< Dim >(const Point< Dim > &)>
 
template<int Dim>
using ComplexCurlField = std::function< ComplexCurl< Dim >(const Point< Dim > &)>
 
template<int Dim>
using CellFormFactory = std::function< MaxwellForm< Dim >(Index)>
 

Functions

AxisymmetricSystem assemble_axisymmetric (const fespace::NedelecDofMap< 2 > &nedelec, const fespace::DofMap< 2 > &h1, int m, const AxisymmetricFormFactory &form_of_cell, int extra_order=2, std::span< const Index > cells={})
 
SparseMatrix axisymmetric_gradient (const fespace::DofMap< 2 > &h1, const fespace::NedelecDofMap< 2 > &nedelec, int m)
 
std::vector< Index > axis_cells (const mesh::Mesh< 2 > &mesh, Real tolerance=1e-10)
 Cells with at least one vertex on the axis r = 0 (within tolerance times the largest r).
 
ConicalTensor conical_scaled_curl_tensor (const ConicalTensor &inverse_permeability)
 
ConicalTensor conical_scaled_tensor (const ConicalTensor &permittivity)
 
bool is_diagonal (const ConicalTensor &tensor) noexcept
 True if the off-diagonal entries are exactly zero.
 
ConicalElement element_conical (const fespace::NedelecBasis< 2 > &nd_basis, const fespace::H1Basis< 2 > &h1_basis, const mesh::CellGeometry< 2 > &geometry, const QuadratureRule< 2 > &rule, Real beta, const ConicalForm &form)
 Integrates the conical forms over one cell with the given rule.
 
ConicalSystem assemble_conical (const fespace::NedelecDofMap< 2 > &nedelec, const fespace::DofMap< 2 > &h1, Real beta, const ConicalFormFactory &form_of_cell, int extra_order=2, std::span< const Index > cells={})
 
SparseMatrix conical_gradient (const fespace::DofMap< 2 > &h1, const fespace::NedelecDofMap< 2 > &nedelec, Real beta)
 
template<int Dim>
DirichletData dirichlet_values (const fespace::DofMap< Dim > &dofs, std::span< const Index > facets, const std::type_identity_t< ScalarField< Dim > > &g)
 
template<int Dim>
DirichletData dirichlet_values (const fespace::DofMap< Dim > &dofs, mesh::Tag tag, const std::type_identity_t< ScalarField< Dim > > &g)
 Same for all facets carrying tag.
 
template<int Dim>
DirichletData tangential_dirichlet_values (const fespace::NedelecDofMap< Dim > &dofs, std::span< const Index > facets, const std::type_identity_t< ComplexVectorField< Dim > > &g)
 
template<int Dim>
DirichletData tangential_dirichlet_values (const fespace::NedelecDofMap< Dim > &dofs, mesh::Tag tag, const std::type_identity_t< ComplexVectorField< Dim > > &g)
 Same for all facets carrying tag.
 
template<int Dim>
std::vector< DirichletData > tangential_dirichlet_values (const fespace::NedelecDofMap< Dim > &dofs, std::span< const Index > facets, std::span< const std::type_identity_t< ComplexVectorField< Dim > > > gs)
 
template<int Dim, class Counts >
DirichletData homogeneous_dirichlet (const fespace::EntityDofMap< Dim, Counts > &dofs, std::span< const Index > facets)
 
DirichletData merge_dirichlet (std::span< const DirichletData > parts)
 Union of several constraint sets; a DoF listed twice keeps its first value.
 
void apply_dirichlet (SparseMatrix &matrix, Vector &rhs, const DirichletData &data)
 
template DirichletData dirichlet_values< 2 > (const fespace::DofMap< 2 > &, std::span< const Index >, const ScalarField< 2 > &)
 
template DirichletData dirichlet_values< 3 > (const fespace::DofMap< 3 > &, std::span< const Index >, const ScalarField< 3 > &)
 
template DirichletData dirichlet_values< 2 > (const fespace::DofMap< 2 > &, mesh::Tag, const ScalarField< 2 > &)
 
template DirichletData dirichlet_values< 3 > (const fespace::DofMap< 3 > &, mesh::Tag, const ScalarField< 3 > &)
 
template std::vector< DirichletData > tangential_dirichlet_values< 2 > (const fespace::NedelecDofMap< 2 > &, std::span< const Index >, std::span< const ComplexVectorField< 2 > >)
 
template std::vector< DirichletData > tangential_dirichlet_values< 3 > (const fespace::NedelecDofMap< 3 > &, std::span< const Index >, std::span< const ComplexVectorField< 3 > >)
 
template DirichletData tangential_dirichlet_values< 2 > (const fespace::NedelecDofMap< 2 > &, std::span< const Index >, const ComplexVectorField< 2 > &)
 
template DirichletData tangential_dirichlet_values< 3 > (const fespace::NedelecDofMap< 3 > &, std::span< const Index >, const ComplexVectorField< 3 > &)
 
template DirichletData tangential_dirichlet_values< 2 > (const fespace::NedelecDofMap< 2 > &, mesh::Tag, const ComplexVectorField< 2 > &)
 
template DirichletData tangential_dirichlet_values< 3 > (const fespace::NedelecDofMap< 3 > &, mesh::Tag, const ComplexVectorField< 3 > &)
 
template DirichletData homogeneous_dirichlet< 2, fespace::H1Counts > (const fespace::DofMap< 2 > &, std::span< const Index >)
 
template DirichletData homogeneous_dirichlet< 3, fespace::H1Counts > (const fespace::DofMap< 3 > &, std::span< const Index >)
 
template DirichletData homogeneous_dirichlet< 2, fespace::NedelecCounts > (const fespace::NedelecDofMap< 2 > &, std::span< const Index >)
 
template DirichletData homogeneous_dirichlet< 3, fespace::NedelecCounts > (const fespace::NedelecDofMap< 3 > &, std::span< const Index >)
 
template<int Dim>
SparseMatrix discrete_gradient (const fespace::DofMap< Dim > &h1, const fespace::NedelecDofMap< Dim > &nedelec)
 
SparseMatrix extract (const SparseMatrix &matrix, std::span< const Index > rows, std::span< const Index > cols)
 Rows rows and columns cols of a sparse matrix as a new compressed matrix.
 
std::vector< Index > free_dofs (Index n, std::span< const Index > constrained)
 Complement of a sorted list of constrained DoFs in 0..n-1, ascending.
 
template SparseMatrix discrete_gradient< 2 > (const fespace::DofMap< 2 > &, const fespace::NedelecDofMap< 2 > &)
 
template SparseMatrix discrete_gradient< 3 > (const fespace::DofMap< 3 > &, const fespace::NedelecDofMap< 3 > &)
 
template<int Dim>
VoigtMatrix< Dim > isotropic_stiffness (Real youngs_modulus, Real poisson_ratio)
 
template<int Dim>
VoigtVector< Dim > to_voigt_strain (const ComplexTensor< Dim > &strain)
 Voigt vector of a symmetric strain tensor (engineering shears 2 ε_ij).
 
template<int Dim>
ComplexTensor< Dim > from_voigt_stress (const VoigtVector< Dim > &stress)
 Symmetric stress tensor of a Voigt stress vector (no factor 2 on the shears).
 
template<int Dim>
AssembledSystem assemble_elasticity (const fespace::DofMap< Dim > &dofs, const ElasticFormFactory< Dim > &form_of_cell, int extra_order=2, StaticCondensation *condensation=nullptr)
 
AxisymmetricVoigtMatrix axisymmetric_isotropic_stiffness (Real youngs_modulus, Real poisson_ratio)
 
AssembledSystem assemble_axisymmetric_elasticity (const fespace::DofMap< 2 > &dofs, const AxisymmetricElasticFormFactory &form_of_cell, int extra_order=2, StaticCondensation *condensation=nullptr)
 
template<int Dim>
Eigen::Matrix< Complex, Dim, 1 > evaluate_displacement (const fespace::DofMap< Dim > &dofs, const Vector &u, Index c, const Point< Dim > &xi)
 Displacement (Dim components) of the block coefficients u at reference point ξ of cell c.
 
template<int Dim>
ComplexTensor< Dim > evaluate_displacement_gradient (const fespace::DofMap< Dim > &dofs, const Vector &u, Index c, const Point< Dim > &xi)
 Displacement gradient \( (\nabla u)_{ij} = \partial_j u_i \) at reference point ξ of cell c.
 
template<int Dim>
ErrorNorms elasticity_error (const fespace::DofMap< Dim > &dofs, const Vector &u, const std::function< Eigen::Matrix< Complex, Dim, 1 >(const Point< Dim > &)> &exact, const std::function< ComplexTensor< Dim >(const Point< Dim > &)> &exact_gradient, int extra_order=2)
 
template<int Dim>
Vector point_functional (const fespace::NedelecDofMap< Dim > &dofs, const mesh::PointLocator< Dim > &locator, std::span< const Point< Dim > > points, std::span< const ComplexVector< Dim > > value_weights, std::span< const ComplexCurl< Dim > > curl_weights={})
 
template<int Dim>
Vector point_functional (const fespace::DofMap< Dim > &dofs, const mesh::PointLocator< Dim > &locator, std::span< const Point< Dim > > points, std::span< const Complex > weights)
 
Complex evaluate_functional (const Vector &q, const Vector &e_h)
 \( Q(E_h) = q^\top e_h \).
 
template Vector point_functional< 2 > (const fespace::DofMap< 2 > &, const mesh::PointLocator< 2 > &, std::span< const Point< 2 > >, std::span< const Complex >)
 
template Vector point_functional< 3 > (const fespace::DofMap< 3 > &, const mesh::PointLocator< 3 > &, std::span< const Point< 3 > >, std::span< const Complex >)
 
template Vector point_functional< 2 > (const fespace::NedelecDofMap< 2 > &, const mesh::PointLocator< 2 > &, std::span< const Point< 2 > >, std::span< const ComplexVector< 2 > >, std::span< const ComplexCurl< 2 > >)
 
template Vector point_functional< 3 > (const fespace::NedelecDofMap< 3 > &, const mesh::PointLocator< 3 > &, std::span< const Point< 3 > >, std::span< const ComplexVector< 3 > >, std::span< const ComplexCurl< 3 > >)
 
template<int Dim>
ElementContribution element_h1 (const fespace::H1Basis< Dim > &basis, const mesh::CellGeometry< Dim > &geometry, const QuadratureRule< Dim > &rule, const ScalarForm< Dim > &form)
 
template<int Dim>
AssembledSystem assemble_h1 (const fespace::DofMap< Dim > &dofs, const ScalarForm< Dim > &form, int extra_order=2)
 
template<int Dim>
ErrorNorms h1_error (const fespace::DofMap< Dim > &dofs, const Vector &u_h, const std::type_identity_t< ScalarField< Dim > > &u, const std::type_identity_t< VectorField< Dim > > &grad_u, int extra_order=2)
 
template<int Dim>
Complex evaluate_h1 (const fespace::DofMap< Dim > &dofs, const Vector &u_h, Index c, const Point< Dim > &xi)
 Value of the discrete function at reference point ξ of cell c.
 
template<int Dim>
std::optional< Complex > evaluate_h1 (const fespace::DofMap< Dim > &dofs, const Vector &u_h, const mesh::PointLocator< Dim > &locator, const Point< Dim > &x)
 
template ElementContribution element_h1< 2 > (const fespace::H1Basis< 2 > &, const mesh::CellGeometry< 2 > &, const QuadratureRule< 2 > &, const ScalarForm< 2 > &)
 
template ElementContribution element_h1< 3 > (const fespace::H1Basis< 3 > &, const mesh::CellGeometry< 3 > &, const QuadratureRule< 3 > &, const ScalarForm< 3 > &)
 
template<int Dim>
AssembledSystem assemble_h1 (const fespace::DofMap< Dim > &dofs, const std::type_identity_t< ScalarFormFactory< Dim > > &form_of_cell, int extra_order=2, StaticCondensation *condensation=nullptr)
 
template AssembledSystem assemble_h1< 2 > (const fespace::DofMap< 2 > &, const ScalarForm< 2 > &, int)
 
template AssembledSystem assemble_h1< 3 > (const fespace::DofMap< 3 > &, const ScalarForm< 3 > &, int)
 
template AssembledSystem assemble_h1< 2 > (const fespace::DofMap< 2 > &, const ScalarFormFactory< 2 > &, int, StaticCondensation *)
 
template AssembledSystem assemble_h1< 3 > (const fespace::DofMap< 3 > &, const ScalarFormFactory< 3 > &, int, StaticCondensation *)
 
template ErrorNorms h1_error< 2 > (const fespace::DofMap< 2 > &, const Vector &, const ScalarField< 2 > &, const VectorField< 2 > &, int)
 
template ErrorNorms h1_error< 3 > (const fespace::DofMap< 3 > &, const Vector &, const ScalarField< 3 > &, const VectorField< 3 > &, int)
 
template Complex evaluate_h1< 2 > (const fespace::DofMap< 2 > &, const Vector &, Index, const Point< 2 > &)
 
template Complex evaluate_h1< 3 > (const fespace::DofMap< 3 > &, const Vector &, Index, const Point< 3 > &)
 
template std::optional< Complex > evaluate_h1< 2 > (const fespace::DofMap< 2 > &, const Vector &, const mesh::PointLocator< 2 > &, const Point< 2 > &)
 
template std::optional< Complex > evaluate_h1< 3 > (const fespace::DofMap< 3 > &, const Vector &, const mesh::PointLocator< 3 > &, const Point< 3 > &)
 
template<int Dim, class Counts >
fespace::Constraints hanging_constraints (const fespace::EntityDofMap< Dim, Counts > &dofs, Real tolerance=1e-12)
 
fespace::Constraints restrict_constraints (const fespace::Constraints &full, std::span< const Index > free)
 
fespace::Constraints block_constraints (const fespace::Constraints &first, const fespace::Constraints &second)
 
template fespace::Constraints hanging_constraints< 2, fespace::H1Counts > (const fespace::DofMap< 2 > &, Real)
 
template fespace::Constraints hanging_constraints< 3, fespace::H1Counts > (const fespace::DofMap< 3 > &, Real)
 
template fespace::Constraints hanging_constraints< 2, fespace::NedelecCounts > (const fespace::NedelecDofMap< 2 > &, Real)
 
template fespace::Constraints hanging_constraints< 3, fespace::NedelecCounts > (const fespace::NedelecDofMap< 3 > &, Real)
 
template<int Dim>
DofValues interpolate (const fespace::DofMap< Dim > &dofs, const EntitySet< Dim > &set, const std::type_identity_t< ScalarSampler< Dim > > &g)
 
template<int Dim>
DofValues interpolate (const fespace::NedelecDofMap< Dim > &dofs, const EntitySet< Dim > &set, const std::type_identity_t< VectorSampler< Dim > > &g)
 H(curl): tangential projections along edges and on faces, full projection in the interior.
 
template<int Dim>
std::vector< DofValues > interpolate (const fespace::DofMap< Dim > &dofs, const EntitySet< Dim > &set, std::span< const std::type_identity_t< ScalarSampler< Dim > > > gs)
 
template<int Dim>
std::vector< DofValues > interpolate (const fespace::NedelecDofMap< Dim > &dofs, const EntitySet< Dim > &set, std::span< const std::type_identity_t< VectorSampler< Dim > > > gs)
 
template<int Dim>
Vector interpolate (const fespace::DofMap< Dim > &dofs, const std::type_identity_t< ScalarSampler< Dim > > &g)
 Interpolation on the whole mesh as a coefficient vector.
 
template<int Dim>
Vector interpolate (const fespace::NedelecDofMap< Dim > &dofs, const std::type_identity_t< VectorSampler< Dim > > &g)
 
template<int Dim>
ScalarSampler< Dim > physical_sampler (const std::function< Complex(const Point< Dim > &)> &g)
 Sampler of a physical field g(x) (cell and ξ ignored).
 
template<int Dim>
VectorSampler< Dim > physical_sampler (const ComplexVectorField< Dim > &g)
 
template DofValues interpolate< 2 > (const fespace::DofMap< 2 > &, const EntitySet< 2 > &, const ScalarSampler< 2 > &)
 
template DofValues interpolate< 3 > (const fespace::DofMap< 3 > &, const EntitySet< 3 > &, const ScalarSampler< 3 > &)
 
template DofValues interpolate< 2 > (const fespace::NedelecDofMap< 2 > &, const EntitySet< 2 > &, const VectorSampler< 2 > &)
 
template DofValues interpolate< 3 > (const fespace::NedelecDofMap< 3 > &, const EntitySet< 3 > &, const VectorSampler< 3 > &)
 
template std::vector< DofValues > interpolate< 2 > (const fespace::DofMap< 2 > &, const EntitySet< 2 > &, std::span< const ScalarSampler< 2 > >)
 
template std::vector< DofValues > interpolate< 3 > (const fespace::DofMap< 3 > &, const EntitySet< 3 > &, std::span< const ScalarSampler< 3 > >)
 
template std::vector< DofValues > interpolate< 2 > (const fespace::NedelecDofMap< 2 > &, const EntitySet< 2 > &, std::span< const VectorSampler< 2 > >)
 
template std::vector< DofValues > interpolate< 3 > (const fespace::NedelecDofMap< 3 > &, const EntitySet< 3 > &, std::span< const VectorSampler< 3 > >)
 
template Vector interpolate< 2 > (const fespace::DofMap< 2 > &, const ScalarSampler< 2 > &)
 
template Vector interpolate< 3 > (const fespace::DofMap< 3 > &, const ScalarSampler< 3 > &)
 
template Vector interpolate< 2 > (const fespace::NedelecDofMap< 2 > &, const VectorSampler< 2 > &)
 
template Vector interpolate< 3 > (const fespace::NedelecDofMap< 3 > &, const VectorSampler< 3 > &)
 
template ScalarSampler< 2 > physical_sampler< 2 > (const std::function< Complex(const Point< 2 > &)> &)
 
template ScalarSampler< 3 > physical_sampler< 3 > (const std::function< Complex(const Point< 3 > &)> &)
 
template VectorSampler< 2 > physical_sampler< 2 > (const ComplexVectorField< 2 > &)
 
template VectorSampler< 3 > physical_sampler< 3 > (const ComplexVectorField< 3 > &)
 
template<int Dim>
MaxwellElement element_maxwell (const fespace::NedelecBasis< Dim > &basis, const mesh::CellGeometry< Dim > &geometry, const QuadratureRule< Dim > &rule, const MaxwellForm< Dim > &form)
 
template<int Dim>
MaxwellSystem assemble_maxwell (const fespace::NedelecDofMap< Dim > &dofs, const MaxwellForm< Dim > &form, int extra_order=2)
 Assembles S, M and b over all cells with rules exact for degree 2 p_c + extra_order.
 
template<int Dim>
MaxwellSystem assemble_maxwell (const fespace::NedelecDofMap< Dim > &dofs, const std::type_identity_t< CellFormFactory< Dim > > &form_of_cell, int extra_order=2)
 
template<int Dim>
AssembledSystem assemble_maxwell_operator (const fespace::NedelecDofMap< Dim > &dofs, const std::type_identity_t< CellFormFactory< Dim > > &form_of_cell, Real k_squared, int extra_order=2, StaticCondensation *condensation=nullptr)
 
template<int Dim>
Vector assemble_maxwell_load (const fespace::NedelecDofMap< Dim > &dofs, const std::type_identity_t< CellFormFactory< Dim > > &form_of_cell, int extra_order=2)
 Load vector \( \ell(v) \) alone (new sources on an unchanged operator).
 
template<int Dim>
Matrix assemble_maxwell_loads (const fespace::NedelecDofMap< Dim > &dofs, std::span< const std::type_identity_t< CellFormFactory< Dim > > > forms, int extra_order=2)
 
template<int Dim>
HcurlErrorNorms hcurl_error (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, const std::type_identity_t< ComplexVectorField< Dim > > &field, const std::type_identity_t< std::function< ComplexCurl< Dim >(const Point< Dim > &)> > &curl, int extra_order=2)
 
template<int Dim>
HcurlErrorNorms hcurl_error (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, const std::type_identity_t< ComplexVectorField< Dim > > &field, const std::type_identity_t< std::function< ComplexCurl< Dim >(const Point< Dim > &)> > &curl, std::span< const Index > cells, int extra_order=2)
 The same restricted to the given cells (e.g. the interior without the PML).
 
template<int Dim>
ComplexVector< Dim > evaluate_hcurl (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Index c, const Point< Dim > &xi)
 Physical value of the discrete field at reference point ξ of cell c.
 
template<int Dim>
ComplexCurl< Dim > evaluate_hcurl_curl (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, Index c, const Point< Dim > &xi)
 
template<int Dim>
std::optional< ComplexVector< Dim > > evaluate_hcurl (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, const mesh::PointLocator< Dim > &locator, const Point< Dim > &x)
 
template<int Dim>
std::optional< ComplexCurl< Dim > > evaluate_hcurl_curl (const fespace::NedelecDofMap< Dim > &dofs, const Vector &e_h, const mesh::PointLocator< Dim > &locator, const Point< Dim > &x)
 
template MaxwellElement element_maxwell< 2 > (const fespace::NedelecBasis< 2 > &, const mesh::CellGeometry< 2 > &, const QuadratureRule< 2 > &, const MaxwellForm< 2 > &)
 
template MaxwellElement element_maxwell< 3 > (const fespace::NedelecBasis< 3 > &, const mesh::CellGeometry< 3 > &, const QuadratureRule< 3 > &, const MaxwellForm< 3 > &)
 
template MaxwellSystem assemble_maxwell< 2 > (const fespace::NedelecDofMap< 2 > &, const MaxwellForm< 2 > &, int)
 
template MaxwellSystem assemble_maxwell< 3 > (const fespace::NedelecDofMap< 3 > &, const MaxwellForm< 3 > &, int)
 
template MaxwellSystem assemble_maxwell< 2 > (const fespace::NedelecDofMap< 2 > &, const CellFormFactory< 2 > &, int)
 
template MaxwellSystem assemble_maxwell< 3 > (const fespace::NedelecDofMap< 3 > &, const CellFormFactory< 3 > &, int)
 
template AssembledSystem assemble_maxwell_operator< 2 > (const fespace::NedelecDofMap< 2 > &, const CellFormFactory< 2 > &, Real, int, StaticCondensation *)
 
template AssembledSystem assemble_maxwell_operator< 3 > (const fespace::NedelecDofMap< 3 > &, const CellFormFactory< 3 > &, Real, int, StaticCondensation *)
 
template Vector assemble_maxwell_load< 2 > (const fespace::NedelecDofMap< 2 > &, const CellFormFactory< 2 > &, int)
 
template Vector assemble_maxwell_load< 3 > (const fespace::NedelecDofMap< 3 > &, const CellFormFactory< 3 > &, int)
 
template Matrix assemble_maxwell_loads< 2 > (const fespace::NedelecDofMap< 2 > &, std::span< const CellFormFactory< 2 > >, int)
 
template Matrix assemble_maxwell_loads< 3 > (const fespace::NedelecDofMap< 3 > &, std::span< const CellFormFactory< 3 > >, int)
 
template HcurlErrorNorms hcurl_error< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, const ComplexVectorField< 2 > &, const std::function< ComplexCurl< 2 >(const Point< 2 > &)> &, int)
 
template HcurlErrorNorms hcurl_error< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, const ComplexVectorField< 3 > &, const std::function< ComplexCurl< 3 >(const Point< 3 > &)> &, int)
 
template HcurlErrorNorms hcurl_error< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, const ComplexVectorField< 2 > &, const std::function< ComplexCurl< 2 >(const Point< 2 > &)> &, std::span< const Index >, int)
 
template HcurlErrorNorms hcurl_error< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, const ComplexVectorField< 3 > &, const std::function< ComplexCurl< 3 >(const Point< 3 > &)> &, std::span< const Index >, int)
 
template ComplexVector< 2 > evaluate_hcurl< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Index, const Point< 2 > &)
 
template ComplexVector< 3 > evaluate_hcurl< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Index, const Point< 3 > &)
 
template ComplexCurl< 2 > evaluate_hcurl_curl< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, Index, const Point< 2 > &)
 
template ComplexCurl< 3 > evaluate_hcurl_curl< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, Index, const Point< 3 > &)
 
template std::optional< ComplexVector< 2 > > evaluate_hcurl< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, const mesh::PointLocator< 2 > &, const Point< 2 > &)
 
template std::optional< ComplexVector< 3 > > evaluate_hcurl< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, const mesh::PointLocator< 3 > &, const Point< 3 > &)
 
template std::optional< ComplexCurl< 2 > > evaluate_hcurl_curl< 2 > (const fespace::NedelecDofMap< 2 > &, const Vector &, const mesh::PointLocator< 2 > &, const Point< 2 > &)
 
template std::optional< ComplexCurl< 3 > > evaluate_hcurl_curl< 3 > (const fespace::NedelecDofMap< 3 > &, const Vector &, const mesh::PointLocator< 3 > &, const Point< 3 > &)
 
template<int Dim>
Complex bloch_phase (const Point< Dim > &k, const Point< Dim > &shift)
 Bloch phase \( e^{i k\cdot a} \) of the Bloch wave vector k and lattice vector a.
 
template<int Dim>
fespace::Constraints bloch_constraints (const fespace::NedelecDofMap< Dim > &dofs, std::span< const PeriodicPair< Dim > > pairs, Real tolerance=1e-8)
 
template<int Dim>
fespace::Constraints bloch_constraints (const fespace::DofMap< Dim > &dofs, std::span< const PeriodicPair< Dim > > pairs, Real tolerance=1e-8)
 
template fespace::Constraints bloch_constraints< 2 > (const fespace::NedelecDofMap< 2 > &, std::span< const PeriodicPair< 2 > >, Real)
 
template fespace::Constraints bloch_constraints< 3 > (const fespace::NedelecDofMap< 3 > &, std::span< const PeriodicPair< 3 > >, Real)
 
template fespace::Constraints bloch_constraints< 2 > (const fespace::DofMap< 2 > &, std::span< const PeriodicPair< 2 > >, Real)
 
template fespace::Constraints bloch_constraints< 3 > (const fespace::DofMap< 3 > &, std::span< const PeriodicPair< 3 > >, Real)
 
template<int Dim, class Counts >
Vector prolongate (const fespace::EntityDofMap< Dim, Counts > &old_dofs, const Vector &old_coefficients, const fespace::EntityDofMap< Dim, Counts > &new_dofs, const mesh::RefinementStep &step)
 
template Vector prolongate< 2, fespace::H1Counts > (const fespace::DofMap< 2 > &, const Vector &, const fespace::DofMap< 2 > &, const mesh::RefinementStep &)
 
template Vector prolongate< 3, fespace::H1Counts > (const fespace::DofMap< 3 > &, const Vector &, const fespace::DofMap< 3 > &, const mesh::RefinementStep &)
 
template Vector prolongate< 2, fespace::NedelecCounts > (const fespace::NedelecDofMap< 2 > &, const Vector &, const fespace::NedelecDofMap< 2 > &, const mesh::RefinementStep &)
 
template Vector prolongate< 3, fespace::NedelecCounts > (const fespace::NedelecDofMap< 3 > &, const Vector &, const fespace::NedelecDofMap< 3 > &, const mesh::RefinementStep &)
 
QuadratureRule< 1 > gauss_legendre (int n)
 
QuadratureRule< 1 > gauss_jacobi (int n, Real alpha, Real beta)
 
template<int Dim>
QuadratureRule< Dim > simplex_quadrature (int order)
 
template QuadratureRule< 1 > simplex_quadrature< 1 > (int)
 
template QuadratureRule< 2 > simplex_quadrature< 2 > (int)
 
template QuadratureRule< 3 > simplex_quadrature< 3 > (int)
 
void scatter (Vector &global, std::span< const Index > dofs, const Vector &local)
 Adds the element vector local to global at the positions dofs.
 
Vector gather (const Vector &global, std::span< const Index > dofs)
 Gathers global at the positions dofs into a dense vector.
 

Variables

template<int Dim>
constexpr int kVoigtSize = Dim == 2 ? 3 : 6
 Number of Voigt components: 3 in 2D, 6 in 3D.
 

Typedef Documentation

◆ AxisymmetricElasticFormFactory

◆ AxisymmetricFormFactory

◆ AxisymmetricTensorField

using hpfem::assembly::AxisymmetricTensorField = typedef std::function<Eigen::Matrix<Complex, 3, 1>(const Point<2>&)>

Diagonal tensor in cylindrical components (r, φ, z) as a function of the meridian point.

◆ AxisymmetricVoigtMatrix

using hpfem::assembly::AxisymmetricVoigtMatrix = typedef Eigen::Matrix<Complex, 4, 4>

Axisymmetric elasticity (m = 0, no torsion) on the meridian half-plane x = r ≥ 0, y = z (ADR-0016 S5): the unknowns (u_r | u_z) on two copies of the scalar map, the strains in Voigt order (rr, zz, θθ, rz) with \( \varepsilon_{\theta\theta} = u_r / r \) and the engineering shear \( \gamma_{rz} = \partial_z u_r + \partial_r u_z \), integrals with the weight r (the factor 2π dropped, as in the axisymmetric Maxwell forms). u_r must vanish on the axis (the caller eliminates it).

◆ AxisymmetricVoigtVector

using hpfem::assembly::AxisymmetricVoigtVector = typedef Eigen::Matrix<Complex, 4, 1>

◆ CellFormFactory

template<int Dim>
using hpfem::assembly::CellFormFactory = typedef std::function<MaxwellForm<Dim>(Index)>

Per-cell coefficients (materials by tag, PML regions): form_of_cell(c) supplies the form of cell c.

◆ ComplexCurl

template<int Dim>
using hpfem::assembly::ComplexCurl = typedef Eigen::Matrix<Complex, Dim == 2 ? 1 : 3, 1>

Curl of a physical field: scalar (1-vector) in 2D, 3-vector in 3D.

◆ ComplexCurlField

template<int Dim>
using hpfem::assembly::ComplexCurlField = typedef std::function<ComplexCurl<Dim>(const Point<Dim>&)>

◆ ComplexTensor

template<int Dim>
using hpfem::assembly::ComplexTensor = typedef Eigen::Matrix<Complex, Dim, Dim>

◆ ComplexVector

template<int Dim>
using hpfem::assembly::ComplexVector = typedef Eigen::Matrix<Complex, Dim, 1>

◆ ComplexVectorField

template<int Dim>
using hpfem::assembly::ComplexVectorField = typedef std::function<ComplexVector<Dim>(const Point<Dim>&)>

◆ ConicalFormFactory

using hpfem::assembly::ConicalFormFactory = typedef std::function<ConicalForm(Index)>

◆ ConicalSourceField

using hpfem::assembly::ConicalSourceField = typedef std::function<Eigen::Matrix<Complex, 3, 1>(const Point<2>&)>

Vector in the scaled components (x, y, v) as a function of the point (sources).

◆ ConicalTensor

using hpfem::assembly::ConicalTensor = typedef Eigen::Matrix<Complex, 3, 3>

Physical 3×3 tensor in Cartesian components (x, y, z).

◆ ConicalTensorField

using hpfem::assembly::ConicalTensorField = typedef std::function<ConicalTensor(const Point<2>&)>

Tensor as a function of the point.

◆ CurlTensorField

template<int Dim>
using hpfem::assembly::CurlTensorField = typedef std::function<InversePermeabilityTensor<Dim>(const Point<Dim>&)>

◆ DirichletData

Constrained DoFs (sorted, unique) and their prescribed values.

◆ ElasticFormFactory

template<int Dim>
using hpfem::assembly::ElasticFormFactory = typedef std::function<ElasticForm<Dim>(Index)>

◆ InversePermeabilityTensor

template<int Dim>
using hpfem::assembly::InversePermeabilityTensor = typedef Eigen::Matrix<Complex, Dim == 2 ? 1 : 3, Dim == 2 ? 1 : 3>

◆ PermittivityTensor

template<int Dim>
using hpfem::assembly::PermittivityTensor = typedef Eigen::Matrix<Complex, Dim, Dim>

Permittivity tensor ε (Dim × Dim) and inverse permeability tensor acting on curls.

◆ ReferenceScalarField

template<int Dim>
using hpfem::assembly::ReferenceScalarField = typedef std::function<Complex(const Point<Dim>& xi, const Point<Dim>& x)>

Source sampled at reference point ξ of the cell being assembled (physical point x): for sources given per cell, e.g. a discrete field of another space.

◆ ScalarField

template<int Dim>
using hpfem::assembly::ScalarField = typedef std::function<Complex(const Point<Dim>&)>

◆ ScalarFormFactory

template<int Dim>
using hpfem::assembly::ScalarFormFactory = typedef std::function<ScalarForm<Dim>(Index)>

Per-cell coefficients (materials by tag): form_of_cell(c) supplies the form of cell c; with condensation the interior DoFs are condensed (condensation.hpp).

◆ ScalarSampler

template<int Dim>
using hpfem::assembly::ScalarSampler = typedef std::function<Complex(Index cell, const Point<Dim>& xi, const Point<Dim>& x)>

Function to interpolate, sampled at the physical point x which is reference point ξ of the given cell (the cell is the one the interpolation evaluates the entity from).

◆ TensorField

template<int Dim>
using hpfem::assembly::TensorField = typedef std::function<PermittivityTensor<Dim>(const Point<Dim>&)>

◆ VectorField

template<int Dim>
using hpfem::assembly::VectorField = typedef std::function<Eigen::Matrix<Complex, Dim, 1>(const Point<Dim>&)>

◆ VectorSampler

template<int Dim>
using hpfem::assembly::VectorSampler = typedef std::function<ComplexVector<Dim>(Index cell, const Point<Dim>& xi, const Point<Dim>& x)>

◆ VoigtMatrix

template<int Dim>
using hpfem::assembly::VoigtMatrix = typedef Eigen::Matrix<Complex, kVoigtSize<Dim>, kVoigtSize<Dim> >

◆ VoigtVector

template<int Dim>
using hpfem::assembly::VoigtVector = typedef Eigen::Matrix<Complex, kVoigtSize<Dim>, 1>

Function Documentation

◆ apply_dirichlet()

void hpfem::assembly::apply_dirichlet ( SparseMatrix &  matrix,
Vector &  rhs,
const DirichletData &  data 
)

Eliminates the constrained DoFs symmetrically, keeping the system size: \( b \leftarrow b - A_{:,c}\,g_c \), rows and columns c cleared, \( A_{cc} = 1 \), \( b_c = g_c \). The solution of the modified system equals g on the constrained DoFs and solves the reduced problem on the free ones. O(nnz).

◆ assemble_axisymmetric()

AxisymmetricSystem hpfem::assembly::assemble_axisymmetric ( const fespace::NedelecDofMap< 2 > &  nedelec,
const fespace::DofMap< 2 > &  h1,
int  m,
const AxisymmetricFormFactory &  form_of_cell,
int  extra_order = 2,
std::span< const Index >  cells = {} 
)

Assembles the forms of azimuthal order m over all cells (or over cells only, e.g. the support of a source for a new load on a kept factorisation) with rules exact for degree 2 p_c + extra_order (plus 2 on cells touching the axis r = 0 and on curved cells).

Exceptions
InvalidArgumentif the maps belong to different meshes, a vertex has r < 0 or a cell index is out of range.

◆ assemble_axisymmetric_elasticity()

AssembledSystem hpfem::assembly::assemble_axisymmetric_elasticity ( const fespace::DofMap< 2 > &  dofs,
const AxisymmetricElasticFormFactory &  form_of_cell,
int  extra_order = 2,
StaticCondensation *  condensation = nullptr 
)

Stiffness matrix and load of the axisymmetric forms (size 2N), rules exact for degree 2 p + extra_order + 1 (the weight r).

Exceptions
InvalidArgumentif a cell has no stiffness or a quadrature point lies at r ≤ 0.

◆ assemble_conical()

ConicalSystem hpfem::assembly::assemble_conical ( const fespace::NedelecDofMap< 2 > &  nedelec,
const fespace::DofMap< 2 > &  h1,
Real  beta,
const ConicalFormFactory &  form_of_cell,
int  extra_order = 2,
std::span< const Index >  cells = {} 
)

Assembles the forms for the longitudinal wavenumber β over all cells (or over cells only, the rest contributing nothing) with rules exact for degree 2 p_c + extra_order (plus 2 on curved cells), in parallel over the cells with per-thread buffers.

Exceptions
InvalidArgumentif the maps belong to different meshes or a cell index is out of range.

◆ assemble_elasticity()

template<int Dim>
AssembledSystem hpfem::assembly::assemble_elasticity ( const fespace::DofMap< Dim > &  dofs,
const ElasticFormFactory< Dim > &  form_of_cell,
int  extra_order = 2,
StaticCondensation *  condensation = nullptr 
)

Stiffness matrix and load over all cells (size Dim·N), rules exact for degree 2 p_c + extra_order (plus 2 on curved cells). With condensation (of size Dim·N) the interior DoFs of all components are condensed cell by cell (condensation.hpp).

Exceptions
InvalidArgumentif a cell has no stiffness.

◆ assemble_h1() [1/2]

template<int Dim>
AssembledSystem hpfem::assembly::assemble_h1 ( const fespace::DofMap< Dim > &  dofs,
const ScalarForm< Dim > &  form,
int  extra_order = 2 
)

Assembles matrix and right-hand side over all cells of the DoF map. Each cell uses a rule exact for degree 2 p_c + extra_order on the reference cell (extra_order covers non-polynomial coefficients and the Jacobian of curved cells).

◆ assemble_h1() [2/2]

template<int Dim>
AssembledSystem hpfem::assembly::assemble_h1 ( const fespace::DofMap< Dim > &  dofs,
const std::type_identity_t< ScalarFormFactory< Dim > > &  form_of_cell,
int  extra_order = 2,
StaticCondensation *  condensation = nullptr 
)

◆ assemble_h1< 2 >() [1/2]

template AssembledSystem hpfem::assembly::assemble_h1< 2 > ( const fespace::DofMap< 2 > &  ,
const ScalarForm< 2 > &  ,
int   
)
extern

◆ assemble_h1< 2 >() [2/2]

template AssembledSystem hpfem::assembly::assemble_h1< 2 > ( const fespace::DofMap< 2 > &  ,
const ScalarFormFactory< 2 > &  ,
int  ,
StaticCondensation *   
)
extern

◆ assemble_h1< 3 >() [1/2]

template AssembledSystem hpfem::assembly::assemble_h1< 3 > ( const fespace::DofMap< 3 > &  ,
const ScalarForm< 3 > &  ,
int   
)
extern

◆ assemble_h1< 3 >() [2/2]

template AssembledSystem hpfem::assembly::assemble_h1< 3 > ( const fespace::DofMap< 3 > &  ,
const ScalarFormFactory< 3 > &  ,
int  ,
StaticCondensation *   
)
extern

◆ assemble_maxwell() [1/2]

template<int Dim>
MaxwellSystem hpfem::assembly::assemble_maxwell ( const fespace::NedelecDofMap< Dim > &  dofs,
const MaxwellForm< Dim > &  form,
int  extra_order = 2 
)

Assembles S, M and b over all cells with rules exact for degree 2 p_c + extra_order.

◆ assemble_maxwell() [2/2]

template<int Dim>
MaxwellSystem hpfem::assembly::assemble_maxwell ( const fespace::NedelecDofMap< Dim > &  dofs,
const std::type_identity_t< CellFormFactory< Dim > > &  form_of_cell,
int  extra_order = 2 
)

◆ assemble_maxwell< 2 >() [1/2]

template MaxwellSystem hpfem::assembly::assemble_maxwell< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const CellFormFactory< 2 > &  ,
int   
)
extern

◆ assemble_maxwell< 2 >() [2/2]

template MaxwellSystem hpfem::assembly::assemble_maxwell< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const MaxwellForm< 2 > &  ,
int   
)
extern

◆ assemble_maxwell< 3 >() [1/2]

template MaxwellSystem hpfem::assembly::assemble_maxwell< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const CellFormFactory< 3 > &  ,
int   
)
extern

◆ assemble_maxwell< 3 >() [2/2]

template MaxwellSystem hpfem::assembly::assemble_maxwell< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const MaxwellForm< 3 > &  ,
int   
)
extern

◆ assemble_maxwell_load()

template<int Dim>
Vector hpfem::assembly::assemble_maxwell_load ( const fespace::NedelecDofMap< Dim > &  dofs,
const std::type_identity_t< CellFormFactory< Dim > > &  form_of_cell,
int  extra_order = 2 
)

Load vector \( \ell(v) \) alone (new sources on an unchanged operator).

◆ assemble_maxwell_load< 2 >()

template Vector hpfem::assembly::assemble_maxwell_load< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const CellFormFactory< 2 > &  ,
int   
)
extern

◆ assemble_maxwell_load< 3 >()

template Vector hpfem::assembly::assemble_maxwell_load< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const CellFormFactory< 3 > &  ,
int   
)
extern

◆ assemble_maxwell_loads()

template<int Dim>
Matrix hpfem::assembly::assemble_maxwell_loads ( const fespace::NedelecDofMap< Dim > &  dofs,
std::span< const std::type_identity_t< CellFormFactory< Dim > > >  forms,
int  extra_order = 2 
)

Several load vectors in one pass over the cells (the incident fields of an angle sweep): column k of the result is assemble_maxwell_load(dofs, forms[k], extra_order), but the geometry, the quadrature rule and the basis functions of a cell are evaluated once for all loads and only the source values differ. The cells are coloured so that no two cells of a colour share a DoF, and every colour is assembled in parallel straight into the result (no per-thread copies of the n × k matrix). Loads whose quadrature order differs on a cell are integrated one by one on that cell, so every column agrees with the single-load assembly up to the summation order (round-off).

◆ assemble_maxwell_loads< 2 >()

template Matrix hpfem::assembly::assemble_maxwell_loads< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
std::span< const CellFormFactory< 2 > >  ,
int   
)
extern

◆ assemble_maxwell_loads< 3 >()

template Matrix hpfem::assembly::assemble_maxwell_loads< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
std::span< const CellFormFactory< 3 > >  ,
int   
)
extern

◆ assemble_maxwell_operator()

template<int Dim>
AssembledSystem hpfem::assembly::assemble_maxwell_operator ( const fespace::NedelecDofMap< Dim > &  dofs,
const std::type_identity_t< CellFormFactory< Dim > > &  form_of_cell,
Real  k_squared,
int  extra_order = 2,
StaticCondensation *  condensation = nullptr 
)

Assembles the operator \( A = S - k^2 M \) and the load in one pass over the cells (per-cell forms), optionally with static condensation of the interior DoFs: the condensed matrix carries identity rows for them, condensation->recover fills them in after the solve (condensation.hpp).

◆ assemble_maxwell_operator< 2 >()

template AssembledSystem hpfem::assembly::assemble_maxwell_operator< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const CellFormFactory< 2 > &  ,
Real  ,
int  ,
StaticCondensation *   
)
extern

◆ assemble_maxwell_operator< 3 >()

template AssembledSystem hpfem::assembly::assemble_maxwell_operator< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const CellFormFactory< 3 > &  ,
Real  ,
int  ,
StaticCondensation *   
)
extern

◆ axis_cells()

std::vector< Index > hpfem::assembly::axis_cells ( const mesh::Mesh< 2 > &  mesh,
Real  tolerance = 1e-10 
)

Cells with at least one vertex on the axis r = 0 (within tolerance times the largest r).

◆ axisymmetric_gradient()

SparseMatrix hpfem::assembly::axisymmetric_gradient ( const fespace::DofMap< 2 > &  h1,
const fespace::NedelecDofMap< 2 > &  nedelec,
int  m 
)

Gradient of order m on the block space: \( K_m = [G;\ m I] \) maps the H1 coefficients of ψ to the block coefficients of \( \nabla(\psi e^{im\varphi}) \) (G the 2D discrete gradient). Columns: h1.num_dofs(), rows: the block size.

◆ axisymmetric_isotropic_stiffness()

AxisymmetricVoigtMatrix hpfem::assembly::axisymmetric_isotropic_stiffness ( Real  youngs_modulus,
Real  poisson_ratio 
)

Isotropic stiffness in the order (rr, zz, θθ, rz).

Exceptions
InvalidArgumentas isotropic_stiffness.

◆ bloch_constraints() [1/2]

template<int Dim>
fespace::Constraints hpfem::assembly::bloch_constraints ( const fespace::DofMap< Dim > &  dofs,
std::span< const PeriodicPair< Dim > >  pairs,
Real  tolerance = 1e-8 
)

The same for the H1 space (scalar trace: vertex values, edge and face projections), e.g. the longitudinal field of the conical solver or the gauge space of a band structure.

◆ bloch_constraints() [2/2]

template<int Dim>
fespace::Constraints hpfem::assembly::bloch_constraints ( const fespace::NedelecDofMap< Dim > &  dofs,
std::span< const PeriodicPair< Dim > >  pairs,
Real  tolerance = 1e-8 
)

Constraints of the given periodic directions on the Nédélec space (tangential traces). tolerance (times the facet diameter) decides whether facets coincide, are nested or merely overlap; directions may share edges (box corners), the chained constraints are resolved by Constraints.

Exceptions
InvalidArgumentif a side has no facets or a slave facet overlaps no master facet.

◆ bloch_constraints< 2 >() [1/2]

template fespace::Constraints hpfem::assembly::bloch_constraints< 2 > ( const fespace::DofMap< 2 > &  ,
std::span< const PeriodicPair< 2 > >  ,
Real   
)
extern

◆ bloch_constraints< 2 >() [2/2]

template fespace::Constraints hpfem::assembly::bloch_constraints< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
std::span< const PeriodicPair< 2 > >  ,
Real   
)
extern

◆ bloch_constraints< 3 >() [1/2]

template fespace::Constraints hpfem::assembly::bloch_constraints< 3 > ( const fespace::DofMap< 3 > &  ,
std::span< const PeriodicPair< 3 > >  ,
Real   
)
extern

◆ bloch_constraints< 3 >() [2/2]

template fespace::Constraints hpfem::assembly::bloch_constraints< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
std::span< const PeriodicPair< 3 > >  ,
Real   
)
extern

◆ bloch_phase()

template<int Dim>
Complex hpfem::assembly::bloch_phase ( const Point< Dim > &  k,
const Point< Dim > &  shift 
)

Bloch phase \( e^{i k\cdot a} \) of the Bloch wave vector k and lattice vector a.

◆ block_constraints()

fespace::Constraints hpfem::assembly::block_constraints ( const fespace::Constraints &  first,
const fespace::Constraints &  second 
)

Constraints of a block vector \( (x_0, x_1) \): those of first on the leading block and those of second shifted by first.num_dofs().

◆ conical_gradient()

SparseMatrix hpfem::assembly::conical_gradient ( const fespace::DofMap< 2 > &  h1,
const fespace::NedelecDofMap< 2 > &  nedelec,
Real  beta 
)

Gradient of the block space: \( K_\beta = [G;\ \beta I] \) maps the H1 coefficients of ψ to the block coefficients of \( \nabla(\psi e^{i\beta z}) \). Columns: h1.num_dofs().

◆ conical_scaled_curl_tensor()

ConicalTensor hpfem::assembly::conical_scaled_curl_tensor ( const ConicalTensor &  inverse_permeability)

The tensors of the conical forms in the scaled components: \( \bar D\mu^{-1}D \) acting on \( c \) (entries times \( [[1,-1,-i],[-1,1,i],[i,-i,1]] \)) and \( D''\varepsilon D' \) acting on \( (E_x, E_y, v) \) (entries times \( [[1,1,i],[1,1,i],[-i,-i,1]] \)); the latter also maps a physical contrast \( \Delta\varepsilon\,E \) to the scaled source.

◆ conical_scaled_tensor()

ConicalTensor hpfem::assembly::conical_scaled_tensor ( const ConicalTensor &  permittivity)

◆ dirichlet_values() [1/2]

template<int Dim>
DirichletData hpfem::assembly::dirichlet_values ( const fespace::DofMap< Dim > &  dofs,
mesh::Tag  tag,
const std::type_identity_t< ScalarField< Dim > > &  g 
)

Same for all facets carrying tag.

◆ dirichlet_values() [2/2]

template<int Dim>
DirichletData hpfem::assembly::dirichlet_values ( const fespace::DofMap< Dim > &  dofs,
std::span< const Index >  facets,
const std::type_identity_t< ScalarField< Dim > > &  g 
)

Boundary values of g on the given facets as coefficients of the trace space (interpolate on the vertices, edges and faces of the facets): vertex DoFs take g(x_v); the edge DoFs of every edge of these facets take the L2 projection (along the edge) of the remainder onto the edge functions; in 3D the face DoFs take the projection of the remainder onto the face functions. For g in the trace space the result is exact; otherwise it is the hierarchical interpolant, accurate to order p + 1.

◆ dirichlet_values< 2 >() [1/2]

template DirichletData hpfem::assembly::dirichlet_values< 2 > ( const fespace::DofMap< 2 > &  ,
mesh::Tag  ,
const ScalarField< 2 > &   
)
extern

◆ dirichlet_values< 2 >() [2/2]

template DirichletData hpfem::assembly::dirichlet_values< 2 > ( const fespace::DofMap< 2 > &  ,
std::span< const Index >  ,
const ScalarField< 2 > &   
)
extern

◆ dirichlet_values< 3 >() [1/2]

template DirichletData hpfem::assembly::dirichlet_values< 3 > ( const fespace::DofMap< 3 > &  ,
mesh::Tag  ,
const ScalarField< 3 > &   
)
extern

◆ dirichlet_values< 3 >() [2/2]

template DirichletData hpfem::assembly::dirichlet_values< 3 > ( const fespace::DofMap< 3 > &  ,
std::span< const Index >  ,
const ScalarField< 3 > &   
)
extern

◆ discrete_gradient()

template<int Dim>
SparseMatrix hpfem::assembly::discrete_gradient ( const fespace::DofMap< Dim > &  h1,
const fespace::NedelecDofMap< Dim > &  nedelec 
)

Sparse N_ND × N_H1 matrix with S G = 0 for every curl–curl stiffness matrix S. Both maps must live on the same mesh with the same cell orders.

Exceptions
InvalidArgumentotherwise.

◆ discrete_gradient< 2 >()

template SparseMatrix hpfem::assembly::discrete_gradient< 2 > ( const fespace::DofMap< 2 > &  ,
const fespace::NedelecDofMap< 2 > &   
)
extern

◆ discrete_gradient< 3 >()

template SparseMatrix hpfem::assembly::discrete_gradient< 3 > ( const fespace::DofMap< 3 > &  ,
const fespace::NedelecDofMap< 3 > &   
)
extern

◆ elasticity_error()

template<int Dim>
ErrorNorms hpfem::assembly::elasticity_error ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u,
const std::function< Eigen::Matrix< Complex, Dim, 1 >(const Point< Dim > &)> &  exact,
const std::function< ComplexTensor< Dim >(const Point< Dim > &)> &  exact_gradient,
int  extra_order = 2 
)

Errors of the block coefficients u against an exact displacement and its gradient \( (\nabla u)_{ij} = \partial_j u_i \): L2 of the displacement and of its gradient, and the norms of the exact fields (relative errors).

◆ element_conical()

ConicalElement hpfem::assembly::element_conical ( const fespace::NedelecBasis< 2 > &  nd_basis,
const fespace::H1Basis< 2 > &  h1_basis,
const mesh::CellGeometry< 2 > &  geometry,
const QuadratureRule< 2 > &  rule,
Real  beta,
const ConicalForm &  form 
)

Integrates the conical forms over one cell with the given rule.

◆ element_h1()

template<int Dim>
ElementContribution hpfem::assembly::element_h1 ( const fespace::H1Basis< Dim > &  basis,
const mesh::CellGeometry< Dim > &  geometry,
const QuadratureRule< Dim > &  rule,
const ScalarForm< Dim > &  form 
)

Integrates the form over one cell with the given rule (reference points, weights). Physical gradients are \( J^{-T}\nabla_\xi\phi \), the measure is \( |\det J| \).

◆ element_h1< 2 >()

template ElementContribution hpfem::assembly::element_h1< 2 > ( const fespace::H1Basis< 2 > &  ,
const mesh::CellGeometry< 2 > &  ,
const QuadratureRule< 2 > &  ,
const ScalarForm< 2 > &   
)
extern

◆ element_h1< 3 >()

template ElementContribution hpfem::assembly::element_h1< 3 > ( const fespace::H1Basis< 3 > &  ,
const mesh::CellGeometry< 3 > &  ,
const QuadratureRule< 3 > &  ,
const ScalarForm< 3 > &   
)
extern

◆ element_maxwell()

template<int Dim>
MaxwellElement hpfem::assembly::element_maxwell ( const fespace::NedelecBasis< Dim > &  basis,
const mesh::CellGeometry< Dim > &  geometry,
const QuadratureRule< Dim > &  rule,
const MaxwellForm< Dim > &  form 
)

Integrates the forms over one cell. Physical fields are the covariant Piola images \( \phi = J^{-T}\hat\phi \), curls \( \nabla\times\phi = J\,\hat\nabla\times\hat\phi / \det J \) (3D) and \( \hat\nabla\times\hat\phi / \det J \) (2D), the measure is \( |\det J| \).

◆ element_maxwell< 2 >()

template MaxwellElement hpfem::assembly::element_maxwell< 2 > ( const fespace::NedelecBasis< 2 > &  ,
const mesh::CellGeometry< 2 > &  ,
const QuadratureRule< 2 > &  ,
const MaxwellForm< 2 > &   
)
extern

◆ element_maxwell< 3 >()

template MaxwellElement hpfem::assembly::element_maxwell< 3 > ( const fespace::NedelecBasis< 3 > &  ,
const mesh::CellGeometry< 3 > &  ,
const QuadratureRule< 3 > &  ,
const MaxwellForm< 3 > &   
)
extern

◆ evaluate_displacement()

template<int Dim>
Eigen::Matrix< Complex, Dim, 1 > hpfem::assembly::evaluate_displacement ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u,
Index  c,
const Point< Dim > &  xi 
)

Displacement (Dim components) of the block coefficients u at reference point ξ of cell c.

◆ evaluate_displacement_gradient()

template<int Dim>
ComplexTensor< Dim > hpfem::assembly::evaluate_displacement_gradient ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u,
Index  c,
const Point< Dim > &  xi 
)

Displacement gradient \( (\nabla u)_{ij} = \partial_j u_i \) at reference point ξ of cell c.

◆ evaluate_functional()

Complex hpfem::assembly::evaluate_functional ( const Vector &  q,
const Vector &  e_h 
)
inline

\( Q(E_h) = q^\top e_h \).

◆ evaluate_h1() [1/2]

template<int Dim>
std::optional< Complex > hpfem::assembly::evaluate_h1 ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u_h,
const mesh::PointLocator< Dim > &  locator,
const Point< Dim > &  x 
)

Value of the discrete function at the physical point x located with locator (built on dofs.mesh()), or nothing if x lies outside the mesh.

◆ evaluate_h1() [2/2]

template<int Dim>
Complex hpfem::assembly::evaluate_h1 ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u_h,
Index  c,
const Point< Dim > &  xi 
)

Value of the discrete function at reference point ξ of cell c.

◆ evaluate_h1< 2 >() [1/2]

template std::optional< Complex > hpfem::assembly::evaluate_h1< 2 > ( const fespace::DofMap< 2 > &  ,
const Vector &  ,
const mesh::PointLocator< 2 > &  ,
const Point< 2 > &   
)
extern

◆ evaluate_h1< 2 >() [2/2]

template Complex hpfem::assembly::evaluate_h1< 2 > ( const fespace::DofMap< 2 > &  ,
const Vector &  ,
Index  ,
const Point< 2 > &   
)
extern

◆ evaluate_h1< 3 >() [1/2]

template std::optional< Complex > hpfem::assembly::evaluate_h1< 3 > ( const fespace::DofMap< 3 > &  ,
const Vector &  ,
const mesh::PointLocator< 3 > &  ,
const Point< 3 > &   
)
extern

◆ evaluate_h1< 3 >() [2/2]

template Complex hpfem::assembly::evaluate_h1< 3 > ( const fespace::DofMap< 3 > &  ,
const Vector &  ,
Index  ,
const Point< 3 > &   
)
extern

◆ evaluate_hcurl() [1/2]

template<int Dim>
std::optional< ComplexVector< Dim > > hpfem::assembly::evaluate_hcurl ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
const mesh::PointLocator< Dim > &  locator,
const Point< Dim > &  x 
)

Value / curl at the physical point x located with locator (built on dofs.mesh()), or nothing if x lies outside the mesh.

◆ evaluate_hcurl() [2/2]

template<int Dim>
ComplexVector< Dim > hpfem::assembly::evaluate_hcurl ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Index  c,
const Point< Dim > &  xi 
)

Physical value of the discrete field at reference point ξ of cell c.

◆ evaluate_hcurl< 2 >() [1/2]

template std::optional< ComplexVector< 2 > > hpfem::assembly::evaluate_hcurl< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
const mesh::PointLocator< 2 > &  ,
const Point< 2 > &   
)
extern

◆ evaluate_hcurl< 2 >() [2/2]

template ComplexVector< 2 > hpfem::assembly::evaluate_hcurl< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Index  ,
const Point< 2 > &   
)
extern

◆ evaluate_hcurl< 3 >() [1/2]

template std::optional< ComplexVector< 3 > > hpfem::assembly::evaluate_hcurl< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
const mesh::PointLocator< 3 > &  ,
const Point< 3 > &   
)
extern

◆ evaluate_hcurl< 3 >() [2/2]

template ComplexVector< 3 > hpfem::assembly::evaluate_hcurl< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Index  ,
const Point< 3 > &   
)
extern

◆ evaluate_hcurl_curl() [1/2]

template<int Dim>
std::optional< ComplexCurl< Dim > > hpfem::assembly::evaluate_hcurl_curl ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
const mesh::PointLocator< Dim > &  locator,
const Point< Dim > &  x 
)

◆ evaluate_hcurl_curl() [2/2]

template<int Dim>
ComplexCurl< Dim > hpfem::assembly::evaluate_hcurl_curl ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
Index  c,
const Point< Dim > &  xi 
)

Physical curl of the discrete field at reference point ξ of cell c (e.g. for \( H = (i\omega\mu)^{-1}\nabla\times E \)).

◆ evaluate_hcurl_curl< 2 >() [1/2]

template std::optional< ComplexCurl< 2 > > hpfem::assembly::evaluate_hcurl_curl< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
const mesh::PointLocator< 2 > &  ,
const Point< 2 > &   
)
extern

◆ evaluate_hcurl_curl< 2 >() [2/2]

template ComplexCurl< 2 > hpfem::assembly::evaluate_hcurl_curl< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
Index  ,
const Point< 2 > &   
)
extern

◆ evaluate_hcurl_curl< 3 >() [1/2]

template std::optional< ComplexCurl< 3 > > hpfem::assembly::evaluate_hcurl_curl< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
const mesh::PointLocator< 3 > &  ,
const Point< 3 > &   
)
extern

◆ evaluate_hcurl_curl< 3 >() [2/2]

template ComplexCurl< 3 > hpfem::assembly::evaluate_hcurl_curl< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
Index  ,
const Point< 3 > &   
)
extern

◆ extract()

SparseMatrix hpfem::assembly::extract ( const SparseMatrix &  matrix,
std::span< const Index >  rows,
std::span< const Index >  cols 
)

Rows rows and columns cols of a sparse matrix as a new compressed matrix.

◆ free_dofs()

std::vector< Index > hpfem::assembly::free_dofs ( Index  n,
std::span< const Index >  constrained 
)

Complement of a sorted list of constrained DoFs in 0..n-1, ascending.

◆ from_voigt_stress()

template<int Dim>
ComplexTensor< Dim > hpfem::assembly::from_voigt_stress ( const VoigtVector< Dim > &  stress)

Symmetric stress tensor of a Voigt stress vector (no factor 2 on the shears).

◆ gather()

Vector hpfem::assembly::gather ( const Vector &  global,
std::span< const Index >  dofs 
)

Gathers global at the positions dofs into a dense vector.

◆ gauss_jacobi()

QuadratureRule< 1 > hpfem::assembly::gauss_jacobi ( int  n,
Real  alpha,
Real  beta 
)

Gauss–Jacobi rule with n points on [0,1] for the weight \( (1-s)^\alpha s^\beta \), \( \alpha, \beta > -1 \): \( \sum_j w_j g(s_j) = \int_0^1 g(s)(1-s)^\alpha s^\beta\,ds \) exactly for polynomials g of degree ≤ 2n − 1. The weight function is not part of the returned weights' integrand, i.e. the rule is meant for integrands of the form \( g(s)(1-s)^\alpha s^\beta \).

◆ gauss_legendre()

QuadratureRule< 1 > hpfem::assembly::gauss_legendre ( int  n)

Gauss–Legendre rule with n points on [0,1], exact to degree 2n − 1.

Exceptions
InvalidArgumentfor n < 1.

◆ h1_error()

template<int Dim>
ErrorNorms hpfem::assembly::h1_error ( const fespace::DofMap< Dim > &  dofs,
const Vector &  u_h,
const std::type_identity_t< ScalarField< Dim > > &  u,
const std::type_identity_t< VectorField< Dim > > &  grad_u,
int  extra_order = 2 
)

◆ h1_error< 2 >()

template ErrorNorms hpfem::assembly::h1_error< 2 > ( const fespace::DofMap< 2 > &  ,
const Vector &  ,
const ScalarField< 2 > &  ,
const VectorField< 2 > &  ,
int   
)
extern

◆ h1_error< 3 >()

template ErrorNorms hpfem::assembly::h1_error< 3 > ( const fespace::DofMap< 3 > &  ,
const Vector &  ,
const ScalarField< 3 > &  ,
const VectorField< 3 > &  ,
int   
)
extern

◆ hanging_constraints()

template<int Dim, class Counts >
fespace::Constraints hpfem::assembly::hanging_constraints ( const fespace::EntityDofMap< Dim, Counts > &  dofs,
Real  tolerance = 1e-12 
)

Constraints of all hanging DoFs of the DoF map's mesh (none on a conforming mesh). Coefficients below tolerance (relative to 1) are dropped. O(#hanging entities · p^Dim).

◆ hanging_constraints< 2, fespace::H1Counts >()

◆ hanging_constraints< 2, fespace::NedelecCounts >()

◆ hanging_constraints< 3, fespace::H1Counts >()

◆ hanging_constraints< 3, fespace::NedelecCounts >()

◆ hcurl_error() [1/2]

template<int Dim>
HcurlErrorNorms hpfem::assembly::hcurl_error ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
const std::type_identity_t< ComplexVectorField< Dim > > &  field,
const std::type_identity_t< std::function< ComplexCurl< Dim >(const Point< Dim > &)>  ,
&  curl,
int  extra_order = 2 
)

◆ hcurl_error() [2/2]

template<int Dim>
HcurlErrorNorms hpfem::assembly::hcurl_error ( const fespace::NedelecDofMap< Dim > &  dofs,
const Vector &  e_h,
const std::type_identity_t< ComplexVectorField< Dim > > &  field,
const std::type_identity_t< std::function< ComplexCurl< Dim >(const Point< Dim > &)>  ,
&  curl,
std::span< const Index >  cells,
int  extra_order = 2 
)

The same restricted to the given cells (e.g. the interior without the PML).

◆ hcurl_error< 2 >() [1/2]

template HcurlErrorNorms hpfem::assembly::hcurl_error< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
const ComplexVectorField< 2 > &  ,
const std::function< ComplexCurl< 2 >(const Point< 2 > &)> &  ,
int   
)
extern

◆ hcurl_error< 2 >() [2/2]

template HcurlErrorNorms hpfem::assembly::hcurl_error< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
const ComplexVectorField< 2 > &  ,
const std::function< ComplexCurl< 2 >(const Point< 2 > &)> &  ,
std::span< const Index >  ,
int   
)
extern

◆ hcurl_error< 3 >() [1/2]

template HcurlErrorNorms hpfem::assembly::hcurl_error< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
const ComplexVectorField< 3 > &  ,
const std::function< ComplexCurl< 3 >(const Point< 3 > &)> &  ,
int   
)
extern

◆ hcurl_error< 3 >() [2/2]

template HcurlErrorNorms hpfem::assembly::hcurl_error< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
const ComplexVectorField< 3 > &  ,
const std::function< ComplexCurl< 3 >(const Point< 3 > &)> &  ,
std::span< const Index >  ,
int   
)
extern

◆ homogeneous_dirichlet()

template<int Dim, class Counts >
DirichletData hpfem::assembly::homogeneous_dirichlet ( const fespace::EntityDofMap< Dim, Counts > &  dofs,
std::span< const Index >  facets 
)

All DoFs on the facets, value 0: homogeneous Dirichlet for H1, PEC (vanishing tangential trace) for the Nédélec space.

◆ homogeneous_dirichlet< 2, fespace::H1Counts >()

template DirichletData hpfem::assembly::homogeneous_dirichlet< 2, fespace::H1Counts > ( const fespace::DofMap< 2 > &  ,
std::span< const Index >   
)
extern

◆ homogeneous_dirichlet< 2, fespace::NedelecCounts >()

template DirichletData hpfem::assembly::homogeneous_dirichlet< 2, fespace::NedelecCounts > ( const fespace::NedelecDofMap< 2 > &  ,
std::span< const Index >   
)
extern

◆ homogeneous_dirichlet< 3, fespace::H1Counts >()

template DirichletData hpfem::assembly::homogeneous_dirichlet< 3, fespace::H1Counts > ( const fespace::DofMap< 3 > &  ,
std::span< const Index >   
)
extern

◆ homogeneous_dirichlet< 3, fespace::NedelecCounts >()

template DirichletData hpfem::assembly::homogeneous_dirichlet< 3, fespace::NedelecCounts > ( const fespace::NedelecDofMap< 3 > &  ,
std::span< const Index >   
)
extern

◆ interpolate() [1/6]

template<int Dim>
DofValues hpfem::assembly::interpolate ( const fespace::DofMap< Dim > &  dofs,
const EntitySet< Dim > &  set,
const std::type_identity_t< ScalarSampler< Dim > > &  g 
)

Interpolates g on the entities of the set: H1 (vertex values, edge, face and interior projections of the remainder).

◆ interpolate() [2/6]

template<int Dim>
std::vector< DofValues > hpfem::assembly::interpolate ( const fespace::DofMap< Dim > &  dofs,
const EntitySet< Dim > &  set,
std::span< const std::type_identity_t< ScalarSampler< Dim > > >  gs 
)

Several functions on the same entities in one pass (geometry, basis traces and Gram matrices once): one DofValues per function, the same DoFs in each; column j equals the single interpolation of gs[j] up to round-off.

◆ interpolate() [3/6]

template<int Dim>
Vector hpfem::assembly::interpolate ( const fespace::DofMap< Dim > &  dofs,
const std::type_identity_t< ScalarSampler< Dim > > &  g 
)

Interpolation on the whole mesh as a coefficient vector.

◆ interpolate() [4/6]

template<int Dim>
DofValues hpfem::assembly::interpolate ( const fespace::NedelecDofMap< Dim > &  dofs,
const EntitySet< Dim > &  set,
const std::type_identity_t< VectorSampler< Dim > > &  g 
)

H(curl): tangential projections along edges and on faces, full projection in the interior.

◆ interpolate() [5/6]

template<int Dim>
std::vector< DofValues > hpfem::assembly::interpolate ( const fespace::NedelecDofMap< Dim > &  dofs,
const EntitySet< Dim > &  set,
std::span< const std::type_identity_t< VectorSampler< Dim > > >  gs 
)

◆ interpolate() [6/6]

template<int Dim>
Vector hpfem::assembly::interpolate ( const fespace::NedelecDofMap< Dim > &  dofs,
const std::type_identity_t< VectorSampler< Dim > > &  g 
)

◆ interpolate< 2 >() [1/6]

template DofValues hpfem::assembly::interpolate< 2 > ( const fespace::DofMap< 2 > &  ,
const EntitySet< 2 > &  ,
const ScalarSampler< 2 > &   
)
extern

◆ interpolate< 2 >() [2/6]

template std::vector< DofValues > hpfem::assembly::interpolate< 2 > ( const fespace::DofMap< 2 > &  ,
const EntitySet< 2 > &  ,
std::span< const ScalarSampler< 2 > >   
)
extern

◆ interpolate< 2 >() [3/6]

template Vector hpfem::assembly::interpolate< 2 > ( const fespace::DofMap< 2 > &  ,
const ScalarSampler< 2 > &   
)
extern

◆ interpolate< 2 >() [4/6]

template DofValues hpfem::assembly::interpolate< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const EntitySet< 2 > &  ,
const VectorSampler< 2 > &   
)
extern

◆ interpolate< 2 >() [5/6]

template std::vector< DofValues > hpfem::assembly::interpolate< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const EntitySet< 2 > &  ,
std::span< const VectorSampler< 2 > >   
)
extern

◆ interpolate< 2 >() [6/6]

template Vector hpfem::assembly::interpolate< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const VectorSampler< 2 > &   
)
extern

◆ interpolate< 3 >() [1/6]

template DofValues hpfem::assembly::interpolate< 3 > ( const fespace::DofMap< 3 > &  ,
const EntitySet< 3 > &  ,
const ScalarSampler< 3 > &   
)
extern

◆ interpolate< 3 >() [2/6]

template std::vector< DofValues > hpfem::assembly::interpolate< 3 > ( const fespace::DofMap< 3 > &  ,
const EntitySet< 3 > &  ,
std::span< const ScalarSampler< 3 > >   
)
extern

◆ interpolate< 3 >() [3/6]

template Vector hpfem::assembly::interpolate< 3 > ( const fespace::DofMap< 3 > &  ,
const ScalarSampler< 3 > &   
)
extern

◆ interpolate< 3 >() [4/6]

template DofValues hpfem::assembly::interpolate< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const EntitySet< 3 > &  ,
const VectorSampler< 3 > &   
)
extern

◆ interpolate< 3 >() [5/6]

template std::vector< DofValues > hpfem::assembly::interpolate< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const EntitySet< 3 > &  ,
std::span< const VectorSampler< 3 > >   
)
extern

◆ interpolate< 3 >() [6/6]

template Vector hpfem::assembly::interpolate< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const VectorSampler< 3 > &   
)
extern

◆ is_diagonal()

bool hpfem::assembly::is_diagonal ( const ConicalTensor &  tensor)
noexcept

True if the off-diagonal entries are exactly zero.

◆ isotropic_stiffness()

template<int Dim>
VoigtMatrix< Dim > hpfem::assembly::isotropic_stiffness ( Real  youngs_modulus,
Real  poisson_ratio 
)

Isotropic stiffness in Voigt notation from Young's modulus E [Pa] and Poisson's ratio ν: \( \lambda = E\nu/((1+\nu)(1-2\nu)) \), \( \mu = E/(2(1+\nu)) \); in 2D the plane-strain matrix (ε_zz = 0).

Exceptions
InvalidArgumentfor E ≤ 0 or ν ∉ (−1, 0.5).

◆ merge_dirichlet()

DirichletData hpfem::assembly::merge_dirichlet ( std::span< const DirichletData >  parts)

Union of several constraint sets; a DoF listed twice keeps its first value.

◆ physical_sampler() [1/2]

template<int Dim>
VectorSampler< Dim > hpfem::assembly::physical_sampler ( const ComplexVectorField< Dim > &  g)

◆ physical_sampler() [2/2]

template<int Dim>
ScalarSampler< Dim > hpfem::assembly::physical_sampler ( const std::function< Complex(const Point< Dim > &)> &  g)

Sampler of a physical field g(x) (cell and ξ ignored).

◆ physical_sampler< 2 >() [1/2]

template VectorSampler< 2 > hpfem::assembly::physical_sampler< 2 > ( const ComplexVectorField< 2 > &  )
extern

◆ physical_sampler< 2 >() [2/2]

template ScalarSampler< 2 > hpfem::assembly::physical_sampler< 2 > ( const std::function< Complex(const Point< 2 > &)> &  )
extern

◆ physical_sampler< 3 >() [1/2]

template VectorSampler< 3 > hpfem::assembly::physical_sampler< 3 > ( const ComplexVectorField< 3 > &  )
extern

◆ physical_sampler< 3 >() [2/2]

template ScalarSampler< 3 > hpfem::assembly::physical_sampler< 3 > ( const std::function< Complex(const Point< 3 > &)> &  )
extern

◆ point_functional() [1/2]

template<int Dim>
Vector hpfem::assembly::point_functional ( const fespace::DofMap< Dim > &  dofs,
const mesh::PointLocator< Dim > &  locator,
std::span< const Point< Dim > >  points,
std::span< const Complex >  weights 
)

The same on an H1 space: \( Q(u) = \sum_j u(x_j)\,w_j \) (the longitudinal unknown of the conical solver, physics/conical_goal.hpp).

Exceptions
InvalidArgumentif a point lies outside the mesh or the spans differ in size.

◆ point_functional() [2/2]

template<int Dim>
Vector hpfem::assembly::point_functional ( const fespace::NedelecDofMap< Dim > &  dofs,
const mesh::PointLocator< Dim > &  locator,
std::span< const Point< Dim > >  points,
std::span< const ComplexVector< Dim > >  value_weights,
std::span< const ComplexCurl< Dim > >  curl_weights = {} 
)

Vector q of the functional sampled at the given physical points with value weights \( w_j \) and (optional, empty span) curl weights \( v_j \). O(#points · p^Dim).

Exceptions
InvalidArgumentif a point lies outside the mesh or the spans differ in size.

◆ point_functional< 2 >() [1/2]

template Vector hpfem::assembly::point_functional< 2 > ( const fespace::DofMap< 2 > &  ,
const mesh::PointLocator< 2 > &  ,
std::span< const Point< 2 > >  ,
std::span< const Complex >   
)
extern

◆ point_functional< 2 >() [2/2]

template Vector hpfem::assembly::point_functional< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
const mesh::PointLocator< 2 > &  ,
std::span< const Point< 2 > >  ,
std::span< const ComplexVector< 2 > >  ,
std::span< const ComplexCurl< 2 > >   
)
extern

◆ point_functional< 3 >() [1/2]

template Vector hpfem::assembly::point_functional< 3 > ( const fespace::DofMap< 3 > &  ,
const mesh::PointLocator< 3 > &  ,
std::span< const Point< 3 > >  ,
std::span< const Complex >   
)
extern

◆ point_functional< 3 >() [2/2]

template Vector hpfem::assembly::point_functional< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
const mesh::PointLocator< 3 > &  ,
std::span< const Point< 3 > >  ,
std::span< const ComplexVector< 3 > >  ,
std::span< const ComplexCurl< 3 > >   
)
extern

◆ prolongate()

template<int Dim, class Counts >
Vector hpfem::assembly::prolongate ( const fespace::EntityDofMap< Dim, Counts > &  old_dofs,
const Vector &  old_coefficients,
const fespace::EntityDofMap< Dim, Counts > &  new_dofs,
const mesh::RefinementStep &  step 
)

Coefficients of the old function on the new DoF map; step relates the new mesh to the old one.

Exceptions
InvalidArgumentif the sizes do not match.

◆ prolongate< 2, fespace::H1Counts >()

template Vector hpfem::assembly::prolongate< 2, fespace::H1Counts > ( const fespace::DofMap< 2 > &  ,
const Vector &  ,
const fespace::DofMap< 2 > &  ,
const mesh::RefinementStep &   
)
extern

◆ prolongate< 2, fespace::NedelecCounts >()

template Vector hpfem::assembly::prolongate< 2, fespace::NedelecCounts > ( const fespace::NedelecDofMap< 2 > &  ,
const Vector &  ,
const fespace::NedelecDofMap< 2 > &  ,
const mesh::RefinementStep &   
)
extern

◆ prolongate< 3, fespace::H1Counts >()

template Vector hpfem::assembly::prolongate< 3, fespace::H1Counts > ( const fespace::DofMap< 3 > &  ,
const Vector &  ,
const fespace::DofMap< 3 > &  ,
const mesh::RefinementStep &   
)
extern

◆ prolongate< 3, fespace::NedelecCounts >()

template Vector hpfem::assembly::prolongate< 3, fespace::NedelecCounts > ( const fespace::NedelecDofMap< 3 > &  ,
const Vector &  ,
const fespace::NedelecDofMap< 3 > &  ,
const mesh::RefinementStep &   
)
extern

◆ restrict_constraints()

fespace::Constraints hpfem::assembly::restrict_constraints ( const fespace::Constraints &  full,
std::span< const Index >  free 
)

The constraints of full restricted to the DoFs listed in free (e.g. after PEC elimination): slaves and masters are renumbered to their positions in free; masters that are not free are dropped, a slave whose masters are all eliminated is set to zero.

◆ scatter()

void hpfem::assembly::scatter ( Vector &  global,
std::span< const Index >  dofs,
const Vector &  local 
)

Adds the element vector local to global at the positions dofs.

◆ simplex_quadrature()

template<int Dim>
QuadratureRule< Dim > hpfem::assembly::simplex_quadrature ( int  order)

Rule on the reference simplex exact for total degree ≤ order (≥ 0), built by collapsing Gauss–Jacobi rules (n = ⌈(order+1)/2⌉ points per direction, n^Dim in total). All weights are positive and all points lie strictly inside the simplex. For Dim = 1 this is gauss_legendre(n).

◆ simplex_quadrature< 1 >()

template QuadratureRule< 1 > hpfem::assembly::simplex_quadrature< 1 > ( int  )
extern

◆ simplex_quadrature< 2 >()

template QuadratureRule< 2 > hpfem::assembly::simplex_quadrature< 2 > ( int  )
extern

◆ simplex_quadrature< 3 >()

template QuadratureRule< 3 > hpfem::assembly::simplex_quadrature< 3 > ( int  )
extern

◆ tangential_dirichlet_values() [1/3]

template<int Dim>
DirichletData hpfem::assembly::tangential_dirichlet_values ( const fespace::NedelecDofMap< Dim > &  dofs,
mesh::Tag  tag,
const std::type_identity_t< ComplexVectorField< Dim > > &  g 
)

Same for all facets carrying tag.

◆ tangential_dirichlet_values() [2/3]

template<int Dim>
DirichletData hpfem::assembly::tangential_dirichlet_values ( const fespace::NedelecDofMap< Dim > &  dofs,
std::span< const Index >  facets,
const std::type_identity_t< ComplexVectorField< Dim > > &  g 
)

Prescribed tangential trace \( n\times E = n\times g \) on the given facets as coefficients of the Nédélec trace space: for every edge of these facets the L2 projection (along the edge) of \( g\cdot t \) onto the edge functions; in 3D the face DoFs take the projection of the remaining tangential part onto the face functions. For \( g \) with a trace in the discrete trace space the result is exact (the DoF values of the discrete field), otherwise the hierarchical interpolant, accurate to order p.

◆ tangential_dirichlet_values() [3/3]

template<int Dim>
std::vector< DirichletData > hpfem::assembly::tangential_dirichlet_values ( const fespace::NedelecDofMap< Dim > &  dofs,
std::span< const Index >  facets,
std::span< const std::type_identity_t< ComplexVectorField< Dim > > >  gs 
)

The traces of several fields on the same facets in one pass (the incident fields of an angle sweep): one DirichletData per field with the same DoFs, each equal to the single call up to round-off.

◆ tangential_dirichlet_values< 2 >() [1/3]

◆ tangential_dirichlet_values< 2 >() [2/3]

template DirichletData hpfem::assembly::tangential_dirichlet_values< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
std::span< const Index >  ,
const ComplexVectorField< 2 > &   
)
extern

◆ tangential_dirichlet_values< 2 >() [3/3]

template std::vector< DirichletData > hpfem::assembly::tangential_dirichlet_values< 2 > ( const fespace::NedelecDofMap< 2 > &  ,
std::span< const Index >  ,
std::span< const ComplexVectorField< 2 > >   
)
extern

◆ tangential_dirichlet_values< 3 >() [1/3]

◆ tangential_dirichlet_values< 3 >() [2/3]

template DirichletData hpfem::assembly::tangential_dirichlet_values< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
std::span< const Index >  ,
const ComplexVectorField< 3 > &   
)
extern

◆ tangential_dirichlet_values< 3 >() [3/3]

template std::vector< DirichletData > hpfem::assembly::tangential_dirichlet_values< 3 > ( const fespace::NedelecDofMap< 3 > &  ,
std::span< const Index >  ,
std::span< const ComplexVectorField< 3 > >   
)
extern

◆ to_voigt_strain()

template<int Dim>
VoigtVector< Dim > hpfem::assembly::to_voigt_strain ( const ComplexTensor< Dim > &  strain)

Voigt vector of a symmetric strain tensor (engineering shears 2 ε_ij).

Variable Documentation

◆ kVoigtSize

template<int Dim>
constexpr int hpfem::assembly::kVoigtSize = Dim == 2 ? 3 : 6
inlineconstexpr

Number of Voigt components: 3 in 2D, 6 in 3D.