Skip to content

Commit

Permalink
Fix compilation due to removal of topologyHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
hugtalbot committed Apr 27, 2022
1 parent 5493a82 commit fe50ccd
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 101 deletions.
26 changes: 9 additions & 17 deletions src/SofaMJEDFEM/MJEDTetrahedralForceField.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,27 +230,20 @@ protected :

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


/** Method to initialize @sa TetrahedronRestInformation when a new Tetrahedron is created.
* Will be set as creation callback in the TetrahedronData @sa tetrahedronInfo
*/
void createTetrahedronRestInformation(Index, TetrahedronRestInformation& t,
const core::topology::BaseMeshTopology::Tetrahedron&,
const sofa::type::vector<Index>&,
const sofa::type::vector<double>&);

type::Mat<3,3,double> getPhi( int tetrahedronIndex);
type::Mat<3,3,double> getForce( int tetrahedronIndex);
TetrahedronData<sofa::type::vector<TetrahedronRestInformation> > tetrahedronInfo;
EdgeData<sofa::type::vector<EdgeInformation> > edgeInfo;

class TetrahedronHandler : public TopologyDataHandler<core::topology::BaseMeshTopology::Tetrahedron,sofa::type::vector<TetrahedronRestInformation> >
{
public:
typedef typename MJEDTetrahedralForceField<DataTypes>::TetrahedronRestInformation TetrahedronRestInformation;
TetrahedronHandler(MJEDTetrahedralForceField<DataTypes>* ff,TetrahedronData<sofa::type::vector<TetrahedronRestInformation> >* data )
:TopologyDataHandler<core::topology::BaseMeshTopology::Tetrahedron,sofa::type::vector<TetrahedronRestInformation> >(data)
,ff(ff)
{
}

void applyCreateFunction(unsigned int, TetrahedronRestInformation &t, const core::topology::BaseMeshTopology::Tetrahedron
&, const sofa::type::vector<unsigned int> &, const sofa::type::vector<double> &);

protected:
MJEDTetrahedralForceField<DataTypes>* ff;
};
protected:

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

TetrahedronHandler* tetrahedronHandler;
VecCoord myposition;

};
Expand Down
Loading

0 comments on commit fe50ccd

Please sign in to comment.