-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.scn
42 lines (33 loc) · 3 KB
/
base.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
<Node name="root" dt="0.01" gravity="0 -9.8 0">
<VisualStyle displayFlags="showBehaviorModels showVisualModels" />
<Node name="rigidbeam">
<EulerImplicitSolver name="odesolver"/>
<SparseLDLSolver/>
<RegularGridTopology name="grid" nx="1" ny="1" nz="20" xmin="0" xmax="0" ymin="-1.5" ymax="1.5" zmin="0" zmax="18" />
<MechanicalObject template="Rigid3" name="DOFs" showObject="true" showObjectScale="1" position="@grid.position"/>
<FixedProjectiveConstraint indices="0" />
<Node name="FEM">
<RegularGridTopology name="FEM_grid" nx="4" ny="4" nz="20" xmin="-1.5" xmax="1.5" ymin="-1.5" ymax="1.5" zmin="0" zmax="19" />
<MechanicalObject template="Vec3d" name="FEM_DOFs" position="@FEM_grid.position"/>
<HexahedronSetGeometryAlgorithms/>
<MeshMatrixMass massDensity="1"/>
<HexahedronFEMForceField name="FEM" youngModulus="10000" poissonRatio="0.45" method="large"/>
<RigidMapping globalToLocalCoords="true" rigidIndexPerPoint="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19"/>
<Node name="solution">
<ValuesFromIndices name="PFI_a" template="Vec3" in="@FEM_DOFs.position" indices="179 178 177 176 175 174" />
<ValuesFromIndices name="PFI_b" template="Vec3" in="@FEM_DOFs.position" indices="179 178 177 176 175 174" />
<DifferenceEngine name="diff" input="@PFI_b.out" substractor="@PFI_a.out"/>
<NormEngine input="@diff.output" name="norm"/>
</Node>
<Node name="Visual">
<RegularGridTopology name="grid" nx="2" ny="2" nz="20" xmin="-1.5" xmax="1.5" ymin="-1.5" ymax="1.5" zmin="0" zmax="19" computeTriangleList="false" />
<OglModel name="visu" lineWidth="5" material="Default Diffuse 0 1 1 1 1 Ambient 1 1 0 0 1 Specular 0 1 0 0 1 Emissive 0 1 0 0 1 Shininess 0 45"/>
<BarycentricMapping input="@../FEM_DOFs" output="@visu"/>
</Node>
<Node name="Output">
<!-- Write positions to a file -->
<WriteState fileName="output/positions.txt" input="@DOFs.position" />
</Node>
</Node>
</Node>
</Node>