Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Scenes] Fix scenes errors and major warnings. Add scene-tests file to ignore or add safe guard for the CI #116

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions examples/.scene-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Scenes to reduce are too heavy and slow to be simulated, so compute only a few iterations

# Organs
iterations "organs/liver/liverFine.pyscn" "10"
timeout "organs/liver/liverFine.pyscn" "120"

iterations "organs/liver/liverFineHyperElastic.pyscn" "10"
timeout "organs/liver/liverFineHyperElastic.pyscn" "120"



# Others
iterations "others/caduceus/SphereOnAPlane.softSphereFalling.pyscn" "10"
timeout "others/caduceus/SphereOnAPlane.softSphereFalling.pyscn" "120"

iterations "others/caduceus/caduceusNG.pyscn" "10"
timeout "others/caduceus/caduceusNG.pyscn" "120"


# SoftRobot
iterations "softRobots/multiGait/multiGait.py" "20"
timeout "softRobots/multiGait/multiGait.py" "120"

ignore "softRobots/multiGait/reducedMultiGait-softRobot.pyscn" # TODO fix: MechanicalMatrixMapperMOR is missing
ignore "softRobots/multiGait/reduced/debug/debug_scene.py" # TODO fix: ODE solver is not copied during reduction process
16 changes: 16 additions & 0 deletions examples/organs/liver/liverFine.pyscn
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,26 @@ def createScene(rootNode):

rootNode.addObject('RequiredPlugin', name='ModelOrderReduction', pluginName='ModelOrderReduction')
rootNode.addObject('RequiredPlugin', name='SofaPython3', pluginName='SofaPython3')
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.IO.Mesh') # Needed to use components [MeshOBJLoader,MeshVTKLoader]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') # Needed to use components [TetrahedronFEMForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
rootNode.addObject('RequiredPlugin', name='Sofa.GL.Component.Rendering3D') # Needed to use components [OglModel]


rootNode.addObject('VisualStyle', displayFlags='showCollision showVisualModels showForceFields showInteractionForceFields hideCollisionModels hideBoundingCollisionModels hideWireframe')
rootNode.findData('dt').value=0.01
rootNode.findData('gravity').value=[0, -981, 0]

rootNode.addObject('DefaultAnimationLoop')

liver = rootNode.addChild('liver')
liver.addObject('EulerImplicitSolver', rayleighStiffness = 0.0, rayleighMass = 0.0)
liver.addObject('SparseLDLSolver',template="CompressedRowSparseMatrixMat3x3d")
Expand Down
15 changes: 15 additions & 0 deletions examples/organs/liver/liverFineHyperElastic.pyscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,25 @@ def createScene(rootNode):

rootNode.addObject('RequiredPlugin', name='ModelOrderReduction', pluginName='ModelOrderReduction')
rootNode.addObject('RequiredPlugin', name='SofaPython3', pluginName='SofaPython3')
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.IO.Mesh') # Needed to use components [MeshOBJLoader,MeshVTKLoader]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.HyperElastic') # Needed to use components [TetrahedronHyperelasticityFEMForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
rootNode.addObject('RequiredPlugin', name='Sofa.GL.Component.Rendering3D') # Needed to use components [OglModel]


rootNode.addObject('VisualStyle', displayFlags='showCollision showVisualModels showForceFields showInteractionForceFields hideCollisionModels hideBoundingCollisionModels hideWireframe')
rootNode.findData('dt').value=0.01
rootNode.findData('gravity').value=[0, -981, 0]
rootNode.addObject('DefaultAnimationLoop')

liver = rootNode.addChild('liver')
liver.addObject('EulerImplicitSolver', rayleighStiffness = 0.0, rayleighMass = 0.0)
liver.addObject('SparseLDLSolver',template="CompressedRowSparseMatrixMat3x3d")
Expand Down
Loading
Loading