Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
95 lines
14 KiB
TeX
95 lines
14 KiB
TeX
\doxysection{src/include/serif/eos/runtime/details.hpp File Reference}
|
|
\hypertarget{eos_2runtime_2details_8hpp}{}\label{eos_2runtime_2details_8hpp}\index{src/include/serif/eos/runtime/details.hpp@{src/include/serif/eos/runtime/details.hpp}}
|
|
|
|
|
|
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.
|
|
|
|
|
|
{\ttfamily \#include $<$array$>$}\newline
|
|
{\ttfamily \#include $<$type\+\_\+traits$>$}\newline
|
|
{\ttfamily \#include $<$tuple$>$}\newline
|
|
{\ttfamily \#include $<$expected$>$}\newline
|
|
{\ttfamily \#include "{}serif/dimensions/runtime/concepts.\+hpp"{}}\newline
|
|
{\ttfamily \#include "{}serif/eos/exceptions.\+hpp"{}}\newline
|
|
{\ttfamily \#include "{}serif/eos/evaluation.\+hpp"{}}\newline
|
|
{\ttfamily \#include "{}serif/eos/relations/catalog.\+hpp"{}}\newline
|
|
{\ttfamily \#include "{}serif/utils/error/codes.\+hpp"{}}\newline
|
|
Include dependency graph for details.\+hpp\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{eos_2runtime_2details_8hpp__incl}
|
|
\end{center}
|
|
\end{figure}
|
|
This graph shows which files directly or indirectly include this file\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=350pt]{eos_2runtime_2details_8hpp__dep__incl}
|
|
\end{center}
|
|
\end{figure}
|
|
\doxysubsubsection*{Classes}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_has_runtime_quantity_identifiers}{serif\+::eos\+::runtime\+::\+Has\+Runtime\+Quantity\+Identifiers$<$ Relation\+T $>$}}
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_has_runtime_quantity_identifiers_3_01relations_1_1_relation_3_cccf8857ab0156cf2afc2677bc16446c}{serif\+::eos\+::runtime\+::\+Has\+Runtime\+Quantity\+Identifiers$<$ relations\+::\+Relation$<$ Output\+T, Input\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_has_runtime_quantity_identifiers}{Has\+Runtime\+Quantity\+Identifiers} trait for a relation. This specialization checks if the output and input quantities of the relation have runtime quantity identifiers. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_relation_quantities_3_01relations_1_1_relation_3_01_ou3e28a4892e3a6a07a1f901a4b02b1a2d}{serif\+::eos\+::runtime\+::\+Runtime\+Relation\+Quantities$<$ relations\+::\+Relation$<$ Output\+T, Input\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_relation_quantities}{Runtime\+Relation\+Quantities} trait for a relation. This specialization extracts the output and input quantity types from the relation and stores them in a tuple. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_relations_are_supported}{serif\+::eos\+::runtime\+::\+Runtime\+Relations\+Are\+Supported$<$ Quantities\+Are\+Identified, Relation\+Ts $>$}}
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_relations_are_supported_3_01true_00_01_relation_ts_8_8_8_01_4}{serif\+::eos\+::runtime\+::\+Runtime\+Relations\+Are\+Supported$<$ true, Relation\+Ts... $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_relations_are_supported}{Runtime\+Relations\+Are\+Supported} trait for a catalog of relations. This specialization checks if the runtime quantity identifiers in the catalog are unambiguous. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_is_supported}{serif\+::eos\+::runtime\+::\+Runtime\+Catalog\+Is\+Supported$<$ Catalog\+T $>$}}
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_is_supported_3_01relations_1_1_relation_cataloe1dd4e8866d49db6ba530e370961bebe}{serif\+::eos\+::runtime\+::\+Runtime\+Catalog\+Is\+Supported$<$ relations\+::\+Relation\+Catalog$<$ Relation\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_is_supported}{Runtime\+Catalog\+Is\+Supported} 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. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_relation_storage_3_01_e_o_s_00_01relations_1_1_relatio1af2754f79c06f8e77304f983650b533}{serif\+::eos\+::runtime\+::\+Runtime\+Relation\+Storage$<$ EOS, relations\+::\+Relation$<$ Output\+T, Input\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_relation_storage}{Runtime\+Relation\+Storage} trait for a relation. This specialization extracts the output and input quantity types from the relation and stores them in a tuple. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_storage_3_01_e_o_s_00_01relations_1_1_relation983e333b4bd596c3958f49a1bba13994}{serif\+::eos\+::runtime\+::\+Runtime\+Catalog\+Storage$<$ EOS, relations\+::\+Relation\+Catalog$<$ Relation\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_storage}{Runtime\+Catalog\+Storage} struct for a catalog of relations. This specialization stores the runtime relation descriptors for each relation in the catalog. \end{DoxyCompactList}\item
|
|
struct \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_dispatch_3_01_e_o_s_00_01relations_1_1_relatio0166b9bbd8882975b3d1325bcdcd27cb}{serif\+::eos\+::runtime\+::\+Runtime\+Catalog\+Dispatch$<$ EOS, relations\+::\+Relation\+Catalog$<$ Relation\+Ts... $>$ $>$}}
|
|
\begin{DoxyCompactList}\small\item\em A specialization of the \doxylink{structserif_1_1eos_1_1runtime_1_1_runtime_catalog_dispatch}{Runtime\+Catalog\+Dispatch} struct for a catalog of relations. This specialization dispatches runtime evaluation of relations in the catalog. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
\doxysubsubsection*{Namespaces}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
namespace \mbox{\hyperlink{namespaceserif}{serif}}
|
|
\item
|
|
namespace \mbox{\hyperlink{namespaceserif_1_1eos}{serif\+::eos}}
|
|
\item
|
|
namespace \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime}{serif\+::eos\+::runtime}}
|
|
\end{DoxyCompactItemize}
|
|
\doxysubsubsection*{Typedefs}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
{\footnotesize template$<$typename... Relation\+Ts$>$ }\\using \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a401a6ebdc70fa8ebcaa52ae6d85088c3}{serif\+::eos\+::runtime\+::\+Runtime\+Catalog\+Quantity\+Tuple}} = decltype(std\+::tuple\+\_\+cat(std\+::declval$<$typename \mbox{\hyperlink{structserif_1_1eos_1_1runtime_1_1_runtime_relation_quantities}{Runtime\+Relation\+Quantities}}$<$Relation\+Ts$>$\+::\+Type$>$()...))
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
\doxysubsubsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
{\footnotesize template$<$typename First\+QuantityT, typename Second\+QuantityT$>$ }\\consteval bool \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_ad0ac24809585cfe3727b7c54825ee888}{serif\+::eos\+::runtime\+::runtime\+Quantity\+Identifiers\+Are\+Compatible}} ()
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename Quantity\+TupleT, std\+::size\+\_\+t First, std\+::size\+\_\+t... Offsets$>$ }\\consteval bool \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_af820c5291bf57d6f96d7394880ae120d}{serif\+::eos\+::runtime\+::runtime\+Quantity\+Identifier\+Is\+Unambiguous}} (std\+::index\+\_\+sequence$<$ Offsets... $>$)
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename Quantity\+TupleT, std\+::size\+\_\+t... Indices$>$ }\\consteval bool \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a70b84b0bdf6dfd9a32811741eeb5904c}{serif\+::eos\+::runtime\+::runtime\+Quantity\+Identifiers\+Are\+Unambiguous}} (std\+::index\+\_\+sequence$<$ Indices... $>$)
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
std\+::expected$<$ double, \mbox{\hyperlink{namespaceserif_1_1utils_1_1errors_ab04484c13887f78337c2331fb2911346}{utils\+::errors\+::\+SERi\+FError\+Code}} $>$ \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a6bf81d411b0ecbf037e521c4fd9a73fd}{serif\+::eos\+::runtime\+::runtime\+Evaluation\+Failure}} (const \mbox{\hyperlink{namespaceserif_1_1utils_1_1errors_ab04484c13887f78337c2331fb2911346}{utils\+::errors\+::\+SERi\+FError\+Code}} code)
|
|
\begin{DoxyCompactList}\small\item\em A helper function to create a std\+::unexpected with a \doxylink{views_8cpp_ab04484c13887f78337c2331fb2911346}{SERi\+FError\+Code}. This is used to simplify the usage of std\+::expected in the runtime system. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename EOS, typename OutputT, typename... Input\+Ts$>$ }\\std\+::expected$<$ double, \mbox{\hyperlink{namespaceserif_1_1utils_1_1errors_ab04484c13887f78337c2331fb2911346}{utils\+::errors\+::\+SERi\+FError\+Code}} $>$ \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_ada3bf0e8223991d705767cfedd798d0e}{serif\+::eos\+::runtime\+::evaluate\+Runtime\+Relation}} (const EOS \&eos, \mbox{\hyperlink{structserif_1_1eos_1_1relations_1_1_relation}{relations\+::\+Relation}}$<$ OutputT, Input\+Ts... $>$, const std\+::span$<$ const \mbox{\hyperlink{structserif_1_1dimensions_1_1runtime_1_1_runtime_quantity_value}{dimensions\+::runtime\+::\+Runtime\+Quantity\+Value}} $>$ input\+Values)
|
|
\begin{DoxyCompactList}\small\item\em A helper function to evaluate a relation at runtime. This is used to simplify the usage of std\+::expected in the runtime system. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename Input\+QuantityT, typename EOS, typename OutputT, typename... Input\+Ts$>$ }\\bool \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a7a12dde1e7beb91e5714eb5f058b21b9}{serif\+::eos\+::runtime\+::try\+Runtime\+Partial\+Derivative}} (const EOS \&eos, \mbox{\hyperlink{structserif_1_1eos_1_1relations_1_1_relation}{relations\+::\+Relation}}$<$ OutputT, Input\+Ts... $>$, const \mbox{\hyperlink{classserif_1_1dimensions_1_1runtime_1_1_thermodynamic_quantity_i_d}{dimensions\+::runtime\+::\+Thermodynamic\+Quantity\+ID}} with\+Respect\+To, const std\+::span$<$ const \mbox{\hyperlink{structserif_1_1dimensions_1_1runtime_1_1_runtime_quantity_value}{dimensions\+::runtime\+::\+Runtime\+Quantity\+Value}} $>$ input\+Values, std\+::expected$<$ double, \mbox{\hyperlink{namespaceserif_1_1utils_1_1errors_ab04484c13887f78337c2331fb2911346}{utils\+::errors\+::\+SERi\+FError\+Code}} $>$ \&result)
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename EOS, typename OutputT, typename... Input\+Ts$>$ }\\std\+::expected$<$ double, \mbox{\hyperlink{namespaceserif_1_1utils_1_1errors_ab04484c13887f78337c2331fb2911346}{utils\+::errors\+::\+SERi\+FError\+Code}} $>$ \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a8b97b3741d11fdc026685bd5c857404d}{serif\+::eos\+::runtime\+::evaluate\+Runtime\+Partial\+Derivative}} (const EOS \&eos, \mbox{\hyperlink{structserif_1_1eos_1_1relations_1_1_relation}{relations\+::\+Relation}}$<$ OutputT, Input\+Ts... $>$ relation, const \mbox{\hyperlink{classserif_1_1dimensions_1_1runtime_1_1_thermodynamic_quantity_i_d}{dimensions\+::runtime\+::\+Thermodynamic\+Quantity\+ID}} with\+Respect\+To, const std\+::span$<$ const \mbox{\hyperlink{structserif_1_1dimensions_1_1runtime_1_1_runtime_quantity_value}{dimensions\+::runtime\+::\+Runtime\+Quantity\+Value}} $>$ input\+Values)
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\item
|
|
{\footnotesize template$<$typename EOS, typename RelationT$>$ }\\bool \mbox{\hyperlink{namespaceserif_1_1eos_1_1runtime_a47b57535e125e2a963ff0105c77420fd}{serif\+::eos\+::runtime\+::runtime\+Relation\+Matches}} (const \mbox{\hyperlink{classserif_1_1dimensions_1_1runtime_1_1_thermodynamic_quantity_i_d}{dimensions\+::runtime\+::\+Thermodynamic\+Quantity\+ID}} output\+Quantity\+ID, const std\+::span$<$ const \mbox{\hyperlink{structserif_1_1dimensions_1_1runtime_1_1_runtime_quantity_value}{dimensions\+::runtime\+::\+Runtime\+Quantity\+Value}} $>$ input\+Values)
|
|
\begin{DoxyCompactList}\small\item\em 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. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{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.
|
|
|
|
\begin{DoxyAuthor}{Author}
|
|
Emily M. Boudreaux
|
|
\end{DoxyAuthor}
|