33 std::vector<double>
const& mfront_data,
36 mgis::behaviour::Behaviour
const& behaviour)
38 using VT = mgis::behaviour::Variable::Type;
42 std::vector<double> ogs_data(mfront_data.size());
44 std::size_t offset = 0;
45 constexpr auto kv_size =
48 for (
auto const& [var1, var2] : behaviour.to_blocks)
52 auto const*
const d_in = mfront_data.data() + offset;
53 auto*
const d_out = ogs_data.data() + offset;
55 if (var1.type == VT::SCALAR && var2.type == VT::SCALAR)
60 else if (var1.type == VT::SCALAR && var2.type == VT::STENSOR)
62 assert(getVariableSize(var2, behaviour.hypothesis) == kv_size);
68 "Coordinate frame rotation not yet implemented for "
74 else if (var1.type == VT::STENSOR && var2.type == VT::SCALAR)
76 assert(getVariableSize(var1, behaviour.hypothesis) == kv_size);
82 "Coordinate frame rotation not yet implemented for "
88 else if (var1.type == VT::STENSOR && var2.type == VT::STENSOR)
90 assert(getVariableSize(var1, behaviour.hypothesis) == kv_size);
91 assert(getVariableSize(var2, behaviour.hypothesis) == kv_size);
92 size = kv_size * kv_size;
96 Eigen::Map<KM>{d_out} =
102 Eigen::Map<KM>{d_out} =
108 OGS_FATAL(
"unsupported variable type combination");
114 return {std::move(ogs_data)};