1231 std::array<double, 9> def;
1232 std::fill(def.begin(), def.end(), 0);
1234 auto get_tag = [&](
const std::string name,
size_t size) {
1237 MB_TAG_CREAT | MB_TAG_SPARSE,
1246 for (
size_t r = 0;
r !=
DIM1; ++
r)
1253 for (
size_t r = 0;
r !=
DIM1; ++
r)
1254 for (
size_t c = 0;
c !=
DIM2; ++
c)
1255 mat(
r,
c) =
t(
r,
c);
1261 for (
size_t r = 0;
r !=
DIM1; ++
r)
1262 for (
size_t c = 0;
c !=
DIM1; ++
c)
1263 mat(
r,
c) =
t(
r,
c);
1273 auto set_float_precision = [](
const double x) {
1274 if (std::abs(x) < std::numeric_limits<float>::epsilon())
1281 for (
auto &
v : mat.data())
1282 v = set_float_precision(
v);
1284 &*mat.data().begin());
1288 auto th = get_tag(
m.first, 1);
1290 auto nb_integration_pts = getGaussPts().size2();
1292 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1293 CHKERR set_tag(
th, gg, set_scalar(t_scl));
1299 auto th = get_tag(
m.first, 3);
1300 auto t_vec = getFTensor1FromMat<DIM1>(*
m.second);
1301 auto nb_integration_pts = getGaussPts().size2();
1303 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1304 CHKERR set_tag(
th, gg, set_vector_3d(t_vec));
1310 auto th = get_tag(
m.first, 9);
1311 auto t_mat = getFTensor2FromMat<DIM1, DIM2>(*
m.second);
1312 auto nb_integration_pts = getGaussPts().size2();
1314 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1315 CHKERR set_tag(
th, gg, set_matrix_3d(t_mat));
1321 auto th = get_tag(
m.first, 9);
1322 auto t_mat = getFTensor2SymmetricFromMat<DIM1>(*
m.second);
1323 auto nb_integration_pts = getGaussPts().size2();
1325 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1326 CHKERR set_tag(
th, gg, set_matrix_symm_3d(t_mat));