Skip to content

Commit bd42c09

Browse files
authored
Merge pull request #1 from hugtalbot/v22.06
Updates for v22.06 release
2 parents 7063102 + fe50ccd commit bd42c09

File tree

3 files changed

+80
-102
lines changed

3 files changed

+80
-102
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.12)
2-
project(SofaMJEDFEM VERSION 1.0 LANGUAGES CXX)
2+
project(SofaMJEDFEM VERSION 21.12 LANGUAGES CXX)
33

44
find_package(SofaFramework REQUIRED)
55
find_package(SofaBaseTopology REQUIRED)

src/SofaMJEDFEM/MJEDTetrahedralForceField.h

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -230,27 +230,20 @@ protected :
230230

231231
void draw(const core::visual::VisualParams* vparams) override;
232232

233+
234+
/** Method to initialize @sa TetrahedronRestInformation when a new Tetrahedron is created.
235+
* Will be set as creation callback in the TetrahedronData @sa tetrahedronInfo
236+
*/
237+
void createTetrahedronRestInformation(Index, TetrahedronRestInformation& t,
238+
const core::topology::BaseMeshTopology::Tetrahedron&,
239+
const sofa::type::vector<Index>&,
240+
const sofa::type::vector<double>&);
241+
233242
type::Mat<3,3,double> getPhi( int tetrahedronIndex);
234243
type::Mat<3,3,double> getForce( int tetrahedronIndex);
235244
TetrahedronData<sofa::type::vector<TetrahedronRestInformation> > tetrahedronInfo;
236245
EdgeData<sofa::type::vector<EdgeInformation> > edgeInfo;
237246

238-
class TetrahedronHandler : public TopologyDataHandler<core::topology::BaseMeshTopology::Tetrahedron,sofa::type::vector<TetrahedronRestInformation> >
239-
{
240-
public:
241-
typedef typename MJEDTetrahedralForceField<DataTypes>::TetrahedronRestInformation TetrahedronRestInformation;
242-
TetrahedronHandler(MJEDTetrahedralForceField<DataTypes>* ff,TetrahedronData<sofa::type::vector<TetrahedronRestInformation> >* data )
243-
:TopologyDataHandler<core::topology::BaseMeshTopology::Tetrahedron,sofa::type::vector<TetrahedronRestInformation> >(data)
244-
,ff(ff)
245-
{
246-
}
247-
248-
void applyCreateFunction(unsigned int, TetrahedronRestInformation &t, const core::topology::BaseMeshTopology::Tetrahedron
249-
&, const sofa::type::vector<unsigned int> &, const sofa::type::vector<double> &);
250-
251-
protected:
252-
MJEDTetrahedralForceField<DataTypes>* ff;
253-
};
254247
protected:
255248

256249
/// the array that describes the complete material energy and its derivatives
@@ -261,7 +254,6 @@ protected :
261254
void testDerivatives();// a test to check the accuracy of Addforce and AddDforce, it needs the calculus of the total strain energy
262255
void saveMesh( const char *filename );
263256

264-
TetrahedronHandler* tetrahedronHandler;
265257
VecCoord myposition;
266258

267259
};

0 commit comments

Comments
 (0)