evaluation.hpp serif/eos/models/concepts.hpp src/compile_time_checks/serif/eos/evaluation.cpp src/include/serif/equations/barotropic_density.hpp src/include/serif/geometry/surface/detail/evaluation.hpp serif serif::eos File containing the evaluate and partial_derivative functions. These functions are used to evaluate relations and partial derivatives for a given EOS model. Emily M. Boudreaux #pragmaonce #include"serif/eos/models/concepts.hpp" namespaceserif::eos{ /* *Ifindthesyntaxthatfollowstobepotentiallyconfusing.Specificallythedoubleuseofnoexcept.Forthose *unfamiliarabriefexplanationfollows. * *Thefirstnoexceptisusedtomarkiftheoverallfunction(evaluate)isnoexcept.However,noexceptcantakeaboolean.noexcept(true) *tellsthecompilerthatthefunctionwillnotthrowanexception(noteifanexceptionisthrowninanoexceptfunctionstd::terminatewillbecalled *andnotry-catchblockwillcatchtheexception).Thisallowsforthecompilertogeneratemoreefficientcode.noexcept(false)tells *thecompilerthatthefunctionmaythrowanexception(semanticallyitisequivalenttonotincludingnoexcept).Thesecondnoexcept *(e.g.noexcept(noexcept())isusedtodeterminewhatthatbooleanis.ThisisaconfusingpartofC++syntaxwherethesame *keywordhasdifferentsemanticmeaningsdependingoncontext.Inthiscasetheinnernoexceptisused *todetermineiftheexpressioninsideitisnoexcept.Thatistosayifeos.evaluate(...)isnoexceptfortheparticular *templatesEOSargumentthenthisfunctionwillbenoexcept.Ifeos.evaluate(...)isnotnoexceptthenthisfunctionwillnotbenoexcept. */ template<dimensions::ThermodynamicQuantityTypeOutputQ,models::EOSModelEOS,dimensions::QuantityValueType...InputValues> requiresmodels::EOSSupportingRelation<EOS, relations::Relation<OutputQ, dimensions::QuantityOfT<InputValues>...>> [[nodiscard]]constexprdimensions::QuantityValue<OutputQ>evaluate(constEOS&eos,constInputValues...inputValues) noexcept(noexcept(eos.evaluate(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{},inputValues...))){ returneos.evaluate(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{},inputValues...); }; template<dimensions::ThermodynamicQuantityTypeOutputQ,dimensions::ThermodynamicQuantityTypeInputQ,models::EOSModelEOS,dimensions::QuantityValueType...InputValues> requiresmodels::EOSSupportingPartialDerivative<EOS, relations::Relation<OutputQ, dimensions::QuantityOfT<InputValues>...>,InputQ> [[nodiscard]]constexprdimensions::PartialDerivative<OutputQ, InputQ>partial_derivative(constEOS&eos,constInputValues...inputValues) noexcept(noexcept(eos.partial_derivative(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{},dimensions::WithRespectTo<InputQ>{},inputValues...))){ returneos.partial_derivative(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{},dimensions::WithRespectTo<InputQ>{},inputValues...); } template<dimensions::ThermodynamicQuantityTypeOutputQ,dimensions::ThermodynamicQuantityTypeFirstInput, dimensions::ThermodynamicQuantityTypeSecondInput,models::EOSModelEOS,dimensions::QuantityValueType...InputValues> requiresmodels::EOSSupportingSecondPartialDerivative<EOS, relations::Relation<OutputQ, dimensions::QuantityOfT<InputValues>...>,FirstInput,SecondInput> [[nodiscard]]constexprdimensions::SecondPartialDerivative<OutputQ, FirstInput, SecondInput> second_partial_derivative(constEOS&eos,constInputValues...inputValues) noexcept(noexcept(eos.second_partial_derivative(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{}, dimensions::WithRespectTo<FirstInput>{},dimensions::WithRespectTo<SecondInput>{},inputValues...))){ returneos.second_partial_derivative(relations::Relation<OutputQ,dimensions::QuantityOfT<InputValues>...>{}, dimensions::WithRespectTo<FirstInput>{},dimensions::WithRespectTo<SecondInput>{},inputValues...); } }