SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::eos::runtime::RuntimeCatalogDispatch< EOS, relations::RelationCatalog< RelationTs... > > Struct Template Reference

A specialization of the RuntimeCatalogDispatch struct for a catalog of relations. This specialization dispatches runtime evaluation of relations in the catalog. More...

#include <details.hpp>

Static Public Member Functions

static std::expected< double, utils::errors::SERiFErrorCode > evaluate (const void *object, const dimensions::runtime::ThermodynamicQuantityID &outputQuantity, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues)
 A helper function to evaluate a relation in the catalog at runtime. This is used to simplify the usage of std::expected in the runtime system.
 
static std::expected< double, utils::errors::SERiFErrorCode > partial_derivative (const void *object, const dimensions::runtime::ThermodynamicQuantityID &outputQuantity, const dimensions::runtime::ThermodynamicQuantityID &withRespectTo, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues)
 A helper function to evaluate a partial derivative of a relation in the catalog at runtime. This is used to simplify the usage of std::expected in the runtime system.
 

Detailed Description

template<typename EOS, typename... RelationTs>
struct serif::eos::runtime::RuntimeCatalogDispatch< EOS, relations::RelationCatalog< RelationTs... > >

A specialization of the RuntimeCatalogDispatch struct for a catalog of relations. This specialization dispatches runtime evaluation of relations in the catalog.

Template Parameters
EOSThe EOS model type that supports the relations in the catalog.
RelationTsThe relation types in the catalog.

Member Function Documentation

◆ evaluate()

template<typename EOS, typename... RelationTs>
static std::expected< double, utils::errors::SERiFErrorCode > serif::eos::runtime::RuntimeCatalogDispatch< EOS, relations::RelationCatalog< RelationTs... > >::evaluate ( const void * object,
const dimensions::runtime::ThermodynamicQuantityID & outputQuantity,
const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues )
inlinestaticnodiscard

A helper function to evaluate a relation in the catalog at runtime. This is used to simplify the usage of std::expected in the runtime system.

Parameters
objectA pointer to the EOS model instance to use for evaluation.
outputQuantityThe output quantity type to evaluate.
inputValuesThe input values to use for evaluation.
Returns
A std::expected containing the result of the evaluation or a SERiFErrorCode if the evaluation failed.

◆ partial_derivative()

template<typename EOS, typename... RelationTs>
static std::expected< double, utils::errors::SERiFErrorCode > serif::eos::runtime::RuntimeCatalogDispatch< EOS, relations::RelationCatalog< RelationTs... > >::partial_derivative ( const void * object,
const dimensions::runtime::ThermodynamicQuantityID & outputQuantity,
const dimensions::runtime::ThermodynamicQuantityID & withRespectTo,
const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues )
inlinestaticnodiscard

A helper function to evaluate a partial derivative of a relation in the catalog at runtime. This is used to simplify the usage of std::expected in the runtime system.

Parameters
objectA pointer to the EOS model instance to use for evaluation.
outputQuantityThe output quantity type to evaluate.
withRespectToThe input quantity type to take the partial derivative with respect to.
inputValuesThe input values to use for evaluation.
Returns
A std::expected containing the result of the evaluation or a SERiFErrorCode if the evaluation failed.

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