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

Classes

struct  AreSurfaceBindings
 
struct  AreSurfaceBindings< utils::dependencies::Bindings< Entries... > >
 
struct  BoundaryValueTracking
 
struct  MatchingPressureRelations
 
struct  MatchingPressureRelations< EOS, Bindings, Carrier, eos::relations::RelationCatalog< Relations... > >
 
struct  PressureConditionTracking
 
struct  PressureSurfaceDescription
 Common physical metadata; numerical values and preparation belong to the dependency context and cache. More...
 
struct  RelationQuantities
 
struct  RelationQuantities< eos::relations::Relation< Output, Inputs... > >
 
struct  SelectedPressureSurface
 
struct  SelectedPressureSurface< std::tuple< Candidate > >
 
struct  SurfaceOperands
 
struct  SurfaceOperands< utils::dependencies::KeyList< Terms... > >
 
struct  UniqueTerms
 
struct  UniqueTerms< utils::types::TypeList< Terms... > >
 

Concepts

concept  EligibleSurfaceRow
 Strong boundary enforcement requires an actual solved, scalar H1 equation row.
 
concept  ThermodynamicBoundaryField
 Globals require an explicit physical role: matching units alone would mistake C or a multiplier for enthalpy.
 

Typedefs

template<typename Bindings, typename Quantities>
using BoundTerms = typename UniqueTerms<utils::dependencies::ResolvedTargets<Bindings, Quantities>>::Type
 

Functions

template<int Priority, typename EOS, typename Field, typename Fields, typename Rows, typename SolvedTerms, typename PreferredField>
consteval auto field_candidates ()
 Search one precedence level, without asking the EOS for a relation when pressure is already an unknown.
 
template<int Priority, typename EOS, typename Rows, typename SolvedTerms, typename PreferredField, typename... Fields>
consteval auto select_candidates (utils::dependencies::KeyList< Fields... > fields)
 Prefer a pressure unknown, then an explicit inverse, then a direct pressure residual.
 
template<PressureSurfaceFormulationType Formulation, template< typename > typename SampleKey, typename... Terms>
auto make_surface_eos_computation (utils::dependencies::KeyList< Terms... >)
 Declare the exact EOS inputs from the formulation, so derivative metadata and cache dependencies cannot diverge.
 
template<PressureSurfaceFormulationType Formulation, template< typename > typename SampleKey>
auto make_surface_linearization_computation ()
 Keep the inexpensive boundary residual separate from the reusable EOS response and its partials.
 
template<typename... Terms>
consteval auto thermodynamic_fields (utils::dependencies::KeyList< Terms... >)
 Collect physical fields, retaining distinct terms with equal quantities so ambiguity remains visible.
 
template<typename Quantity, typename Carrier, typename... Fields>
consteval auto quantity_field (utils::dependencies::KeyList< Fields... >)
 Return a unique field for a quantity; the chosen residual carrier supplies its own quantity unambiguously.
 
template<typename Carrier, typename Fields, typename... Quantities>
consteval auto relation_bindings (utils::dependencies::KeyList< Quantities... >)
 Bind only the quantities read by this candidate, ignoring unrelated fields and quantities.
 
template<typename EOS, typename Carrier, typename Fields, typename Relation>
consteval auto inverse_candidate ()
 Test a declared inverse and every required analytic partial before publishing its formulation.
 
template<typename EOS, typename Carrier, typename Fields, typename Relation>
consteval auto direct_candidate ()
 A direct pressure relation may replace only a row belonging to one of its solved inputs.
 
template<bool Inverse, typename EOS, typename Carrier, typename Fields, typename... Relations>
consteval auto relation_candidates (eos::relations::RelationCatalog< Relations... >)
 Keep every admissible relation; catalog order never selects a physical implementation.
 
template<typename... Terms>
std::expected< std::size_t, SurfaceFailure > surface_sample_count (const BoundaryValues< Terms > &... columns)
 All EOS columns must describe the same ordered, nonempty set of boundary points.
 
