-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fix_incisionEdgeBorders
- Loading branch information
Showing
53 changed files
with
1,647 additions
and
903 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file added
BIN
+11.4 KB
regression/references/TearingEngine/SquareTissue_01_gravity.scn.reference_0_Mo_mstate.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+13.7 KB
.../references/TearingEngine/SquareTissue_02_pressureBorder.scn.reference_0_Mo_mstate.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+11.3 KB
...eferences/TearingEngine/SquareTissue_03_centralePressure.scn.reference_0_Mo_mstate.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+11.4 KB
.../references/TearingEngine/SquareTissue_04_cornerPressure.scn.reference_0_Mo_mstate.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+4.8 KB
...erences/TearingEngine/SquareTissue_05_circleHole_gravity.scn.reference_0_Mo_mstate.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+2.18 MB
..._topology/TearingEngine/SquareTissue_01_gravity.scn.reference_0_Container_topology.txt.gz
Binary file not shown.
Binary file added
BIN
+2.18 MB
..._topology/TearingEngine/SquareTissue_01_gravity.scn.reference_1_Container_topology.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+2.18 MB
...gy/TearingEngine/SquareTissue_02_pressureBorder.scn.reference_0_Container_topology.txt.gz
Binary file not shown.
Binary file added
BIN
+2.18 MB
...gy/TearingEngine/SquareTissue_02_pressureBorder.scn.reference_1_Container_topology.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+2.18 MB
.../TearingEngine/SquareTissue_03_centralePressure.scn.reference_0_Container_topology.txt.gz
Binary file not shown.
Binary file added
BIN
+2.18 MB
.../TearingEngine/SquareTissue_03_centralePressure.scn.reference_1_Container_topology.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+2.18 MB
...gy/TearingEngine/SquareTissue_04_cornerPressure.scn.reference_0_Container_topology.txt.gz
Binary file not shown.
Binary file added
BIN
+2.18 MB
...gy/TearingEngine/SquareTissue_04_cornerPressure.scn.reference_1_Container_topology.txt.gz
Binary file not shown.
Empty file.
Binary file added
BIN
+27.5 KB
...earingEngine/SquareTissue_05_circleHole_gravity.scn.reference_0_Container_topology.txt.gz
Binary file not shown.
Binary file added
BIN
+27.5 KB
...earingEngine/SquareTissue_05_circleHole_gravity.scn.reference_1_Container_topology.txt.gz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import os | ||
import sys | ||
|
||
#arguments: | ||
# 0 - script name | ||
# 1 - sofa build dir | ||
#use: | ||
# python regression_tests.py /c/projects/sofa-build/ | ||
|
||
sofa_build_dir = sys.argv[1] | ||
pwd = os.getcwd() | ||
reg_binary = sofa_build_dir + '/bin/Release/Regression_test.exe' | ||
ref_dir = pwd + "/references/" | ||
scenes_dir = pwd + "/../scenes/" | ||
|
||
# logs | ||
print("--- Regression config ---") | ||
print("sofa_build_dir: " + sofa_build_dir) | ||
print("ref_dir: " + ref_dir) | ||
print("scenes_dir: " + scenes_dir) | ||
print("reg_binary: " + reg_binary) | ||
print("-------------------------") | ||
|
||
os.environ["REGRESSION_SCENES_DIR"] = scenes_dir | ||
os.environ["REGRESSION_REFERENCES_DIR"] = ref_dir | ||
|
||
os.environ["SOFA_ROOT"] = sofa_build_dir | ||
os.environ["SOFA_PLUGIN_PATH"] = sofa_build_dir + '/lib' | ||
|
||
os.system(reg_binary) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# WARNING: | ||
# REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES. | ||
# USE UNDERSCORES ("_") INSTEAD. | ||
|
||
../regression/references | ||
|
||
### Demo scenes ### | ||
./TearingEngine/SquareTissue_01_gravity.scn 500 1e-4 1 1 | ||
./TearingEngine/SquareTissue_02_pressureBorder.scn 500 1e-4 1 1 | ||
./TearingEngine/SquareTissue_03_centralePressure.scn 500 1e-4 1 1 | ||
./TearingEngine/SquareTissue_04_cornerPressure.scn 500 1e-4 1 1 | ||
./TearingEngine/SquareTissue_05_circleHole_gravity.scn 500 1e-4 1 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# WARNING: | ||
# REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES. | ||
# USE UNDERSCORES ("_") INSTEAD. | ||
|
||
### References relative path ### | ||
../regression/references_topology | ||
|
||
### Topology scenes ### | ||
./TearingEngine/SquareTissue_01_gravity.scn 200 1e-4 1 | ||
./TearingEngine/SquareTissue_02_pressureBorder.scn 200 1e-4 1 | ||
./TearingEngine/SquareTissue_03_centralePressure.scn 200 1e-4 1 | ||
./TearingEngine/SquareTissue_04_cornerPressure.scn 200 1e-4 1 | ||
./TearingEngine/SquareTissue_05_circleHole_gravity.scn 200 1e-4 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
scenes/TearingEngine/SquareTissue_01_gravity_interaction.scn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" ?> | ||
<!--Test case 1: Upper border is fixed and only heavy gravity is applied --> | ||
|
||
<Node name="root" dt="0.01" showBoundingTree="0" gravity="0 -10 0"> | ||
<Node name="RequiredPlugins"> | ||
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, DefaultPipeline] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] --> | ||
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] --> | ||
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedConstraint] --> | ||
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] --> | ||
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshGmshLoader] --> | ||
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] --> | ||
<RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] --> | ||
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] --> | ||
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] --> | ||
<RequiredPlugin name="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] --> | ||
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TriangularFEMForceField] --> | ||
<RequiredPlugin name="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [TriangularBendingSprings] --> | ||
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] --> | ||
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] --> | ||
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] --> | ||
<RequiredPlugin name="Tearing"/> | ||
</Node> | ||
|
||
<VisualStyle displayFlags="showVisual showBehaviorModels" /> | ||
|
||
<DefaultAnimationLoop /> | ||
<DefaultPipeline verbose="0" /> | ||
<BruteForceBroadPhase/> | ||
<BVHNarrowPhase/> | ||
<CollisionResponse response="PenalityContactForceField" /> | ||
<MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" /> | ||
|
||
<Node name="SquareGravity_FEM"> | ||
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" /> | ||
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> | ||
<MeshGmshLoader name="meshLoader" filename="mesh/square3.msh" scale="10" createSubelements="true" /> | ||
|
||
<TriangleSetTopologyContainer name="Container" src="@meshLoader" fileTopology="" tags=" " /> | ||
<TriangleSetTopologyModifier name="Modifier" /> | ||
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" /> | ||
|
||
<MechanicalObject name="Mo"/> | ||
<DiagonalMass massDensity="2.0" /> | ||
|
||
<BoxROI name="FixedSide" box="-0.1 9.9 0.1 10.1 10.1 -0.1" drawBoxes="1" /> | ||
<FixedConstraint name="FixedConstraint" indices="@FixedSide.indices" /> | ||
|
||
<TriangularFEMForceField name="FEM" youngModulus="300" poissonRatio="0.3" method="large" computePrincipalStress="1"/> | ||
<TriangularBendingSprings name="FEM-Bend" stiffness="300" /> | ||
<PlaneForceField normal="0 1 0" d="-20" stiffness="100000" showPlane="1" showPlaneSize="20"/> | ||
|
||
<TriangleCollisionModel /> | ||
|
||
<TearingEngine name="TearingEngine" input_position="@Mo.position" stressThreshold="12.0" | ||
step="30" nbFractureMax="40" showFracturePath="1" fractureMaxLength="1.5"/> | ||
|
||
<Node > | ||
<OglModel name="Visual" color="red" /> | ||
<IdentityMapping input="@.." output="@Visual" /> | ||
</Node> | ||
</Node> | ||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.