Skip to content

Commit 7063102

Browse files
committed
Clean to hopefully fix Win compilation
1 parent 6e966db commit 7063102

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

src/SofaMJEDFEM/MJEDTetrahedralForceField.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,23 @@
2222
#define SOFA_COMPONENT_FORCEFIELD_MJEDTETRAHEDRALFORCEFIELD_CPP
2323

2424
#include <SofaMJEDFEM/MJEDTetrahedralForceField.inl>
25-
2625
#include <SofaMJEDFEM/config.h>
27-
#include <SofaBaseMechanics/MechanicalObject.h>
26+
2827
#include <sofa/core/ObjectFactory.h>
28+
#include <sofa/defaulttype/VecTypes.h>
2929

30-
#include <sofa/core/behavior/ForceField.inl>
31-
#include <SofaBaseTopology/TopologyData.inl>
3230

3331
namespace sofa::component::forcefield
3432
{
3533

3634
using namespace sofa::defaulttype;
3735

3836
// Register in the Factory
39-
int MJEDTetrahedralForceFieldClass = core::RegisterObject("Generic Tetrahedral finite elements")
40-
.add< MJEDTetrahedralForceField<sofa::defaulttype::Vec3dTypes> >()
41-
;
37+
int MJEDTetrahedralForceFieldClass = core::RegisterObject("Tetrahedral FEM model of visco-hyperelastic material using MJED")
38+
.add< MJEDTetrahedralForceField<Vec3Types> >()
39+
;
4240

43-
template class SOFA_MJED_FEM_API MJEDTetrahedralForceField<Vec3dTypes>;
41+
template class SOFA_MJED_FEM_API MJEDTetrahedralForceField<Vec3Types>;
4442

4543

4644
} // namespace sofa::component::forcefield

src/SofaMJEDFEM/MJEDTetrahedralForceField.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ using namespace sofa::component::topology;
4747
//******************* It is dependant on the description of material following the model of sofa::component::fem::HyperelasticMaterial.h ************************
4848
//***************************** more explication on MJED explication.pdf****************************
4949

50-
/** Compute Finite Element forces based on tetrahedral elements.
51-
*/
50+
/** Compute Finite Element forces based on tetrahedral elements.*/
5251
template<class DataTypes>
5352
class MJEDTetrahedralForceField : public core::behavior::ForceField<DataTypes>
5453
{
@@ -267,10 +266,10 @@ protected :
267266

268267
};
269268

270-
using sofa::defaulttype::Vec3dTypes;
269+
using sofa::defaulttype::Vec3Types;
271270

272271
#if !defined(SOFA_COMPONENT_FORCEFIELD_MJEDTETRAHEDRALFORCEFIELD_CPP)
273-
extern template class SOFA_MJED_FEM_API MJEDTetrahedralForceField<Vec3dTypes>;
272+
extern template class SOFA_MJED_FEM_API MJEDTetrahedralForceField<Vec3Types>;
274273
#endif //!defined(SOFA_COMPONENT_FORCEFIELD_MJEDTETRAHEDRALFORCEFIELD_CPP)
275274

276275
} // namespace sofa::component::forcefield

src/SofaMJEDFEM/config.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
#pragma once
2323

2424
#include <sofa/config.h>
25+
#include <sofa/config/sharedlibrary_defines.h>
2526

2627
#define SOFAMJEDFEM_VERSION @PROJECT_VERSION@
2728

28-
#ifdef SOFA_BUILD_MJED_FEM
29+
#ifdef SOFA_BUILD_SOFAMJEDFEM
2930
# define SOFA_TARGET @PROJECT_NAME@
3031
# define SOFA_MJED_FEM_API SOFA_EXPORT_DYNAMIC_LIBRARY
3132
#else

src/SofaMJEDFEM/initSofaMJEDFEM.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <sofa/core/ObjectFactory.h>
2424
using sofa::core::ObjectFactory;
2525

26+
namespace sofa::component
27+
{
2628

2729
extern "C" {
2830
SOFA_MJED_FEM_API void initExternalModule();
@@ -68,3 +70,5 @@ const char* getModuleComponentList()
6870
static std::string classes = ObjectFactory::getInstance()->listClassesFromTarget(sofa_tostring(SOFA_TARGET));
6971
return classes.c_str();
7072
}
73+
74+
} // namespace sofa::component

0 commit comments

Comments
 (0)