39 std::vector<double>
const& mfront_data,
42 mgis::behaviour::Behaviour
const& behaviour)
44 using VT = mgis::behaviour::Variable::Type;
48 std::vector<double> ogs_data(mfront_data.size());
50 std::size_t offset = 0;
51 constexpr auto kv_size =
54 for (
auto const& [var1, var2] : behaviour.to_blocks)
58 auto const*
const d_in = mfront_data.data() + offset;
59 auto*
const d_out = ogs_data.data() + offset;
61 if (var1.type == VT::SCALAR && var2.type == VT::SCALAR)
66 else if (var1.type == VT::SCALAR && var2.type == VT::STENSOR)
68 assert(getVariableSize(var2, behaviour.hypothesis) == kv_size);
74 "Coordinate frame rotation not yet implemented for "
80 else if (var1.type == VT::STENSOR && var2.type == VT::SCALAR)
82 assert(getVariableSize(var1, behaviour.hypothesis) == kv_size);
88 "Coordinate frame rotation not yet implemented for "
94 else if (var1.type == VT::STENSOR && var2.type == VT::STENSOR)
96 assert(getVariableSize(var1, behaviour.hypothesis) == kv_size);
97 assert(getVariableSize(var2, behaviour.hypothesis) == kv_size);
98 size = kv_size * kv_size;
102 Eigen::Map<KM>{d_out} =
108 Eigen::Map<KM>{d_out} =
114 OGS_FATAL(
"unsupported variable type combination");
120 return {std::move(ogs_data)};