Skip to content

Failing tests for off-diagonal elasticity tensor components for hyperelastic models #5739

@th-skam

Description

@th-skam

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.

// 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
Image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    expert discussion requiredTechnical or scientific topic which requires investigation or discussion among SOFA experts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions