From fd2e3f521bc559289976360d00e1319d630191fc Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Fri, 29 Nov 2024 16:59:48 +0100 Subject: [PATCH] fix again missing plugins --- unittest/SofaCaribou/Forcefield/test_tractionforce.cpp | 4 ++++ unittest/SofaCaribou/Mass/test_cariboumass.cpp | 6 ++++++ unittest/SofaCaribou/ODE/test_backward_euler.cpp | 4 ++++ unittest/SofaCaribou/ODE/test_static.cpp | 6 +++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp b/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp index 39aa0807..a910a7e3 100644 --- a/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp +++ b/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp @@ -31,6 +31,8 @@ class TractionForcefield : public BaseTest { TEST_F(TractionForcefield, Triangle) { EXPECT_MSG_NOEMIT(Error, Warning) ; + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); createObject(root, "DefaultAnimationLoop"); createObject(root, "DefaultVisualManagerLoop"); createObject(root, "MechanicalObject", {{"position", "-1 0 1 1 0 1 -1 0 -1 1 0 -1 0 0 1 0 0 -1 -1 0 0 1 0 0 0 0 0"}}); @@ -51,6 +53,8 @@ TEST_F(TractionForcefield, Triangle) { TEST_F(TractionForcefield, Quad) { EXPECT_MSG_NOEMIT(Error, Warning) ; + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); createObject(root, "DefaultAnimationLoop"); createObject(root, "DefaultVisualManagerLoop"); createObject(root, "MechanicalObject", {{"position", "-1 0 1 1 0 1 -1 0 -1 1 0 -1 0 0 1 0 0 -1 -1 0 0 1 0 0 0 0 0"}}); diff --git a/unittest/SofaCaribou/Mass/test_cariboumass.cpp b/unittest/SofaCaribou/Mass/test_cariboumass.cpp index 9f73b1a0..8d57ef9b 100644 --- a/unittest/SofaCaribou/Mass/test_cariboumass.cpp +++ b/unittest/SofaCaribou/Mass/test_cariboumass.cpp @@ -34,6 +34,8 @@ TEST(CaribouMass, LinearTetrahedron) { createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Engine.Select"}}); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Grid"}}); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Mapping"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); // Some component to avoid warnings createObject(root, "DefaultAnimationLoop"); @@ -141,6 +143,10 @@ TEST(CaribouMass, LinearHexahedron) { auto root = getSimulation()->createNewNode("root"); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Engine.Select"}}); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Mapping"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Grid"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Mass"}}); // Some component to avoid warnings createObject(root, "DefaultAnimationLoop"); diff --git a/unittest/SofaCaribou/ODE/test_backward_euler.cpp b/unittest/SofaCaribou/ODE/test_backward_euler.cpp index d3ad95dc..b04cbfdc 100644 --- a/unittest/SofaCaribou/ODE/test_backward_euler.cpp +++ b/unittest/SofaCaribou/ODE/test_backward_euler.cpp @@ -24,6 +24,10 @@ TEST(BackwardEulerODESolver, Beam) { auto root = getSimulation()->createNewNode("root"); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Constraint.Projective"}}); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Engine.Select"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Mass"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Grid"}}); // Some component to avoid warnings createObject(root, "DefaultAnimationLoop"); diff --git a/unittest/SofaCaribou/ODE/test_static.cpp b/unittest/SofaCaribou/ODE/test_static.cpp index 1523f3f1..bf47fd2b 100644 --- a/unittest/SofaCaribou/ODE/test_static.cpp +++ b/unittest/SofaCaribou/ODE/test_static.cpp @@ -87,6 +87,10 @@ TEST(StaticODESolver, Beam) { createObject(root, "DefaultAnimationLoop"); createObject(root, "DefaultVisualManagerLoop"); createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Engine.Select"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Grid"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Topology.Container.Dynamic"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.StateContainer"}}); + createObject(root, "RequiredPlugin", {{"pluginName", "Sofa.Component.Constraint.Projective"}}); createObject(root, "RegularGridTopology", {{"name", "grid"}, {"min", "-7.5 -7.5 0"}, {"max", "7.5 7.5 80"}, {"n", "3 3 9"}}); auto meca = createChild(root, "meca"); @@ -108,7 +112,7 @@ TEST(StaticODESolver, Beam) { // Fix the left side of the beam createObject(meca, "BoxROI", {{"name", "fixed_roi"}, {"quad", "@surface_topology.quad"}, {"box", "-7.5 -7.5 -0.9 7.5 7.5 0.1"}}); - createObject(meca, "FixedConstraint", {{"indices", "@fixed_roi.indices"}}); + createObject(meca, "FixedProjectiveConstraint", {{"indices", "@fixed_roi.indices"}}); // Apply traction on the right side of the beam createObject(meca, "BoxROI", {{"name", "top_roi"}, {"quad", "@surface_topology.quad"}, {"box", "-7.5 -7.5 79.9 7.5 7.5 80.1"}});