From ae8ab1026fd1e4fb741fa29ca14b977a16d484fe Mon Sep 17 00:00:00 2001 From: Olivier Rochel Date: Tue, 13 May 2025 13:50:58 +0200 Subject: [PATCH 1/2] ConstraintSolver: template method pattern for all public methods --- .../solver/ConstraintSolverImpl.cpp | 2 +- .../lagrangian/solver/ConstraintSolverImpl.h | 2 +- .../solver/GenericConstraintSolver.cpp | 12 +- .../solver/GenericConstraintSolver.h | 12 +- .../lagrangian/solver/LCPConstraintSolver.cpp | 8 +- .../lagrangian/solver/LCPConstraintSolver.h | 8 +- .../sofa/core/behavior/ConstraintSolver.cpp | 2 +- .../src/sofa/core/behavior/ConstraintSolver.h | 115 ++++++++++++++++-- 8 files changed, 128 insertions(+), 33 deletions(-) diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.cpp b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.cpp index 2e9105b45b9..d540aeb0f1c 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.cpp @@ -89,7 +89,7 @@ void ConstraintSolverImpl::cleanup() ConstraintSolver::cleanup(); } -void ConstraintSolverImpl::removeConstraintCorrection(core::behavior::BaseConstraintCorrection* s) +void ConstraintSolverImpl::doRemoveConstraintCorrection(core::behavior::BaseConstraintCorrection* s) { l_constraintCorrections.remove(s); } diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.h b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.h index 626eb74d2ec..f4e36552fd5 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.h +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/ConstraintSolverImpl.h @@ -80,7 +80,7 @@ class SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_SOLVER_API ConstraintSolverImpl : pub /// This is used to prevent concurrent access to the LCP when using a LCPForceFeedback through an haptic thread. virtual void lockConstraintProblem(sofa::core::objectmodel::BaseObject* from, ConstraintProblem* p1, ConstraintProblem* p2=nullptr) = 0; - void removeConstraintCorrection(core::behavior::BaseConstraintCorrection *s) override; + void doRemoveConstraintCorrection(core::behavior::BaseConstraintCorrection *s) override; protected: diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.cpp b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.cpp index b90c05c6c71..a351d0ab4fc 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.cpp @@ -158,7 +158,7 @@ void GenericConstraintSolver::cleanup() sofa::component::constraint::lagrangian::solver::ConstraintSolverImpl::cleanup(); } -bool GenericConstraintSolver::prepareStates(const core::ConstraintParams *cParams, MultiVecId /*res1*/, MultiVecId /*res2*/) +bool GenericConstraintSolver::doPrepareStates(const core::ConstraintParams *cParams, MultiVecId /*res1*/, MultiVecId /*res2*/) { last_cp = current_cp; @@ -186,7 +186,7 @@ bool GenericConstraintSolver::prepareStates(const core::ConstraintParams *cParam return true; } -bool GenericConstraintSolver::buildSystem(const core::ConstraintParams *cParams, MultiVecId res1, MultiVecId res2) +bool GenericConstraintSolver::doBuildSystem(const core::ConstraintParams *cParams, MultiVecId res1, MultiVecId res2) { SOFA_UNUSED(res1); SOFA_UNUSED(res2); @@ -373,7 +373,7 @@ void GenericConstraintSolver::buildSystem_matrixAssembly(const core::ConstraintP dmsg_info() << " computeCompliance_done " ; } -void GenericConstraintSolver::rebuildSystem(const SReal massFactor, const SReal forceFactor) +void GenericConstraintSolver::doRebuildSystem(const SReal massFactor, const SReal forceFactor) { for (const auto& cc : l_constraintCorrections) { @@ -420,7 +420,7 @@ void printLCP(std::ostream& file, SReal *q, SReal **M, SReal *f, int dim, bool p file << " ];" << msgendl << msgendl; } -bool GenericConstraintSolver::solveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) +bool GenericConstraintSolver::doSolveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) { current_cp->tolerance = d_tolerance.getValue(); current_cp->maxIterations = d_maxIt.getValue(); @@ -485,7 +485,7 @@ bool GenericConstraintSolver::solveSystem(const core::ConstraintParams * /*cPara return true; } -void GenericConstraintSolver::computeResidual(const core::ExecParams* eparam) +void GenericConstraintSolver::doComputeResidual(const core::ExecParams* eparam) { for (const auto& cc : l_constraintCorrections) { @@ -564,7 +564,7 @@ void GenericConstraintSolver::storeConstraintLambdas(const core::ConstraintParam } -bool GenericConstraintSolver::applyCorrection(const core::ConstraintParams *cParams, MultiVecId res1, MultiVecId res2) +bool GenericConstraintSolver::doApplyCorrection(const core::ConstraintParams *cParams, MultiVecId res1, MultiVecId res2) { computeAndApplyMotionCorrection(cParams, res1, res2); storeConstraintLambdas(cParams); diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.h b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.h index e7a3a639cfc..a81e340d0e5 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.h +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/GenericConstraintSolver.h @@ -51,13 +51,13 @@ class SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_SOLVER_API GenericConstraintSolver : void cleanup() override; - bool prepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - bool buildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - void rebuildSystem(SReal massFactor, SReal forceFactor) override; + bool doPrepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doBuildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + void doRebuildSystem(SReal massFactor, SReal forceFactor) override; void addRegularization(linearalgebra::BaseMatrix & W); - bool solveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - bool applyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - void computeResidual(const core::ExecParams* /*params*/) override; + bool doSolveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doApplyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + void doComputeResidual(const core::ExecParams* /*params*/) override; ConstraintProblem* getConstraintProblem() override; void lockConstraintProblem(sofa::core::objectmodel::BaseObject* from, ConstraintProblem* p1, ConstraintProblem* p2 = nullptr) override; diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.cpp b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.cpp index c50fb7cb80a..4ad8c2960af 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.cpp @@ -92,7 +92,7 @@ void LCPConstraintProblem::solveTimed(SReal tolerance, int maxIt, SReal timeout) helper::nlcp_gaussseidelTimed(dimension, getDfree(), getW(), getF(), mu, tolerance, maxIt, true, timeout); } -bool LCPConstraintSolver::prepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) +bool LCPConstraintSolver::doPrepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) { last_cp = current_cp; MechanicalVOpVisitor(core::execparams::defaultInstance(), (core::VecId)core::vec_id::write_access::dx).setMapped(true).execute( getContext()); //dX=0 @@ -122,7 +122,7 @@ void LCPConstraintSolver::addRegularization(linearalgebra::BaseMatrix& W) } } -bool LCPConstraintSolver::buildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2) +bool LCPConstraintSolver::doBuildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2) { SOFA_UNUSED(res1); SOFA_UNUSED(res2); @@ -163,7 +163,7 @@ void LCPConstraintSolver::buildSystem() } -bool LCPConstraintSolver::solveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) +bool LCPConstraintSolver::doSolveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) { const auto _mu = d_mu.getValue(); @@ -272,7 +272,7 @@ bool LCPConstraintSolver::solveSystem(const core::ConstraintParams * /*cParams*/ return true; } -bool LCPConstraintSolver::applyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) +bool LCPConstraintSolver::doApplyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId /*res1*/, MultiVecId /*res2*/) { if (d_initial_guess.getValue()) { diff --git a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.h b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.h index b4217228f20..84a7bfee430 100644 --- a/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.h +++ b/Sofa/Component/Constraint/Lagrangian/Solver/src/sofa/component/constraint/lagrangian/solver/LCPConstraintSolver.h @@ -65,10 +65,10 @@ class SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_SOLVER_API LCPConstraintSolver : publ ~LCPConstraintSolver() override; public: - bool prepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - bool buildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - bool solveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; - bool applyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doPrepareStates(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doBuildSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doSolveSystem(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; + bool doApplyCorrection(const core::ConstraintParams * /*cParams*/, MultiVecId res1, MultiVecId res2=MultiVecId::null()) override; void draw(const core::visual::VisualParams* vparams) override; diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.cpp b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.cpp index f20198c898f..920998be51b 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.cpp +++ b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.cpp @@ -31,7 +31,7 @@ namespace sofa::core::behavior ConstraintSolver::ConstraintSolver() = default; ConstraintSolver::~ConstraintSolver() = default; -void ConstraintSolver::solveConstraint(const ConstraintParams * cParams, MultiVecId res1, MultiVecId res2) +void ConstraintSolver::doSolveConstraint(const ConstraintParams * cParams, MultiVecId res1, MultiVecId res2) { SCOPED_TIMER("SolveConstraint"); prepareStatesTask(cParams, res1, res2) && diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h index 89b209e1215..afccb67e234 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h @@ -48,7 +48,17 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject ConstraintSolver(); ~ConstraintSolver() override; - + virtual void doSolveConstraint(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()); + virtual bool doPrepareStates(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) = 0; + virtual bool doBuildSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) = 0; + virtual void doRebuildSystem(SReal /*massFactor*/, SReal /*forceFactor*/) {}; + virtual bool doSolveSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) = 0; + virtual bool doApplyCorrection(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) = 0; + virtual void doComputeResidual(const core::ExecParams* /*cParams*/) + { + dmsg_error() << "ComputeResidual is not implemented in " << this->getName() ; + } + virtual void doRemoveConstraintCorrection(BaseConstraintCorrection *s) = 0; private: ConstraintSolver(const ConstraintSolver& n) = delete; ConstraintSolver& operator=(const ConstraintSolver& n) = delete; @@ -58,41 +68,115 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject /** * Launch the sequence of operations in order to solve the constraints */ - virtual void solveConstraint(const ConstraintParams *, MultiVecId res1, MultiVecId res2=MultiVecId::null()); + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doSolveConstraint" internally, + * which is the method to override from now on. + * + **/ + virtual void solveConstraint(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final + { + doSolveConstraint(cParams, res1, res2); + } /** * Do the precomputation: compute free state, or propagate the states to the mapped mechanical states, where the constraint can be expressed */ - virtual bool prepareStates(const ConstraintParams *, MultiVecId res1, MultiVecId res2=MultiVecId::null())=0; + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doPrepareStates" internally, + * which is the method to override from now on. + * + **/ + virtual bool prepareStates(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final + { + return doPrepareStates(cParams,res1,res2); + } /** * Create the system corresponding to the constraints */ - virtual bool buildSystem(const ConstraintParams *, MultiVecId res1, MultiVecId res2=MultiVecId::null())=0; + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doBuildSystem" internally, + * which is the method to override from now on. + * + **/ + virtual bool buildSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final + { + return doBuildSystem(cParams, res1, res2); + } /** * Rebuild the system using a mass and force factor. * Experimental API used to investigate convergence issues. */ - virtual void rebuildSystem(SReal /*massfactor*/, SReal /*forceFactor*/){} + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doRebuildSystem" internally, + * which is the method to override from now on. + * + **/ + virtual void rebuildSystem(SReal massFactor, SReal forceFactor) final + { + doRebuildSystem(massFactor, forceFactor); + } /** * Use the system previously built and solve it with the appropriate algorithm */ - virtual bool solveSystem(const ConstraintParams *, MultiVecId res1, MultiVecId res2=MultiVecId::null())=0; + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doSolveSystem" internally, + * which is the method to override from now on. + * + **/ + virtual bool solveSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final + { + return doSolveSystem(cParams, res1, res2); + } /** * Correct the Mechanical State with the solution found */ - virtual bool applyCorrection(const ConstraintParams *, MultiVecId res1, MultiVecId res2=MultiVecId::null())=0; + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doApplyCorrection" internally, + * which is the method to override from now on. + * + **/ + virtual bool applyCorrection(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final + { + return doApplyCorrection(cParams, res1, res2); + } /// Compute the residual in the newton iterations due to the constraints forces /// i.e. compute Vecid::force() += J^t lambda /// the result is accumulated in Vecid::force() - virtual void computeResidual(const core::ExecParams* /*params*/) + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doCompureResidual" internally, + * which is the method to override from now on. + * + **/ + virtual void computeResidual(const core::ExecParams* cParams) final { - dmsg_error() << "ComputeResidual is not implemented in " << this->getName() ; + doComputeResidual(cParams); } /// @name Resolution DOFs vectors API @@ -111,7 +195,18 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject /// Remove reference to ConstraintCorrection /// /// @param c is the ConstraintCorrection - virtual void removeConstraintCorrection(BaseConstraintCorrection *s) = 0; + /** + * !!! WARNING since v25.12 !!! + * + * The template method pattern has been applied to this part of the API. + * This method calls the newly introduced method "doRemoveConstraintCorrection" internally, + * which is the method to override from now on. + * + **/ + virtual void removeConstraintCorrection(BaseConstraintCorrection *s) final + { + doRemoveConstraintCorrection(s); + } bool insertInNode( objectmodel::BaseNode* node ) override; bool removeInNode( objectmodel::BaseNode* node ) override; From 0c31d0109ca2502061c0c29e095919d7056d42f6 Mon Sep 17 00:00:00 2001 From: Olivier Rochel Date: Wed, 14 May 2025 09:54:56 +0200 Subject: [PATCH 2/2] ConstraintSolver: add missing TODO comment --- .../Core/src/sofa/core/behavior/ConstraintSolver.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h index afccb67e234..7af2c3d61cb 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintSolver.h @@ -78,6 +78,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual void solveConstraint(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final { + //TODO (SPRINT SED 2025): Component state mechanism doSolveConstraint(cParams, res1, res2); } @@ -94,6 +95,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual bool prepareStates(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final { + //TODO (SPRINT SED 2025): Component state mechanism return doPrepareStates(cParams,res1,res2); } @@ -110,6 +112,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual bool buildSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final { + //TODO (SPRINT SED 2025): Component state mechanism return doBuildSystem(cParams, res1, res2); } @@ -127,6 +130,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual void rebuildSystem(SReal massFactor, SReal forceFactor) final { + //TODO (SPRINT SED 2025): Component state mechanism doRebuildSystem(massFactor, forceFactor); } @@ -143,6 +147,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual bool solveSystem(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final { + //TODO (SPRINT SED 2025): Component state mechanism return doSolveSystem(cParams, res1, res2); } @@ -159,6 +164,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual bool applyCorrection(const ConstraintParams *cParams, MultiVecId res1, MultiVecId res2=MultiVecId::null()) final { + //TODO (SPRINT SED 2025): Component state mechanism return doApplyCorrection(cParams, res1, res2); } @@ -176,6 +182,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual void computeResidual(const core::ExecParams* cParams) final { + //TODO (SPRINT SED 2025): Component state mechanism doComputeResidual(cParams); } @@ -205,6 +212,7 @@ class SOFA_CORE_API ConstraintSolver : public virtual objectmodel::BaseObject **/ virtual void removeConstraintCorrection(BaseConstraintCorrection *s) final { + //TODO (SPRINT SED 2025): Component state mechanism doRemoveConstraintCorrection(s); }