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

Classes

struct  NoAdditionalComputations
 Ordinary model evaluation adds no caller-selected preparation computations. More...
 
struct  PhysicalEvaluation
 Select physical coordinates without adding normalization graph services. More...
 
class  StateCoefficients
 
class  StateCoefficients< Discretization, Layout, Prescribed, utils::dependencies::KeyList< Fields... > >
 Borrow an owning state's fields for one synchronous equation evaluation. More...
 
struct  SystemData
 Retain accepted blocks and the stable external resources borrowed by those blocks. More...
 

Concepts

concept  ReconstructionSpecification
 Recognize a field-specific reconstruction request without prescribing its numerical form.
 
concept  CoefficientInput
 Recognize a field view by its physical identity and backend coefficient representation.
 
concept  PrescribedInputsFor
 Prescribed views must supply every unsolved input and cannot duplicate a solved coordinate.
 

Functions

template<typename EOS>
auto equation_of_state_input (const EOS &eos)
 Track immutable physics with a policy type independent of the caller's field ordering.
 
template<typename Geometry>
std::size_t geometry_size (const Geometry &coefficients)
 Count either backend displacement coefficients or independent surface coefficients.
 
template<geometry::deformation::DeformationMap Map>
void validate_deformation (const std::shared_ptr< const geometry::deformation::DeformationLinearization< Map > > &state)
 Reject null accepted maps and dimensions that MFEM cannot represent.
 
void require_deformation_action (const geometry::deformation::DeformationStatus &status)
 Preserve the originating deformation diagnostic at the MFEM action boundary.
 
template<typename... Computations>
auto computation_keys (const std::tuple< Computations... > &)
 Derive requested result identities directly from the supplied computation declarations.
 
template<typename Prescribed, typename SpecificationMap, typename ExplicitZeroCouplings, typename Model, typename Discretization, typename Coefficients, typename Geometry, typename NumericalOptions = PhysicalEvaluation, typename Preconditioner = preconditioning::None, typename Services = NoAdditionalComputations, typename ObserverFactory = utils::dependencies::NoGraphObservers>
auto bind_evaluator (std::shared_ptr< const Model > model, std::shared_ptr< const Discretization > discretization, const Coefficients &coefficients, const Geometry &geometry, operators::backend::mfem::VolumeOptions options, NumericalOptions numerical_options={}, Preconditioner preconditioner={}, Services services={}, ObserverFactory observer_factory={})
 Bind physics once and add only the explicitly selected numerical services.
 
template<typename Prescribed, typename SpecificationMap, typename ExplicitZeroCouplings, typename Model, typename Discretization, typename Layout, typename Geometry, typename Inputs, typename NumericalOptions = PhysicalEvaluation, typename Preconditioner = preconditioning::None, typename Services = NoAdditionalComputations, typename ObserverFactory = utils::dependencies::NoGraphObservers>
auto bind_state_evaluator (Model model, Discretization discretization, const StellarState< Layout > &state, const Geometry &geometry, operators::backend::mfem::VolumeOptions options, const Inputs &prescribed, NumericalOptions numerical={}, Preconditioner preconditioner={}, Services services={}, ObserverFactory observer_factory={})
 Retain finite-element bindings before constructing temporary views into an owning state.
 
template<typename Bound, typename Coefficients, typename Geometry>
auto candidate_inputs (const Bound &bound, const Coefficients &coefficients, const Geometry &geometry)
 Use one shape-view input schema for both packed states and external coefficient containers.
 
template<typename Owner, typename... Terms, ReconstructionSpecification Specification>
void apply_reconstruction (Owner &owner, utils::dependencies::KeyList< Terms... >, const Specification &specification)
 Attach a requested numerical interpretation while the bindings still have a single mutable owner.
 
template<ReconstructionSpecification... Specifications>
void validate_reconstruction_requests ()
 Reject duplicate field requests before constructing any finite elements.
 
template<discretization::blocks::SpatialTerm Term>
::mfem::FiniteElementSpace & term_space (discretization::backend::mfem::Resources &resources)
 Construct only representations supported by TermBinding, directly from the term's compile-time descriptor.
 
