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

Namespaces

namespace  backend
 
namespace  checks
 
namespace  detail
 
namespace  keys
 

Classes

struct  AutomaticPlan
 Derive the coordinate rules from the selected fields, equations and boundary formulation. More...
 
class  DiagonalNormalization
 Own the frozen, independent state and residual transformations used by one solve. More...
 
struct  Dimensionless
 Remove physical and geometric units from the solver's coordinates and norms. More...
 
struct  DimensionlessMetricGeometry
 Require custom metrics to declare their geometric convention explicitly. More...
 
struct  DimensionlessMetricGeometry< geometry::deformation::keys::SurfaceMetric >
 
struct  DimensionlessMetricGeometry< ReferenceVolumeMetric< TermT > >
 
struct  DimensionlessMetricGeometry< UnitMetric >
 
struct  DimensionlessRieszCoordinate
 Measure coordinates using dimensionless physical fields and reference geometry. More...
 
struct  FromModel
 Obtain a reference value from the corresponding descriptive model prescription. More...
 
struct  IdentityCoordinate
 Leave the declared coordinates unchanged, including their physical units. More...
 
struct  LaneEmdenApproximation
 Estimate a reference radius from a Lane–Emden shape, mass and central density. More...
 
struct  MetricCoordinates
 Metric keys advertise the coordinate identities they measure; a same-sized unrelated metric is insufficient. More...
 
struct  MetricCoordinates< geometry::deformation::keys::SurfaceMetric >
 Consume deformation's existing metric directly in both native shape-coordinate roles. More...
 
struct  MetricCoordinates< MetricT, std::void_t< typename MetricT::Coordinates > >
 
struct  MetricCoordinates< UnitMetric >
 Permit a Euclidean norm of algebraic surface moments after their measure is made dimensionless. More...
 
struct  NormalizationOptions
 Declare normalization without evaluating a reference star or allocating coordinate factors. More...
 
struct  NormalizationPlan
 Independent term-to-method and row-to-method maps; their order does not define the packed layout. More...
 
struct  NormalizationPrescriptionTag
 
struct  PhysicalRieszCoordinate
 Measure a physical quantity with the named reference Gram diagonal. More...
 
struct  ReferenceVolumeMetric
 Identify a reference volume metric by its physical term, including its support and FE representation. More...
 
struct  RuntimePreparedCoordinate
 Identify the exact prescription supplying positive factors; this never claims identity scaling. More...
 
struct  StellarReferenceScales
 Fixed reference scales used throughout a solve, independent of its candidate state. More...
 
struct  UnitMetric
 A unit Gram metric for algebraic coordinates, still subject to physical scaling. More...
 
struct  WithPointRows
 Replace selected volume residual rows by point residuals with their own physical quantity. More...
 

Concepts

concept  NormalizationPreparable
 
concept  ReferenceScheme
 A custom stellar reference strategy supplies the same typed scales and ordinary failure value.
 
concept  CoordinateLayoutType
 Normalization consumes the same coordinate representation as physical operators and solvers.
 
concept  MetricFor
 
concept  NormalizationPrescription
 
concept  NormalizationPlanType
 
concept  CompleteNormalizationFor
 
concept  StellarScaleQuantity
 Quantities whose characteristic scales follow from reference mass, radius, and G alone.
 

Typedefs

template<utils::dependencies::IsKeyList Values, utils::dependencies::IsKeyList Residuals>
using CoordinateLayout = discretization::blocks::SystemLayout<Values, Residuals>
 Compatibility spelling for the shared discretization layout.
 
template<discretization::blocks::HasQuantity TermT>
using PhysicalValueRule = utils::dependencies::Binding<TermT, PhysicalRieszCoordinate<typename TermT::Quantity, typename decltype(detail::default_metric<TermT>())::type>>
 Describe an unknown from its existing quantity, support, and functional-space metadata.
 
template<typename EquationT>
using PhysicalResidualRule = utils::dependencies::Binding<EquationT, PhysicalRieszCoordinate<typename EquationT::ResidualQuantity, typename decltype(detail::default_metric<EquationT>())::type>>
 Describe a residual using the equation's declared quantity, which may differ from the unknown it closes.
 

Enumerations

enum class  ReferenceGeometry { volume , surface , algebraic }
 Identify the geometric convention of a reference coordinate metric. More...
 

