-
Notifications
You must be signed in to change notification settings - Fork 298
/
RemovingBilateralInteractionConstraint.scn
77 lines (62 loc) · 4.75 KB
/
RemovingBilateralInteractionConstraint.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<Node name="root" dt="0.02">
<Node name="requiredPlugins">
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Correction"/> <!-- Needed to use components [UncoupledConstraintCorrection] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Model"/> <!-- Needed to use components [BilateralLagrangianConstraint] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [GenericConstraintSolver] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<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.FEM.Elastic"/> <!-- Needed to use components [HexahedronFEMForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [HexahedronSetGeometryAlgorithms HexahedronSetTopologyContainer HexahedronSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] -->
<RequiredPlugin name="Sofa.Component.Topology.Utility"/> <!-- Needed to use components [TopologicalChangeProcessor] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
</Node>
<VisualStyle displayFlags="showBehaviorModels showForceFields showInteractionForceFields" />
<FreeMotionAnimationLoop parallelODESolving="true"/>
<GenericConstraintSolver tolerance="0.001" maxIterations="1000" resolutionMethod="UnbuildGaussSeidel" multithreading="true"/>
<!--
This Node shows how NearestPointROI is used to create constraints to link close vertices
-->
<Node name="ObjectsAttachedWithConstraints">
<EulerImplicitSolver name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1"/>
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<Node name="gridM1" >
<RegularGridTopology name="GM1" nx="4" ny="4" nz="10" xmin="0" xmax="3" ymin="0" ymax="3" zmin="0" zmax="9" />
</Node>
<Node name="gridM2" >
<RegularGridTopology name="GM2" nx="4" ny="4" nz="10" xmin="0" xmax="3" ymin="0" ymax="3" zmin="9" zmax="18" />
</Node>
<Node name="M1">
<MechanicalObject name="mo" position="@../gridM1/GM1.position"/>
<DiagonalMass totalMass="160" />
<HexahedronSetTopologyContainer name="topo" src="@../gridM1/GM1" />
<HexahedronSetTopologyModifier name="Modifier" />
<HexahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3"/>
<BoxROI box="-0.1 -0.1 -0.1 3.1 3.1 0.1" name="box"/>
<FixedProjectiveConstraint indices="@box.indices"/>
<HexahedronFEMForceField name="FEM" youngModulus="4000" poissonRatio="0.3" />
<TopologicalChangeProcessor listening="1" filename="RemovingConstraint.txt" />
<UncoupledConstraintCorrection useOdeSolverIntegrationFactors="0"/>
</Node>
<Node name="M2">
<MechanicalObject name="mo" position="@../gridM2/GM2.position"/>
<DiagonalMass totalMass="160" />
<HexahedronSetTopologyContainer name="topo" src="@../gridM2/GM2" />
<HexahedronSetTopologyModifier name="Modifier" />
<HexahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3"/>
<HexahedronFEMForceField name="FEM" youngModulus="4000" poissonRatio="0.3" />
<TopologicalChangeProcessor listening="1" filename="RemovingConstraint.txt" />
<UncoupledConstraintCorrection useOdeSolverIntegrationFactors="0"/>
</Node>
<BilateralLagrangianConstraint template="Vec3" object1="@M1" object2="@M2"
topology1="@M1/topo" topology2="@M2/topo"
first_point="144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159"
second_point="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" />
</Node>
</Node>