Skip to content

Commit

Permalink
Fix tests (and move a file with its test)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Nov 6, 2020
1 parent 3d256f7 commit d77d774
Show file tree
Hide file tree
Showing 23 changed files with 49 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -298,6 +299,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -332,6 +334,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -366,6 +369,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -400,6 +404,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -435,6 +440,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -469,6 +475,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -504,6 +511,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -539,6 +547,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down Expand Up @@ -574,6 +583,7 @@ class DiagonalMass_test : public BaseTest
string scene =
"<?xml version='1.0'?> "
"<Node name='Root' gravity='0 0 0' time='0' animate='0' > "
" <RequiredPlugin name='SofaTopologyMapping'/> "
" <MechanicalObject /> "
" <RegularGridTopology name='grid' n='2 2 2' min='0 0 0' max='2 2 2' p0='0 0 0' /> "
" <Node name='Tetra' > "
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Node name="root" dt="0.0001" gravity="0 0 0" >
<VisualStyle displayFlags="showBehaviorModels"/>
<RequiredPlugin name='SofaBoundaryCondition'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<MeshObjLoader name="temperatureLoader" filename="mesh/beamTemperatures.obj" />
<MeshObjLoader name="temperatureLoader" filename="beamTemperatures.obj" />
<RegularGridTopology name="grid" n="21 11 11" p0="0 0 0" min="0 0 0" max="1 0.5 0.5" drawHexahedra="1" tags="geom"/>
<MechanicalObject template="Vec3d" name="gridDOFs" tags="geom" />
<BoxROI name="box-dirac" box="-0.01 -0.01 -0.01 0.01 0.51 0.51" drawBoxes="1" position="@gridDOFs.position"/>
Expand All @@ -23,12 +25,6 @@
<DiagonalMass template="Vec1d" name="Mass" massDensity="1.0" tags="heat"/>
<LinearMovementConstraint template="Vec1d" keyTimes="0 998 999" movements="1 1 0" indices="@../../box-dirac.indices" />
<FixedConstraint indices="@../../box-fixed.indices" />

<!-- <Node name="Visu">
<TextureInterpolation template="Vec1d" name="EngineInterpolation" input_states="@../gridTemperature.position" input_coordinates="@../../raptorDOFs.position" min_value="0.0" max_value="1.0" manual_scale="1" drawPotentiels="0" showIndicesScale="5e-05" />
<OglModel template="ExtVec3f" name="oglPotentiel" texcoords="@EngineInterpolation.output_coordinates" texturename="textures/heatColor.bmp" useVBO="0" scale3d="1000 1000 1000" material="Default Diffuse 1 1 1 1 0.5 Ambient 1 1 1 1 0.3 Specular 0 0.5 0.5 0.5 1 Emissive 0 0.5 0.5 0.5 1 Shininess 0 45 No texture linked to the material No bump texture linked to the material "/>
<IdentityMapping input="@../../../gridDOFs" output="@oglPotentiel" />
</Node> -->
</Node>
</Node>
</Node>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<Node name="Root" gravity="0 0 0" time="0" animate="0" dt="0.5" showAxis="true">
<RequiredPlugin pluginName="Flexible"/>
<RequiredPlugin name='SofaTopologyMapping'/>

<!--Solver-->
<StaticSolver residual_tolerance_threshold="1e-9" correction_tolerance_threshold="1e-9"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ bool SofaCarving_test::createScene(const std::string& carvingDistance)
m_root->setGravity(sofa::defaulttype::Vector3(0.0, 0.0, -0.9));
m_root->setDt(0.01);
createObject(m_root, "RequiredPlugin", { { "name","SofaGeneralSimpleFem" } });
createObject(m_root, "RequiredPlugin", { { "name","SofaTopologyMapping" } });
// create collision pipeline
createObject(m_root, "CollisionPipeline", { { "name","Collision Pipeline" } });
createObject(m_root, "BruteForceDetection", { { "name","Detection" } });
Expand Down
3 changes: 2 additions & 1 deletion applications/plugins/SofaCarving/examples/CarvingTool.scn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<Node name="root" dt="0.05" showBoundingTree="0" gravity="0 0 0">
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="Carving" pluginName="SofaCarving" />
<RequiredPlugin name='SofaGeneralSimpleFem'/>
<RequiredPlugin name='SofaGeneralSimpleFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="Carving" pluginName="SofaCarving" />
<RequiredPlugin name='SofaGeneralSimpleFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showCollisionModels" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="Carving" pluginName="SofaCarving" />
<RequiredPlugin name='SofaGeneralSimpleFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showCollisionModels" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" ?>
<Node name="root" dt="0.05" showBoundingTree="0" gravity="0 0 0">
<RequiredPlugin name='SofaTopologyMapping'/>
<VisualStyle displayFlags="showBehaviorModels showForceFields showCollisionModels showVisual" />
<DefaultPipeline verbose="0" name="CollisionPipeline" />
<BruteForceDetection name="N2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Node name="root" dt="0.05" showBoundingTree="0" gravity="0 0 0">
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels showVisual" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<RequiredPlugin name="SofaMiscCollision" />
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscCollision' />
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels" />
<DefaultPipeline verbose="0" />
<BruteForceDetection name="N2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaMiscFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showVisual showBehaviorModels showForceFields showWireframe" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Node name="root" gravity="0 0 -9" dt="0.01">
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showVisual showBehaviorModels showForcefields" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<RequiredPlugin name="SofaMiscCollision" />
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="SofaMiscCollision" />
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels showVisual" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaMiscFem'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels showVisual showWireframe hideForceFields" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Node name="root" dt="0.01" showBoundingTree="0" gravity="0 -9 0">
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showBehaviorModels showVisual showWireframe hideForceFields" />
<DefaultPipeline verbose="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name='SofaMiscFem'/>
<RequiredPlugin name='SofaMiscTopology'/>
<RequiredPlugin name='SofaTopologyMapping'/>

<VisualStyle displayFlags="showVisual showBehaviorModels" />
<DefaultPipeline verbose="0" />
Expand Down
1 change: 1 addition & 0 deletions examples/Demos/simpleBoundaryConditions.scn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!--Decompose a hexahedral grid in tetrahedra and triangles, then stretch the object using a TrianglePressureForceField -->

<Node name="SimpleBoundaryConditions demo" gravity="0 0 0" dt="0.1">
<RequiredPlugin name='SofaTopologyMapping'/>
<VisualStyle displayFlags="showBehavior hideVisual" />
<Node name="Cube grid" >
<EulerImplicitSolver name="cg_odesolver" printLog="0" rayleighStiffness="0.1" rayleighMass="0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.12)
project(SofaMiscForceField_test)

find_package(SofaMiscForceField REQUIRED)
find_package(SofaTopologyMapping REQUIRED) # Needed by tests at runtime

set(SOURCE_FILES
MeshMatrixMass_test.cpp
Expand Down
Loading

0 comments on commit d77d774

Please sign in to comment.