From fcc62e99bc99ab856450a3a06b0b0bf8032c5a87 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Wed, 14 May 2025 10:29:47 +0200 Subject: [PATCH 1/5] rename files --- Sofa/framework/Core/CMakeLists.txt | 12 ++++++------ .../{Constraint.cpp => LagrangianConstraint.cpp} | 0 .../{Constraint.h => LagrangianConstraint.h} | 0 .../{Constraint.inl => LagrangianConstraint.inl} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename Sofa/framework/Core/src/sofa/core/behavior/{Constraint.cpp => LagrangianConstraint.cpp} (100%) rename Sofa/framework/Core/src/sofa/core/behavior/{Constraint.h => LagrangianConstraint.h} (100%) rename Sofa/framework/Core/src/sofa/core/behavior/{Constraint.inl => LagrangianConstraint.inl} (100%) diff --git a/Sofa/framework/Core/CMakeLists.txt b/Sofa/framework/Core/CMakeLists.txt index 5948823e627..8659bd90091 100644 --- a/Sofa/framework/Core/CMakeLists.txt +++ b/Sofa/framework/Core/CMakeLists.txt @@ -69,10 +69,8 @@ set(HEADER_FILES ${SRC_ROOT}/behavior/BaseProjectiveConstraintSet.h ${SRC_ROOT}/behavior/BaseRotationFinder.h ${SRC_ROOT}/behavior/BaseVectorOperations.h - ${SRC_ROOT}/behavior/BlockType.h ${SRC_ROOT}/behavior/BlocMatrixWriter.h - ${SRC_ROOT}/behavior/Constraint.h - ${SRC_ROOT}/behavior/Constraint.inl + ${SRC_ROOT}/behavior/BlockType.h ${SRC_ROOT}/behavior/ConstraintCorrection.h ${SRC_ROOT}/behavior/ConstraintCorrection.inl ${SRC_ROOT}/behavior/ConstraintResolution.h @@ -80,11 +78,13 @@ set(HEADER_FILES ${SRC_ROOT}/behavior/DefaultMultiMatrixAccessor.h ${SRC_ROOT}/behavior/ForceField.h ${SRC_ROOT}/behavior/ForceField.inl + ${SRC_ROOT}/behavior/LagrangianConstraint.h + ${SRC_ROOT}/behavior/LagrangianConstraint.inl ${SRC_ROOT}/behavior/LinearSolver.h ${SRC_ROOT}/behavior/LinearSolverAccessor.h - ${SRC_ROOT}/behavior/MatrixAPICompatibility.h ${SRC_ROOT}/behavior/Mass.h ${SRC_ROOT}/behavior/Mass.inl + ${SRC_ROOT}/behavior/MatrixAPICompatibility.h ${SRC_ROOT}/behavior/MechanicalMatrix.h ${SRC_ROOT}/behavior/MechanicalState.h ${SRC_ROOT}/behavior/MechanicalState.inl @@ -106,10 +106,10 @@ set(HEADER_FILES ${SRC_ROOT}/behavior/ProjectiveConstraintSet.h ${SRC_ROOT}/behavior/ProjectiveConstraintSet.inl ${SRC_ROOT}/behavior/RotationFinder.h - ${SRC_ROOT}/behavior/StateAccessor.h ${SRC_ROOT}/behavior/SingleMatrixAccessor.h ${SRC_ROOT}/behavior/SingleStateAccessor.h ${SRC_ROOT}/behavior/SingleStateAccessor.inl + ${SRC_ROOT}/behavior/StateAccessor.h ${SRC_ROOT}/behavior/fwd.h ${SRC_ROOT}/collision/BroadPhaseDetection.h ${SRC_ROOT}/collision/CollisionAlgorithm.h @@ -246,12 +246,12 @@ set(SOURCE_FILES ${SRC_ROOT}/behavior/BaseMechanicalState.cpp ${SRC_ROOT}/behavior/BaseOrderingMethod.cpp ${SRC_ROOT}/behavior/BaseProjectiveConstraintSet.cpp - ${SRC_ROOT}/behavior/Constraint.cpp ${SRC_ROOT}/behavior/ConstraintCorrection.cpp ${SRC_ROOT}/behavior/ConstraintResolution.cpp ${SRC_ROOT}/behavior/ConstraintSolver.cpp ${SRC_ROOT}/behavior/DefaultMultiMatrixAccessor.cpp ${SRC_ROOT}/behavior/ForceField.cpp + ${SRC_ROOT}/behavior/LagrangianConstraint.cpp ${SRC_ROOT}/behavior/LinearSolver.cpp ${SRC_ROOT}/behavior/LinearSolverAccessor.cpp ${SRC_ROOT}/behavior/Mass.cpp diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.cpp b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp similarity index 100% rename from Sofa/framework/Core/src/sofa/core/behavior/Constraint.cpp rename to Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h similarity index 100% rename from Sofa/framework/Core/src/sofa/core/behavior/Constraint.h rename to Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl similarity index 100% rename from Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl rename to Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl From 51ef0770606dbe813d0531716271b322da9ab14f Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Wed, 14 May 2025 10:37:06 +0200 Subject: [PATCH 2/5] compatibility for files --- Sofa/framework/Core/CMakeLists.txt | 2 ++ .../Core/src/sofa/core/behavior/Constraint.h | 26 +++++++++++++++++++ .../src/sofa/core/behavior/Constraint.inl | 26 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 Sofa/framework/Core/src/sofa/core/behavior/Constraint.h create mode 100644 Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl diff --git a/Sofa/framework/Core/CMakeLists.txt b/Sofa/framework/Core/CMakeLists.txt index 8659bd90091..a712ab08e63 100644 --- a/Sofa/framework/Core/CMakeLists.txt +++ b/Sofa/framework/Core/CMakeLists.txt @@ -71,6 +71,8 @@ set(HEADER_FILES ${SRC_ROOT}/behavior/BaseVectorOperations.h ${SRC_ROOT}/behavior/BlocMatrixWriter.h ${SRC_ROOT}/behavior/BlockType.h + ${SRC_ROOT}/behavior/Constraint.h + ${SRC_ROOT}/behavior/Constraint.inl ${SRC_ROOT}/behavior/ConstraintCorrection.h ${SRC_ROOT}/behavior/ConstraintCorrection.inl ${SRC_ROOT}/behavior/ConstraintResolution.h diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h new file mode 100644 index 00000000000..ce37552b294 --- /dev/null +++ b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h @@ -0,0 +1,26 @@ +/****************************************************************************** +* SOFA, Simulation Open-Framework Architecture * +* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * +* * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU Lesser General Public License as published by * +* the Free Software Foundation; either version 2.1 of the License, or (at * +* your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, but WITHOUT * +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * +* for more details. * +* * +* You should have received a copy of the GNU Lesser General Public License * +* along with this program. If not, see . * +******************************************************************************* +* Authors: The SOFA Team and external contributors (see Authors.txt) * +* * +* Contact information: contact@sofa-framework.org * +******************************************************************************/ +#pragma once + +#include + +SOFA_HEADER_DEPRECATED("v25.12", "v26.12", "sofa/core/behavior/LagrangianConstraint.h") diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl new file mode 100644 index 00000000000..8cd5117155b --- /dev/null +++ b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.inl @@ -0,0 +1,26 @@ +/****************************************************************************** +* SOFA, Simulation Open-Framework Architecture * +* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * +* * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU Lesser General Public License as published by * +* the Free Software Foundation; either version 2.1 of the License, or (at * +* your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, but WITHOUT * +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * +* for more details. * +* * +* You should have received a copy of the GNU Lesser General Public License * +* along with this program. If not, see . * +******************************************************************************* +* Authors: The SOFA Team and external contributors (see Authors.txt) * +* * +* Contact information: contact@sofa-framework.org * +******************************************************************************/ +#pragma once + +#include + +SOFA_HEADER_DEPRECATED("v25.12", "v26.12", "sofa/core/behavior/LagrangianConstraint.inl") From 2521d7fa863f913a8d11a36a8dae1430928033e2 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Wed, 14 May 2025 10:42:53 +0200 Subject: [PATCH 3/5] Rename class --- .../core/behavior/BaseLagrangianConstraint.h | 2 +- .../sofa/core/behavior/BaseMechanicalState.h | 2 +- .../Core/src/sofa/core/behavior/Constraint.h | 6 +++++ .../core/behavior/LagrangianConstraint.cpp | 12 ++++----- .../sofa/core/behavior/LagrangianConstraint.h | 26 +++++++++---------- .../core/behavior/LagrangianConstraint.inl | 16 ++++++------ 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/Sofa/framework/Core/src/sofa/core/behavior/BaseLagrangianConstraint.h b/Sofa/framework/Core/src/sofa/core/behavior/BaseLagrangianConstraint.h index 49eeb0cea1b..813d472031c 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/BaseLagrangianConstraint.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/BaseLagrangianConstraint.h @@ -35,7 +35,7 @@ namespace sofa::core::behavior * given its current position and velocity. * * Constraints can be internal to a given body (attached to one MechanicalState, - * see the Constraint class), or link several bodies together (such as contacts, + * see the LagrangianConstraint class), or link several bodies together (such as contacts, * see the InteractionConstraint class). * */ diff --git a/Sofa/framework/Core/src/sofa/core/behavior/BaseMechanicalState.h b/Sofa/framework/Core/src/sofa/core/behavior/BaseMechanicalState.h index 9344498e63f..462bb36afc9 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/BaseMechanicalState.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/BaseMechanicalState.h @@ -36,7 +36,7 @@ namespace sofa::core::behavior * * This class only contains the data of the body and not any of its * active computations, which are handled by the Mass, ForceField, and - * Constraint components. + * LagrangianConstraint components. * * Two types of vectors are used : * \li \code VecCoord \endcode : containing positions. diff --git a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h index ce37552b294..3641d740e98 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/Constraint.h @@ -24,3 +24,9 @@ #include SOFA_HEADER_DEPRECATED("v25.12", "v26.12", "sofa/core/behavior/LagrangianConstraint.h") + +namespace sofa::core::behavior +{ +template +using Constraint SOFA_ATTRIBUTE_DEPRECATED("v25.12", "v26.12", "Constraint has been renamed to LagrangianConstraint") = LagrangianConstraint; +} diff --git a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp index af0cef4e3f0..0341a1ce428 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp +++ b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.cpp @@ -26,12 +26,12 @@ namespace sofa::core::behavior { using namespace sofa::defaulttype; -template class SOFA_CORE_API Constraint; -template class SOFA_CORE_API Constraint; -template class SOFA_CORE_API Constraint; -template class SOFA_CORE_API Constraint; -template class SOFA_CORE_API Constraint; -template class SOFA_CORE_API Constraint; +template class SOFA_CORE_API LagrangianConstraint; +template class SOFA_CORE_API LagrangianConstraint; +template class SOFA_CORE_API LagrangianConstraint; +template class SOFA_CORE_API LagrangianConstraint; +template class SOFA_CORE_API LagrangianConstraint; +template class SOFA_CORE_API LagrangianConstraint; } // namespace sofa::core::behavior diff --git a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h index 8a4e5b8c722..52aba30d714 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h @@ -34,17 +34,17 @@ namespace sofa::core::behavior /** * \brief Component computing constraints within a simulated body. * - * This class define the abstract API common to constraints using a given type + * This class defines the abstract API common to constraints using a given type * of DOFs. - * A Constraint computes constraints applied to one simulated body given its + * A LagrangianConstraint computes constraints applied to one simulated body given its * current position and velocity. * */ template -class Constraint : public BaseLagrangianConstraint, public SingleStateAccessor +class LagrangianConstraint : public BaseLagrangianConstraint, public SingleStateAccessor { public: - SOFA_CLASS2(SOFA_TEMPLATE(Constraint, DataTypes), BaseLagrangianConstraint, SOFA_TEMPLATE(SingleStateAccessor, DataTypes)); + SOFA_CLASS2(SOFA_TEMPLATE(LagrangianConstraint, DataTypes), BaseLagrangianConstraint, SOFA_TEMPLATE(SingleStateAccessor, DataTypes)); typedef typename DataTypes::Real Real; typedef typename DataTypes::VecCoord VecCoord; @@ -57,9 +57,9 @@ class Constraint : public BaseLagrangianConstraint, public SingleStateAccessor DataVecDeriv; typedef core::objectmodel::Data DataMatrixDeriv; protected: - Constraint(MechanicalState *mm = nullptr); + LagrangianConstraint(MechanicalState *mm = nullptr); - ~Constraint() override; + ~LagrangianConstraint() override; virtual void init() override; public: @@ -121,7 +121,7 @@ class Constraint : public BaseLagrangianConstraint, public SingleStateAccessor getBaseConstraintIdentifiers() override final { type::vector ids = getConstraintIdentifiers(); - ids.push_back("Constraint"); + ids.push_back("LagrangianConstraint"); return ids; } @@ -135,12 +135,12 @@ class Constraint : public BaseLagrangianConstraint, public SingleStateAccessor; -extern template class SOFA_CORE_API Constraint; -extern template class SOFA_CORE_API Constraint; -extern template class SOFA_CORE_API Constraint; -extern template class SOFA_CORE_API Constraint; -extern template class SOFA_CORE_API Constraint; +extern template class SOFA_CORE_API LagrangianConstraint; +extern template class SOFA_CORE_API LagrangianConstraint; +extern template class SOFA_CORE_API LagrangianConstraint; +extern template class SOFA_CORE_API LagrangianConstraint; +extern template class SOFA_CORE_API LagrangianConstraint; +extern template class SOFA_CORE_API LagrangianConstraint; #endif diff --git a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl index e80274dd83a..e7baa677ef5 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl +++ b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl @@ -28,34 +28,34 @@ namespace sofa::core::behavior { template -Constraint::Constraint(MechanicalState *mm) +LagrangianConstraint::LagrangianConstraint(MechanicalState *mm) : Inherit1(), Inherit2(mm) , endTime( initData(&endTime,(Real)-1,"endTime","The constraint stops acting after the given value.\nUse a negative value for infinite constraints") ) { } template -Constraint::~Constraint() +LagrangianConstraint::~LagrangianConstraint() { } template -bool Constraint::isActive() const +bool LagrangianConstraint::isActive() const { if( endTime.getValue()<0 ) return true; return endTime.getValue()>getContext()->getTime(); } template -void Constraint::init() +void LagrangianConstraint::init() { Inherit1::init(); Inherit2::init(); } template -void Constraint::getConstraintViolation(const ConstraintParams* cParams, linearalgebra::BaseVector *v) +void LagrangianConstraint::getConstraintViolation(const ConstraintParams* cParams, linearalgebra::BaseVector *v) { if (cParams) { @@ -65,7 +65,7 @@ void Constraint::getConstraintViolation(const ConstraintParams* cPara template -void Constraint::buildConstraintMatrix(const ConstraintParams* cParams, MultiMatrixDerivId cId, unsigned int &cIndex) +void LagrangianConstraint::buildConstraintMatrix(const ConstraintParams* cParams, MultiMatrixDerivId cId, unsigned int &cIndex) { if (cParams) { @@ -75,7 +75,7 @@ void Constraint::buildConstraintMatrix(const ConstraintParams* cParam template -void Constraint::storeLambda(const ConstraintParams* cParams, MultiVecDerivId res, const sofa::linearalgebra::BaseVector* lambda) +void LagrangianConstraint::storeLambda(const ConstraintParams* cParams, MultiVecDerivId res, const sofa::linearalgebra::BaseVector* lambda) { if (cParams) { @@ -84,7 +84,7 @@ void Constraint::storeLambda(const ConstraintParams* cParams, MultiVe } template -void Constraint::storeLambda(const ConstraintParams*, Data& result, const Data& jacobian, const sofa::linearalgebra::BaseVector* lambda) +void LagrangianConstraint::storeLambda(const ConstraintParams*, Data& result, const Data& jacobian, const sofa::linearalgebra::BaseVector* lambda) { auto res = sofa::helper::getWriteAccessor(result); const MatrixDeriv& j = jacobian.getValue(); From 0e743c0175ee6e8bef747092f6c373dc3469b2e3 Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Wed, 14 May 2025 10:44:26 +0200 Subject: [PATCH 4/5] Apply renaming --- .../constraint/lagrangian/model/FixedLagrangianConstraint.h | 6 +++--- .../lagrangian/model/StopperLagrangianConstraint.h | 6 +++--- .../lagrangian/model/UniformLagrangianConstraint.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h index 03944cdd4ba..d7b1f66d2de 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h @@ -32,10 +32,10 @@ namespace sofa::component::constraint::lagrangian::model { template< class DataTypes > -class FixedLagrangianConstraint : public core::behavior::Constraint +class FixedLagrangianConstraint : public core::behavior::LagrangianConstraint { public: - SOFA_CLASS(SOFA_TEMPLATE(FixedLagrangianConstraint,DataTypes), SOFA_TEMPLATE(core::behavior::Constraint,DataTypes)); + SOFA_CLASS(SOFA_TEMPLATE(FixedLagrangianConstraint,DataTypes), SOFA_TEMPLATE(core::behavior::LagrangianConstraint,DataTypes)); typedef typename DataTypes::VecCoord VecCoord; typedef typename DataTypes::VecDeriv VecDeriv; @@ -43,7 +43,7 @@ class FixedLagrangianConstraint : public core::behavior::Constraint typedef typename DataTypes::Deriv Deriv; typedef typename DataTypes::MatrixDeriv MatrixDeriv; typedef typename core::behavior::MechanicalState MechanicalState; - typedef typename core::behavior::Constraint Inherit; + typedef typename core::behavior::LagrangianConstraint Inherit; typedef typename DataTypes::MatrixDeriv::RowIterator MatrixDerivRowIterator; typedef core::objectmodel::Data DataVecCoord; diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h index 4d04c866b9c..a56b99ab26c 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h @@ -65,10 +65,10 @@ class StopperLagrangianConstraintResolution1Dof : public core::behavior::Constra }; template< class DataTypes > -class StopperLagrangianConstraint : public core::behavior::Constraint +class StopperLagrangianConstraint : public core::behavior::LagrangianConstraint { public: - SOFA_CLASS(SOFA_TEMPLATE(StopperLagrangianConstraint,DataTypes), SOFA_TEMPLATE(core::behavior::Constraint,DataTypes)); + SOFA_CLASS(SOFA_TEMPLATE(StopperLagrangianConstraint,DataTypes), SOFA_TEMPLATE(core::behavior::LagrangianConstraint,DataTypes)); typedef typename DataTypes::VecCoord VecCoord; typedef typename DataTypes::VecDeriv VecDeriv; @@ -77,7 +77,7 @@ class StopperLagrangianConstraint : public core::behavior::Constraint typedef typename DataTypes::MatrixDeriv MatrixDeriv; typedef typename Coord::value_type Real; typedef typename core::behavior::MechanicalState MechanicalState; - typedef typename core::behavior::Constraint Inherit; + typedef typename core::behavior::LagrangianConstraint Inherit; typedef typename DataTypes::MatrixDeriv::RowIterator MatrixDerivRowIterator; typedef core::objectmodel::Data DataVecCoord; diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h index ffdaf656bc6..88bd61de69a 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h @@ -28,10 +28,10 @@ namespace sofa::component::constraint::lagrangian::model { template < class DataTypes > -class UniformLagrangianConstraint : public sofa::core::behavior::Constraint< DataTypes > +class UniformLagrangianConstraint : public sofa::core::behavior::LagrangianConstraint< DataTypes > { public: - SOFA_CLASS(SOFA_TEMPLATE(UniformLagrangianConstraint, DataTypes), SOFA_TEMPLATE(sofa::core::behavior::Constraint, DataTypes)); + SOFA_CLASS(SOFA_TEMPLATE(UniformLagrangianConstraint, DataTypes), SOFA_TEMPLATE(sofa::core::behavior::LagrangianConstraint, DataTypes)); typedef typename DataTypes::VecCoord VecCoord; typedef typename DataTypes::VecDeriv VecDeriv; From cf7b007572aa6c9ecfd072dff17d7956b247cf4f Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Wed, 14 May 2025 10:47:52 +0200 Subject: [PATCH 5/5] replace includes --- .../constraint/lagrangian/model/FixedLagrangianConstraint.h | 2 +- .../constraint/lagrangian/model/StopperLagrangianConstraint.h | 2 +- .../constraint/lagrangian/model/UniformLagrangianConstraint.h | 2 +- .../Core/src/sofa/core/behavior/LagrangianConstraint.inl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h index d7b1f66d2de..22f083180c3 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/FixedLagrangianConstraint.h @@ -22,7 +22,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h index a56b99ab26c..41f86c73f22 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/StopperLagrangianConstraint.h @@ -22,7 +22,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h index 88bd61de69a..905ead566c4 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/UniformLagrangianConstraint.h @@ -22,7 +22,7 @@ #pragma once #include -#include +#include namespace sofa::component::constraint::lagrangian::model { diff --git a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl index e7baa677ef5..f4cfd00a8e6 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl +++ b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.inl @@ -21,7 +21,7 @@ ******************************************************************************/ #pragma once -#include +#include #include namespace sofa::core::behavior