Skip to content

Commit 346d298

Browse files
authored
ordering field is deprecated, use NaturalOrderingMethod instead (#577)
1 parent 959b4cd commit 346d298

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

examples/access_mass_matrix.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ def createScene(root):
2828
root.addObject('VisualStyle', displayFlags="showBehaviorModels showForceFields")
2929

3030
root.addObject("RequiredPlugin", pluginName=['Sofa.Component.Constraint.Projective',
31-
'Sofa.Component.Engine.Select',
32-
'Sofa.Component.LinearSolver.Direct',
33-
'Sofa.Component.LinearSystem',
34-
'Sofa.Component.Mass',
35-
'Sofa.Component.ODESolver.Backward',
36-
'Sofa.Component.SolidMechanics.FEM.Elastic',
37-
'Sofa.Component.StateContainer',
38-
'Sofa.Component.Topology.Container.Grid',
39-
'Sofa.Component.Visual'
31+
'Sofa.Component.Engine.Select',
32+
'Sofa.Component.LinearSolver.Direct',
33+
'Sofa.Component.LinearSolver.Ordering',
34+
'Sofa.Component.LinearSystem',
35+
'Sofa.Component.Mass',
36+
'Sofa.Component.ODESolver.Backward',
37+
'Sofa.Component.SolidMechanics.FEM.Elastic',
38+
'Sofa.Component.StateContainer',
39+
'Sofa.Component.Topology.Container.Grid',
40+
'Sofa.Component.Visual'
4041
])
4142

4243
root.addObject('DefaultAnimationLoop')
@@ -57,8 +58,10 @@ def createScene(root):
5758
# This component distributes the matrix contributions to the other systems
5859
root.addObject('CompositeLinearSystem', template="CompressedRowSparseMatrixMat3x3d", name="solverSystem",
5960
linearSystems="@matrices/system @matrices/M", solverLinearSystem="@matrices/system")
60-
# It is important to define the linear system in the linear solver: the CompositeLinearSystem
61-
root.addObject('SparseLDLSolver', ordering='Natural', template="CompressedRowSparseMatrixMat3x3d",
61+
62+
root.addObject('NaturalOrderingMethod', name='ordering')
63+
# It is important to configure the solver to work on the CompositeLinearSystem
64+
root.addObject('SparseLDLSolver', orderingMethod='@ordering', template="CompressedRowSparseMatrixMat3x3d",
6265
linearSystem="@solverSystem")
6366

6467
beam1 = root.addChild('Beam1')

0 commit comments

Comments
 (0)