template<PressureSurfaceFormulationType Formulation, typename... Terms>
SurfacePoint< Formulation > surface_point (const std::size_t sample, const BoundaryValues< Terms > &... columns)
 Assemble the conventional equation point from typed columns; no mesh assumptions enter the physical calculation.
 
template<typename Value, typename Evaluate>
std::expected< std::vector< Value >, SurfaceFailure > collect_surface_samples (std::size_t count, Evaluate evaluate)
 Collect one ordered batch, attaching the first failure's sample index before any result is published.
 
template<PressureSurfaceFormulationType Formulation, typename... Terms>
std::expected< std::vector< SurfaceEOSResponse< Formulation > >, SurfaceFailure > evaluate_response_samples (const typename Formulation::EquationOfState &equation_of_state, const dimensions::PressureValue pressure, const BoundaryValues< Terms > &... columns)
 Evaluate the EOS once per state sample, or once for a genuinely pressure-only relation.
 
template<PressureSurfaceFormulationType Formulation>
std::expected< std::vector< SurfaceLinearization< Formulation > >, SurfaceFailure > linearize_carrier_samples (const std::vector< SurfaceEOSResponse< Formulation > > &responses, const BoundaryValues< typename Formulation::CarrierTerm > &carrier)
 Broadcast only a pressure-only relation; every state-dependent carrier sample needs its own response.
 
template<PressureSurfaceFormulationType Formulation>
std::expected< std::vector< SurfaceLinearization< Formulation > >, SurfaceFailure > linearize_pressure_samples (const IsobaricSurface &condition, const std::vector< SurfaceEOSResponse< Formulation > > &responses)
 Changing prescribed pressure reuses all values and partials of a direct-pressure EOS relation.
 
template<typename Quantity, PressureSurfaceFormulationType Formulation>
dimensions::QuantityValue< Quantity > state_value (const SurfacePoint< Formulation > &point)
 Read one thermodynamic role from its bound term, preserving the EOS argument's physical type.
 
template<typename Quantity, PressureSurfaceFormulationType Formulation>
dimensions::QuantityValue< Quantity > relation_input (const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point)
 Only the carrier-resolved formulation substitutes prescribed pressure for an EOS input.
 
template<PressureSurfaceFormulationType Formulation, typename... Quantities>
bool finite_state (const SurfacePoint< Formulation > &point, utils::dependencies::KeyList< Quantities... >)
 Validate precisely the state read by this calculation, leaving unrelated state outside its dependencies.
 
template<typename Quantity, PressureSurfaceFormulationType Formulation, typename... Inputs>
void accumulate_partial (const typename Formulation::EquationOfState &equation_of_state, const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point, SurfaceEOSResponse< Formulation > &response, dimensions::QuantityList< Inputs... >)
 Add each quantity's chain-rule contribution, including distinct roles bound to the same unknown.
 
template<PressureSurfaceFormulationType Formulation, typename... Inputs, typename... StateQuantities>
SurfaceEOSResponse< Formulation > evaluate_relation (const typename Formulation::EquationOfState &equation_of_state, const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point, dimensions::QuantityList< Inputs... > inputs, utils::dependencies::KeyList< StateQuantities... >)
 Evaluate one selected relation and all required partials without any hidden EOS inversion.
 
template<PressureSurfaceFormulationType Formulation>
std::expected< SurfaceEOSResponse< Formulation >, SurfaceFailure > evaluate_surface_response (const typename Formulation::EquationOfState &equation_of_state, const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point)
 Reject non-finite thermodynamic inputs, EOS outputs, and partials as values.
 
template<PressureSurfaceFormulationType Formulation>
SurfaceLinearization< Formulation > linearize_surface (const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point, const SurfaceEOSResponse< Formulation > &response)
 Form the declared residual from an already evaluated EOS response, keeping the carrier identity explicit.
 
template<PressureSurfaceFormulationType Formulation>
std::expected< SurfaceLinearization< Formulation >, SurfaceFailure > checked_linearization (const dimensions::PressureValue pressure, const SurfacePoint< Formulation > &point, const SurfaceEOSResponse< Formulation > &response)
 Catch overflow in residual subtraction or derivative accumulation before publishing a linearization.
 
