<?xml version="1.0" ?>
<!-- See http://wiki.sofa-framework.org/mediawiki/index.php/TutorialForceFieldLiverFEM -->
<Node name="root" gravity="0 -9.81 0" dt="0.02">
    <VisualStyle displayFlags="showForceFields" />
    <DefaultPipeline name="CollisionPipeline" verbose="0" />
    <BruteForceDetection name="N2" />
    <DefaultContactManager name="collision response" response="default" />
    <DiscreteIntersection />
    <Node name="LiverFEM" gravity="0 -9.81 0">
        <EulerImplicitSolver name="cg_odesolver" printLog="0" />
        <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" />
        <MeshTopology name="mesh" fileTopology="mesh/liver.msh" />
        <MechanicalObject template="Vec3d" name="dofs" />
        <TetrahedronFEMForceField template="Vec3d" name="FEM" youngModulus="50" poissonRatio="0.45" />
        <UniformMass name="mass" totalmass="1" />
        <FixedConstraint name="FixedConstraint" indices="3 39 64" />
        <Node name="Visu" gravity="0 -9.81 0">
            <OglModel name="VisualModel" fileMesh="mesh/liver-smooth.obj" />
            <BarycentricMapping name="visual mapping" input="@../dofs" output="@VisualModel" />
        </Node>
        <Node name="Surf" gravity="0 -9.81 0">
            <SphereLoader name="SphereLoader" filename="mesh/liver.sph" />
            <MechanicalObject name="mappedMS" position="@[-1].position" />
            <SphereModel name="CollisionModel" listRadius="@[-2].listRadius" />
            <BarycentricMapping name="sphere mapping" input="@../dofs" output="@mappedMS" />
        </Node>
    </Node>
</Node>
