-
Notifications
You must be signed in to change notification settings - Fork 297
/
MeshGmshLoader.scn
63 lines (62 loc) · 4.84 KB
/
MeshGmshLoader.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
<?xml version="1.0" ?>
<!-- For more details see: https://wiki.sofa-framework.org/tdev/wiki/Notes/NewLoaderArchitecture -->
<Node name="Root" gravity="0 -9.81 0" dt="0.05">
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase BruteForceBroadPhase CollisionPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] -->
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshGmshLoader] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<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 [TetrahedronFEMForceField TriangularFEMForceField] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [TriangularBendingSprings] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms TetrahedronSetTopologyContainer TetrahedronSetTopologyModifier TriangleSetGeometryAlgorithms TriangleSetTopologyContainer TriangleSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
<DefaultAnimationLoop/>
<VisualStyle displayFlags="showVisual showBehaviorModels showForceFields showCollision showMapping" />
<CollisionPipeline name="DefaultCollisionPipeline" verbose="0" draw="0" depth="6" />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2" />
<CollisionResponse name="Response" response="PenalityContactForceField" />
<Node name="gmsh file">
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MeshGmshLoader name="GmshLoader" filename="mesh/square3.msh" createSubelements="true" flipNormals="0" />
<MechanicalObject name="dofs" scale="10" src="@GmshLoader" />
<TriangleSetTopologyContainer name="topo" src="@GmshLoader" />
<TriangleSetTopologyModifier name="modif" />
<TriangleSetGeometryAlgorithms name="triGeo" drawEdges="1" />
<DiagonalMass massDensity="0.15" />
<FixedProjectiveConstraint indices="0 1" />
<TriangularFEMForceField name="FEM" youngModulus="100" poissonRatio="0.3" method="large" />
<TriangularBendingSprings name="FEM-Bend" stiffness="300" damping="1.0" />
<TriangleCollisionModel />
<Node>
<OglModel src="@../GmshLoader" name="VisualModel" color="blue" />
<IdentityMapping name="mapping" input="@.." output="@VisualModel" />
</Node>
</Node>
<Node name="gmsh file v4">
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MeshGmshLoader name="GmshLoaderv4" filename="mesh/msh4_cube.msh" createSubelements="true" flipNormals="0" />
<MechanicalObject name="dofs" scale="10" src="@GmshLoaderv4" />
<TetrahedronSetTopologyContainer name="topo" src="@GmshLoaderv4" />
<TetrahedronSetTopologyModifier name="modif" />
<TetrahedronSetGeometryAlgorithms template="Vec3" name="tetraGeo" />
<DiagonalMass massDensity="0.2" />
<FixedProjectiveConstraint indices="0 1" />
<TetrahedronFEMForceField name="FEM" youngModulus="1000" poissonRatio="0.3" method="large" />
<TriangleCollisionModel />
<Node>
<OglModel src="@../GmshLoaderv4" name="VisualModel" color="blue" />
<IdentityMapping name="mapping" input="@.." output="@VisualModel" />
</Node>
</Node>
</Node>