Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
266 lines
10 KiB
Groff
266 lines
10 KiB
Groff
.TH "serif::discretization::backend::mfem::TermBinding< TermT, SchemaT >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
serif::discretization::backend::mfem::TermBinding< TermT, SchemaT > \- 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 \fBDofMap\fP, therefor all term bindings are also dof maps\&.
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.PP
|
|
\fR#include <term_binding\&.hpp>\fP
|
|
.PP
|
|
Inherits \fBserif::discretization::backend::mfem::DofMap\fP\&.
|
|
.SS "Public Types"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "using \fBTerm\fP = TermT"
|
|
.br
|
|
.ti -1c
|
|
.RI "using \fBSchema\fP = SchemaT"
|
|
.br
|
|
.in -1c
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBTermBinding\fP (::mfem::FiniteElementSpace &\fBspace\fP, std::shared_ptr< const \fBReconstructionPlan\fP > \fBreconstruction\fP={})"
|
|
.br
|
|
.RI "Construct a term binding from an MFEM finite-element space\&. This requires that the term be a valid spatial term (\fBSpatialTerm\fP) "
|
|
.ti -1c
|
|
.RI "\fBTermBinding\fP (::mfem::Mesh &\fBmesh\fP)"
|
|
.br
|
|
.RI "Construct a term binding from an MFEM mesh\&. This requires that the term be a valid global scalar term (\fBGlobalScalarTerm\fP)\&. E\&.g\&. the only way you can construct such a term binding is for things like the total mass, angular momentum, etc\&.\&.\&. "
|
|
.in -1c
|
|
|
|
Public Member Functions inherited from \fBserif::discretization::backend::mfem::DofMap\fP
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBElements\fP \fBvalidated_elements\fP () const"
|
|
.br
|
|
.RI "Validate once before traversing elements without repeated mesh-wide scans\&. "
|
|
.ti -1c
|
|
.RI "const std::shared_ptr< const \fBReconstructionPlan\fP > & \fBreconstruction\fP () const noexcept"
|
|
.br
|
|
.RI "Read the immutable physical-field representation retained by this binding\&. "
|
|
.ti -1c
|
|
.RI "const \fBElementReconstruction\fP * \fBreconstruction_element\fP (int element) const"
|
|
.br
|
|
.RI "Select the reference adapter without adding work to ordinary elements\&. "
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP (const \fBDofMap\fP &)=delete"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP & \fBoperator=\fP (const \fBDofMap\fP &)=delete"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP (\fBDofMap\fP &&)=delete"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP & \fBoperator=\fP (\fBDofMap\fP &&)=delete"
|
|
.br
|
|
.ti -1c
|
|
.RI "::mfem::FiniteElementSpace & \fBspace\fP () const"
|
|
.br
|
|
.RI "Return the borrowed finite-element space associated with this DOF map\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Mesh & \fBmesh\fP () const noexcept"
|
|
.br
|
|
.RI "Return the borrowed mesh associated with this DOF map\&. "
|
|
.ti -1c
|
|
.RI "int \fBfull_size\fP () const noexcept"
|
|
.br
|
|
.RI "Return the number of full-space DOFs, including those not supported by the element support\&. "
|
|
.ti -1c
|
|
.RI "int \fBsize\fP () const noexcept"
|
|
.br
|
|
.RI "Return the number of supported DOFs, which is the size of the reduced coefficient vector\&. "
|
|
.ti -1c
|
|
.RI "std::optional< int > \fBreduced_dof\fP (const int \fBfull_dof\fP) const"
|
|
.br
|
|
.RI "Locate a local coefficient represented by exactly one supported independent coordinate\&. "
|
|
.ti -1c
|
|
.RI "int \fBfull_dof\fP (const int reduced) const"
|
|
.br
|
|
.RI "Return the representative local coefficient selected for one supported independent coordinate\&. "
|
|
.ti -1c
|
|
.RI "bool \fBconstrained\fP () const noexcept"
|
|
.br
|
|
.RI "Report whether local coefficients require hanging-node interpolation\&. "
|
|
.ti -1c
|
|
.RI "int \fBtrue_size\fP () const noexcept"
|
|
.br
|
|
.RI "Return the full independent coordinate count before selecting material support\&. "
|
|
.ti -1c
|
|
.RI "template<typename Visitor> void \fBfor_each_coefficient\fP (const int local_dof, Visitor &&visit) const"
|
|
.br
|
|
.RI "Visit the supported independent coefficients contributing to one unsigned local DOF\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Vector \fBgather_true\fP (const ::mfem::Vector &values) const"
|
|
.br
|
|
.RI "Select supported coefficients from a full independent vector, without interpolation\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Vector \fBscatter_true\fP (const ::mfem::Vector &values) const"
|
|
.br
|
|
.RI "Expand supported coefficients into a full independent vector, without interpolation\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Vector \fBaccumulate_dual\fP (const ::mfem::Vector &full) const"
|
|
.br
|
|
.RI "Accumulate local dual contributions with the transpose of coefficient expansion\&. "
|
|
.ti -1c
|
|
.RI "void \fBaccumulate_dual\fP (const ::mfem::Vector &full, ::mfem::Vector &result) const"
|
|
.br
|
|
.RI "Accumulate local dual contributions while reusing caller storage\&. "
|
|
.ti -1c
|
|
.RI "bool \fBsupports\fP (const int element) const"
|
|
.br
|
|
.RI "Check whether an element is supported by this dof map\&. "
|
|
.ti -1c
|
|
.RI "void \fBvalidate\fP () const"
|
|
.br
|
|
.RI "Validate the dof map\&. "
|
|
.ti -1c
|
|
.RI "void \fBvalidate_values\fP (const ::mfem::Vector &values) const"
|
|
.br
|
|
.RI "Check supported coefficient count and finiteness\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Vector \fBgather\fP (const ::mfem::Vector &full) const"
|
|
.br
|
|
.RI "Restrict a full coefficient vector to supported DOFs\&. "
|
|
.ti -1c
|
|
.RI "void \fBgather\fP (const ::mfem::Vector &full, ::mfem::Vector &result) const"
|
|
.br
|
|
.RI "Restrict supported coefficients while reusing the destination allocation\&. "
|
|
.ti -1c
|
|
.RI "::mfem::Vector \fBscatter\fP (const ::mfem::Vector &reduced) const"
|
|
.br
|
|
.RI "Expand supported independent coefficients into the constrained local field\&. Unsupported independent coordinates are zero\&. Interpolation can populate local coordinates outside the supported elements; element support still controls physical integration\&. "
|
|
.ti -1c
|
|
.RI "void \fBelement_values\fP (int element, const ::mfem::Vector &reduced, ::mfem::Vector &values) const"
|
|
.br
|
|
.RI "Extract element coefficients, including primal orientation transforms\&. "
|
|
.ti -1c
|
|
.RI "void \fBadd_element\fP (int element, ::mfem::Vector &values, ::mfem::Vector &full) const"
|
|
.br
|
|
.RI "Apply dual orientation transforms and add an element residual\&. "
|
|
.in -1c
|
|
.SS "Private Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "static ::mfem::Array< int > \fBelement_support\fP (const ::mfem::Mesh &\fBmesh\fP)"
|
|
.br
|
|
.RI "Translate the mesh into an element support array for the particular term binding\&. "
|
|
.in -1c
|
|
.SS "Static Private Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "::mfem::Mesh & \fBchecked_mesh\fP (const ::mfem::FiniteElementSpace &\fBspace\fP)"
|
|
.br
|
|
.RI "Check that the mesh associated with a finite-element space is valid for term binding construction\&. "
|
|
.in -1c
|
|
.SS "Additional Inherited Members"
|
|
|
|
|
|
Protected Member Functions inherited from \fBserif::discretization::backend::mfem::DofMap\fP
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP (::mfem::FiniteElementSpace &\fBspace\fP, const ::mfem::Array< int > &element_support, std::shared_ptr< const \fBReconstructionPlan\fP > \fBreconstruction\fP={})"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBDofMap\fP (::mfem::Mesh &\fBmesh\fP, const ::mfem::Array< int > &element_support)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fB~DofMap\fP ()=default"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT>
|
|
.br
|
|
requires (blocks::SpatialTerm<TermT> || blocks::GlobalScalarTerm<TermT>)
|
|
.br
|
|
class serif::discretization::backend::mfem::TermBinding< TermT, SchemaT >"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 \fBDofMap\fP, therefor all term bindings are also dof maps\&.
|
|
|
|
|
|
.PP
|
|
\fBTemplate Parameters\fP
|
|
.RS 4
|
|
\fITermT\fP The term descriptor type to bind to\&. Note that if the FiniteElementSpace is not a global scalar then this must be a spatial term descriptor (\fBSpatialTerm\fP)
|
|
.br
|
|
\fISchemaT\fP The domain schema type to bind to\&. This must be a valid schema (\fBIsSchema\fP)
|
|
.RE
|
|
.PP
|
|
|
|
.SH "Member Typedef Documentation"
|
|
.PP
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> using \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::Schema = SchemaT"
|
|
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> using \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::Term = TermT"
|
|
|
|
.SH "Constructor & Destructor Documentation"
|
|
.PP
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::TermBinding (::mfem::FiniteElementSpace & space, std::shared_ptr< const \fBReconstructionPlan\fP > reconstruction = \fR{}\fP)\fR [inline]\fP, \fR [explicit]\fP"
|
|
|
|
.PP
|
|
Construct a term binding from an MFEM finite-element space\&. This requires that the term be a valid spatial term (\fBSpatialTerm\fP)
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIspace\fP The finite-element space to bind to\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::TermBinding (::mfem::Mesh & mesh)\fR [inline]\fP, \fR [explicit]\fP"
|
|
|
|
.PP
|
|
Construct a term binding from an MFEM mesh\&. This requires that the term be a valid global scalar term (\fBGlobalScalarTerm\fP)\&. E\&.g\&. the only way you can construct such a term binding is for things like the total mass, angular momentum, etc\&.\&.\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fImesh\fP The mesh to bind to, note that the mesh must be three-dimensional and have a space dimension of three\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> ::mfem::Mesh & \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::checked_mesh (const ::mfem::FiniteElementSpace & space)\fR [inline]\fP, \fR [static]\fP, \fR [private]\fP"
|
|
|
|
.PP
|
|
Check that the mesh associated with a finite-element space is valid for term binding construction\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIspace\fP The finite-element space to check\&.
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
The mesh associated with the finite-element space\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "template<typename TermT, domain::schema::IsSchema SchemaT> static ::mfem::Array< int > \fBserif::discretization::backend::mfem::TermBinding\fP< TermT, SchemaT >::element_support (const ::mfem::Mesh & mesh)\fR [inline]\fP, \fR [private]\fP"
|
|
|
|
.PP
|
|
Translate the mesh into an element support array for the particular term binding\&.
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fImesh\fP the mesh to translate into an element support array
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
An array where each entry is 1 if the corresponding element is supported by the term binding and 0 otherwise\&. This array is parallel to the mesh elements ordering array\&.
|
|
.RE
|
|
.PP
|
|
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|