<?xml version="1.0" ?>
<!-- See https://wiki.sofa-framework.org/wiki/TutorialTopologySurfaceMesh -->
<Node name="root" gravity="0 -9.81 1" dt="0.05">
    <!-- Basic Components to perform the collision detection -->
    <VisualStyle displayFlags="showVisual showBehaviorModels" />
    <DefaultPipeline name="DefaultCollisionPipeline" depth="6" />
    <BruteForceDetection name="Detection" />
    <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" />
    <DefaultContactManager name="Response" />
    <DefaultCollisionGroupManager name="Group" />
    <Node name="Cloth Static Mesh">
        <MeshGmshLoader name="loader" filename="mesh/square3.msh" createSubelements="true"/>
        <MechanicalObject src="@loader" name="DOFs" template="Vec3d" translation="10 0 5" rotation="0 90 90" scale="10" />
        <FixedConstraint name="Fixed dof" template="Vec3d" indices="0 1" />
        <UniformMass name="Mass" template="Vec3d" mass="1" totalmass="50" />
        <EulerImplicitSolver name="cg_odesolver" printLog="0" />
        <CGLinearSolver name="linear solver" template="GraphScattered" iterations="40" tolerance="1e-09" threshold="1e-09" />
        <MeshTopology src="@loader" name="Static Mesh" />
        <MeshSpringForceField name="Springs" template="Vec3d" stiffness="100" damping="1" />
        <TriangularFEMForceField name="FEM" template="Vec3d" method="large" poissonRatio="0.3" youngModulus="60" />
        <TriangleModel name="models" />
        <OglModel name="Visual" template="ExtVec3f" color="red" />
        <IdentityMapping name="Mapping" template="Vec3d,ExtVec3f" input="@." output="@Visual" />
    </Node>
    <Node name="Cloth Regular Mesh">
        <MechanicalObject name="DOFs" template="Vec3d" translation="0 0 -10" />
        <FixedConstraint name="Fixed dof" template="Vec3d" indices="0 870" />
        <UniformMass name="Mass" template="Vec3d" mass="1" totalmass="50" />
        <EulerImplicitSolver name="cg_odesolver" printLog="0" />
        <CGLinearSolver name="linear solver" template="GraphScattered" iterations="40" tolerance="1e-09" threshold="1e-09" />
        <RegularGridTopology name="default38" n="30 1 30" min="0 0 -20" max="10 0 -30" p0="0 0 -1" />
        <RegularGridSpringForceField template="Vec3d" />
        <QuadBendingSprings template="Vec3d" name="Bend" stiffness="20" damping="0" />
        <OglModel name="Visual" template="ExtVec3f" color="blue" />
        <IdentityMapping name="Mapping" template="Vec3d,ExtVec3f" input="@." output="@Visual" />
    </Node>
    <Node name="Cloth Dynamic Mesh">
        <MeshGmshLoader name="loader" filename="mesh/square3.msh" createSubelements="true" />
        <MechanicalObject src="@loader" name="DOF" template="Vec3d" translation="10 0 20" rotation="0 90 90" scale="10" />
        <FixedConstraint name="Fixed dof" template="Vec3d" indices="0 1" />
        <UniformMass name="Mass" template="Vec3d" mass="1" totalmass="50" />
        <EulerImplicitSolver name="cg_odesolver" printLog="0" />
        <CGLinearSolver name="linear solver" template="GraphScattered" iterations="40" tolerance="1e-09" threshold="1e-09" />
        <TriangleSetTopologyContainer src="@loader" name="Topology Container" />
        <TriangleSetTopologyModifier name="Topology Modifier" />
        <TriangleSetTopologyAlgorithms template="Vec3d" name="Topology Algorithms" />
        <TriangleSetGeometryAlgorithms template="Vec3d" name="Geometry Algorithms" />
        <TriangularBendingSprings name="FEM-Bend" template="Vec3d" stiffness="300" damping="1" />
        <TriangularFEMForceField name="FEM" template="Vec3d" method="large" poissonRatio="0.3" youngModulus="60" />
        <TriangleModel name="models" />
        <OglModel name="Visual" template="ExtVec3f" color="green" />
        <IdentityMapping name="Mapping" template="Vec3d,ExtVec3f" input="@." output="@Visual" />
    </Node>
</Node>