template<typename EOS, typename Relation, typename... Quantities>
consteval bool supports_partials (utils::dependencies::KeyList< Quantities... >)
 Check only the derivatives of unknown state; prescribed pressure has no Newton column.
 
template<typename EOS, typename Bindings, typename Carrier, typename Relation>
consteval bool matches_pressure_relation ()
 A resolved carrier must be supplied by one pressure-input relation, with all remaining inputs and partials available.
 

Variables

template<typename Candidate>
constexpr bool is_pressure_surface_formulation = false
 
template<typename EOS, typename Bindings, typename Carrier>
constexpr bool is_pressure_surface_formulation< PressureSurfaceFormulation< EOS, Bindings, Carrier > > = true
 
template<typename EOS, typename Bindings, typename Relation>
constexpr bool is_pressure_surface_formulation< InversePressureSurfaceFormulation< EOS, Bindings, Relation > > = true
 
template<typename EOS, typename Bindings, typename RowQuantity, typename Relation>
constexpr bool is_pressure_surface_formulation< DirectPressureSurfaceFormulation< EOS, Bindings, RowQuantity, Relation > > = true
 
template<typename EOS, typename Bindings>
constexpr bool is_pressure_surface_formulation< PressureFieldSurfaceFormulation< EOS, Bindings > > = true
 

Typedef Documentation

◆ BoundTerms

template<typename Bindings, typename Quantities>
using serif::geometry::surface::detail::BoundTerms = typename UniqueTerms<utils::dependencies::ResolvedTargets<Bindings, Quantities>>::Type

Function Documentation

◆ accumulate_partial()

template<typename Quantity, PressureSurfaceFormulationType Formulation, typename... Inputs>
void serif::geometry::surface::detail::accumulate_partial ( const typename Formulation::EquationOfState & equation_of_state,
const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point,
SurfaceEOSResponse< Formulation > & response,
dimensions::QuantityList< Inputs... >  )

Add each quantity's chain-rule contribution, including distinct roles bound to the same unknown.

◆ checked_linearization()

template<PressureSurfaceFormulationType Formulation>
std::expected< SurfaceLinearization< Formulation >, SurfaceFailure > serif::geometry::surface::detail::checked_linearization ( const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point,
const SurfaceEOSResponse< Formulation > & response )
nodiscard

Catch overflow in residual subtraction or derivative accumulation before publishing a linearization.

◆ collect_surface_samples()

template<typename Value, typename Evaluate>
std::expected< std::vector< Value >, SurfaceFailure > serif::geometry::surface::detail::collect_surface_samples ( std::size_t count,
Evaluate evaluate )
nodiscard

Collect one ordered batch, attaching the first failure's sample index before any result is published.

◆ direct_candidate()

template<typename EOS, typename Carrier, typename Fields, typename Relation>
auto serif::geometry::surface::detail::direct_candidate ( )
nodiscardconsteval

A direct pressure relation may replace only a row belonging to one of its solved inputs.

◆ evaluate_relation()

template<PressureSurfaceFormulationType Formulation, typename... Inputs, typename... StateQuantities>
SurfaceEOSResponse< Formulation > serif::geometry::surface::detail::evaluate_relation ( const typename Formulation::EquationOfState & equation_of_state,
const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point,
dimensions::QuantityList< Inputs... > inputs,
utils::dependencies::KeyList< StateQuantities... >  )
nodiscard

Evaluate one selected relation and all required partials without any hidden EOS inversion.

◆ evaluate_response_samples()

template<PressureSurfaceFormulationType Formulation, typename... Terms>
std::expected< std::vector< SurfaceEOSResponse< Formulation > >, SurfaceFailure > serif::geometry::surface::detail::evaluate_response_samples ( const typename Formulation::EquationOfState & equation_of_state,
const dimensions::PressureValue pressure,
const BoundaryValues< Terms > &... columns )
nodiscard

Evaluate the EOS once per state sample, or once for a genuinely pressure-only relation.

◆ evaluate_surface_response()

template<PressureSurfaceFormulationType Formulation>
std::expected< SurfaceEOSResponse< Formulation >, SurfaceFailure > serif::geometry::surface::detail::evaluate_surface_response ( const typename Formulation::EquationOfState & equation_of_state,
const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point )
nodiscard