template<typename... Terms, ReconstructionSpecification... Specifications>
auto make_bindings (const StellarMeshOptions &options, utils::dependencies::KeyList< Terms... > keys, const Specifications &... specifications)
 Own precisely the model's coefficients plus displacement geometry; no particular thermodynamic field is required.
 
template<typename Discretization, typename Coefficients, typename... Terms>
void validate_coefficient_owners (const Discretization &discretization, const Coefficients &coefficients, utils::dependencies::KeyList< Terms... >)
 Accepted actions may borrow only bindings retained by the declared discretization owner.
 
template<typename Discretization, typename Coefficients, typename... Equations, typename... Fields>
auto model_inputs (const Discretization &discretization, const Coefficients &coefficients, utils::types::TypeList< Equations... >, utils::dependencies::KeyList< Fields... >)
 Bind common physical coefficients once and keep equation-specific metadata distinct.
 
template<typename Inputs, typename... Terms>
consteval bool coefficient_inputs (utils::dependencies::KeyList< Terms... >)
 Check required fields before entering evaluation, including during compile-time API detection.
 
template<typename Discretization, typename Layout, typename Prescribed>
auto state_coefficients (const Discretization &discretization, const StellarState< Layout > &state, const Prescribed &prescribed)
 Keep surface coordinates in the state while exposing only ordinary fields to volume equations.
 
void validate_range (int offset, int size, int extent)
 Reject invalid subranges without overflowing integer additions.
 
LinearizedBlock select_block (std::shared_ptr< const SystemData > data, std::span< const CoordinateRange > rows, std::span< const CoordinateRange > columns, bool complete_action=false)
 Build an independently owned selection of accepted physical couplings.
 

Function Documentation

◆ apply_reconstruction()

template<typename Owner, typename... Terms, ReconstructionSpecification Specification>
void serif::model::backend::mfem::detail::apply_reconstruction ( Owner & owner,
utils::dependencies::KeyList< Terms... > ,
const Specification & specification )

Attach a requested numerical interpretation while the bindings still have a single mutable owner.

◆ bind_evaluator()

template<typename Prescribed, typename SpecificationMap, typename ExplicitZeroCouplings, typename Model, typename Discretization, typename Coefficients, typename Geometry, typename NumericalOptions = PhysicalEvaluation, typename Preconditioner = preconditioning::None, typename Services = NoAdditionalComputations, typename ObserverFactory = utils::dependencies::NoGraphObservers>
auto serif::model::backend::mfem::detail::bind_evaluator ( std::shared_ptr< const Model > model,
std::shared_ptr< const Discretization > discretization,
const Coefficients & coefficients,
const Geometry & geometry,
operators::backend::mfem::VolumeOptions options,
NumericalOptions numerical_options = {},
Preconditioner preconditioner = {},
Services services = {},
ObserverFactory observer_factory = {} )
nodiscard

Bind physics once and add only the explicitly selected numerical services.

◆ bind_state_evaluator()

template<typename Prescribed, typename SpecificationMap, typename ExplicitZeroCouplings, typename Model, typename Discretization, typename Layout, typename Geometry, typename Inputs, typename NumericalOptions = PhysicalEvaluation, typename Preconditioner = preconditioning::None, typename Services = NoAdditionalComputations, typename ObserverFactory = utils::dependencies::NoGraphObservers>
auto serif::model::backend::mfem::detail::bind_state_evaluator ( Model model,
Discretization discretization,
const StellarState< Layout > & state,
const Geometry & geometry,
operators::backend::mfem::VolumeOptions options,
const Inputs & prescribed,
NumericalOptions numerical = {},
Preconditioner preconditioner = {},
Services services = {},
ObserverFactory observer_factory = {} )
nodiscard

Retain finite-element bindings before constructing temporary views into an owning state.

◆ candidate_inputs()

template<typename Bound, typename Coefficients, typename Geometry>
auto serif::model::backend::mfem::detail::candidate_inputs ( const Bound & bound,
const Coefficients & coefficients,
const Geometry & geometry )
nodiscard

