Skip to content

Commit 109fb38

Browse files
committed
Remove "Element" prefix
1 parent 308bc45 commit 109fb38

21 files changed

Lines changed: 70 additions & 511 deletions

CMakeLists.txt

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ set(HEADER_FILES
99
src/Elasticity/config.h.in
1010
src/Elasticity/init.h
1111

12-
src/Elasticity/component/ElementHyperelasticityFEMForceField.h
13-
src/Elasticity/component/ElementHyperelasticityFEMForceField.inl
14-
src/Elasticity/component/ElementPrefab.h
15-
src/Elasticity/component/ElementPrefab.inl
12+
src/Elasticity/component/HyperelasticityFEMForceField.h
13+
src/Elasticity/component/HyperelasticityFEMForceField.inl
1614
src/Elasticity/component/HyperelasticMaterial.h
1715
src/Elasticity/component/HyperelasticMaterial.inl
1816
src/Elasticity/component/LinearMechanicalParametersComponent.h
@@ -33,13 +31,6 @@ set(HEADER_FILES
3331
src/Elasticity/component/material/StVenantKirchhoffMaterial.h
3432
src/Elasticity/component/material/StVenantKirchhoffMaterial.inl
3533

36-
src/Elasticity/component/prefab/CorotationalFEMForceField.h
37-
src/Elasticity/component/prefab/CorotationalFEMForceField.inl
38-
src/Elasticity/component/prefab/HyperelasticityFEMForceField.h
39-
src/Elasticity/component/prefab/HyperelasticityFEMForceField.inl
40-
src/Elasticity/component/prefab/LinearSmallStrainFEMForceField.h
41-
src/Elasticity/component/prefab/LinearSmallStrainFEMForceField.inl
42-
4334
src/Elasticity/impl/IdentityMatrix.h
4435
src/Elasticity/impl/IsotropicElasticityTensor.h
4536
src/Elasticity/impl/MajorSymmetric4Tensor.h
@@ -53,8 +44,7 @@ set(HEADER_FILES
5344
set(SOURCE_FILES
5445
src/Elasticity/init.cpp
5546

56-
src/Elasticity/component/ElementHyperelasticityFEMForceField.cpp
57-
src/Elasticity/component/ElementPrefab.cpp
47+
src/Elasticity/component/HyperelasticityFEMForceField.cpp
5848
src/Elasticity/component/HyperelasticMaterial.cpp
5949
src/Elasticity/component/LinearMechanicalParametersComponent.cpp
6050
src/Elasticity/component/PK2HyperelasticMaterial.cpp
@@ -65,10 +55,6 @@ set(SOURCE_FILES
6555
src/Elasticity/component/material/OgdenMaterial.cpp
6656
src/Elasticity/component/material/NeoHookeanMaterial.cpp
6757
src/Elasticity/component/material/StVenantKirchhoffMaterial.cpp
68-
69-
src/Elasticity/component/prefab/CorotationalFEMForceField.cpp
70-
src/Elasticity/component/prefab/HyperelasticityFEMForceField.cpp
71-
src/Elasticity/component/prefab/LinearSmallStrainFEMForceField.cpp
7258
)
7359

7460
add_library(${PROJECT_NAME} SHARED README.md ${HEADER_FILES} ${SOURCE_FILES})

src/Elasticity/component/ElementHyperelasticityFEMForceField.cpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Elasticity/component/ElementPrefab.cpp

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/Elasticity/component/ElementPrefab.h

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/Elasticity/component/ElementPrefab.inl

Lines changed: 0 additions & 105 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#define ELASTICITY_COMPONENT_HYPERLASTICITY_FEM_FORCE_FIELD_CPP
2+
3+
#include <Elasticity/component/HyperelasticityFEMForceField.inl>
4+
5+
#include <sofa/fem/FiniteElement[all].h>
6+
#include <sofa/core/ObjectFactory.h>
7+
8+
namespace elasticity
9+
{
10+
11+
void registerHyperelasticityFEMForceField(sofa::core::ObjectFactory* factory)
12+
{
13+
factory->registerObjects(sofa::core::ObjectRegistrationData("Hyperelasticity")
14+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec1Types, sofa::geometry::Edge> >()
15+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Edge> >()
16+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Edge> >()
17+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Triangle> >()
18+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Triangle> >()
19+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Quad> >()
20+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Quad> >()
21+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron> >()
22+
.add< HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron> >()
23+
);
24+
}
25+
26+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec1Types, sofa::geometry::Edge>;
27+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Edge>;
28+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Edge>;
29+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Triangle>;
30+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Triangle>;
31+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Quad>;
32+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Quad>;
33+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron>;
34+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron>;
35+
36+
}

src/Elasticity/component/ElementHyperelasticityFEMForceField.h renamed to src/Elasticity/component/HyperelasticityFEMForceField.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ namespace elasticity
1313
{
1414

1515
template <class TDataTypes, class TElementType>
16-
class ElementHyperelasticityFEMForceField :
16+
class HyperelasticityFEMForceField :
1717
public sofa::component::solidmechanics::fem::elastic::FEMForceField<TDataTypes, TElementType>
1818
{
1919
public:
2020
SOFA_CLASS(
21-
SOFA_TEMPLATE2(ElementHyperelasticityFEMForceField, TDataTypes, TElementType),
21+
SOFA_TEMPLATE2(HyperelasticityFEMForceField, TDataTypes, TElementType),
2222
SOFA_TEMPLATE2(sofa::component::solidmechanics::fem::elastic::FEMForceField, TDataTypes, TElementType));
2323

2424
using DataTypes = TDataTypes;
@@ -132,16 +132,16 @@ class ElementHyperelasticityFEMForceField :
132132
const sofa::VecDeriv_t<TDataTypes>& dx) override;
133133
};
134134

135-
#if !defined(ELASTICITY_COMPONENT_ELEMENT_HYPERLASTICITY_FEM_FORCE_FIELD_CPP)
136-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec1Types, sofa::geometry::Edge>;
137-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Edge>;
138-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Edge>;
139-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Triangle>;
140-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Triangle>;
141-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Quad>;
142-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Quad>;
143-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron>;
144-
template class ELASTICITY_API ElementHyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron>;
135+
#if !defined(ELASTICITY_COMPONENT_HYPERLASTICITY_FEM_FORCE_FIELD_CPP)
136+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec1Types, sofa::geometry::Edge>;
137+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Edge>;
138+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Edge>;
139+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Triangle>;
140+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Triangle>;
141+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec2Types, sofa::geometry::Quad>;
142+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Quad>;
143+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Tetrahedron>;
144+
template class ELASTICITY_API HyperelasticityFEMForceField<sofa::defaulttype::Vec3Types, sofa::geometry::Hexahedron>;
145145
#endif
146146

147147
} // namespace elasticity

0 commit comments

Comments
 (0)