Skip to content

Commit d97d4ba

Browse files
authored
Apply changes from SOFA PR 5666 regarding GenericConstraintSolver (#338)
1 parent d86ccb3 commit d97d4ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+69
-69
lines changed

examples/component/constraint/CableConstraint/CableSmoothActuation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def createScene(rootNode):
3535
rootNode.addObject('VisualStyle', displayFlags='showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe')
3636

3737
rootNode.addObject('FreeMotionAnimationLoop')
38-
rootNode.addObject('GenericConstraintSolver', printLog='0')
38+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', printLog='0')
3939

4040
################################################################################################################
4141
################################################### Bunny ######################################################

examples/component/constraint/CableConstraint/Finger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def createScene(rootNode):
3535
#  of the actuator's parameters.
3636
# rootNode.addObject('QPInverseProblemSolver', printLog=False)
3737
# Otherwise use a GenericConstraintSolver
38-
rootNode.addObject('GenericConstraintSolver', tolerance=1e-5, maxIterations=100)
38+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', tolerance=1e-5, maxIterations=100)
3939

4040
rootNode.gravity = [0, -9810, 0]
4141
rootNode.dt = 0.01

examples/component/constraint/CableConstraint/FingerWithSTLIB.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def createScene(rootNode):
3636

3737
rootNode.addObject("FreeMotionAnimationLoop")
3838
rootNode.addObject('DefaultVisualManagerLoop')
39-
rootNode.addObject("GenericConstraintSolver", maxIterations=1000, tolerance=0.001)
39+
rootNode.addObject("ProjectedGaussSeidelConstraintSolver", maxIterations=1000, tolerance=0.001)
4040

4141
finger = ElasticMaterialObject(name="finger",
4242
volumeMeshFileName="mesh/finger.vtk",

examples/component/constraint/JointConstraint/JointConstraint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def createScene(rootNode):
2828
rootNode.gravity = [0., -9810., 0.]
2929
rootNode.addObject('VisualStyle', displayFlags='showBehaviorModels')
3030
rootNode.addObject('FreeMotionAnimationLoop')
31-
rootNode.addObject('GenericConstraintSolver', maxIterations=500, tolerance=1e-4)
31+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, tolerance=1e-4)
3232

3333
# Simulation node
3434
simulation = rootNode.addChild('Simulation')

examples/component/constraint/PositionConstraint/PositionConstraint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def createScene(rootnode):
33
rootnode.addObject('RequiredPlugin', name='SoftRobots')
44

55
rootnode.addObject('FreeMotionAnimationLoop')
6-
rootnode.addObject('GenericConstraintSolver', maxIterations=1e4, tolerance=1e-5, printLog=True)
6+
rootnode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1e4, tolerance=1e-5, printLog=True)
77
rootnode.gravity = [0, -9.81, 0]
88
rootnode.addObject('VisualStyle', displayFlags='showForceFields')
99

examples/component/constraint/SurfacePressureConstraint/PressureVsVolumeGrowthControl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def createScene(rootNode):
3636

3737
rootNode.addObject('FreeMotionAnimationLoop')
3838
rootNode.addObject('DefaultVisualManagerLoop')
39-
rootNode.addObject('GenericConstraintSolver', maxIterations=500, printLog=False, tolerance=0.0000001)
39+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=500, printLog=False, tolerance=0.0000001)
4040

4141
Bunny(rootNode, name='BunnyPressure', controlType='pressure', initialValue=2)
4242
Bunny(rootNode, translation=[15, 0, 0], controlType='volumeGrowth', name='BunnyVolume', initialValue=40)

examples/component/constraint/SurfacePressureConstraint/Springy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def createScene(rootNode):
3333
rootNode.addObject('FreeMotionAnimationLoop')
3434
rootNode.addObject('DefaultVisualManagerLoop')
3535

36-
rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-3)
36+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-3)
3737

3838
rootNode.addObject('BackgroundSetting', color=[0, 0.168627, 0.211765, 1])
3939
rootNode.findData('gravity').value = [0, 0, -981.0]

examples/component/constraint/SurfacePressureConstraint/SurfacePressureConstraint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def createScene(rootNode):
3232

3333
rootNode.addObject('FreeMotionAnimationLoop')
3434
rootNode.addObject('DefaultVisualManagerLoop')
35-
rootNode.addObject('GenericConstraintSolver', maxIterations=100, tolerance=0.0000001)
35+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=100, tolerance=0.0000001)
3636

3737
# bunny
3838
bunny = rootNode.addChild('bunny')

examples/component/constraint/UnilateralPlaneConstraint/ArticulatedTentacle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def createScene(rootNode):
3535
rootNode.addObject('VisualStyle', displayFlags="showVisualModels hideBehaviorModels showCollisionModels hideBoundingCollisionModels hideForceFields showInteractionForceFields hideWireframe")
3636
rootNode.addObject('FreeMotionAnimationLoop')
3737
rootNode.addObject('DefaultVisualManagerLoop')
38-
rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-3)
38+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-3)
3939

4040
rootNode.addObject('CollisionPipeline')
4141
rootNode.addObject('BruteForceBroadPhase', name="N2")

examples/component/controller/CommunicationController/SimulationDirect_Receiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def createScene(rootNode):
2626

2727
rootNode.addObject('FreeMotionAnimationLoop')
2828
rootNode.addObject('DefaultVisualManagerLoop')
29-
rootNode.addObject('GenericConstraintSolver', maxIterations=1000, tolerance=1e-14)
29+
rootNode.addObject('ProjectedGaussSeidelConstraintSolver', maxIterations=1000, tolerance=1e-14)
3030

3131
rootNode.gravity.value = [0, 0, -981.0]
3232
rootNode.dt.value = 0.01

0 commit comments

Comments
 (0)