SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
details.hpp File Reference

File containing implementation details for the eos runtime module. These details are used internally by the runtime system and are not intended to be used directly by users. More...

#include <array>
#include <type_traits>
#include <tuple>
#include <expected>
#include "serif/dimensions/runtime/concepts.hpp"
#include "serif/eos/exceptions.hpp"
#include "serif/eos/evaluation.hpp"
#include "serif/eos/relations/catalog.hpp"
#include "serif/utils/error/codes.hpp"
Include dependency graph for details.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  serif::eos::runtime::HasRuntimeQuantityIdentifiers< RelationT >
 A helper trait to determine if a relation has runtime quantity identifiers. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers. More...
 
struct  serif::eos::runtime::HasRuntimeQuantityIdentifiers< relations::Relation< OutputT, InputTs... > >
 A specialization of the HasRuntimeQuantityIdentifiers trait for a relation. This specialization checks if the output and input quantities of the relation have runtime quantity identifiers. More...
 
struct  serif::eos::runtime::RuntimeRelationQuantities< relations::Relation< OutputT, InputTs... > >
 A specialization of the RuntimeRelationQuantities trait for a relation. This specialization extracts the output and input quantity types from the relation and stores them in a tuple. More...
 
struct  serif::eos::runtime::RuntimeRelationsAreSupported< QuantitiesAreIdentified, RelationTs >
 A helper trait to determine if the runtime quantity identifiers in a catalog of relations are unambiguous. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers. More...
 
struct  serif::eos::runtime::RuntimeRelationsAreSupported< true, RelationTs... >
 A specialization of the RuntimeRelationsAreSupported trait for a catalog of relations. This specialization checks if the runtime quantity identifiers in the catalog are unambiguous. More...
 
struct  serif::eos::runtime::RuntimeCatalogIsSupported< CatalogT >
 A helper trait to determine if a catalog of relations is supported by the runtime system. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers. More...
 
struct  serif::eos::runtime::RuntimeCatalogIsSupported< relations::RelationCatalog< RelationTs... > >
 A specialization of the RuntimeCatalogIsSupported trait for a catalog of relations. This specialization checks if the relations in the catalog have runtime quantity identifiers and if the runtime quantity identifiers are unambiguous. More...
 
struct  serif::eos::runtime::RuntimeRelationStorage< EOS, relations::Relation< OutputT, InputTs... > >
 A specialization of the RuntimeRelationStorage trait for a relation. This specialization extracts the output and input quantity types from the relation and stores them in a tuple. More...
 
struct  serif::eos::runtime::RuntimeCatalogStorage< EOS, relations::RelationCatalog< RelationTs... > >
 A specialization of the RuntimeCatalogStorage struct for a catalog of relations. This specialization stores the runtime relation descriptors for each relation in the catalog. More...
 
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. More...
 

Namespaces

namespace  serif
 
namespace  serif::eos
 
namespace  serif::eos::runtime
 

Typedefs

template<typename... RelationTs>
using serif::eos::runtime::RuntimeCatalogQuantityTuple = decltype(std::tuple_cat(std::declval<typename RuntimeRelationQuantities<RelationTs>::Type>()...))
 A helper alias to extract the quantity types from a catalog of relations. This is used to simplify the usage of catalogs in the runtime system.
 

Functions

template<typename FirstQuantityT, typename SecondQuantityT>
consteval bool serif::eos::runtime::runtimeQuantityIdentifiersAreCompatible ()
 A helper function to determine if two runtime quantity identifiers are compatible. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers.
 
template<typename QuantityTupleT, std::size_t First, std::size_t... Offsets>
consteval bool serif::eos::runtime::runtimeQuantityIdentifierIsUnambiguous (std::index_sequence< Offsets... >)
 A helper function to determine if the runtime quantity identifiers in a tuple of quantity types are unambiguous. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers.
 
template<typename QuantityTupleT, std::size_t... Indices>
consteval bool serif::eos::runtime::runtimeQuantityIdentifiersAreUnambiguous (std::index_sequence< Indices... >)
 A helper function to determine if the runtime quantity identifiers in a tuple of quantity types are unambiguous. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers.
 
std::expected< double, utils::errors::SERiFErrorCode > serif::eos::runtime::runtimeEvaluationFailure (const utils::errors::SERiFErrorCode code)
 A helper function to create a std::unexpected with a SERiFErrorCode. This is used to simplify the usage of std::expected in the runtime system.
 
template<typename EOS, typename OutputT, typename... InputTs>
std::expected< double, utils::errors::SERiFErrorCode > serif::eos::runtime::evaluateRuntimeRelation (const EOS &eos, relations::Relation< OutputT, InputTs... >, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues)
 A helper function to evaluate a relation at runtime. This is used to simplify the usage of std::expected in the runtime system.
 
template<typename InputQuantityT, typename EOS, typename OutputT, typename... InputTs>
bool serif::eos::runtime::tryRuntimePartialDerivative (const EOS &eos, relations::Relation< OutputT, InputTs... >, const dimensions::runtime::ThermodynamicQuantityID withRespectTo, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues, std::expected< double, utils::errors::SERiFErrorCode > &result)
 A helper function to evaluate a partial derivative of a relation at runtime. This is used to simplify the usage of std::expected in the runtime system.
 
template<typename EOS, typename OutputT, typename... InputTs>
std::expected< double, utils::errors::SERiFErrorCode > serif::eos::runtime::evaluateRuntimePartialDerivative (const EOS &eos, relations::Relation< OutputT, InputTs... > relation, const dimensions::runtime::ThermodynamicQuantityID withRespectTo, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues)
 A helper function to evaluate a partial derivative of a relation at runtime. This is used to simplify the usage of std::expected in the runtime system.
 
template<typename EOS, typename RelationT>
bool serif::eos::runtime::runtimeRelationMatches (const dimensions::runtime::ThermodynamicQuantityID outputQuantityID, const std::span< const dimensions::runtime::RuntimeQuantityValue > inputValues)
 A helper function to determine if a relation matches the given output quantity and input quantities at runtime. This is used to simplify the usage of std::expected in the runtime system.
 

Detailed Description

File containing implementation details for the eos runtime module. These details are used internally by the runtime system and are not intended to be used directly by users.

Author
Emily M. Boudreaux