Skip to content

Instantly share code, notes, and snippets.

@zbounik
Created December 5, 2018 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbounik/579655d1d753ab749158d8cf89e830f1 to your computer and use it in GitHub Desktop.
Save zbounik/579655d1d753ab749158d8cf89e830f1 to your computer and use it in GitHub Desktop.
TutorialForceFieldLiverFEM with objexporter
<?xml version="1.0"?>
<Node name="root" gravity="0 -9.81 0" dt="0.02" >
<VisualStyle name="visualStyle1" displayFlags="showForceFields" />
<DefaultPipeline name="CollisionPipeline" verbose="0" />
<BruteForceDetection name="N2" />
<DefaultContactManager name="collision response" response="default" />
<DiscreteIntersection name="discreteIntersection1" />
<Node name="LiverFEM" gravity="0 -9.81 0" >
<EulerImplicitSolver name="cg_odesolver" printLog="0" />
<CGLinearSolver template="GraphScattered" name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" />
<MeshTopology name="mesh" fileTopology="mesh/liver.msh" />
<MechanicalObject template="Vec3d" name="dofs" position="0 0 0" velocity="0 0 0" force="0 0 0" externalForce="0 0 0" restScale="1" />
<TetrahedronFEMForceField template="Vec3d" name="FEM" poissonRatio="0.45" youngModulus="50" gatherPt=" " gatherBsize=" " />
<UniformMass template="Vec3d" name="mass" totalmass="1" filename="unused" />
<FixedConstraint template="Vec3d" name="FixedConstraint" indices="3 39 64" />
<Node name="Visu" gravity="0 -9.81 0" >
<OglModel template="ExtVec3f" name="VisualModel" fileMesh="mesh/liver-smooth.obj" primitiveType="DEFAULT" blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" />
<BarycentricMapping template="Vec3d,ExtVec3f" name="visual mapping" input="@../dofs" output="@VisualModel" />
<OBJExporter name="oBJExporter0" listening="1" filename="/home/zahra/objexport" exportEveryNumberOfSteps="1" exportAtBegin="1" exportAtEnd="1" />
</Node>
<Node name="Surf" gravity="0 -9.81 0" >
<SphereLoader name="SphereLoader" filename="mesh/liver.sph" position="-4 1.25 0 -4 1.25 1 -3 1.25 2.5 -4 2.25 -1 -4 2.25 0 -4 2.25 1 -3 2.25 -1 -3 2.25 0 -3 2.25 1 -3 2.25 2 -2 2.25 2 -4 3.25 -1 -4 3.25 0 -4 3.25 1 -3 3.25 -1 -3 3.25 0 -3 3.25 1 -3 3.25 2 -2 3.25 -1 -2 3.25 0 -2 3.25 1 -2 3.25 2 -1 3.25 2 0 3.25 2 -3 4.25 0 -3 4.25 1 -2 4.25 0 -2 4.25 1 -1 4.25 0 -1 4.25 1 0 4.25 0 0 4.25 1 1 4.25 0 1 4.25 1 -4 1.25 0 -4 1.25 1 -3 1.25 2.5 -4 2.25 -1 -4 2.25 0 -4 2.25 1 -3 2.25 -1 -3 2.25 0 -3 2.25 1 -3 2.25 2 -2 2.25 2 -4 3.25 -1 -4 3.25 0 -4 3.25 1 -3 3.25 -1 -3 3.25 0 -3 3.25 1 -3 3.25 2 -2 3.25 -1 -2 3.25 0 -2 3.25 1 -2 3.25 2 -1 3.25 2 0 3.25 2 -3 4.25 0 -3 4.25 1 -2 4.25 0 -2 4.25 1 -1 4.25 0 -1 4.25 1 0 4.25 0 0 4.25 1 1 4.25 0 1 4.25 1" listRadius="0.85 0.85 0.35 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.35 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85 0.85" />
<MechanicalObject template="Vec3d" name="mappedMS" position="@[-1].position" velocity="0 0 0" force="0 0 0" externalForce="0 0 0" restScale="1" />
<TSphereModel template="Vec3d" name="CollisionModel" listRadius="@[-2].listRadius" />
<BarycentricMapping template="Vec3d,Vec3d" name="sphere mapping" input="@../dofs" output="@mappedMS" />
</Node>
</Node>
</Node>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment