Files
MeanField_SERiF/docs/man/man3/serif_eos_runtime.3

368 lines
18 KiB
Groff
Raw Permalink Normal View History

.TH "serif::eos::runtime" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
.ad l
.nh
.SH NAME
serif::eos::runtime
.SH SYNOPSIS
.br
.PP
.SS "Classes"
.in +1c
.ti -1c
.RI "class \fBEOSView\fP"
.br
.RI "A class to provide a runtime view of an EOS model and its relations\&. This class is used to provide a uniform interface for evaluating relations and partial derivatives at runtime\&. "
.ti -1c
.RI "struct \fBHasRuntimeQuantityIdentifiers\fP"
.br
.RI "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\&. "
.ti -1c
.RI "struct \fBHasRuntimeQuantityIdentifiers< relations::Relation< OutputT, InputTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBHasRuntimeQuantityIdentifiers\fP trait for a relation\&. This specialization checks if the output and input quantities of the relation have runtime quantity identifiers\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogDispatch\fP"
.br
.RI "A helper struct to dispatch runtime evaluation of relations in a catalog\&. This is used to simplify the usage of std::expected in the runtime system\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogDispatch< EOS, relations::RelationCatalog< RelationTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBRuntimeCatalogDispatch\fP struct for a catalog of relations\&. This specialization dispatches runtime evaluation of relations in the catalog\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogIsSupported\fP"
.br
.RI "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\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogIsSupported< relations::RelationCatalog< RelationTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBRuntimeCatalogIsSupported\fP 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\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogStorage\fP"
.br
.RI "A helper struct to store the runtime relation descriptors for a catalog of relations\&. This is used to ensure that all relations in a catalog have unique runtime quantity identifiers\&. "
.ti -1c
.RI "struct \fBRuntimeCatalogStorage< EOS, relations::RelationCatalog< RelationTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBRuntimeCatalogStorage\fP struct for a catalog of relations\&. This specialization stores the runtime relation descriptors for each relation in the catalog\&. "
.ti -1c
.RI "struct \fBRuntimeRelationQuantities\fP"
.br
.RI "A helper trait to extract the output and input quantity types from a relation\&. This is used to simplify the usage of relations in the runtime system\&. "
.ti -1c
.RI "struct \fBRuntimeRelationQuantities< relations::Relation< OutputT, InputTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBRuntimeRelationQuantities\fP trait for a relation\&. This specialization extracts the output and input quantity types from the relation and stores them in a tuple\&. "
.ti -1c
.RI "struct \fBRuntimeRelationsAreSupported\fP"
.br
.RI "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\&. "
.ti -1c
.RI "struct \fBRuntimeRelationsAreSupported< true, RelationTs\&.\&.\&. >\fP"
.br
.RI "A specialization of the \fBRuntimeRelationsAreSupported\fP trait for a catalog of relations\&. This specialization checks if the runtime quantity identifiers in the catalog are unambiguous\&. "
.ti -1c
.RI "struct \fBRuntimeRelationStorage\fP"
.br
.RI "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\&. "
.ti -1c
.RI "struct \fBRuntimeRelationStorage< EOS, relations::Relation< OutputT, InputTs\&.\&.\&. > >\fP"
.br
.RI "A specialization of the \fBRuntimeRelationStorage\fP trait for a relation\&. This specialization extracts the output and input quantity types from the relation and stores them in a tuple\&. "
.in -1c
.SS "Concepts"
.in +1c
.ti -1c
.RI "concept \fBRuntimeEOSModel\fP"
.br
.RI "A concept to determine if a type is a valid runtime EOS model\&. A type is a valid RuntimeEOSModel if it satisfies the EOSModel concept and if its Relations catalog is supported by the runtime system\&. "
.in -1c
.SS "Typedefs"
.in +1c
.ti -1c
.RI "template<RuntimeEOSModel EOSCandidate> using \fBRuntimeEOSAdapter\fP = \fBRuntimeCatalogDispatch\fP<EOSCandidate, typename EOSCandidate::Relations>"
.br
.RI "A helper alias to adapt a runtime EOS model to the runtime catalog dispatch system\&. This is used to simplify the usage of runtime EOS models in the runtime system\&. "
.ti -1c
.RI "template<typename\&.\&.\&. RelationTs> using \fBRuntimeCatalogQuantityTuple\fP = decltype(std::tuple_cat(std::declval<typename \fBRuntimeRelationQuantities\fP<RelationTs>::Type>()\&.\&.\&.))"
.br
.RI "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\&. "
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "template<RuntimeEOSModel EOSCandidate> constexpr std::span< const \fBdimensions::runtime::RuntimeRelationDescriptor\fP > \fBruntimeRelationDescriptors\fP () noexcept"
.br
.RI "A helper function to get the runtime relation descriptors for a runtime EOS model\&. This is used to simplify the usage of runtime EOS models in the runtime system\&. "
.ti -1c
.RI "template<typename FirstQuantityT, typename SecondQuantityT> consteval bool \fBruntimeQuantityIdentifiersAreCompatible\fP ()"
.br
.RI "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\&. "
.ti -1c
.RI "template<typename QuantityTupleT, std::size_t First, std::size_t\&.\&.\&. Offsets> consteval bool \fBruntimeQuantityIdentifierIsUnambiguous\fP (std::index_sequence< Offsets\&.\&.\&. >)"
.br
.RI "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\&. "
.ti -1c
.RI "template<typename QuantityTupleT, std::size_t\&.\&.\&. Indices> consteval bool \fBruntimeQuantityIdentifiersAreUnambiguous\fP (std::index_sequence< Indices\&.\&.\&. >)"
.br
.RI "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\&. "
.ti -1c
.RI "std::expected< double, \fButils::errors::SERiFErrorCode\fP > \fBruntimeEvaluationFailure\fP (const \fButils::errors::SERiFErrorCode\fP code)"
.br
.RI "A helper function to create a std::unexpected with a \fBSERiFErrorCode\fP\&. This is used to simplify the usage of std::expected in the runtime system\&. "
.ti -1c
.RI "template<typename EOS, typename OutputT, typename\&.\&.\&. InputTs> std::expected< double, \fButils::errors::SERiFErrorCode\fP > \fBevaluateRuntimeRelation\fP (const EOS &eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. >, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)"
.br
.RI "A helper function to evaluate a relation at runtime\&. This is used to simplify the usage of std::expected in the runtime system\&. "
.ti -1c
.RI "template<typename InputQuantityT, typename EOS, typename OutputT, typename\&.\&.\&. InputTs> bool \fBtryRuntimePartialDerivative\fP (const EOS &eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. >, const \fBdimensions::runtime::ThermodynamicQuantityID\fP withRespectTo, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues, std::expected< double, \fButils::errors::SERiFErrorCode\fP > &result)"
.br
.RI "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\&. "
.ti -1c
.RI "template<typename EOS, typename OutputT, typename\&.\&.\&. InputTs> std::expected< double, \fButils::errors::SERiFErrorCode\fP > \fBevaluateRuntimePartialDerivative\fP (const EOS &eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. > relation, const \fBdimensions::runtime::ThermodynamicQuantityID\fP withRespectTo, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)"
.br
.RI "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\&. "
.ti -1c
.RI "template<typename EOS, typename RelationT> bool \fBruntimeRelationMatches\fP (const \fBdimensions::runtime::ThermodynamicQuantityID\fP outputQuantityID, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)"
.br
.RI "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\&. "
.in -1c
.SH "Typedef Documentation"
.PP
.SS "template<typename\&.\&.\&. RelationTs> using \fBserif::eos::runtime::RuntimeCatalogQuantityTuple\fP = decltype(std::tuple_cat(std::declval<typename \fBRuntimeRelationQuantities\fP<RelationTs>::Type>()\&.\&.\&.))"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIRelationTs\fP The relation types in the catalog\&.
.RE
.PP
.SS "template<RuntimeEOSModel EOSCandidate> using \fBserif::eos::runtime::RuntimeEOSAdapter\fP = \fBRuntimeCatalogDispatch\fP<EOSCandidate, typename EOSCandidate::Relations>"
.PP
A helper alias to adapt a runtime EOS model to the runtime catalog dispatch system\&. This is used to simplify the usage of runtime EOS models in the runtime system\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOSCandidate\fP The runtime EOS model type to adapt\&.
.RE
.PP
.SH "Function Documentation"
.PP
.SS "template<typename EOS, typename OutputT, typename\&.\&.\&. InputTs> std::expected< double, \fButils::errors::SERiFErrorCode\fP > serif::eos::runtime::evaluateRuntimePartialDerivative (const EOS & eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. > relation, const \fBdimensions::runtime::ThermodynamicQuantityID\fP withRespectTo, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)\fR [nodiscard]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOS\fP The EOS model type that supports the relation\&.
.br
\fIOutputT\fP The output quantity type of the relation\&.
.br
\fIInputTs\fP The input quantity types of the relation\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIeos\fP The EOS model instance to use for evaluation\&.
.br
\fIrelation\fP The relation to evaluate\&.
.br
\fIwithRespectTo\fP The input quantity type to take the partial derivative with respect to\&.
.br
\fIinputValues\fP The input values to use for evaluation\&.
.RE
.PP
\fBReturns\fP
.RS 4
A std::expected containing the result of the evaluation or a \fBSERiFErrorCode\fP if the evaluation failed\&.
.RE
.PP
.SS "template<typename EOS, typename OutputT, typename\&.\&.\&. InputTs> std::expected< double, \fButils::errors::SERiFErrorCode\fP > serif::eos::runtime::evaluateRuntimeRelation (const EOS & eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. > , const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)\fR [nodiscard]\fP"
.PP
A helper function to evaluate a relation at runtime\&. This is used to simplify the usage of std::expected in the runtime system\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOS\fP The EOS model type that supports the relation\&.
.br
\fIOutputT\fP The output quantity type of the relation\&.
.br
\fIInputTs\fP The input quantity types of the relation\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIeos\fP The EOS model instance to use for evaluation\&.
.br
\fIrelation\fP The relation to evaluate\&.
.br
\fIinputValues\fP The input values to use for evaluation\&.
.RE
.PP
\fBReturns\fP
.RS 4
A std::expected containing the result of the evaluation or a \fBSERiFErrorCode\fP if the evaluation failed\&.
.RE
.PP
.SS "std::expected< double, \fButils::errors::SERiFErrorCode\fP > serif::eos::runtime::runtimeEvaluationFailure (const \fButils::errors::SERiFErrorCode\fP code)\fR [inline]\fP, \fR [nodiscard]\fP"
.PP
A helper function to create a std::unexpected with a \fBSERiFErrorCode\fP\&. This is used to simplify the usage of std::expected in the runtime system\&.
.PP
\fBParameters\fP
.RS 4
\fIcode\fP The \fBSERiFErrorCode\fP to wrap in a std::unexpected\&.
.RE
.PP
\fBReturns\fP
.RS 4
A std::unexpected containing the given \fBSERiFErrorCode\fP\&.
.RE
.PP
.SS "template<typename QuantityTupleT, std::size_t First, std::size_t\&.\&.\&. Offsets> bool serif::eos::runtime::runtimeQuantityIdentifierIsUnambiguous (std::index_sequence< Offsets\&.\&.\&. > )\fR [nodiscard]\fP, \fR [consteval]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIQuantityTupleT\fP The tuple of quantity types to check\&.
.br
\fIFirst\fP The index of the first quantity type to check\&.
.br
\fIOffsets\fP The indices of the remaining quantity types to check\&.
.RE
.PP
\fBReturns\fP
.RS 4
True if the quantity identifiers are unambiguous, false otherwise\&.
.RE
.PP
.SS "template<typename FirstQuantityT, typename SecondQuantityT> bool serif::eos::runtime::runtimeQuantityIdentifiersAreCompatible ()\fR [nodiscard]\fP, \fR [consteval]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIFirstQuantityT\fP The first quantity type to check\&.
.br
\fISecondQuantityT\fP The second quantity type to check\&.
.RE
.PP
\fBReturns\fP
.RS 4
True if the quantity identifiers are compatible, false otherwise\&.
.RE
.PP
.SS "template<typename QuantityTupleT, std::size_t\&.\&.\&. Indices> bool serif::eos::runtime::runtimeQuantityIdentifiersAreUnambiguous (std::index_sequence< Indices\&.\&.\&. > )\fR [nodiscard]\fP, \fR [consteval]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIQuantityTupleT\fP The tuple of quantity types to check\&.
.br
\fIIndices\fP The indices of the quantity types to check\&.
.RE
.PP
\fBReturns\fP
.RS 4
True if the quantity identifiers are unambiguous, false otherwise\&.
.RE
.PP
.SS "template<RuntimeEOSModel EOSCandidate> std::span< const \fBdimensions::runtime::RuntimeRelationDescriptor\fP > serif::eos::runtime::runtimeRelationDescriptors ()\fR [nodiscard]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP"
.PP
A helper function to get the runtime relation descriptors for a runtime EOS model\&. This is used to simplify the usage of runtime EOS models in the runtime system\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOSCandidate\fP The runtime EOS model type to get the descriptors for\&.
.RE
.PP
\fBReturns\fP
.RS 4
A span of runtime relation descriptors\&.
.RE
.PP
.SS "template<typename EOS, typename RelationT> bool serif::eos::runtime::runtimeRelationMatches (const \fBdimensions::runtime::ThermodynamicQuantityID\fP outputQuantityID, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues)\fR [nodiscard]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIEOS\fP The EOS model type that supports the relation\&.
.br
\fIRelationT\fP The relation type to check\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIoutputQuantityID\fP The output quantity type to check\&.
.br
\fIinputValues\fP The input values to check\&.
.RE
.PP
\fBReturns\fP
.RS 4
True if the relation matches the given output quantity and input quantities, false otherwise\&.
.RE
.PP
.SS "template<typename InputQuantityT, typename EOS, typename OutputT, typename\&.\&.\&. InputTs> bool serif::eos::runtime::tryRuntimePartialDerivative (const EOS & eos, \fBrelations::Relation\fP< OutputT, InputTs\&.\&.\&. > , const \fBdimensions::runtime::ThermodynamicQuantityID\fP withRespectTo, const std::span< const \fBdimensions::runtime::RuntimeQuantityValue\fP > inputValues, std::expected< double, \fButils::errors::SERiFErrorCode\fP > & result)\fR [nodiscard]\fP"
.PP
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\&.
.PP
\fBTemplate Parameters\fP
.RS 4
\fIInputQuantityT\fP The input quantity type to take the partial derivative with respect to\&.
.br
\fIEOS\fP The EOS model type that supports the relation\&.
.br
\fIOutputT\fP The output quantity type of the relation\&.
.br
\fIInputTs\fP The input quantity types of the relation\&.
.RE
.PP
\fBParameters\fP
.RS 4
\fIeos\fP The EOS model instance to use for evaluation\&.
.br
\fIrelation\fP The relation to evaluate\&.
.br
\fIwithRespectTo\fP The input quantity type to take the partial derivative with respect to\&.
.br
\fIinputValues\fP The input values to use for evaluation\&.
.RE
.PP
\fBReturns\fP
.RS 4
A std::expected containing the result of the evaluation or a \fBSERiFErrorCode\fP if the evaluation failed\&.
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for SERiF from the source code\&.