Reject non-finite thermodynamic inputs, EOS outputs, and partials as values.

Note
Existing EOS implementations can still throw their documented domain errors; these propagate to the caller.

◆ field_candidates()

template<int Priority, typename EOS, typename Field, typename Fields, typename Rows, typename SolvedTerms, typename PreferredField>
auto serif::geometry::surface::detail::field_candidates ( )
nodiscardconsteval

Search one precedence level, without asking the EOS for a relation when pressure is already an unknown.

◆ finite_state()

template<PressureSurfaceFormulationType Formulation, typename... Quantities>
bool serif::geometry::surface::detail::finite_state ( const SurfacePoint< Formulation > & point,
utils::dependencies::KeyList< Quantities... >  )
nodiscard

Validate precisely the state read by this calculation, leaving unrelated state outside its dependencies.

◆ inverse_candidate()

template<typename EOS, typename Carrier, typename Fields, typename Relation>
auto serif::geometry::surface::detail::inverse_candidate ( )
nodiscardconsteval

Test a declared inverse and every required analytic partial before publishing its formulation.

◆ linearize_carrier_samples()

template<PressureSurfaceFormulationType Formulation>
std::expected< std::vector< SurfaceLinearization< Formulation > >, SurfaceFailure > serif::geometry::surface::detail::linearize_carrier_samples ( const std::vector< SurfaceEOSResponse< Formulation > > & responses,
const BoundaryValues< typename Formulation::CarrierTerm > & carrier )
nodiscard

Broadcast only a pressure-only relation; every state-dependent carrier sample needs its own response.

◆ linearize_pressure_samples()

template<PressureSurfaceFormulationType Formulation>
std::expected< std::vector< SurfaceLinearization< Formulation > >, SurfaceFailure > serif::geometry::surface::detail::linearize_pressure_samples ( const IsobaricSurface & condition,
const std::vector< SurfaceEOSResponse< Formulation > > & responses )
nodiscard

Changing prescribed pressure reuses all values and partials of a direct-pressure EOS relation.

◆ linearize_surface()

template<PressureSurfaceFormulationType Formulation>
SurfaceLinearization< Formulation > serif::geometry::surface::detail::linearize_surface ( const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point,
const SurfaceEOSResponse< Formulation > & response )
nodiscard

Form the declared residual from an already evaluated EOS response, keeping the carrier identity explicit.

◆ make_surface_eos_computation()

template<PressureSurfaceFormulationType Formulation, template< typename > typename SampleKey, typename... Terms>
auto serif::geometry::surface::detail::make_surface_eos_computation ( utils::dependencies::KeyList< Terms... > )
nodiscard

Declare the exact EOS inputs from the formulation, so derivative metadata and cache dependencies cannot diverge.

◆ make_surface_linearization_computation()

template<PressureSurfaceFormulationType Formulation, template< typename > typename SampleKey>
auto serif::geometry::surface::detail::make_surface_linearization_computation ( )
nodiscard

Keep the inexpensive boundary residual separate from the reusable EOS response and its partials.

◆ matches_pressure_relation()

template<typename EOS, typename Bindings, typename Carrier, typename Relation>
bool serif::geometry::surface::detail::matches_pressure_relation ( )
nodiscardconsteval

A resolved carrier must be supplied by one pressure-input relation, with all remaining inputs and partials available.

◆ quantity_field()

template<typename Quantity, typename Carrier, typename... Fields>
auto serif::geometry::surface::detail::quantity_field ( utils::dependencies::KeyList< Fields... > )
nodiscardconsteval

Return a unique field for a quantity; the chosen residual carrier supplies its own quantity unambiguously.

◆ relation_bindings()

template<typename Carrier, typename Fields, typename... Quantities>
auto serif::geometry::surface::detail::relation_bindings ( utils::dependencies::KeyList< Quantities... > )
nodiscardconsteval

Bind only the quantities read by this candidate, ignoring unrelated fields and quantities.

◆ relation_candidates()

