19 #ifndef TRAN_CALCULATOR_HPP 20 #define TRAN_CALCULATOR_HPP 23 #include <unordered_map> 32 namespace keywords {
template<
class T>
struct keyword_info; }
34 enum class ScalarOperation {
50 bool operator==(
const TranAction& other)
const {
51 return this->op == other.op &&
52 this->field == other.field;
55 template<
class Serializer>
70 std::string next_name()
const {
71 return this->m_name + std::to_string( this->actions.size() );
74 std::vector<TranAction>::const_iterator begin()
const {
75 return this->actions.begin();
78 std::vector<TranAction>::const_iterator end()
const {
79 return this->actions.end();
82 void add_action(ScalarOperation op,
const std::string& field) {
83 this->actions.push_back(TranAction{op, field});
86 std::size_t size()
const {
87 return this->actions.size();
90 const std::string& name()
const {
94 keywords::keyword_info<double> make_kw_info(ScalarOperation op,
95 const std::string& target_kw);
97 bool operator==(
const TranCalculator& other)
const {
98 return this->m_name == other.m_name &&
99 this->actions == other.actions;
102 template<
class Serializer>
103 void serializeOp(Serializer& serializer)
109 static TranCalculator serializationTestObject()
111 TranCalculator tran(
"test");
112 tran.add_action(ScalarOperation::MIN,
"FGOP");
118 std::vector<TranAction> actions;
123 #endif // TRAN_CALCULATOR_HPP Definition: TranCalculator.hpp:43
Definition: TranCalculator.hpp:46
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Class for (de-)serializing.
Definition: Serializer.hpp:94