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

Namespaces

namespace  detail
 
namespace  keys
 

Classes

struct  PressureBoundary
 The selected equation rows and the finite-element traces supplying their physical state. More...
 

Concepts

concept  PressureBoundaryFormulation
 Isobaric rows are scalar nodal H1 equations with continuous scalar or global EOS inputs.
 

Functions

template<PressureBoundaryFormulation Formulation>
auto make_pressure_boundary_computations ()
 Combine finite-element sampling with the unchanged thermodynamic graph; coefficient sources can also feed volume equations.
 
template<PressureBoundaryFormulation Formulation>
auto make_pressure_boundary_graph ()
 Construct a standalone isobaric boundary graph with the ordinary dependency-cache lifecycle.
 
template<PressureBoundaryFormulation Formulation, utils::dependencies::IsDependencyContext Coefficients>
requires utils::dependencies::SatisfiesKeyList<typename Coefficients::Bindings, typename Formulation::StateTerms>
auto make_pressure_boundary (const Coefficients &coefficients)
 Compile nodal boundary traces explicitly; this does not sample coefficients or evaluate the EOS.
 
template<typename Boundary, typename EOSResource>
auto make_pressure_boundary_metadata (std::shared_ptr< const Boundary > boundary, EOSResource equation_of_state, IsobaricSurface condition)
 Share boundary metadata with a model's common coefficient context.
 
template<typename Boundary, utils::dependencies::IsResource EOSResource, utils::dependencies::IsDependencyContext Coefficients>
requires std::same_as<typename EOSResource::Key, surface::keys::EquationOfState> && std::same_as<std::remove_cvref_t<typename EOSResource::Target>, typename Boundary::Formulation::EquationOfState> && utils::dependencies::SatisfiesKeyList<typename Coefficients::Bindings, typename Boundary::Formulation::StateTerms>
auto make_pressure_boundary_inputs (std::shared_ptr< const Boundary > boundary, EOSResource equation_of_state, IsobaricSurface condition, const Coefficients &coefficients)
 Bind the physical condition, explicitly tracked EOS, and borrowed field coefficients without evaluating them.
 
template<PressureBoundaryFormulation Formulation, typename Traces>
void apply_residual_rows (const PressureBoundary< Formulation, Traces > &boundary, const std::vector< SurfaceLinearization< Formulation > > &linearizations, ::mfem::Vector &result)
 Replace selected residual rows with a prepared isobaric equation, preserving all interior rows.
 
template<PressureBoundaryFormulation Formulation, typename Traces, utils::dependencies::IsDependencyContext Directions>
requires utils::dependencies::SatisfiesKeyList<typename Directions::Bindings, typename Formulation::StateTerms>
void apply_jacobian_rows (const PressureBoundary< Formulation, Traces > &boundary, const std::vector< SurfaceLinearization< Formulation > > &linearizations, const Directions &directions, ::mfem::Vector &result)
 Replace full Jacobian rows, including every EOS input; directions may alias the output.
 
template<PressureBoundaryFormulation Formulation, typename Traces>
void mask_residual_dual (const PressureBoundary< Formulation, Traces > &boundary, const ::mfem::Vector &dual, ::mfem::Vector &volume_dual)
 Remove the replaced rows before applying the volume Jacobian transpose.
 
template<typename Term, PressureBoundaryFormulation Formulation, typename Traces>
requires utils::dependencies::BindingsWithBinding<typename Traces::Bindings, Term>
void add_jacobian_transpose_rows (const PressureBoundary< Formulation, Traces > &boundary, const std::vector< SurfaceLinearization< Formulation > > &linearizations, const ::mfem::Vector &dual, ::mfem::Vector &result)
 Add one physical term's constrained-row transpose to its existing volume contribution.
 
template<typename Field, PressureBoundaryFormulation Formulation, typename Traces>
requires utils::dependencies::ContainsKey<Field, typename Formulation::StateTerms>
std::shared_ptr< const ::mfem::SparseMatrix > pressure_field_trace (const PressureBoundary< Formulation, Traces > &boundary, const std::vector< SurfaceLinearization< Formulation > > &linearizations)
 Freeze one EOS partial times its finite-element trace in selected boundary-row coordinates.
 
template<typename Field, PressureBoundaryFormulation Formulation, typename Traces>
operators::backend::mfem::LinearizedBlock pressure_field_block (operators::backend::mfem::LinearizedBlock volume, const PressureBoundary< Formulation, Traces > &boundary, const std::vector< SurfaceLinearization< Formulation > > &linearizations)
 Install one field's accepted isobaric derivative rows on its physical volume block.
 

Function Documentation

◆ add_jacobian_transpose_rows()

template<typename Term, PressureBoundaryFormulation Formulation, typename Traces>
requires utils::dependencies::BindingsWithBinding<typename Traces::Bindings, Term>
void serif::geometry::surface::backend::mfem::add_jacobian_transpose_rows ( const PressureBoundary< Formulation, Traces > & boundary,
const std::vector< SurfaceLinearization< Formulation > > & linearizations,
const ::mfem::Vector & dual,
::mfem::Vector & result )