template<bool Inverse, typename EOS, typename Carrier, typename Fields, typename... Relations>
auto serif::geometry::surface::detail::relation_candidates ( eos::relations::RelationCatalog< Relations... > )
nodiscardconsteval

Keep every admissible relation; catalog order never selects a physical implementation.

◆ relation_input()

template<typename Quantity, PressureSurfaceFormulationType Formulation>
dimensions::QuantityValue< Quantity > serif::geometry::surface::detail::relation_input ( const dimensions::PressureValue pressure,
const SurfacePoint< Formulation > & point )
nodiscard

Only the carrier-resolved formulation substitutes prescribed pressure for an EOS input.

◆ select_candidates()

template<int Priority, typename EOS, typename Rows, typename SolvedTerms, typename PreferredField, typename... Fields>
auto serif::geometry::surface::detail::select_candidates ( utils::dependencies::KeyList< Fields... > fields)
nodiscardconsteval

Prefer a pressure unknown, then an explicit inverse, then a direct pressure residual.

◆ state_value()

template<typename Quantity, PressureSurfaceFormulationType Formulation>
dimensions::QuantityValue< Quantity > serif::geometry::surface::detail::state_value ( const SurfacePoint< Formulation > & point)
nodiscard

Read one thermodynamic role from its bound term, preserving the EOS argument's physical type.

◆ supports_partials()

template<typename EOS, typename Relation, typename... Quantities>
bool serif::geometry::surface::detail::supports_partials ( utils::dependencies::KeyList< Quantities... > )
nodiscardconsteval

Check only the derivatives of unknown state; prescribed pressure has no Newton column.

◆ surface_point()

template<PressureSurfaceFormulationType Formulation, typename... Terms>
SurfacePoint< Formulation > serif::geometry::surface::detail::surface_point ( const std::size_t sample,
const BoundaryValues< Terms > &... columns )
nodiscard

Assemble the conventional equation point from typed columns; no mesh assumptions enter the physical calculation.

◆ surface_sample_count()

template<typename... Terms>
std::expected< std::size_t, SurfaceFailure > serif::geometry::surface::detail::surface_sample_count ( const BoundaryValues< Terms > &... columns)
nodiscard

All EOS columns must describe the same ordered, nonempty set of boundary points.

◆ thermodynamic_fields()

template<typename... Terms>
auto serif::geometry::surface::detail::thermodynamic_fields ( utils::dependencies::KeyList< Terms... > )
nodiscardconsteval

Collect physical fields, retaining distinct terms with equal quantities so ambiguity remains visible.

Variable Documentation

◆ is_pressure_surface_formulation

template<typename Candidate>
bool serif::geometry::surface::detail::is_pressure_surface_formulation = false
inlineconstexpr

◆ is_pressure_surface_formulation< DirectPressureSurfaceFormulation< EOS, Bindings, RowQuantity, Relation > >

template<typename EOS, typename Bindings, typename RowQuantity, typename Relation>
bool serif::geometry::surface::detail::is_pressure_surface_formulation< DirectPressureSurfaceFormulation< EOS, Bindings, RowQuantity, Relation > > = true
inlineconstexpr

◆ is_pressure_surface_formulation< InversePressureSurfaceFormulation< EOS, Bindings, Relation > >

template<typename EOS, typename Bindings, typename Relation>
bool serif::geometry::surface::detail::is_pressure_surface_formulation< InversePressureSurfaceFormulation< EOS, Bindings, Relation > > = true
inlineconstexpr

◆ is_pressure_surface_formulation< PressureFieldSurfaceFormulation< EOS, Bindings > >

template<typename EOS, typename Bindings>
bool serif::geometry::surface::detail::is_pressure_surface_formulation< PressureFieldSurfaceFormulation< EOS, Bindings > > = true
inlineconstexpr

◆ is_pressure_surface_formulation< PressureSurfaceFormulation< EOS, Bindings, Carrier > >

template<typename EOS, typename Bindings, typename Carrier>
bool serif::geometry::surface::detail::is_pressure_surface_formulation< PressureSurfaceFormulation< EOS, Bindings, Carrier > > = true
inlineconstexpr