Skip to content

Commit accb5c2

Browse files
authored
[examples] Clean linear solver scenes (sofa-framework#2494)
* [examples] MinResLinearSolver scene follows the same pattern * [examples] speed up CGLinearSolver scene
1 parent 8b2e573 commit accb5c2

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

examples/Components/linearsolver/FEMBAR-CGLinearSolver.scn

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<RequiredPlugin name="SofaBoundaryCondition"/>
33
<RequiredPlugin name="SofaImplicitOdeSolver"/>
44
<RequiredPlugin name="SofaSimpleFem"/>
5-
<RequiredPlugin name="SofaSparseSolver"/>
65

76
<VisualStyle displayFlags="showBehaviorModels showForceFields" />
87

@@ -11,7 +10,7 @@
1110

1211
<Node name="M1">
1312
<EulerImplicitSolver name="odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
14-
<CGLinearSolver iterations="1000" threshold="1e-5" tolerance="1e-5"/>
13+
<CGLinearSolver template="CompressedRowSparseMatrixMat3x3d" iterations="1000" threshold="1e-9" tolerance="1e-9"/>
1514
<MechanicalObject />
1615
<UniformMass vertexMass="1" />
1716
<RegularGridTopology nx="4" ny="4" nz="20" xmin="-9" xmax="-6" ymin="0" ymax="3" zmin="0" zmax="19" />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Node name="root" dt="0.02" gravity="0 -10 0">
2+
<RequiredPlugin name="SofaBoundaryCondition"/>
3+
<RequiredPlugin name="SofaImplicitOdeSolver"/>
4+
<RequiredPlugin name="SofaSimpleFem"/>
5+
<RequiredPlugin name="SofaGeneralLinearSolver"/>
6+
7+
<VisualStyle displayFlags="showBehaviorModels showForceFields" />
8+
9+
<DefaultAnimationLoop/>
10+
<DefaultVisualManagerLoop/>
11+
12+
<Node name="M1">
13+
<EulerImplicitSolver name="odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
14+
<MinResLinearSolver template="GraphScattered" iterations="1000" tolerance="1e-9" />
15+
<MechanicalObject />
16+
<UniformMass vertexMass="1" />
17+
<RegularGridTopology nx="4" ny="4" nz="20" xmin="-9" xmax="-6" ymin="0" ymax="3" zmin="0" zmax="19" />
18+
<FixedConstraint indices="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" />
19+
<HexahedronFEMForceField name="FEM" youngModulus="4000" poissonRatio="0.3" method="large" />
20+
</Node>
21+
</Node>

examples/Components/linearsolver/MinResLinearSolver.scn

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)