|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
Shared preparation and row replacement for scalar boundary values and vector point values. More...
#include <prepared_nodal_constraint.hpp>
Classes | |
| struct | CalculateNodes |
| struct | NodalData |
Public Types | |
| using | Test = EquationT::Test |
| using | Value = discretization::forms::OperandValue<equations::TestOperandOf<EquationT>> |
| using | RowBinding = discretization::backend::mfem::TermBinding<Test, SchemaT> |
Public Member Functions | |
| PreparedNodalConstraint (EquationT equation, const RowBinding &row, discretization::backend::mfem::DofSelection rows) | |
| Borrow selected nodal rows; vector selections contain exactly one point in component order. | |
| template<typename StateT> | |
| std::expected< void, PreparationRejection > | try_prepare (const StateT &state, const PreparationMode mode=PreparationMode::rebuild) |
| Freeze the local equation and derivative; rejection invalidates the previous preparation. | |
| template<typename StateT> | |
| void | prepare (const StateT &state, const PreparationMode mode=PreparationMode::rebuild) |
| Prepare or translate a numerical rejection to a caller-visible exception. | |
| void | apply_residual_rows (::mfem::Vector &result) const |
| Replace the selected entries of an assembled residual. | |
| template<typename StateT> | |
| void | apply_jacobian_rows (const StateT &direction, ::mfem::Vector &result) const |
| Replace complete row actions, removing every unconstrained coupling at these rows. | |
| void | apply_jacobian_rows (const ::mfem::Vector &direction, ::mfem::Vector &result) const |
| Apply the same row replacement to a coefficient vector without a state wrapper. | |
| void | mask_residual_dual (const ::mfem::Vector &dual, ::mfem::Vector &volume_dual) const |
| Remove constrained rows BEFORE applying the volume Jacobian transpose. | |
| void | add_jacobian_transpose_rows (const ::mfem::Vector &dual, ::mfem::Vector &result) const |
| Add the nodal transpose AFTER the volume transpose of the masked residual dual. | |
| void | invalidate () noexcept |
| Invalidate frozen residuals and derivatives. | |
| bool | is_prepared () const noexcept |
| Report whether a complete preparation exists. | |
| std::size_t | preparation_count () const noexcept |
| Count successful preparations. | |
| const PreparationReport & | preparation_report () const noexcept |
| Report whether the selected nodal equations were reevaluated. | |
| const discretization::backend::mfem::DofSelection & | rows () const noexcept |
| Return the selected supported coefficient indices. | |
| const EquationT & | equation () const noexcept |
| Expose immutable physics metadata to constraint diagnostics. | |
Static Public Attributes | |
| static constexpr int | components = discretization::forms::component_count<Value> |
Protected Member Functions | |
| void | validate_result (const ::mfem::Vector &result) const |
| Reject missing preparation, stale selection, and incorrect output sizes. | |
| const NodalData & | prepared_data () const |
| Read frozen nodal values shared by row replacement and point borders. | |
Protected Attributes | |
| std::unique_ptr< const EquationT > | m_equation |
| const RowBinding & | m_row |
| discretization::backend::mfem::DofSelection | m_rows |
Private Types | |
| using | Calculation = utils::dependencies::Computation<NodalResult, utils::dependencies::InputList<Test>, CalculateNodes> |
| using | Graph = utils::dependencies::ComputationGraph<Calculation> |
| using | Context = decltype(utils::dependencies::make_dependency_context(utils::dependencies::own<Test>(std::declval<CoefficientView<RowBinding>>(), CoefficientTracking{}))) |
| using | Cache = utils::dependencies::ComputationCache<Graph, Context, PreparationRejection> |
Private Attributes | |
| Cache | m_cache {Graph{Calculation{CalculateNodes{.equation = *m_equation}}}} |
| PreparationReport | m_report |
| std::size_t | m_preparation_count {0} |
Shared preparation and row replacement for scalar boundary values and vector point values.
|
private |
|
private |
|
private |
|
private |
| using serif::operators::backend::mfem::PreparedNodalConstraint< EquationT, SchemaT >::RowBinding = discretization::backend::mfem::TermBinding<Test, SchemaT> |
| using serif::operators::backend::mfem::PreparedNodalConstraint< EquationT, SchemaT >::Test = EquationT::Test |
| using serif::operators::backend::mfem::PreparedNodalConstraint< EquationT, SchemaT >::Value = discretization::forms::OperandValue<equations::TestOperandOf<EquationT>> |
|
inline |
Borrow selected nodal rows; vector selections contain exactly one point in component order.
|
inline |
Add the nodal transpose AFTER the volume transpose of the masked residual dual.
|
inline |
Apply the same row replacement to a coefficient vector without a state wrapper.
|
inline |
Replace complete row actions, removing every unconstrained coupling at these rows.
|
inline |
Replace the selected entries of an assembled residual.
|
inlinenodiscardnoexcept |
Expose immutable physics metadata to constraint diagnostics.
|
inlinenoexcept |
Invalidate frozen residuals and derivatives.
|
inlinenodiscardnoexcept |
Report whether a complete preparation exists.
|
inline |
Remove constrained rows BEFORE applying the volume Jacobian transpose.
|
inlinenodiscardnoexcept |
Count successful preparations.
|
inlinenodiscardnoexcept |
Report whether the selected nodal equations were reevaluated.
|
inline |
Prepare or translate a numerical rejection to a caller-visible exception.
|
inlinenodiscardprotected |
Read frozen nodal values shared by row replacement and point borders.
|
inlinenodiscardnoexcept |
Return the selected supported coefficient indices.
|
inlinenodiscard |
Freeze the local equation and derivative; rejection invalidates the previous preparation.
|
inlineprotected |
Reject missing preparation, stale selection, and incorrect output sizes.
|
staticconstexpr |
|
private |
|
protected |
|
private |
|
private |
|
protected |
|
protected |