Skip to content

Commit b9faf2d

Browse files
authored
Merge pull request #190 from alxbilger/diagonalmatrix
Fix for which matrix is diagonal
2 parents 4f217c8 + 3de2bf6 commit b9faf2d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

20_Simulation_Principles/60_Constraint/20_Lagrange_Constraint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ The output of the constraint resolution is the corrected motion $\Delta v^{cor}$
201201
ConstraintCorrection
202202
--------------------
203203

204-
As explained above, a _ConstraintCorrection_ is required in the simulation to define the way the compliance matrix $\mathbf{W}$ is computed. Different classes of _ConstraintCorrection_ exist in SOFA corresponding to different approaches:
204+
As explained above, a _ConstraintCorrection_ is required in the simulation to define the way the compliance matrix projected in the constraint space $\mathbf{W}$ is computed. Different classes of _ConstraintCorrection_ exist in SOFA corresponding to different approaches:
205205

206-
- [UncoupledConstraintCorrection](../../../components/constraint/lagrangian/correction/uncoupledconstraintcorrection/): makes the approximation that the compliance matrix $\mathbf{W}$ is diagonal. This is as strong assumption since a diagonal matrix means that all constraints are independent from each other. Note that you can directly specify the compliance matrix values within the Data field "compliance"
206+
- [UncoupledConstraintCorrection](../../../components/constraint/lagrangian/correction/uncoupledconstraintcorrection/): makes the approximation that the compliance matrix $\mathbf{A}^{-1}$ is diagonal. This is as strong assumption since a diagonal matrix means that all constraints are independent from each other. Note that you can directly specify the compliance matrix values within the Data field "compliance"
207207

208208
- [LinearSolverConstraintCorrection](../../../components/constraint/lagrangian/correction/linearsolverconstraintcorrection/): computes the compliance matrix $\mathbf{W}=\mathbf{H}\mathbf{A}^{-1}\mathbf{H}^T$ where $\mathbf{A}^{-1}$ comes from a direct solver associated to the object. Since the direct solvers in SOFA factorize the matrix $\mathbf{A}$ (for instance using a LDL factorization if you use the _LDLSolver_), the factorization is reused to compute the compliance matrix. The matrix-matrix multiplication $\mathbf{H}\mathbf{A}^{-1}\mathbf{H}^T$ is not possible in case of a matrix-free solver, since the assembled inverse matrix $\mathbf{A}^{-1}$ is not available. From the factorization of $\mathbf{A}$, the computation of $\mathbf{H}\mathbf{A}^{-1}\mathbf{H}^T$ done in the function _addJMInvJt()_ requires to call the _solve()_ function from the direct solver, computing a matrix-vector multiplication, for each line of the constraint matrix $\mathbf{H}$, i.e. for each constraint. This approach can therefore be very computationally-demanding if you have many constraints. Note that this ConstraintCorrection proposes an optimization for wire-like structures (boolean option)
209209

0 commit comments

Comments
 (0)