Valid combinations of ConstraintCorrection and LinearSolver #3046
-
Hi, If I am using the
This leaves the
If I understand the documentation correctly, they do basically the same thing, but The documentation further indicates that they require a DIRECT linear solver to work. node.addObject("EulerImplicitSolver")
node.addObject("CGLinearSolver")
node.addObject("EdgeSetTopologyContainer", position=[[x, 0, 0] for x in range(5)], edges=[[x, x + 1] for x in range(4)])
node.addObject("MechanicalObject", template="Rigid3d", position=[[x, 0, 0, 0, 0, 0, 1] for x in range(5)])
node.addObject("UniformMass", totalMass=1.0)
node.addObject("BeamFEMForceField", radius=0.1, youngModulus=5e6, poissonRatio=0.49)
node.addObject("LinearSolverConstraintCorrection") works just fine, even though I am using an ITERATIVE linear solver. If I replace the [WARNING] [GenericConstraintCorrection(GenericConstraintCorrection)] Can not use the solver CGLinearSolver because it is templated on GraphScatteredType
[ERROR] [GenericConstraintCorrection(GenericConstraintCorrection)] No LinearSolver found. which I am also not quite sure how to interpret. Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
From what I can see, Even if a CG works with |
Beta Was this translation helpful? Give feedback.
-
I guess the code snippet you gave is just a part of the scene (since there, there is not Lagrangian constraint).
Does it work even when constraints appear? I would expect a crash looking at the code : a pointer on a
indeed the |
Beta Was this translation helpful? Give feedback.
I guess the code snippet you gave is just a part of the scene (since there, there is not Lagrangian constraint).
Does it work even when constraints appear? I would expect a crash looking at the code : a pointer on a
LinearSolver
is saved internally inLinearSolverConstraintCorrection
, but this might fail when callingaddJMInvJt
indeed the
GenericConstraintCorrection
checks this correctly at init.