-
Notifications
You must be signed in to change notification settings - Fork 343
Description
Some context
There are a number of classes implementing material models in Sofa/Component/SolidMechanics/FEM/HyperElastic/src/sofa/component/solidmechanics/fem/hyperelastic/material. The Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/Material_test.cpp file tests 3 functions: deriveSPKTensor, applyElasticityTensor and ElasticityTensor, implemented by these classes.
Here we are looking at models that already pass these tests.
The issue
Currently, the test for the ElasticityTensor is incomplete as it checks only the diagonal components of the tensor.
sofa/Sofa/Component/SolidMechanics/FEM/HyperElastic/tests/Material_test.cpp
Lines 189 to 190 in 98ae907
| // for (sofa::Size i = 0; i < Matrix6::size(); ++i) | |
| for (sofa::Size i : {0, 2, 5}) //only the diagonal terms |
If you activate the off-diagonal test, all components fail. But... it's just that the off-diagonal entries are multiplied by 2. e.g. from the
VerondaWestman
This is the case for all models and I would assume that this multiplication is put in place on purpose. Maybe it's convenient to store the tensor like this (due to symmetry)?
Does anyone know whether this is by design or a mistake?