diff --git a/Sofa/framework/Core/src/sofa/core/DerivativeMatrix.h b/Sofa/framework/Core/src/sofa/core/DerivativeMatrix.h index f64172169c5..eee2a173c9d 100644 --- a/Sofa/framework/Core/src/sofa/core/DerivativeMatrix.h +++ b/Sofa/framework/Core/src/sofa/core/DerivativeMatrix.h @@ -50,6 +50,8 @@ class DerivativeMatrix : public MechanicalStatesMatrixAccumulators void operator+=(const sofa::type::Mat<2, 2, double>& value) const { mat->add(row, col, value); } void operator+=(const sofa::type::Mat<3, 3, float> & value) const { mat->add(row, col, value); } void operator+=(const sofa::type::Mat<3, 3, double>& value) const { mat->add(row, col, value); } + void operator+=(const sofa::type::Mat<6, 6, float> & value) const { mat->add(row, col, value); } + void operator+=(const sofa::type::Mat<6, 6, double>& value) const { mat->add(row, col, value); } [[nodiscard]] bool isValid() const { return mat != nullptr; } operator bool() const { return isValid(); } diff --git a/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.cpp b/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.cpp index 56f64a15816..0c8e7474a57 100644 --- a/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.cpp +++ b/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.cpp @@ -60,6 +60,18 @@ void MatrixAccumulatorInterface::add(sofa::SignedIndex row, sofa::SignedIndex co matAdd(row, col, value); } +void MatrixAccumulatorInterface::add(sofa::SignedIndex row, sofa::SignedIndex col, + const sofa::type::Mat<6, 6, float>& value) +{ + matAdd(row, col, value); +} + +void MatrixAccumulatorInterface::add(sofa::SignedIndex row, sofa::SignedIndex col, + const sofa::type::Mat<6, 6, double>& value) +{ + matAdd(row, col, value); +} + helper::logging::MessageDispatcher::LoggerStream matrixaccumulator::RangeVerification:: logger() const { diff --git a/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.h b/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.h index 53bf7d77b75..0606bfdfd27 100644 --- a/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.h +++ b/Sofa/framework/Core/src/sofa/core/MatrixAccumulator.h @@ -43,6 +43,8 @@ class SOFA_CORE_API MatrixAccumulatorInterface virtual void add(sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat<2, 2, double>& value); virtual void add(sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat<3, 3, float> & value); virtual void add(sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat<3, 3, double>& value); + virtual void add(sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat<6, 6, float> & value); + virtual void add(sofa::SignedIndex row, sofa::SignedIndex col, const sofa::type::Mat<6, 6, double>& value); virtual void clear() {}