- This topic has 5 replies, 2 voices, and was last updated 4 years, 9 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Initialize degrees of freedom
Tagged: 64_bits, Linux_ubuntu, mapping, MechanicalObject, SOFA_1906
I have a scene with 3 mechanical objects. 2 mechanical objects contain independent DoFs and the third one contain mapped values. The issue is that at startup, the values I know are the mapped values, as they directly from a mesh, but it looks like at startup the values are propagated from independent dofs to mapped dofs (which makes sense).
I am not sure how to proceed here. How should I initialize my data?
Hi @jjcasmar
Could you share (a simplified version of) your scene to make sure we are on the same page?
Hugo
Not sure I can share my scene. It uses some plugin code I can’t share atm.
I am trying to initialize my degrees of freedom using a DataEngine. Still, its a bit unclear what is the order of initialization of the different components in a scene. Any hint about this?
Hi @jjcasmar
Order of initialization will be following the scene graph through the init visitor (MechanicalVInitVisitor). If the data dependencies (link between DataEgine and MechanicalObject) do not follow the scene graph, you might end up with an empty MechanicalObject.
Do you see my point?
Hugo
Okay, I see the point. If the DataEngine initializing the data is after the MO, the MO init function will be called before the init function of my DataEngine so the MO will see nothing when executhing the link, no?
Exactly!
A current work group is thinking about a new design that could prevent from this limitation: “Data update / dependency”
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.