Files
MeanField_SERiF/src/include/serif/eos/relations/catalog.hpp

39 lines
1.7 KiB
C++

#pragma once
/**
* @file catalog.hpp
* @author Emily M. Boudreaux
*
* @brief File containing the Relation and RelationCatalog structs. These structs are used to represent relations between physical quantities and to group them into catalogs for use in EOS models.
*/
#include "serif/utils/misc/concepts/type_uniqueness.hpp"
#include "serif/utils/misc/std_helper/variadic_cleaning.hpp"
#include "serif/dimensions/quantities.hpp"
namespace serif::eos::relations {
using utils::misc::std_helper::CountVariadicArguments;
using utils::misc::concepts::AllTypesAreUnique;
/**
* @brief A struct to represent a relation between physical quantities. This is used to define the relations that an EOS model supports.
* @tparam Output The output quantity of the relation.
* @tparam Inputs The input quantities of the relation.
*/
template <typename Output, typename... Inputs>
struct Relation final {
using OutputQuantity = Output; ///< The output quantity of the relation.
using InputQuantities = dimensions::QuantityList<Inputs...>; ///< The input quantities of the relation.
static constexpr std::size_t inputCount = CountVariadicArguments<Inputs...>(); ///< The number of input quantities in the relation.
};
/**
* @brief A struct to represent a catalog of relations between physical quantities. This is used to group relations for use in EOS models.
* @tparam Relations The relations to include in the catalog.
*/
template <typename... Relations>
struct RelationCatalog final {
static constexpr std::size_t size = CountVariadicArguments<Relations...>(); ///< The number of relations in the catalog.
};
}