From c8600678658ff23f12b4379ba07d5a9cddc189c8 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Fri, 15 Sep 2023 16:42:55 +0200 Subject: [PATCH 1/7] [MPL] Tensor type and size function --- MaterialLib/MPL/Utils/Tensor.h | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 MaterialLib/MPL/Utils/Tensor.h diff --git a/MaterialLib/MPL/Utils/Tensor.h b/MaterialLib/MPL/Utils/Tensor.h new file mode 100644 index 00000000000..f0d41e823cf --- /dev/null +++ b/MaterialLib/MPL/Utils/Tensor.h @@ -0,0 +1,54 @@ +/* + * \file + * \copyright + * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#pragma once + +#include + +#include "MaterialLib/MPL/Property.h" + +namespace MaterialPropertyLib +{ +/// See Tensor type for details. +constexpr int tensorSize(int dim) +{ + if (dim == 1) + { + return 3; // Diagonal entries. + } + if (dim == 2) + { + return 5; // 2x2 matrix and the 3rd diagonal entry. + } + if (dim == 3) + { + return 9; // Full 3x3 matrix. + } + OGS_FATAL("Tensor size for dimension {} is not defined.", dim); +} + +/// The tensor's components in 3D case are ordered in the usual way: +/// (1,1), (1,2), (1,3) +/// (2,1), (2,2), (2,3) +/// (3,1), (3,2), (3,3). +/// +/// For the 2D case the 2x2 block is as usual and is followed by the (3,3) +/// component: +/// (1,1), (1,2), +/// (2,1), (2,2), +/// (3,3). +/// +/// For the 1D case only the diagonal is stored: +/// (1,1), +/// (2,2), +/// (3,3). +template +using Tensor = Eigen::Matrix; + +} // namespace MaterialPropertyLib From a00368f79b2bfaae4755c0e82ac81453a7be24d9 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Tue, 15 Aug 2023 17:52:16 +0200 Subject: [PATCH 2/7] [MPL] Add deformation gradient to variables --- MaterialLib/MPL/VariableType.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MaterialLib/MPL/VariableType.h b/MaterialLib/MPL/VariableType.h index 647f00b7f17..f11624e8eb0 100644 --- a/MaterialLib/MPL/VariableType.h +++ b/MaterialLib/MPL/VariableType.h @@ -29,6 +29,7 @@ enum class Variable : int { capillary_pressure, concentration, + deformation_gradient, density, effective_pore_pressure, enthalpy, @@ -58,6 +59,7 @@ static const std::array(Variable::number_of_variables)> variable_enum_to_string{{"capillary_pressure", "concentration", + "deformation_gradient", "density", "effective_pore_pressure", "enthalpy", @@ -86,7 +88,9 @@ static const std::array, - Eigen::Matrix>; + Eigen::Matrix, + Eigen::Matrix, + Eigen::Matrix>; class VariableArray { @@ -102,6 +106,8 @@ class VariableArray return capillary_pressure; case Variable::concentration: return concentration; + case Variable::deformation_gradient: + return std::visit(identity, deformation_gradient); case Variable::density: return density; case Variable::effective_pore_pressure: @@ -156,6 +162,12 @@ class VariableArray double capillary_pressure = nan_; double concentration = nan_; + // Compare to GMatrixPolicy::GradientVectorType. The 1d case = Matrix<3, 1> + // is not used so far. + std::variant, + Eigen::Matrix> + deformation_gradient; double density = nan_; double effective_pore_pressure = nan_; double enthalpy = nan_; From a4e77268f513752d919df3ce7d256e99d39e664d Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Fri, 10 Nov 2023 16:05:17 +0100 Subject: [PATCH 3/7] [MatL/MFront] Meta data for deformation gradient --- MaterialLib/SolidModels/MFront/Variable.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/MaterialLib/SolidModels/MFront/Variable.h b/MaterialLib/SolidModels/MFront/Variable.h index c36ebb4cd27..92fa336c5c1 100644 --- a/MaterialLib/SolidModels/MFront/Variable.h +++ b/MaterialLib/SolidModels/MFront/Variable.h @@ -90,6 +90,24 @@ struct Strain : Variable /// Instance that can be used for overload resolution/template type deduction. static constexpr Strain strain; +/// Meta data for deformation gradient. +struct DeformationGradient : Variable +{ + /// The name of the variable in MFront. + constexpr static const char* name = "DeformationGradient"; + + /// The type of the variable in MFront. + constexpr static mgis::behaviour::Variable::Type type = + mgis::behaviour::Variable::Type::TENSOR; + + /// The VariableArray entry that holds this variable in OGS. + constexpr static auto mpl_var = + &MaterialPropertyLib::VariableArray::deformation_gradient; +}; + +/// Instance that can be used for overload resolution/template type deduction. +static constexpr DeformationGradient deformation_gradient; + struct LiquidPressure : Variable { constexpr static const char* name = "LiquidPressure"; From 9c41af526b5c5687c7084938eac8ddd79ff5726e Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Fri, 15 Sep 2023 16:44:35 +0200 Subject: [PATCH 4/7] [MatL/MFront] Meta data for Green-Lagrange strain --- MaterialLib/SolidModels/MFront/Variable.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/MaterialLib/SolidModels/MFront/Variable.h b/MaterialLib/SolidModels/MFront/Variable.h index 92fa336c5c1..a44d382bb61 100644 --- a/MaterialLib/SolidModels/MFront/Variable.h +++ b/MaterialLib/SolidModels/MFront/Variable.h @@ -90,6 +90,26 @@ struct Strain : Variable /// Instance that can be used for overload resolution/template type deduction. static constexpr Strain strain; +/// Meta data for Green-Lagrange strain. +struct GreenLagrangeStrain : Variable +{ + /// The name of the variable in MFront. + constexpr static const char* name = "GreenLagrangeStrain"; + + /// The type of the variable in MFront. + constexpr static mgis::behaviour::Variable::Type type = + mgis::behaviour::Variable::Type::STENSOR; + + /// The VariableArray entry that holds this variable in OGS. + /// + /// \note Currently we always pass strain via mechanical_strain. + constexpr static auto mpl_var = + &MaterialPropertyLib::VariableArray::mechanical_strain; +}; + +/// Instance that can be used for overload resolution/template type deduction. +static constexpr GreenLagrangeStrain green_lagrange_strain; + /// Meta data for deformation gradient. struct DeformationGradient : Variable { From b18713c93b00ab3c1ea4d9bb944c8729fd8b5c60 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Fri, 15 Sep 2023 16:45:10 +0200 Subject: [PATCH 5/7] [MatL/MFront] Meta data; 2nd Piola-Kirchoff stress ... tensor --- MaterialLib/SolidModels/MFront/Variable.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MaterialLib/SolidModels/MFront/Variable.h b/MaterialLib/SolidModels/MFront/Variable.h index a44d382bb61..05927dafc31 100644 --- a/MaterialLib/SolidModels/MFront/Variable.h +++ b/MaterialLib/SolidModels/MFront/Variable.h @@ -153,6 +153,18 @@ struct Stress : Variable static constexpr Stress stress; +struct SecondPiolaKirchhoffStress : Variable +{ + constexpr static const char* name = "SecondPiolaKirchhoffStress"; + + constexpr static mgis::behaviour::Variable::Type type = + mgis::behaviour::Variable::Type::STENSOR; + + constexpr static auto mpl_var = &MaterialPropertyLib::VariableArray::stress; +}; + +static constexpr SecondPiolaKirchhoffStress second_piola_kirchhoff_stress; + struct Saturation : Variable { constexpr static const char* name = "Saturation"; From a99aa1208cbc2772ca491a5780f219d5e87fb4c3 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Fri, 15 Sep 2023 16:43:53 +0200 Subject: [PATCH 6/7] [MatL/MFront] Tensor conversions for gradients Conversion of a OGS tensor to MFront with a simple test. --- .../SolidModels/MFront/MFrontGeneric.h | 61 +++++++++++++++++++ Tests/MaterialLib/OgsToMFrontConversion.cpp | 40 ++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 Tests/MaterialLib/OgsToMFrontConversion.cpp diff --git a/MaterialLib/SolidModels/MFront/MFrontGeneric.h b/MaterialLib/SolidModels/MFront/MFrontGeneric.h index 219cd02a10e..6d73fdef1ef 100644 --- a/MaterialLib/SolidModels/MFront/MFrontGeneric.h +++ b/MaterialLib/SolidModels/MFront/MFrontGeneric.h @@ -15,6 +15,7 @@ #include #include "MaterialLib/MPL/Utils/GetSymmetricTensor.h" +#include "MaterialLib/MPL/Utils/Tensor.h" #include "MaterialLib/SolidModels/MechanicsBase.h" #include "NumLib/Exceptions.h" #include "ParameterLib/Parameter.h" @@ -47,6 +48,45 @@ constexpr auto eigenSwap45View(Eigen::MatrixBase const& matrix) }); } +/// Converts between OGS' and MFront's tensors, which are represented as +/// vectors. An OGS tensor +/// 11 12 13 21 22 23 31 32 33 +/// 0 1 2 3 4 5 6 7 8 +/// is converted to MFront tensor +/// 11 22 33 12 21 13 31 23 32 +/// 0 4 8 1 3 2 6 5 7. +template +constexpr auto ogsTensorToMFrontTensor(Eigen::MatrixBase const& matrix) +{ + using Matrix = + Eigen::Matrix; + + if constexpr (DisplacementDim == 2) + { + return Matrix::NullaryExpr( + matrix.rows(), matrix.cols(), + [&m = matrix.derived()](Eigen::Index const row, + Eigen::Index const col) + { + constexpr std::ptrdiff_t result[5] = {0, 3, 4, 1, 2}; + return m(result[row], result[col]); + }); + } + if constexpr (DisplacementDim == 3) + { + return Matrix::NullaryExpr( + matrix.rows(), matrix.cols(), + [&m = matrix.derived()](Eigen::Index const row, + Eigen::Index const col) + { + constexpr std::ptrdiff_t result[9] = {0, 4, 8, 1, 3, + 2, 6, 5, 7}; + return m(result[row], result[col]); + }); + } +} + const char* varTypeToString(int v); int getEquivalentPlasticStrainOffset(mgis::behaviour::Behaviour const& b); @@ -120,6 +160,12 @@ struct MapToMPLType using type = MaterialPropertyLib::SymmetricTensor; }; +template +struct MapToMPLType +{ + using type = MaterialPropertyLib::Tensor; +}; + template struct MapToMPLType { @@ -160,6 +206,21 @@ struct SetGradient : eigenSwap45View(grad_ogs).eval(); std::copy_n(grad_mfront.data(), num_comp, target); } + else if constexpr (Grad::type == + mgis::behaviour::Variable::Type::TENSOR) + { + using MPLType = MapToMPLType_t; + auto const& grad_ogs = + std::get(variable_array.*Grad::mpl_var); + + if (Q.has_value()) + { + OGS_FATAL("Rotations of tensors are not implemented."); + } + + Eigen::Map>{target} = + ogsTensorToMFrontTensor(grad_ogs); + } else { OGS_FATAL("Unsupported gradient type {}.", diff --git a/Tests/MaterialLib/OgsToMFrontConversion.cpp b/Tests/MaterialLib/OgsToMFrontConversion.cpp new file mode 100644 index 00000000000..5b1c7a4cc93 --- /dev/null +++ b/Tests/MaterialLib/OgsToMFrontConversion.cpp @@ -0,0 +1,40 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + */ + +#ifdef OGS_USE_MFRONT + +#include +#include + +#include "MaterialLib/SolidModels/MFront/MFrontGeneric.h" +#include "Tests/TestTools.h" + +namespace MPL = MaterialPropertyLib; +namespace MSM = MaterialLib::Solids::MFront; + +TEST(MaterialLib_OgsToMFrontConversion, Tensor3D) +{ + MPL::Tensor<3> ogs_tensor; + ogs_tensor << 11, 12, 13, 21, 22, 23, 31, 32, 33; + + EXPECT_THAT(MSM::ogsTensorToMFrontTensor<3>(ogs_tensor).eval(), + testing::Pointwise(testing::DoubleEq(), + {11, 22, 33, 12, 21, 13, 31, 23, 32})); +} + +TEST(MaterialLib_OgsToMFrontConversion, Tensor2D) +{ + MPL::Tensor<2> ogs_tensor; + ogs_tensor << 11, 12, 21, 22, 33; + + EXPECT_THAT(MSM::ogsTensorToMFrontTensor<2>(ogs_tensor).eval(), + testing::Pointwise(testing::DoubleEq(), {11, 22, 33, 12, 21})); +} + +#endif From 27af6d3dc947016914ff0dfee6370c6722a562b3 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov Date: Tue, 24 Oct 2023 18:08:20 +0200 Subject: [PATCH 7/7] [MatL/MFront] Correct TENSOR representation size The size of a MFront tensor is 3, 5, or 9 for the dimensions 1, 2, and 3, accordingly. The data is stored in a vector of the same size in OGS as well. --- .../MFront/TangentOperatorBlocksView.h | 3 +- MaterialLib/SolidModels/MFront/Variable.h | 5 ++-- .../TestTangentOperatorBlocksView.cpp | 30 +++++++++++-------- .../TestThermodynamicForcesView.cpp | 26 +++++++++------- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h b/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h index af9f3eec1ba..835024df5cd 100644 --- a/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h +++ b/MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h @@ -18,6 +18,7 @@ #include #include "BaseLib/cpp23.h" +#include "MaterialLib/MPL/Utils/Tensor.h" #include "MathLib/KelvinVector.h" namespace MaterialLib::Solids::MFront @@ -221,7 +222,7 @@ class OGSMFrontTangentOperatorBlocksView case VT::VECTOR: return DisplacementDim; case VT::TENSOR: - return DisplacementDim * DisplacementDim; + return MaterialPropertyLib::tensorSize(DisplacementDim); } OGS_FATAL("Unsupported variable type {}", BaseLib::to_underlying(vt)); diff --git a/MaterialLib/SolidModels/MFront/Variable.h b/MaterialLib/SolidModels/MFront/Variable.h index 05927dafc31..3469eb307d0 100644 --- a/MaterialLib/SolidModels/MFront/Variable.h +++ b/MaterialLib/SolidModels/MFront/Variable.h @@ -12,6 +12,7 @@ #include +#include "MaterialLib/MPL/Utils/Tensor.h" #include "MaterialLib/MPL/VariableType.h" #include "MathLib/KelvinVector.h" @@ -47,7 +48,7 @@ struct Variable return MathLib::KelvinVector::kelvin_vector_dimensions( DisplacementDim); case T::TENSOR: - return DisplacementDim; + return MaterialPropertyLib::tensorSize(DisplacementDim); } } @@ -65,7 +66,7 @@ struct Variable case T::STENSOR: return 1; case T::TENSOR: - return DisplacementDim; + return 1; } } }; diff --git a/Tests/MaterialLib/TestTangentOperatorBlocksView.cpp b/Tests/MaterialLib/TestTangentOperatorBlocksView.cpp index 046064e3f59..5cbd6f4a88a 100644 --- a/Tests/MaterialLib/TestTangentOperatorBlocksView.cpp +++ b/Tests/MaterialLib/TestTangentOperatorBlocksView.cpp @@ -14,6 +14,7 @@ #include +#include "MaterialLib/MPL/Utils/Tensor.h" #include "MaterialLib/SolidModels/MFront/TangentOperatorBlocksView.h" #include "MaterialLib/SolidModels/MFront/Variable.h" #include "OGSMFrontTestVariables.h" @@ -41,6 +42,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) constexpr int dim = TypeParam::value; constexpr int kv_size = MathLib::KelvinVector::kelvin_vector_dimensions(dim); + constexpr int tensor_size = MaterialPropertyLib::tensorSize(dim); const std::vector to_blocks{ // dsigma/dtensor @@ -52,7 +54,8 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) std::pair{Var{"Stress", Var::STENSOR}, Var{"Temperature", Var::SCALAR}}}; - const std::size_t total_data_size = kv_size * dim * dim + dim + kv_size; + const std::size_t total_data_size = + kv_size * tensor_size + dim * 1 + kv_size * 1; using Gradients = mp_list; using TDynForces = mp_list; @@ -70,7 +73,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) // dvector/dp != 0 { using Vec = Eigen::Vector; - auto const offset = kv_size * dim * dim; + auto const offset = kv_size * tensor_size; Vec const expected = Vec::LinSpaced(offset, offset + dim - 1); auto const b = view.block(Vector{}, MSM::liquid_pressure, data); @@ -80,7 +83,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) // dvector/dtensor = 0 { - using Mat = Eigen::Matrix; + using Mat = Eigen::Matrix; Mat const zero = Mat::Zero(); auto const b = view.block(Vector{}, Tensor{}, data); @@ -110,13 +113,13 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) // dsigma/dtensor != 0 { - using Mat = Eigen::Matrix; + using Mat = Eigen::Matrix; Mat expected = Mat::Zero(); for (int r = 0; r < kv_size; ++r) { - for (int c = 0; c < dim * dim; ++c) + for (int c = 0; c < tensor_size; ++c) { - expected(r, c) = dim * dim * r + c; + expected(r, c) = tensor_size * r + c; } } @@ -128,7 +131,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test1) // dsigma/dT != 0 { using Vec = Eigen::Vector; - auto const offset = kv_size * dim * dim + dim; + auto const offset = kv_size * tensor_size + dim; Vec const expected = Vec::LinSpaced(offset, offset + kv_size - 1); auto const b = view.block(MSM::stress, MSM::temperature, data); @@ -147,6 +150,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test2) constexpr int dim = TypeParam::value; constexpr int kv_size = MathLib::KelvinVector::kelvin_vector_dimensions(dim); + constexpr int tensor_size = MaterialPropertyLib::tensorSize(dim); const std::vector to_blocks{ // dsigma/dtensor @@ -155,7 +159,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test2) std::pair{Var{"Saturation", Var::VECTOR}, Var{"LiquidPressure", Var::SCALAR}}}; - const std::size_t total_data_size = kv_size * dim * dim + 1; + const std::size_t total_data_size = kv_size * tensor_size + dim * 1; using Gradients = mp_list; using TDynForces = mp_list; @@ -172,7 +176,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test2) // dsat/dp != 0 { - auto const offset = kv_size * dim * dim; + auto const offset = kv_size * tensor_size; auto const expected = offset; auto const b = view.block(MSM::saturation, MSM::liquid_pressure, data); @@ -184,7 +188,7 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test2) // dsat/dtensor = 0 { - using Vec = Eigen::RowVector; + using Vec = Eigen::RowVector; Vec const zero = Vec::Zero(); auto const b = view.block(MSM::saturation, Tensor{}, data); @@ -211,13 +215,13 @@ TYPED_TEST(MaterialLib_TangentOperatorBlocksView, Test2) // dsigma/dtensor != 0 { - using Mat = Eigen::Matrix; + using Mat = Eigen::Matrix; Mat expected = Mat::Zero(); for (int r = 0; r < kv_size; ++r) { - for (int c = 0; c < dim * dim; ++c) + for (int c = 0; c < tensor_size; ++c) { - expected(r, c) = dim * dim * r + c; + expected(r, c) = tensor_size * r + c; } } diff --git a/Tests/MaterialLib/TestThermodynamicForcesView.cpp b/Tests/MaterialLib/TestThermodynamicForcesView.cpp index 00339a49183..716da2326fc 100644 --- a/Tests/MaterialLib/TestThermodynamicForcesView.cpp +++ b/Tests/MaterialLib/TestThermodynamicForcesView.cpp @@ -10,6 +10,7 @@ #include #include +#include "MaterialLib/MPL/Utils/Tensor.h" #include "MaterialLib/SolidModels/MFront/ThermodynamicForcesView.h" #include "MathLib/KelvinVector.h" #include "OGSMFrontTestVariables.h" @@ -100,13 +101,13 @@ struct MockTensor template static constexpr std::size_t rows() { - return DisplacementDim; + return MaterialPropertyLib::tensorSize(DisplacementDim); } template static constexpr std::size_t cols() { - return DisplacementDim; + return 1; } }; @@ -156,8 +157,8 @@ test_MaterialLib_ThermodynamicForcesView_ReadAccess_VectorTensor_2D_impl() using TDynForces = boost::mp11::mp_list; MSM::OGSMFrontThermodynamicForcesData const data{{ - 1, 2, // vector data - 3, 4, 5, 6 // tensor data + 1, 2, // vector data + 3, 4, 5, 6, 7 // tensor data }}; MSM::OGSMFrontThermodynamicForcesView<2, TDynForces> view; @@ -167,7 +168,8 @@ test_MaterialLib_ThermodynamicForcesView_ReadAccess_VectorTensor_2D_impl() EXPECT_THAT(vector, testing::Pointwise(testing::DoubleEq(), {1, 2})); auto const tensor = view.block(Tensor{}, data); - auto const tensor_expected = (Eigen::Matrix2d{} << 3, 4, 5, 6).finished(); + auto const tensor_expected = + (Eigen::Matrix{} << 3, 4, 5, 6, 7).finished(); ASSERT_PRED_FORMAT2(Tests::EigenIsNear{}, tensor, tensor_expected); } @@ -238,13 +240,15 @@ test_MaterialLib_ThermodynamicForcesView_WriteAccess_TensorSTensor_3D_impl() view.block(STensor{}, data).template segment<3>(1) = Eigen::Vector3d(21, 22, 23); - view.block(Tensor{}, data).template block<1, 2>(1, 1) = + view.block(Tensor{}, data).template segment<2>(1) = Eigen::RowVector2d(31, 32); + view.block(Tensor{}, data).template segment<2>(4) = + Eigen::RowVector2d(41, 42); EXPECT_THAT(data.data, testing::Pointwise( testing::DoubleEq(), - {1, 2, 3, 4, 31, 32, 7, 8, 9, 10, 21, 22, 23, 14, 15})); + {1, 31, 32, 4, 41, 42, 7, 8, 9, 10, 21, 22, 23, 14, 15})); } #ifdef OGS_USE_MFRONT @@ -270,10 +274,10 @@ static void test_MaterialLib_ThermodynamicForcesView_DataSizes_impl() using TDynForces = boost::mp11::mp_list; static_assert(MSM::OGSMFrontThermodynamicForcesView<3, TDynForces>:: - data_size_all_forces == 3 * 3 + 6); + data_size_all_forces == 9 + 6); static_assert(MSM::OGSMFrontThermodynamicForcesView<2, TDynForces>:: - data_size_all_forces == 2 * 2 + 4); + data_size_all_forces == 5 + 4); } // same as above, order changed @@ -281,10 +285,10 @@ static void test_MaterialLib_ThermodynamicForcesView_DataSizes_impl() using TDynForces = boost::mp11::mp_list; static_assert(MSM::OGSMFrontThermodynamicForcesView<3, TDynForces>:: - data_size_all_forces == 3 * 3 + 6); + data_size_all_forces == 6 + 9); static_assert(MSM::OGSMFrontThermodynamicForcesView<2, TDynForces>:: - data_size_all_forces == 2 * 2 + 4); + data_size_all_forces == 4 + 5); } {