Skip to content

Commit bb7683c

Browse files
bakpaulalxbilger
authored andcommitted
Remove SofaMAtrix components
1 parent 137ed96 commit bb7683c

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

examples/rigidification.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@
7575
every single node in the rigidified region). The FEM stiffness/mass matrices
7676
are computed on the full mesh in "beam/physics", then PROJECTED down onto
7777
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
8382
the FEM forces that were projected through the mappings.
8483
8584
--- What will you actually see if you run this scene? ---
@@ -289,12 +288,6 @@ def create_beam_simulation(root_node, node_name, is_rigidified):
289288
with root_node.addChild(node_name) as simulation:
290289
simulation.addObject('EulerImplicitSolver', name="odesolver", rayleighStiffness=0.1, rayleighMass=0.1)
291290
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')
298291

299292
with simulation.addChild("beam") as beam:
300293
# Define the full computational domain: a regular 3D grid of nodes.
@@ -349,9 +342,7 @@ def createScene(root_node):
349342
Sofa.Component.SolidMechanics.FEM.Elastic
350343
Sofa.Component.StateContainer
351344
Sofa.Component.Topology.Container.Grid
352-
Sofa.Component.Visual
353-
SofaMatrix
354-
SofaMatrix.imgui""")
345+
Sofa.Component.Visual""")
355346

356347
root_node.addObject('DefaultAnimationLoop', parallelODESolving=True)
357348
root_node.addObject('VisualGrid')

0 commit comments

Comments
 (0)