SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs > Class Template Reference

Adapt existing stellar preparation to Newton without giving acceptance to the model. More...

#include <stellar_problem.hpp>

Collaboration diagram for serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >:
[legend]

Public Types

using Vector = serif::Vector
 
using System = std::remove_const_t<typename Evaluator::Result::element_type>
 
using Model = std::remove_cvref_t<decltype(std::declval<const Evaluator&>().model())>
 
using Layout = typename Evaluator::Layout
 
using Failure = typename Evaluator::Cache::Failure
 

Public Member Functions

 StellarProblem (Evaluator evaluator, Inputs prescribed=Inputs{}, ::mfem::Vector displacement={})
 Retain one cache and all external inputs throughout a solve.
 
auto model_owner () const
 Retain the immutable physical definition in the resulting checkpoint.
 
const auto & binding () const
 Inspect typed FE resources for explicitly selected numerical strategies.
 
const Layout & layout () const
 Inspect the coordinate identities used by every physical state in this solve.
 
Evaluator & evaluator ()
 Access the shared physical preparation service for numerical extensions.
 
auto evaluate (const model::StellarState< Layout > &state)
 Evaluate the complete equations, preserving all previously published systems.
 
auto prepare (const model::StellarState< Layout > &state)
 Prepare the inverse belonging to exactly this physical candidate.
 
linear::Report solve_linear (const auto &prepared, const Vector &rhs, Vector &correction, const auto &options)
 Solve with the operator and inverse retained by this candidate's preparation.
 
auto geometry_limit (const model::StellarState< Layout > &state, std::span< const double > direction, const double maximum_step, const double safety, const bool enabled)
 Snapshot the accepted geometry direction for step restriction and backtracking.
 
double next_step (const double step, const Backtracking &options, const auto &evaluation) const
 Skip unsafe backtracking rungs after a structured orientation failure.
 

Static Public Member Functions

static std::string failure_message (const Failure &failure)
 Preserve the original failure message without classifying by its text.
 
static std::string failure_message (const geometry::deformation::DeformationFailure &failure)
 Geometry preflight already reports an ordinary deformation failure.
 
static bool recoverable (const Failure &failure)
 Backtracking may repair a numerical candidate, never an incompatible discretization.
 

Private Member Functions

auto invoke (auto callback)
 Keep fixed displacement outside the unknown vector and omit it for moving stars.
 

Static Private Member Functions

static bool inverted (const Failure &failure)
 Recognize orientation failure from the structured physical rejection.
 

Private Attributes

Evaluator m_evaluator
 
Inputs m_prescribed
 
::mfem::Vector m_fixed_displacement
 
admissibility::backend::mfem::GeometryDirection m_geometry
 

Detailed Description

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
class serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >

Adapt existing stellar preparation to Newton without giving acceptance to the model.

Note
The prescribed input context and a copy of fixed geometry are retained for the entire solve. Explicitly borrowed resources keep their existing lifetime requirements. The public solver factory constructs this object; astronomers normally work with a discretization and a state.

Member Typedef Documentation

◆ Failure

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
using serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::Failure = typename Evaluator::Cache::Failure

◆ Layout

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
using serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::Layout = typename Evaluator::Layout

◆ Model

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
using serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::Model = std::remove_cvref_t<decltype(std::declval<const Evaluator&>().model())>

◆ System

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
using serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::System = std::remove_const_t<typename Evaluator::Result::element_type>

◆ Vector

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
using serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::Vector = serif::Vector

Constructor & Destructor Documentation

◆ StellarProblem()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::StellarProblem ( Evaluator evaluator,
Inputs prescribed = Inputs{},
::mfem::Vector displacement = {} )
inline

Retain one cache and all external inputs throughout a solve.

Member Function Documentation

◆ binding()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
const auto & serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::binding ( ) const
inlinenodiscard

Inspect typed FE resources for explicitly selected numerical strategies.

◆ evaluate()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
auto serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::evaluate ( const model::StellarState< Layout > & state)
inlinenodiscard

Evaluate the complete equations, preserving all previously published systems.

◆ evaluator()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
Evaluator & serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::evaluator ( )
inlinenodiscard

Access the shared physical preparation service for numerical extensions.

◆ failure_message() [1/2]

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
static std::string serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::failure_message ( const Failure & failure)
inlinestaticnodiscard

Preserve the original failure message without classifying by its text.

◆ failure_message() [2/2]

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
static std::string serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::failure_message ( const geometry::deformation::DeformationFailure & failure)
inlinestaticnodiscard

Geometry preflight already reports an ordinary deformation failure.

◆ geometry_limit()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
auto serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::geometry_limit ( const model::StellarState< Layout > & state,
std::span< const double > direction,
const double maximum_step,
const double safety,
const bool enabled )
inlinenodiscard

Snapshot the accepted geometry direction for step restriction and backtracking.

◆ inverted()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
static bool serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::inverted ( const Failure & failure)
inlinestaticnodiscardprivate

Recognize orientation failure from the structured physical rejection.

◆ invoke()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
auto serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::invoke ( auto callback)
inlinenodiscardprivate

Keep fixed displacement outside the unknown vector and omit it for moving stars.

◆ layout()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
const Layout & serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::layout ( ) const
inlinenodiscard

Inspect the coordinate identities used by every physical state in this solve.

◆ model_owner()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
auto serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::model_owner ( ) const
inlinenodiscard

Retain the immutable physical definition in the resulting checkpoint.

◆ next_step()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
double serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::next_step ( const double step,
const Backtracking & options,
const auto & evaluation ) const
inlinenodiscard

Skip unsafe backtracking rungs after a structured orientation failure.

◆ prepare()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
auto serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::prepare ( const model::StellarState< Layout > & state)
inlinenodiscard

Prepare the inverse belonging to exactly this physical candidate.

◆ recoverable()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
static bool serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::recoverable ( const Failure & failure)
inlinestaticnodiscard

Backtracking may repair a numerical candidate, never an incompatible discretization.

◆ solve_linear()

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
linear::Report serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::solve_linear ( const auto & prepared,
const Vector & rhs,
Vector & correction,
const auto & options )
inlinenodiscard

Solve with the operator and inverse retained by this candidate's preparation.

Member Data Documentation

◆ m_evaluator

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
Evaluator serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::m_evaluator
private

◆ m_fixed_displacement

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
::mfem::Vector serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::m_fixed_displacement
private

◆ m_geometry

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
admissibility::backend::mfem::GeometryDirection serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::m_geometry
private

◆ m_prescribed

template<typename Evaluator, typename Inputs = utils::dependencies::DependencyContext<>>
Inputs serif::solver::backend::mfem::StellarProblem< Evaluator, Inputs >::m_prescribed
private

The documentation for this class was generated from the following file: