-
Notifications
You must be signed in to change notification settings - Fork 299
/
SquareDistanceMapping.scn
37 lines (31 loc) · 2.38 KB
/
SquareDistanceMapping.scn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0"?>
<Node name="Root" gravity="0 -10 0" time="0" animate="0" dt="0.01">
<Node name="plugins">
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [StringMeshCreator] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [SquareDistanceMapping] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [RestShapeSpringsForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [EdgeSetGeometryAlgorithms EdgeSetTopologyContainer] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
</Node>
<DefaultVisualManagerLoop/>
<VisualStyle displayFlags="showVisualModels showBehaviorModels showMappings showForceFields showMechanicalMappings" />
<DefaultAnimationLoop/>
<StringMeshCreator name="loader" resolution="20" />
<EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1"/>
<CGLinearSolver iterations="2500" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<EdgeSetTopologyContainer name="topology" position="@loader.position" edges="@loader.edges" />
<MechanicalObject name="defoDOF" template="Vec3" />
<EdgeSetGeometryAlgorithms drawEdges="true" />
<FixedProjectiveConstraint indices="0" />
<DiagonalMass name="mass" totalMass="1e-2"/>
<Node name="extensionsNode" >
<MechanicalObject template="Vec1" name="extensionsDOF" />
<SquareDistanceMapping name="distanceMapping" topology="@../topology" input="@../defoDOF" output="@extensionsDOF" geometricStiffness="1" applyRestPosition="true"/>
<RestShapeSpringsForceField template="Vec1" stiffness="10000"/>
</Node>
</Node>