Skip to content
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
2 changes: 1 addition & 1 deletion Sofa/Component/Mapping/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ set(SOURCE_FILES
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC src/)

target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Simulation.Core)
target_link_libraries(${PROJECT_NAME} Sofa.Config SceneCreator Sofa.Type Sofa.Simulation.Core Sofa.Testing Sofa.SimpleApi Sofa.Component.StateContainer)
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ using sofa::testing::NumericTest;
#include <sofa/linearalgebra/EigenSparseMatrix.h>
#include <sofa/component/statecontainer/MechanicalObject.h>
#include <sofa/simulation/Simulation.h>
#include <sofa/helper/vector.h>
#include <sofa/type/vector.h>
#include <sofa/core/MultiMapping.h>

#include <sofa/defaulttype/VecTypes.h>
#include <sofa/defaulttype/RigidTypes.h>
#include <sofa/core/Multi2Mapping.inl>

#include <SceneCreator/SceneCreator.h>

namespace sofa {
namespace {
using namespace core;
using namespace component;
using defaulttype::Vec;
using defaulttype::Mat;
using type::Vec;
using type::Mat;
using sofa::type::vector;
typedef std::size_t Index;

/** Test suite for Multi2Mapping.
*/
Expand Down Expand Up @@ -99,10 +99,10 @@ struct Multi2Mapping_test : public BaseSimulationTest, NumericTest<typename _Mul

typedef core::Multi2Mapping <In1Type, In2Type, OutType> Multi2Mapping;

typedef component::linearsolver::EigenSparseMatrix<In1Type, OutType> SparseJMatrixEigen1;
typedef component::linearsolver::EigenSparseMatrix<In2Type, OutType> SparseJMatrixEigen2;
typedef linearsolver::EigenSparseMatrix<In1Type, In2Type> SparseKMatrixEigen1;
typedef linearsolver::EigenSparseMatrix<In2Type, In2Type> SparseKMatrixEigen2;
typedef sofa::linearalgebra::EigenSparseMatrix<In1Type, OutType> SparseJMatrixEigen1;
typedef sofa::linearalgebra::EigenSparseMatrix<In2Type, OutType> SparseJMatrixEigen2;
typedef sofa::linearalgebra::EigenSparseMatrix<In1Type, In2Type> SparseKMatrixEigen1;
typedef sofa::linearalgebra::EigenSparseMatrix<In2Type, In2Type> SparseKMatrixEigen2;

Multi2Mapping* mapping; ///< the mapping to be tested
vector<In1DOFs*> in1Dofs; ///< mapping input
Expand Down Expand Up @@ -203,7 +203,7 @@ struct Multi2Mapping_test : public BaseSimulationTest, NumericTest<typename _Mul
}

/// Init
sofa::simulation::MainSimulation::getSimulation()->init(root);
sofa::simulation::node::init(root);

/// Apply the mapping
// --- Use of the method apply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@
******************************************************************************/
#include <sofa/config.h>

/// Keep this here to force the reading of the header with the proper dependencies and see its work.
#include <sofa/component/mapping/testing/MappingTestCreation.h>
#include <sofa/component/mapping/testing/Multi2MappingTestCreation.h>
#include <sofa/component/mapping/testing/MultiMappingTestCreation.h>

SOFA_EXPORT_DYNAMIC_LIBRARY void init(){}
Loading