Use one shape-view input schema for both packed states and external coefficient containers.

◆ coefficient_inputs()

template<typename Inputs, typename... Terms>
bool serif::model::backend::mfem::detail::coefficient_inputs ( utils::dependencies::KeyList< Terms... > )
nodiscardconsteval

Check required fields before entering evaluation, including during compile-time API detection.

◆ computation_keys()

template<typename... Computations>
auto serif::model::backend::mfem::detail::computation_keys ( const std::tuple< Computations... > & )
nodiscard

Derive requested result identities directly from the supplied computation declarations.

◆ equation_of_state_input()

template<typename EOS>
auto serif::model::backend::mfem::detail::equation_of_state_input ( const EOS & eos)
nodiscard

Track immutable physics with a policy type independent of the caller's field ordering.

◆ geometry_size()

template<typename Geometry>
std::size_t serif::model::backend::mfem::detail::geometry_size ( const Geometry & coefficients)
nodiscard

Count either backend displacement coefficients or independent surface coefficients.

◆ make_bindings()

template<typename... Terms, ReconstructionSpecification... Specifications>
auto serif::model::backend::mfem::detail::make_bindings ( const StellarMeshOptions & options,
utils::dependencies::KeyList< Terms... > keys,
const Specifications &... specifications )
nodiscard

Own precisely the model's coefficients plus displacement geometry; no particular thermodynamic field is required.

◆ model_inputs()

template<typename Discretization, typename Coefficients, typename... Equations, typename... Fields>
auto serif::model::backend::mfem::detail::model_inputs ( const Discretization & discretization,
const Coefficients & coefficients,
utils::types::TypeList< Equations... > ,
utils::dependencies::KeyList< Fields... >  )
nodiscard

Bind common physical coefficients once and keep equation-specific metadata distinct.

◆ require_deformation_action()

void serif::model::backend::mfem::detail::require_deformation_action ( const geometry::deformation::DeformationStatus & status)

Preserve the originating deformation diagnostic at the MFEM action boundary.

◆ select_block()

LinearizedBlock serif::model::backend::mfem::detail::select_block ( std::shared_ptr< const SystemData > data,
std::span< const CoordinateRange > rows,
std::span< const CoordinateRange > columns,
bool complete_action = false )
nodiscard

Build an independently owned selection of accepted physical couplings.

◆ state_coefficients()

template<typename Discretization, typename Layout, typename Prescribed>
auto serif::model::backend::mfem::detail::state_coefficients ( const Discretization & discretization,
const StellarState< Layout > & state,
const Prescribed & prescribed )
nodiscard

Keep surface coordinates in the state while exposing only ordinary fields to volume equations.

◆ term_space()

template<discretization::blocks::SpatialTerm Term>
::mfem::FiniteElementSpace & serif::model::backend::mfem::detail::term_space ( discretization::backend::mfem::Resources & resources)
nodiscard

Construct only representations supported by TermBinding, directly from the term's compile-time descriptor.

◆ validate_coefficient_owners()

template<typename Discretization, typename Coefficients, typename... Terms>
void serif::model::backend::mfem::detail::validate_coefficient_owners ( const Discretization & discretization,
const Coefficients & coefficients,
utils::dependencies::KeyList< Terms... >  )

Accepted actions may borrow only bindings retained by the declared discretization owner.

◆ validate_deformation()

template<geometry::deformation::DeformationMap Map>
void serif::model::backend::mfem::detail::validate_deformation ( const std::shared_ptr< const geometry::deformation::DeformationLinearization< Map > > & state)

Reject null accepted maps and dimensions that MFEM cannot represent.

◆ validate_range()

void serif::model::backend::mfem::detail::validate_range ( int offset,
int size,
int extent )

Reject invalid subranges without overflowing integer additions.

◆ validate_reconstruction_requests()

template<ReconstructionSpecification... Specifications>
void serif::model::backend::mfem::detail::validate_reconstruction_requests ( )

Reject duplicate field requests before constructing any finite elements.