Functions

template<typename PlanT, typename ScalesT = StellarReferenceScales, typename LayoutT>
requires NormalizationPreparable<PlanT, LayoutT, ScalesT>
auto make_normalization_computations (const LayoutT &)
 Declare normalization as ordinary dependency computations; no metrics or factors are prepared here.
 
template<typename Scheme, typename Coordinates, typename Plan, typename Sources, typename Computations>
auto make_normalization (NormalizationOptions< Scheme, Coordinates, Plan, Sources, Computations > options)
 Preserve the deduced numerical choices for later preparation with a model and discretization.
 
auto make_normalization ()
 Select the usual dimensionless Lane–Emden reference; supply its central density before resolving it against a model.
 
std::expected< StellarReferenceScales, std::string > prepare_reference_scales (const LaneEmdenApproximation< dimensions::MassValue, dimensions::DensityValue > &scheme, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant)
 Derive the shared stellar scales after both dimensional reference inputs have been resolved.
 
std::expected< StellarReferenceScales, std::string > prepare_reference_scales (const StellarReferenceScales &reference, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant)
 Use explicitly prepared reference scales through the same graph as estimated references.
 
std::expected< double, std::string > make_riesz_factor (discretization::blocks::RepresentedValueKind kind, double metric, double physical_scale)
 Prepare one primal sqrt(metric)/scale or dual 1/(scale sqrt(metric)) factor.
 
std::expected< std::vector< double >, std::string > make_riesz_factors (discretization::blocks::RepresentedValueKind kind, std::span< const double > metric, double physical_scale)
 Prepare diagonal Riesz factors, reporting which coordinate has invalid data.
 
std::expected< DiagonalNormalization, std::string > make_diagonal_normalization (std::vector< double > state, std::vector< double > residual)
 Validate and freeze independent coordinate factors, including empty or rectangular systems.
 
std::expected< std::vector< double >, std::string > make_point_replaced_residual_factors (std::span< const double > volume_metric, double volume_scale, std::span< const int > selected_rows, double point_scale)
 Measure volume and replacement point residuals in their independently specified physical units.
 
std::expected< StellarReferenceScales, std::string > prepare_stellar_reference_scales (dimensions::QuantityValue< dimensions::Mass > mass, dimensions::QuantityValue< dimensions::Length > radius, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant=dimensions::QuantityValue< dimensions::GravitationalConstant >{1.0})
 Derive gravitational stellar scales from a finite, positive reference mass, radius, and G.
 
template<StellarScaleQuantity Quantity>
dimensions::QuantityValue< Quantity > characteristic_scale (const StellarReferenceScales &scales, Quantity)
 Select a typed scale; temperature and other unrelated quantities require an explicit prescription.
 
std::expected< double, std::string > make_riesz_factor (Kind kind, double metric, double physical_scale)
 
std::expected< std::vector< double >, std::string > make_riesz_factors (Kind kind, std::span< const double > metric, double physical_scale)
 

Typedef Documentation

◆ CoordinateLayout

template<utils::dependencies::IsKeyList Values, utils::dependencies::IsKeyList Residuals>
using serif::solver::normalization::CoordinateLayout = discretization::blocks::SystemLayout<Values, Residuals>

Compatibility spelling for the shared discretization layout.

◆ PhysicalResidualRule

template<typename EquationT>
using serif::solver::normalization::PhysicalResidualRule = utils::dependencies::Binding<EquationT, PhysicalRieszCoordinate<typename EquationT::ResidualQuantity, typename decltype(detail::default_metric<EquationT>())::type>>

Describe a residual using the equation's declared quantity, which may differ from the unknown it closes.

◆ PhysicalValueRule

template<discretization::blocks::HasQuantity TermT>
using serif::solver::normalization::PhysicalValueRule = utils::dependencies::Binding<TermT, PhysicalRieszCoordinate<typename TermT::Quantity, typename decltype(detail::default_metric<TermT>())::type>>

Describe an unknown from its existing quantity, support, and functional-space metadata.

Enumeration Type Documentation

◆ ReferenceGeometry

Identify the geometric convention of a reference coordinate metric.

Enumerator
volume 
surface 
algebraic 

Function Documentation

