Skip to content

Commit

Permalink
update scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxbilger committed Dec 20, 2024
1 parent 8c6731e commit 7ebebe5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
9 changes: 6 additions & 3 deletions examples/Component/ODESolver/Backward/NewtonRaphsonSolver.scn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Node name="root" gravity="-1.8 0 100" dt="0.0001">
<Node name="root" gravity="-1.8 0 100" dt="0.01">

<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
Expand All @@ -21,8 +21,10 @@

<BDF1 printLog="true" rayleighStiffness="0.01" rayleighMass="0.01"/>
<NewtonRaphsonSolver name="odeImplicitSolver" printLog="true"
maxNbIterationsNewton="1000" absoluteResidualToleranceThreshold="1e-5"
maxNbIterationsLineSearch="0" lineSearchCoefficient="0.5"/>
maxNbIterationsNewton="1000000" absoluteResidualStoppingThreshold="1e-5"
maxNbIterationsLineSearch="5" lineSearchCoefficient="0.5"
absoluteEstimateDifferenceThreshold="1e-5"
relativeEstimateDifferenceThreshold="1e-5"/>
<ConstantSparsityPatternSystem template="CompressedRowSparseMatrix" name="A" checkIndices="false"/>
<EigenSimplicialLDLT template="CompressedRowSparseMatrix"/>

Expand All @@ -35,6 +37,7 @@
<BoxROI name="box" box="-10 -20 -10 10 -17.5 10" drawBoxes="true"/>
<FixedProjectiveConstraint indices="@box.indices" />
<TetrahedronFEMForceField name="FEM" youngModulus="1000" poissonRatio="0.49" method="large" />
<!-- <MeshSpringForceField name="springs" tetrasStiffness="1000"/>-->

<Node name="visual">
<MeshOBJLoader name="meshLoader_0" filename="mesh/truthcylinder1.obj" handleSeams="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Node name="Newton">

<BDF1 printLog="false" rayleighStiffness="0.01" rayleighMass="0.01"/>
<NewtonRaphsonSolver name="odeImplicitSolver" printLog="false" maxNbIterationsNewton="1" absoluteResidualToleranceThreshold="1e-4"/>
<NewtonRaphsonSolver name="odeImplicitSolver" printLog="false" maxNbIterationsNewton="1" absoluteResidualStoppingThreshold="1e-4"/>
<EigenSimplicialLDLT template="CompressedRowSparseMatrixMat3x3"/>

<MechanicalObject name="dofs" position="0 0 0 1 1 0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Node name="root" gravity="-1 0 0" dt="0.0001">
<Node name="root" gravity="-1 0 0" dt="0.01">
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [EigenSimplicialLDLT] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [MeshMatrixMass] -->
Expand All @@ -19,17 +19,13 @@
<Node name="Newton">

<BDF1 printLog="true"/>
<NewtonRaphsonSolver name="odeImplicitSolver" printLog="true" maxNbIterationsNewton="4" maxNbIterationsLineSearch="2" absoluteResidualToleranceThreshold="1e-6"/>
<NewtonRaphsonSolver name="odeImplicitSolver" printLog="true" maxNbIterationsNewton="4" maxNbIterationsLineSearch="2" absoluteResidualStoppingThreshold="1e-6"/>
<EigenSimplicialLDLT template="CompressedRowSparseMatrix"/>

<MechanicalObject name="dofs" template="Vec1" position="0 1" showObject="true"/>
<EdgeSetTopologyContainer name="topologyContainer" edges="0 1" position="@dofs.position"/>
<UniformMass totalMass="2" topology="@topologyContainer"/>
<SpringForceField spring="0 1 1000 0 0.5"/>

<FixedProjectiveConstraint indices="0" />

<OglCylinderModel position="@dofs.position" edges="0 1" radius="0.1"/>
<MechanicalObject name="dofs" template="Vec1" position="1 " rest_position="0" showObject="true"/>
<PointSetTopologyContainer name="topologyContainer" position="1"/>
<UniformMass totalMass="1" topology="@topologyContainer"/>
<RestShapeSpringsForceField points="0"/>
</Node>

</Node>

0 comments on commit 7ebebe5

Please sign in to comment.