Home › Forum › SOFA › Programming with SOFA › [SOLVED] Using model reduction in SOFA
Tagged: 64_bits, Linux_mint, MechanicalObject, plugin, SOFA_1608
- This topic has 6 replies, 4 voices, and was last updated 7 years, 3 months ago by Hugo.
-
AuthorPosts
-
20 July 2017 at 17:44 #9812BassamBlocked
Hi!
I am writing a plugin to use the model reduction techniques implemented in VegaFEM with SOFA, and I would appreciate it if more experienced SOFA developers can weigh in on my approach. I am subclassing the
MechanicalObject
class to use the reduced dofs, as well as defining a force field to compute the reduced internal forces and mappings for visual/collision models.Is this the right approach in SOFA for non-conforming meshes? or is there a better way of achieving this?
Thanks!
21 July 2017 at 14:25 #9820HugoKeymasterHey @beejay !
Thank you for joining the SOFA force!
Model reduction looks pretty appealing to me, even more when you want to do it in SOFA. I actually think that SOFA is really well suited (thanks to the mapping mechanism among others) for this.Your approach looks good to me: using one MechanicalObject for your real DOFs and one MechanicalObject corresponding to reduced space DOFs. Both should be linked with a specific mapping.
Since I am no expert in model reduction, I will point out your thread to two senior developers that might help you. Hopefully they will reply shortly. If not, I’ll make sure you find answers!
Cheers,
Hugo
26 July 2017 at 17:50 #9865jnbrunetModeratorHey Bassam!
I just want to add that, as Hugo said, I think the best way would be to use two
MechanicalObject
, one with the reduced space and one with the full DOFs, instead of subclassing directly theMechanicalObject
class. In this case, you would only need to create a forcefield component in your code, and use mapping between the two default Sofa’s MechanicalObject components. I’m really not sure how the model reduction works, but I guess you could have a look at theSubsetMapping
of Sofa, either for using it directly if it does the job right, or take ideas from it to create your own mapping component. You can specify a radius attribute of SubsetMapping to find the closest indice of the full model (mapping’s input) from a given reduced indice (mapping’s output). You would then have something like this:<Node name="simulation"> <Node name="full_model"> <MeshObjLoader name="full_meshLoader" filename="full_dof.obj" /> <MechanicalObject name="full_dof" src="@full_meshLoader"/> <Node name="reduced_model"> <MeshObjLoader name="reduced_meshLoader" filename="reduced_dof.obj" /> <MechanicalObject name="reduced_dof" src="@reduced_meshLoader" /> <YourForceField /> <SubsetMapping input="@../full_dof" output="@reduced_dof" radius="1" /> </Node> </Node> </Node>
I hope that helps.
28 July 2017 at 10:50 #9872BassamBlockedHi Hugo and Jean-Nicolas!
Thank you for your advice, using two
MechanicalObject
s with a mapping seems like the better way. I will have a look atSubsetMapping
and update this thread when I get it working, for the record.Best,
Bassam28 July 2017 at 12:09 #9873olivierBlockedHello Bassam,
I am currently developing a projection-based Model Order Reduction technique in SOFA (namely snapshot-POD), with an application to soft robotics in mind.
We could have a chat if you want.Cheers,
Olivier7 August 2017 at 09:56 #9902BassamBlockedHi Olivier,
I would love to, though I couldn’t find a private message option on the forums. You can hit me on my email bassamjabbour_at_gmail_dot_com.
Cheers!
7 August 2017 at 15:22 #9903HugoKeymasterNice to see you guys connecting!
Do not hesitate to keep us updated on this thread, once you’ve made steps forward! Or even to share your work on the Gallery and Marketplace!
Good luck!Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.