Using Identitymultimapping to concatanate DOFs from child nodes at the same level #2738
Answered
by
alxbilger
zbounik
asked this question in
Write / Run a simulation
-
Hi, Is it possible to use Identitymultimapping to concatanate DOFs from child nodes that are at the same level? If yes, how can I provide the true link to the path of all the DOFs? A scene example is provided below: <?xml version="1.0"?>
<Node name="lroot" gravity="0 0 -9" dt="0.01" >
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin pluginName='SofaBoundaryCondition'/>
<RequiredPlugin pluginName='SofaImplicitOdeSolver'/>
<RequiredPlugin pluginName='SofaLoader'/>
<RequiredPlugin pluginName='SofaMiscFem'/>
<RequiredPlugin name="SofaConstraint"/>
<RequiredPlugin name="SofaMiscCollision"/>
<RequiredPlugin name="SofaMeshCollision"/> <!-- Needed to use components [TriangleCollisionModel] -->
<VisualStyle name="visualStyle1" displayFlags="showVisual showBehaviorModels" />
<!--my change in visualStyle2-->
<VisualStyle name="visualStyle2" displayFlags="showBehaviorModels" />
<DefaultVisualManagerLoop name="defaultVisualManagerLoop1" />
<FreeMotionAnimationLoop name="FreeMotionAnimationLoop" />
<DefaultPipeline name="CollisionPipeline" />
<MinProximityIntersection name="Proximity" alarmDistance="0.5" contactDistance="1" />
<DefaultContactManager name="Response" response="default" />
<LCPConstraintSolver name="lCPConstraintSolver1" build_lcp="0" tolerance="0.0001" maxIt="1000" group="0" />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<Node name="A" >
<MeshObjLoader name="meshLoader_0" filename="mesh/liver.obj" />
<OglModel template="Vec3d" name="Visual" src="@meshLoader_0" position="@meshLoader_0.position" edges="@meshLoader_0.edges" triangles="@meshLoader_0.triangles" quads="@meshLoader_0.quads" material="Default Diffuse 1 1 1 0.2 0.5 Ambient 1 0.2 0.2 0.04 0.5 Specular 0 1 1 0.2 0.5 Emissive 0 1 1 0.2 0.5 Shininess 0 45 " primitiveType="DEFAULT" blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" />
<EulerImplicitSolver name="eulerImplicitSolver3" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject name="Mechm" src="@meshLoader_0"/>
<<UniformMass totalMass="60" name="uniformMass" />
<TriangleSetTopologyContainer name="triangleSetTopologyContainer10" src="@meshLoader_0"/>
<TriangleSetTopologyModifier name="triangleSetTopologyModifier13" />
<TriangleSetGeometryAlgorithms template="Vec3d" name="triangleSetGeometryAlgorithms19" />
<TriangularFEMForceField template="Vec3d" name="triangularFEMFF21" poissonRatio="0.49" youngModulus="10000" method="large"/>
<BarycentricMapping input="@Mechm" output="@Visual" name="visual mapping" />
<UncoupledConstraintCorrection />
<TriangleCollisionModel />
<FixedConstraint indices="0 1" />
</Node>
<Node name="B" >
<MeshObjLoader name="meshLoader_0" filename="mesh/torus.obj" />
<OglModel template="Vec3d" name="Visual" src="@meshLoader_0" position="@meshLoader_0.position" edges="@meshLoader_0.edges" triangles="@meshLoader_0.triangles" quads="@meshLoader_0.quads" material="Default Diffuse 1 0.2 1 0.2 0.5 Ambient 1 0.04 0.2 0.04 0.5 Specular 0 0.2 1 0.2 0.5 Emissive 0 0.2 1 0.2 0.5 Shininess 0 45 " primitiveType="DEFAULT" blendEquation="GL_FUNC_ADD" sfactor="GL_SRC_ALPHA" dfactor="GL_ONE_MINUS_SRC_ALPHA" />
<EulerImplicitSolver name="eulerImplicitSolver3" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject name="Mechu" src="@meshLoader_0"/>
<<UniformMass totalMass="60" name="uniformMass" />
<TetrahedronSetTopologyContainer name="TetraTopologyContainer" src="@meshLoader_0" />
<TriangleSetTopologyModifier name="triangleSetTopologyModifier13" />
<TriangleSetGeometryAlgorithms template="Vec3d" name="triangleSetGeometryAlgorithms19" />
<TriangularFEMForceField template="Vec3d" name="triangularFEMFF21" poissonRatio="0.49" youngModulus="10000" method="large"/>
<BarycentricMapping input="@Mechu" output="@Visual" name="visual mapping" />
<UncoupledConstraintCorrection />
<TriangleCollisionModel />
<FixedConstraint indices="2466 " />
</Node>
<Node name="concatenation">
<MechanicalObject template="Vec3d" name="dofall" showObject="1"/>
<IdentityMultiMapping input="@Mechu @Mechm" output="@./dofall" />
<SphereCollisionModel radius="0.3" selfCollision="1"/>
<UniformMass vertexMass="1" />
<ConstantForceField indices="0" force="1 0 0"/>
</Node>
</Node> |
Beta Was this translation helpful? Give feedback.
Answered by
alxbilger
Mar 1, 2022
Replies: 2 comments 2 replies
-
<IdentityMultiMapping input="@../A/Mechu @../B/Mechm" output="@./dofall" /> Does it make the trick? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hugtalbot
-
Note that <Node>
<EulerImplicitSolver name="eulerImplicitSolver3" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<Node name="A">
</Node>
<Node name="B">
</Node>
<Node name="concatenation">
</Node>
</Node> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does it make the trick?