Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger authored and fredroy committed Oct 10, 2024
1 parent 7c7c930 commit 9862b54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class LinearSolverConstraintCorrection : public sofa::core::behavior::Constraint
protected:
DeprecatedAndRemoved J; ///< use m_constraintMatrix instead

linearalgebra::SparseMatrix<Real> m_constraintMatrix;
linearalgebra::SparseMatrix<Real> m_constraintJacobian;

SOFA_ATTRIBUTE_DEPRECATED__FORCES_IN_LINEARSOLVERCONSTRAINTCORRECTION()
linearalgebra::FullVector<SReal> F; ///< forces computed from the constraints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void LinearSolverConstraintCorrection<TDataTypes>::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();

Expand All @@ -162,7 +162,7 @@ void LinearSolverConstraintCorrection<TDataTypes>::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]);
}
}
}
Expand Down Expand Up @@ -201,7 +201,7 @@ void LinearSolverConstraintCorrection<DataTypes>::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);
}


Expand Down Expand Up @@ -702,7 +702,7 @@ void LinearSolverConstraintCorrection<DataTypes>::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++)
{
Expand All @@ -723,7 +723,7 @@ void LinearSolverConstraintCorrection<DataTypes>::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)
{
Expand All @@ -738,7 +738,7 @@ void LinearSolverConstraintCorrection<DataTypes>::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

Expand Down

0 comments on commit 9862b54

Please sign in to comment.