19#ifndef TRAN_CALCULATOR_HPP
20#define TRAN_CALCULATOR_HPP
23#include <unordered_map>
32namespace keywords {
template<
class T>
struct keyword_info; }
34enum 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);
96 bool operator==(
const TranCalculator& other)
const {
97 return this->m_name == other.m_name &&
98 this->actions == other.actions;
101 template<
class Serializer>
102 void serializeOp(Serializer& serializer)
108 static TranCalculator serializationTestObject()
110 TranCalculator tran(
"test");
111 tran.add_action(ScalarOperation::MIN,
"FGOP");
117 std::vector<TranAction> actions;
120using TranMap = std::unordered_map<std::string, TranCalculator>;
Definition: TranCalculator.hpp:43
Class for (de-)serializing.
Definition: Serializer.hpp:75
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: TranCalculator.hpp:46