diff --git a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.h b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.h index b1d0a26c5a1..3704981a5e7 100644 --- a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.h +++ b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.h @@ -112,7 +112,7 @@ class LinearSolverConstraintCorrection : public sofa::core::behavior::Constraint protected: DeprecatedAndRemoved J; ///< use m_constraintMatrix instead - linearalgebra::SparseMatrix m_constraintMatrix; + linearalgebra::SparseMatrix m_constraintJacobian; SOFA_ATTRIBUTE_DEPRECATED__FORCES_IN_LINEARSOLVERCONSTRAINTCORRECTION() linearalgebra::FullVector F; ///< forces computed from the constraints diff --git a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.inl b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.inl index 3c1c8d970dd..4abdd39f127 100644 --- a/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.inl +++ b/Sofa/Component/Constraint/Lagrangian/Correction/src/sofa/component/constraint/lagrangian/correction/LinearSolverConstraintCorrection.inl @@ -145,7 +145,7 @@ void LinearSolverConstraintCorrection::convertConstraintMatrix(const static constexpr unsigned int N = Deriv::size(); const unsigned int numDOFReals = numDOFs * N; - m_constraintMatrix.resize(numberOfConstraints, numDOFReals); + m_constraintJacobian.resize(numberOfConstraints, numDOFReals); MatrixDerivRowConstIterator rowItEnd = inputConstraintMatrix.end(); @@ -162,7 +162,7 @@ void LinearSolverConstraintCorrection::convertConstraintMatrix(const for (unsigned int r = 0; r < N; ++r) { - m_constraintMatrix.add(cid, dof * N + r, n[r]); + m_constraintJacobian.add(cid, dof * N + r, n[r]); } } } @@ -201,7 +201,7 @@ void LinearSolverConstraintCorrection::addComplianceInConstraintSpace // use the Linear solver to compute J*inv(M)*Jt, where M is the mechanical linear system matrix l_linearSolver->setSystemLHVector(sofa::core::MultiVecDerivId::null()); - l_linearSolver->addJMInvJt(W, &m_constraintMatrix, factor); + l_linearSolver->addJMInvJt(W, &m_constraintJacobian, factor); } @@ -702,7 +702,7 @@ void LinearSolverConstraintCorrection::getBlockDiagonalCompliance(lin const MatrixDeriv& constraints = mstate->read(core::ConstMatrixDerivId::constraintJacobian())->getValue(); const sofa::SignedIndex totalNumConstraints = W->rowSize(); - m_constraintMatrix.resize(totalNumConstraints, numDOFReals); + m_constraintJacobian.resize(totalNumConstraints, numDOFReals); for (int i = begin; i <= end; i++) { @@ -723,7 +723,7 @@ void LinearSolverConstraintCorrection::getBlockDiagonalCompliance(lin const Deriv n = colIt.val(); for (unsigned int r = 0; r < N; ++r) - m_constraintMatrix.add(i, dof * N + r, n[r]); + m_constraintJacobian.add(i, dof * N + r, n[r]); if (debug!=0) { @@ -738,7 +738,7 @@ void LinearSolverConstraintCorrection::getBlockDiagonalCompliance(lin } // use the Linear solver to compute J*inv(M)*Jt, where M is the mechanical linear system matrix - l_linearSolver->addJMInvJt(W, &m_constraintMatrix, factor); + l_linearSolver->addJMInvJt(W, &m_constraintJacobian, factor); // construction of Vec_I_list_dof : vector containing, for each constraint block, the list of dof concerned