SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::solver::seed Namespace Reference

Namespaces

namespace  backend
 
namespace  detail
 

Classes

struct  FittedRadialSeed
 An explicitly stretched initial guess, distinct from an equilibrium Lane–Emden scaling. More...
 
struct  PolytropeOptions
 Numerical choices for an EOS-consistent spherical starting guess, separate from solver normalization. More...
 
struct  RadialSeed
 Own a spherical physical profile and its first rotation estimate without changing the stellar model. More...
 

Functions

auto evaluate_radial_seed (const RadialSeed &seed, dimensions::LengthValue radius)
 Evaluate the original equilibrium profile without changing its physical scaling.
 
std::expected< FittedRadialSeed, std::string > fit_radial_seed (const RadialSeed &seed, dimensions::LengthValue radius)
 Copy a radial seed onto another radius without changing its material thermodynamics.
 
std::expected< utils::laneemden::PhysicalSample, std::string > evaluate_radial_seed (const FittedRadialSeed &seed, dimensions::LengthValue radius)
 Evaluate the fitted density and its consistent spherical gravity, retaining the source enthalpy.
 
std::expected< RadialSeed, std::string > make_polytropic_seed (const eos::models::Polytrope &equation_of_state, dimensions::MassValue mass, PolytropeOptions options={})
 Fix the EOS K and requested mass, solving for central density when n differs from three.
 
template<model::StellarModelType Model>
requires Model::template
contains_specification< model::FixedTotalMass > std::expected< RadialSeed, std::string > make_polytropic_seed (const Model &model, PolytropeOptions options={})
 Read the authoritative EOS, mass and optional rotation prescription from a model.
 
template<model::StellarModelType Model, typename Discretization, typename Profile>
requires (std::same_as<Profile, RadialSeed> || std::same_as<Profile, FittedRadialSeed>) && requires(const Model& model, const Discretization& discretization) { requires (!std::same_as<typename std::remove_cvref_t<decltype(model::resolve_equilibrium_equations(model))>::ShapeForce, model::NoShapeForce>); discretization.deformation.model.surface; discretization.deformation.reference; }
auto make_polytropic_state (const Model &model, const Discretization &discretization, const Profile &seed, const ProjectionOptions options={})
 Project a spherical guess into a moving model's named physical coordinates on its undeformed reference mesh.
 
template<typename Discretization>
std::expected< FittedRadialSeed, std::string > fit_radial_seed (const Discretization &discretization, const RadialSeed &seed, double spherical_relative_tolerance=5.0e-4)
 Fit only an initial radial guess to the selected spherical reference surface.
 

Function Documentation

◆ evaluate_radial_seed() [1/2]

std::expected< utils::laneemden::PhysicalSample, std::string > serif::solver::seed::evaluate_radial_seed ( const FittedRadialSeed & seed,
dimensions::LengthValue radius )
nodiscard

Evaluate the fitted density and its consistent spherical gravity, retaining the source enthalpy.

Evaluate unchanged material fields with the gravity generated by their stretched density.

◆ evaluate_radial_seed() [2/2]

auto serif::solver::seed::evaluate_radial_seed ( const RadialSeed & seed,
dimensions::LengthValue radius )
inlinenodiscard

Evaluate the original equilibrium profile without changing its physical scaling.

◆ fit_radial_seed() [1/2]

template<typename Discretization>
std::expected< FittedRadialSeed, std::string > serif::solver::seed::backend::mfem::fit_radial_seed ( const Discretization & discretization,
const RadialSeed & seed,
double spherical_relative_tolerance = 5.0e-4 )
nodiscard

Fit only an initial radial guess to the selected spherical reference surface.

Note
Surface radius is the midpoint of its selected FE-coordinate extrema, as in MeanField. The original seed, reference mesh, EOS and target constraints are never modified.

◆ fit_radial_seed() [2/2]

std::expected< FittedRadialSeed, std::string > serif::solver::seed::fit_radial_seed ( const RadialSeed & seed,
dimensions::LengthValue radius )
nodiscard

Copy a radial seed onto another radius without changing its material thermodynamics.

Validate a regular source and own its explicit, thermodynamically unchanged radial stretch.

Note
For stretch s, enclosed mass scales as s^3, potential as s^2, gravity as s and inertia as s^5. Omega becomes Omega_source/s^5, preserving the angular momentum inferred from the source guess. The original PhysicalScales remain intact; no equilibrium or target-constraint satisfaction is implied.

◆ make_polytropic_seed() [1/2]

std::expected< RadialSeed, std::string > serif::solver::seed::make_polytropic_seed ( const eos::models::Polytrope & equation_of_state,
dimensions::MassValue mass,
PolytropeOptions options = {} )
nodiscard

Fix the EOS K and requested mass, solving for central density when n differs from three.

Note
At n=3 mass does not determine central density: supply that homology scale explicitly. An explicit density specifies the initial guess only; its mass need not satisfy the final constraint.

◆ make_polytropic_seed() [2/2]

template<model::StellarModelType Model>
requires Model::template
contains_specification< model::FixedTotalMass > std::expected< RadialSeed, std::string > serif::solver::seed::make_polytropic_seed ( const Model & model,
PolytropeOptions options = {} )
nodiscard

Read the authoritative EOS, mass and optional rotation prescription from a model.

◆ make_polytropic_state()

template<model::StellarModelType Model, typename Discretization, typename Profile>
requires (std::same_as<Profile, RadialSeed> || std::same_as<Profile, FittedRadialSeed>) && requires(const Model& model, const Discretization& discretization) { requires (!std::same_as<typename std::remove_cvref_t<decltype(model::resolve_equilibrium_equations(model))>::ShapeForce, model::NoShapeForce>); discretization.deformation.model.surface; discretization.deformation.reference; }
auto serif::solver::seed::backend::mfem::make_polytropic_state ( const Model & model,
const Discretization & discretization,
const Profile & seed,
const ProjectionOptions options = {} )
nodiscard

Project a spherical guess into a moving model's named physical coordinates on its undeformed reference mesh.

Note
Choose a spherical reference mesh close to the seed radius, or explicitly fit the initial guess first. Shape starts at zero; the scalar formulation's surface level starts at -GM/R. The selected zero-pressure polytropic field trace is enforced exactly. It does not change the EOS, fit the mesh, or certify a discrete equilibrium. The vacuum limits assume radial compactification, as used by the stellar Kelvin map.