|
75 | 75 | every single node in the rigidified region). The FEM stiffness/mass matrices |
76 | 76 | are computed on the full mesh in "beam/physics", then PROJECTED down onto |
77 | 77 | this reduced system through the chain of mappings (SubsetMultiMapping, then |
78 | | -RigidMapping). If you inspect the assembled system matrix of "rigidified_beam" |
79 | | -(e.g. via "GlobalSystemMatrixImage"/SofaMatrix) and compare it to |
80 | | -"deformable_beam"'s, you will see it is smaller, and that it contains |
81 | | -non-zero coupling terms between the deformable DoFs and the rigid body's 6 |
82 | | -DoFs -- this coupling is exactly the trace, in the reduced linear system, of |
| 78 | +RigidMapping). If you inspect the assembled system matrix of "rigidified_beam" |
| 79 | +and compare it to"deformable_beam"'s, you will see it is smaller, and that it |
| 80 | +contains non-zero coupling terms between the deformable DoFs and the rigid body's |
| 81 | +6 DoFs -- this coupling is exactly the trace, in the reduced linear system, of |
83 | 82 | the FEM forces that were projected through the mappings. |
84 | 83 |
|
85 | 84 | --- What will you actually see if you run this scene? --- |
@@ -289,12 +288,6 @@ def create_beam_simulation(root_node, node_name, is_rigidified): |
289 | 288 | with root_node.addChild(node_name) as simulation: |
290 | 289 | simulation.addObject('EulerImplicitSolver', name="odesolver", rayleighStiffness=0.1, rayleighMass=0.1) |
291 | 290 | simulation.addObject('SparseLDLSolver', template="CompressedRowSparseMatrix") |
292 | | - # Lets you visualize the assembled system matrix. For the rigidified |
293 | | - # beam, its size is reduced compared to the fully flexible beam |
294 | | - # (deformable DoFs + 6 rigid DoFs only), and you can spot the |
295 | | - # coupling terms between the deformable part and the rigid body -- |
296 | | - # see "Why bother going through this indirection at all?" above. |
297 | | - simulation.addObject('GlobalSystemMatrixImage') |
298 | 291 |
|
299 | 292 | with simulation.addChild("beam") as beam: |
300 | 293 | # Define the full computational domain: a regular 3D grid of nodes. |
@@ -349,9 +342,7 @@ def createScene(root_node): |
349 | 342 | Sofa.Component.SolidMechanics.FEM.Elastic |
350 | 343 | Sofa.Component.StateContainer |
351 | 344 | Sofa.Component.Topology.Container.Grid |
352 | | - Sofa.Component.Visual |
353 | | - SofaMatrix |
354 | | - SofaMatrix.imgui""") |
| 345 | + Sofa.Component.Visual""") |
355 | 346 |
|
356 | 347 | root_node.addObject('DefaultAnimationLoop', parallelODESolving=True) |
357 | 348 | root_node.addObject('VisualGrid') |
|
0 commit comments