SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::discretization::backend::mfem Namespace Reference

Namespaces

namespace  detail
 

Classes

class  BasisEvaluation
 Represents an element-local basis evaluation operator, supporting dense or tensor contractions, pointwise mappings, and transpose application. More...
 
struct  BasisWorkspace
 Reusable scratch storage for basis contractions, reducing repeated allocations. More...
 
struct  CoefficientTracking
 Track coefficient values using an owned snapshot and the identity of their binding. More...
 
class  DofMap
 A mapping from a full MFEM finite-element space to a reduced set of DOFs that are supporter by the given element support. That is to say that if one has some set of dofs D (perhaps it looks like [0, 1, 2, 3, 4] as a hypothetical) and dofs 0, 2, and 4 are associated to domain A while 1 and 3 are associated to domain B. Then if one were to construct a DofMap with element support [1, 0, 1, 0, 1] (where 1 indicates that the element is supported and 0 indicates that it is not) then the reduced dof map would be [0, 2, 4] and the full to reduced map would be [-1, -1, 0, -1, 1]. More...
 
class  DofSelection
 A selection of supported DOFs from a term binding, with boundary attribute information. The purpose here is to allow for the selection of a subset of DOFs from a term binding, such as those associated with a particular boundary, while still retaining the ability to validate the selection against the underlying mesh and term binding. More...
 
class  ElementCoordinates
 One element's native orientation and its supported full/reduced coefficient coordinates. More...
 
struct  ElementReconstruction
 An element's radial reconstruction; the enclosing plan owns its profile. More...
 
class  FieldValues
 Read a field using the same representation and mappings as its equation operators. More...
 
struct  OwnedBindings
 
struct  OwnedBindings< Context, utils::dependencies::KeyList< Keys... > >
 Keep typed bindings alive beside the resources they borrow; neither copying a configuration nor restoring it copies these resources. More...
 
class  ReconstructionPlan
 Immutable reconstruction selected on material-side surface elements and validated against their interfaces. More...
 
struct  Resources
 Own meshes and finite-element resources in reverse dependency order, for creation and archive restoration. More...
 
class  ScalarBoundaryTrace
 An immutable scalar interpolation operator from supported coefficients to selected residual nodes. More...
 
class  TensorBasis
 A class that represents a tensor basis for a finite element. This class is used to evaluate the basis functions and their derivatives at a set of reference points. More...
 
class  TensorBasisCache
 Share immutable tensor plans within one operator; copied rules are keyed by their contents. More...
 
struct  TensorWorkspace
 A workspace for tensor contractions to avoid repeated allocations and pack memory (TODO: does this actual pack memory in a useful manner when using mfem vectors? Probably something to look into). More...
 
class  TermBinding
 A runtime binding between a term descriptor and its MFEM finite-element space. This is used to project down the compile time term descriptors into runtime reinterpretations which can then be used to extract things like the list of dofs, the element support, and the mesh. Note that this is a child of DofMap, therefor all term bindings are also dof maps. More...
 

Concepts

concept  BoundaryTraceTerm
 Concept Limiting the input term to either a global scalar term or a spatial term of rank 0 in the H1 family. Outside of H1, the trace is a vector (e.g. the normal trace for a H(div) field or the tangential trace for a H(curl) field). Further, for higher rank H1 fields the trace is a tensor.
 

Enumerations

enum class  ReferenceOperation { value , gradient , value_and_gradient }
 Options enum to control what is actually evaluated at the reference points. More...
 
enum class  ContractionMode { automatic , dense }
 Options enum to control how the tensor contractions are performed. More...
 

Functions

std::vector< int > boundary_leaf_faces (::mfem::Mesh &mesh, const int attribute)
 Expand a selected coarse interface label onto its physical leaf faces, integrating each leaf once.
 
template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace make_boundary_trace (std::shared_ptr< const DofSelection > rows, const TermBinding< TermT, SchemaT > &input)
 Sample a continuous scalar field at the selected nodal H1 residual points.
 
template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace make_boundary_trace (std::shared_ptr< const DofSelection >, TermBinding< TermT, SchemaT > &&)=delete
 A trace borrows its input binding, so temporaries cannot supply its coefficient ordering.
 
template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace make_boundary_trace (std::shared_ptr< const DofSelection >, const TermBinding< TermT, SchemaT > &&)=delete
 Const temporary bindings have the same lifetime restriction.
 
