1 #ifndef __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__
2 #define __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__
5 #include <cpm/Algorithms/Base/ForceFunction.h>
16 class InternalForceFunction
17 : public cpm::Algorithms::Base::ForceFunction< M >
20 typedef InternalForceFunction Self;
21 typedef cpm::Algorithms::Base::ForceFunction< M > Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef typename Superclass::TMesh TMesh;
26 typedef typename Superclass::TPointId TPointId;
27 typedef typename Superclass::TVector TVector;
28 typedef typename TVector::ValueType TScalar;
30 enum PhiConstraint { C0 = 0, C1, C2, C3 };
34 itkTypeMacro( InternalForceFunction, ForceFunction );
37 virtual TVector Evaluate( const TPointId& pId ) const;
39 virtual void SetMesh( const M* m );
40 void SetPhiConstraintToC0( );
41 void SetPhiConstraintToC1( );
42 void SetPhiConstraintToC2( const unsigned int& neigh_order = 1 );
43 void SetPhiConstraintToC3( );
46 InternalForceFunction( );
47 virtual ~InternalForceFunction( );
49 TScalar _ComputeMeanPhi( const TPointId& pId ) const;
52 const TScalar& delta, const TScalar& d, const TScalar& phi
56 // Purposely not implemented
57 InternalForceFunction( const Self& );
58 Self& operator=( const Self& );
61 PhiConstraint m_PhiConstraint;
62 unsigned int m_NeighborhoodOrder;
63 std::vector< TScalar > m_InitialPhiAngles;
72 #include <cpm/Algorithms/Simplex/InternalForceFunction.hxx>
74 #endif // __CPM__ALGORITHMS__SIMPLEX__INTERNALFORCEFUNCTION__H__