Skip to content

Commit

Permalink
fix loading plugins (for registration)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Dec 10, 2024
1 parent 969bed3 commit dd7c752
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions BeamAdapter_test/BeamInterpolation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ using sofa::core::objectmodel::New ;
using sofa::core::objectmodel::BaseData ;
using sofa::component::statecontainer::MechanicalObject ;

#include <sofa/simpleapi/SimpleApi.h>

#include <regex>
#include <vector>
#include <string>
Expand All @@ -61,17 +63,21 @@ namespace sofa
struct BeamInterpolationTest : public sofa::testing::BaseSimulationTest,
public ::testing::WithParamInterface<std::vector<std::string>>
{
void SetUp() override
{
sofa::simpleapi::importPlugin("Sofa.Component.ODESolver.Backward");
sofa::simpleapi::importPlugin("Sofa.Component.LinearSolver.Iterative");
sofa::simpleapi::importPlugin("Sofa.Component.StateContainer");
sofa::simpleapi::importPlugin("Sofa.Component.Topology.Container.Constant");
sofa::simpleapi::importPlugin("BeamAdapter");
}

void simpleScene(const std::vector<std::string>& lines)
{
assert(lines.size()==3);
string scene =
"<?xml version='1.0'?>"
"<Node name='Root' gravity='0 0 0' time='0' animate='0'>"
" <RequiredPlugin name='Sofa.Component.ODESolver.Backward' />"
" <RequiredPlugin name='Sofa.Component.LinearSolver.Iterative' />"
" <RequiredPlugin name='Sofa.Component.StateContainer' />"
" <RequiredPlugin name='Sofa.Component.Topology.Container.Constant' />"
" <RequiredPlugin name='BeamAdapter' />"
" <EulerImplicitSolver rayleighStiffness='0.08' rayleighMass='0.08' printLog='false' />"
" <CGLinearSolver iterations='100' threshold='1e-10' tolerance='1e-15' />"
" $line1"
Expand Down

0 comments on commit dd7c752

Please sign in to comment.