template<domain::IsBoundary BoundaryT, blocks::SpatialTerm TermT, domain::schema::IsSchema SchemaT>
DofSelection select_boundary_dofs (const TermBinding< TermT, SchemaT > &binding)
 Select DOFs associated with a particular boundary from a term binding.
 
template<blocks::SpatialTerm Term, domain::schema::IsSchema Schema>
std::expected< std::vector< double >, std::string > reference_mass_diagonal (const TermBinding< Term, Schema > &binding)
 Measure the supported coefficients in their reference finite-element geometry.
 
template<typename Term, typename Binding>
std::shared_ptr< const ReconstructionPlan > make_reconstruction (const reconstruction::SurfacePower< Term > &specification, const Binding &binding)
 Resolve a surface-power request against a typed binding before publishing the discretization.
 

Enumeration Type Documentation

◆ ContractionMode

Options enum to control how the tensor contractions are performed.

Enumerator
automatic 

Automatically choose the contraction mode based on the number of points and dofs.

dense 

Use a dense contraction mode.

◆ ReferenceOperation

Options enum to control what is actually evaluated at the reference points.

Enumerator
value 

Evaluate the basis functions at the reference points.

gradient 

Evaluate the gradients of the basis functions at the reference points.

value_and_gradient 

Evaluate both the basis functions and their gradients at the reference points.

Function Documentation

◆ boundary_leaf_faces()

std::vector< int > serif::discretization::backend::mfem::boundary_leaf_faces ( ::mfem::Mesh & mesh,
const int attribute )
inlinenodiscard

Expand a selected coarse interface label onto its physical leaf faces, integrating each leaf once.

◆ make_boundary_trace() [1/3]

template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace serif::discretization::backend::mfem::make_boundary_trace ( std::shared_ptr< const DofSelection > rows,
const TermBinding< TermT, SchemaT > & input )
nodiscard

Sample a continuous scalar field at the selected nodal H1 residual points.

Note
Input and residual spaces may have different orders and numbering but must share a mesh. Discontinuous fields require an explicit physical trace convention and are intentionally excluded.

◆ make_boundary_trace() [2/3]

template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace serif::discretization::backend::mfem::make_boundary_trace ( std::shared_ptr< const DofSelection > ,
const TermBinding< TermT, SchemaT > &&  )
delete

Const temporary bindings have the same lifetime restriction.

◆ make_boundary_trace() [3/3]

template<BoundaryTraceTerm TermT, domain::schema::IsSchema SchemaT>
ScalarBoundaryTrace serif::discretization::backend::mfem::make_boundary_trace ( std::shared_ptr< const DofSelection > ,
TermBinding< TermT, SchemaT > &&  )
delete

A trace borrows its input binding, so temporaries cannot supply its coefficient ordering.

◆ make_reconstruction()

template<typename Term, typename Binding>
std::shared_ptr< const ReconstructionPlan > serif::discretization::backend::mfem::make_reconstruction ( const reconstruction::SurfacePower< Term > & specification,
const Binding & binding )
nodiscard

Resolve a surface-power request against a typed binding before publishing the discretization.

Note
Other forms add an ADL-visible make_reconstruction(specification, binding) overload returning an immutable ReconstructionPlan. Unsupported fields must report a SERiF error in that overload.

◆ reference_mass_diagonal()

template<blocks::SpatialTerm Term, domain::schema::IsSchema Schema>
std::expected< std::vector< double >, std::string > serif::discretization::backend::mfem::reference_mass_diagonal ( const TermBinding< Term, Schema > & binding)
nodiscard

Measure the supported coefficients in their reference finite-element geometry.

Returns
The exact mass-matrix diagonal in the binding's reduced ordering, or an invalid-metric diagnostic.
Note
The binding must remain current. Coordinates belong to the reference mesh, not a trial deformation.

◆ select_boundary_dofs()

template<domain::IsBoundary BoundaryT, blocks::SpatialTerm TermT, domain::schema::IsSchema SchemaT>
DofSelection serif::discretization::backend::mfem::select_boundary_dofs ( const TermBinding< TermT, SchemaT > & binding)
nodiscard

Select DOFs associated with a particular boundary from a term binding.

Template Parameters
BoundaryTThe boundary type to select. This must be a valid boundary in the domain schema of the term binding.
TermTThe term type of the term binding. This must be a valid term type in the domain schema of the term binding. (e.g. something like Density)
SchemaTThe domain schema type of the term binding. This must be a valid domain schema type that contains the specified boundary.
Parameters
bindingThe term binding from which to select DOFs. This must outlive the returned DOF selection.
Returns
A DofSelection object representing the selected DOFs associated with the specified boundary.