◆ characteristic_scale()

template<StellarScaleQuantity Quantity>
dimensions::QuantityValue< Quantity > serif::solver::normalization::characteristic_scale ( const StellarReferenceScales & scales,
Quantity  )
nodiscard

Select a typed scale; temperature and other unrelated quantities require an explicit prescription.

◆ make_diagonal_normalization()

std::expected< DiagonalNormalization, std::string > serif::solver::normalization::make_diagonal_normalization ( std::vector< double > state,
std::vector< double > residual )
nodiscard

Validate and freeze independent coordinate factors, including empty or rectangular systems.

◆ make_normalization() [1/2]

auto serif::solver::normalization::make_normalization ( )
inlinenodiscard

Select the usual dimensionless Lane–Emden reference; supply its central density before resolving it against a model.

◆ make_normalization() [2/2]

template<typename Scheme, typename Coordinates, typename Plan, typename Sources, typename Computations>
auto serif::solver::normalization::make_normalization ( NormalizationOptions< Scheme, Coordinates, Plan, Sources, Computations > options)
nodiscard

Preserve the deduced numerical choices for later preparation with a model and discretization.

◆ make_normalization_computations()

template<typename PlanT, typename ScalesT = StellarReferenceScales, typename LayoutT>
requires NormalizationPreparable<PlanT, LayoutT, ScalesT>
auto serif::solver::normalization::make_normalization_computations ( const LayoutT & )
nodiscard

Declare normalization as ordinary dependency computations; no metrics or factors are prepared here.

Note
Supply keys::Layout, keys::Scales, and the plan's metric/selection/prescription sources. Copy the accepted DiagonalNormalization to freeze one solve before preparing later candidates.

◆ make_point_replaced_residual_factors()

std::expected< std::vector< double >, std::string > serif::solver::normalization::make_point_replaced_residual_factors ( std::span< const double > volume_metric,
double volume_scale,
std::span< const int > selected_rows,
double point_scale )
nodiscard

Measure volume and replacement point residuals in their independently specified physical units.

Note
Only replaced rows may have a zero or otherwise unusable volume metric. No bulk factor is evaluated for them.

◆ make_riesz_factor() [1/2]

std::expected< double, std::string > serif::solver::normalization::make_riesz_factor ( discretization::blocks::RepresentedValueKind kind,
double metric,
double physical_scale )
nodiscard

Prepare one primal sqrt(metric)/scale or dual 1/(scale sqrt(metric)) factor.

◆ make_riesz_factor() [2/2]

std::expected< double, std::string > serif::solver::normalization::make_riesz_factor ( Kind kind,
double metric,
double physical_scale )

◆ make_riesz_factors() [1/2]

std::expected< std::vector< double >, std::string > serif::solver::normalization::make_riesz_factors ( discretization::blocks::RepresentedValueKind kind,
std::span< const double > metric,
double physical_scale )
nodiscard

Prepare diagonal Riesz factors, reporting which coordinate has invalid data.

◆ make_riesz_factors() [2/2]

std::expected< std::vector< double >, std::string > serif::solver::normalization::make_riesz_factors ( Kind kind,
std::span< const double > metric,
double physical_scale )

◆ prepare_reference_scales() [1/2]

std::expected< StellarReferenceScales, std::string > serif::solver::normalization::prepare_reference_scales ( const LaneEmdenApproximation< dimensions::MassValue, dimensions::DensityValue > & scheme,
dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant )
inlinenodiscard

Derive the shared stellar scales after both dimensional reference inputs have been resolved.

◆ prepare_reference_scales() [2/2]

std::expected< StellarReferenceScales, std::string > serif::solver::normalization::prepare_reference_scales ( const StellarReferenceScales & reference,
dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant )
inlinenodiscard

Use explicitly prepared reference scales through the same graph as estimated references.

◆ prepare_stellar_reference_scales()

std::expected< StellarReferenceScales, std::string > serif::solver::normalization::prepare_stellar_reference_scales ( dimensions::QuantityValue< dimensions::Mass > mass,
dimensions::QuantityValue< dimensions::Length > radius,
dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant = dimensions::QuantityValue<dimensions::GravitationalConstant>{1.0} )
nodiscard

Derive gravitational stellar scales from a finite, positive reference mass, radius, and G.