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

Classes

struct  ImplementsPartialDerivative_t
 A trait to determine if a type implements a partial derivative for a given relation and input quantity. This is the default false specialization. More...
 
struct  ImplementsRelation_t
 A trait to determine if a type is an equation of state model. This is the default false specialization. More...
 
struct  ImplementsRelationCatalog_t
 A specialization of the ImplementsRelation_t trait for a relation. This is used to determine if an EOS type implements a given relation. More...
 
struct  ImplementsRelationCatalog_t< EOS, relations::RelationCatalog< Relations... > >
 A specialization of the ImplementsRelationCatalog_t trait for a relation catalog. This is used to determine if an EOS type implements all relations in a given relation catalog. More...
 
struct  ImplementsSecondPartialDerivative_t
 A second partial is available only for two actual inputs of the relation. More...
 
struct  IsEquationOfStateModel_t
 A trait to determine if a type is an equation of state model. This is the default false specialization. More...
 
struct  IsEquationOfStateModel_t< EOSCandidate, std::void_t< typename std::remove_cvref_t< EOSCandidate >::Relations > >
 A specialization of the IsEquationOfStateModel_t trait for a type that has a Relations type alias. A candidate is an equation of state model if it has a valid relation catalog and implements all relations in that catalog. More...
 
class  Polytrope
 
struct  PolytropeParameters
 A struct to hold the parameters for a polytropic equation of state. More...
 

Concepts

concept  EOSModel
 A concept to determine if a type is an equation of state model. A type is a valid EOSModel if it satisfies the is_equation_of_state_model_v trait.
 
concept  EOSSupportingRelation
 A concept to determine if a type is an equation of state model that supports a given relation. A type is a valid EOSSupportingRelation if it satisfies the supports_relation_v trait.
 
concept  EOSSupportingPartialDerivative
 A concept to determine if a type is an equation of state model that supports a given relation and a given input quantity. A type is a valid EOSSupportingPartialDerivative if it satisfies the supports_partial_derivative_v trait.
 
concept  EOSSupportingSecondPartialDerivative
 Require a declared EOS relation and its analytic second partial.
 
concept  StructureSeedEOS
 A concept to determine if a type is an equation of state model that can be used in the current SERiF seed initialization system. This is satisfied for types that are both valid EOSModels and which also support the relation for computing specific enthalpy from density.
 

Enumerations

enum class  SERiFErrorCode
 

Functions

template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsNumeric Scalar>
void validate_finite (const Scalar value)
 
template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void validate_greater_than (const Scalar value, const Scalar predicate)
 
template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void validate_less_than (const Scalar value, const Scalar predicate)
 
template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void validate_nonnegativity (const Scalar value)
 

Variables

template<typename EOSCandidate>
constexpr bool is_equation_of_state_model_v = IsEquationOfStateModel_t<std::remove_cvref_t<EOSCandidate>>::value
 A specialization of the ImplementsPartialDerivative_t trait for a relation and input quantity. This is used to determine if an EOS type implements a partial derivative for a given relation and input quantity.
 
template<typename EOS, typename RelationT>
constexpr bool supports_relation_v = is_equation_of_state_model_v<EOS> && ImplementsRelation_t<std::remove_cvref_t<EOS>, std::remove_cvref_t<RelationT>>::value
 Require an analytic implementation with the exact physical return type.
 
template<typename EOS, typename RelationT, typename InputQuantity>
constexpr bool supports_partial_derivative_v = is_equation_of_state_model_v<EOS> && ImplementsPartialDerivative_t<std::remove_cvref_t<EOS>, std::remove_cvref_t<RelationT>, InputQuantity>::value
 A variable template to determine if an EOS type supports a partial derivative for a given relation and input quantity.
 

Enumeration Type Documentation

◆ SERiFErrorCode

enum class serif::utils::errors::SERiFErrorCode : uint16_t
strong

Function Documentation

◆ validate_finite()

template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsNumeric Scalar>
void serif::utils::misc::validate_finite ( const Scalar value)

◆ validate_greater_than()

template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void serif::utils::misc::validate_greater_than ( const Scalar value,
const Scalar predicate )

◆ validate_less_than()

template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void serif::utils::misc::validate_less_than ( const Scalar value,
const Scalar predicate )

◆ validate_nonnegativity()

template<typename ExceptionType, errors::SERiFErrorCode ErrorCode, concepts::IsComparableToNumeric Scalar>
void serif::utils::misc::validate_nonnegativity ( const Scalar value)

Variable Documentation

◆ is_equation_of_state_model_v

template<typename EOSCandidate>
bool serif::eos::models::is_equation_of_state_model_v = IsEquationOfStateModel_t<std::remove_cvref_t<EOSCandidate>>::value
inlineconstexpr

A specialization of the ImplementsPartialDerivative_t trait for a relation and input quantity. This is used to determine if an EOS type implements a partial derivative for a given relation and input quantity.

Template Parameters
EOSThe EOS type to check.
OutputThe output quantity of the relation.
InputsThe input quantities of the relation.
InputQuantityThe input quantity to check.

A variable template to determine if a type is an equation of state model.

Template Parameters
EOSCandidateThe type to check.

◆ supports_partial_derivative_v

template<typename EOS, typename RelationT, typename InputQuantity>
bool serif::eos::models::supports_partial_derivative_v = is_equation_of_state_model_v<EOS> && ImplementsPartialDerivative_t<std::remove_cvref_t<EOS>, std::remove_cvref_t<RelationT>, InputQuantity>::value
inlineconstexpr

A variable template to determine if an EOS type supports a partial derivative for a given relation and input quantity.

Template Parameters
EOSThe EOS type to check.
RelationTThe relation to check.
InputQuantityThe input quantity to check.

◆ supports_relation_v

template<typename EOS, typename RelationT>
bool serif::eos::models::supports_relation_v = is_equation_of_state_model_v<EOS> && ImplementsRelation_t<std::remove_cvref_t<EOS>, std::remove_cvref_t<RelationT>>::value
inlineconstexpr

Require an analytic implementation with the exact physical return type.

A variable template to determine if an EOS type supports a given relation.

Template Parameters
EOSThe EOS type to check.
RelationTThe relation to check.