Add one physical term's constrained-row transpose to its existing volume contribution.

Note
The caller supplies the same accepted linearizations as the forward action. Discard the output if a non-finite action throws.

◆ apply_jacobian_rows()

template<PressureBoundaryFormulation Formulation, typename Traces, utils::dependencies::IsDependencyContext Directions>
requires utils::dependencies::SatisfiesKeyList<typename Directions::Bindings, typename Formulation::StateTerms>
void serif::geometry::surface::backend::mfem::apply_jacobian_rows ( const PressureBoundary< Formulation, Traces > & boundary,
const std::vector< SurfaceLinearization< Formulation > > & linearizations,
const Directions & directions,
::mfem::Vector & result )

Replace full Jacobian rows, including every EOS input; directions may alias the output.

◆ apply_residual_rows()

template<PressureBoundaryFormulation Formulation, typename Traces>
void serif::geometry::surface::backend::mfem::apply_residual_rows ( const PressureBoundary< Formulation, Traces > & boundary,
const std::vector< SurfaceLinearization< Formulation > > & linearizations,
::mfem::Vector & result )

Replace selected residual rows with a prepared isobaric equation, preserving all interior rows.

◆ make_pressure_boundary()

template<PressureBoundaryFormulation Formulation, utils::dependencies::IsDependencyContext Coefficients>
requires utils::dependencies::SatisfiesKeyList<typename Coefficients::Bindings, typename Formulation::StateTerms>
auto serif::geometry::surface::backend::mfem::make_pressure_boundary ( const Coefficients & coefficients)
nodiscard

Compile nodal boundary traces explicitly; this does not sample coefficients or evaluate the EOS.

◆ make_pressure_boundary_computations()

template<PressureBoundaryFormulation Formulation>
auto serif::geometry::surface::backend::mfem::make_pressure_boundary_computations ( )
nodiscard

Combine finite-element sampling with the unchanged thermodynamic graph; coefficient sources can also feed volume equations.

◆ make_pressure_boundary_graph()

template<PressureBoundaryFormulation Formulation>
auto serif::geometry::surface::backend::mfem::make_pressure_boundary_graph ( )
nodiscard

Construct a standalone isobaric boundary graph with the ordinary dependency-cache lifecycle.

◆ make_pressure_boundary_inputs()

template<typename Boundary, utils::dependencies::IsResource EOSResource, utils::dependencies::IsDependencyContext Coefficients>
requires std::same_as<typename EOSResource::Key, surface::keys::EquationOfState> && std::same_as<std::remove_cvref_t<typename EOSResource::Target>, typename Boundary::Formulation::EquationOfState> && utils::dependencies::SatisfiesKeyList<typename Coefficients::Bindings, typename Boundary::Formulation::StateTerms>
auto serif::geometry::surface::backend::mfem::make_pressure_boundary_inputs ( std::shared_ptr< const Boundary > boundary,
EOSResource equation_of_state,
IsobaricSurface condition,
const Coefficients & coefficients )
nodiscard

Bind the physical condition, explicitly tracked EOS, and borrowed field coefficients without evaluating them.

Note
Inputs may be reused while coefficient vectors change. The caller's bindings, vectors and borrowed EOS must remain alive.

◆ make_pressure_boundary_metadata()

template<typename Boundary, typename EOSResource>
auto serif::geometry::surface::backend::mfem::make_pressure_boundary_metadata ( std::shared_ptr< const Boundary > boundary,
EOSResource equation_of_state,
IsobaricSurface condition )
nodiscard

Share boundary metadata with a model's common coefficient context.

◆ mask_residual_dual()

template<PressureBoundaryFormulation Formulation, typename Traces>
void serif::geometry::surface::backend::mfem::mask_residual_dual ( const PressureBoundary< Formulation, Traces > & boundary,
const ::mfem::Vector & dual,
::mfem::Vector & volume_dual )

Remove the replaced rows before applying the volume Jacobian transpose.

◆ pressure_field_block()

template<typename Field, PressureBoundaryFormulation Formulation, typename Traces>
operators::backend::mfem::LinearizedBlock serif::geometry::surface::backend::mfem::pressure_field_block ( operators::backend::mfem::LinearizedBlock volume,
const PressureBoundary< Formulation, Traces > & boundary,
const std::vector< SurfaceLinearization< Formulation > > & linearizations )
nodiscard

Install one field's accepted isobaric derivative rows on its physical volume block.

Note
Every EOS input uses its own interpolation. Absent fields receive zero constrained rows. Copied derivative-weighted traces keep this accepted block independent of later EOS candidates and of the boundary object's lifetime.

◆ pressure_field_trace()

template<typename Field, PressureBoundaryFormulation Formulation, typename Traces>
requires utils::dependencies::ContainsKey<Field, typename Formulation::StateTerms>
std::shared_ptr< const ::mfem::SparseMatrix > serif::geometry::surface::backend::mfem::pressure_field_trace ( const PressureBoundary< Formulation, Traces > & boundary,
const std::vector< SurfaceLinearization< Formulation > > & linearizations )
nodiscard

Freeze one EOS partial times its finite-element trace in selected boundary-row coordinates.