Itk::FEMObject: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
No edit summary |
|||
Line 7: | Line 7: | ||
<source lang="cpp"> | <source lang="cpp"> | ||
template <unsigned int VDimension = 3> | template <unsigned int VDimension = 3> | ||
class ITK_EXPORT FEMObject: public DataObject | class ITK_EXPORT FEMObject : public DataObject | ||
{ | { | ||
public: | public: | ||
Line 20: | Line 20: | ||
/** Standard part of every itk Object. */ | /** Standard part of every itk Object. */ | ||
itkTypeMacro( | itkTypeMacro(FEMObject, DataObject); | ||
itkStaticConstMacro(FEMDimension, unsigned int, VPointDimension); | |||
itkStaticConstMacro(MaxDimensions, unsigned int, 3); | |||
typedef unsigned long ElementIdentifier; | |||
typedef unsigned long NodeIdentifier; | |||
typedef unsigned long LoadIdentifier; | |||
typedef unsigned long MaterialIdentifier; | |||
typedef VectorContainer< ElementIdentifier, Element > ElementContainer; | |||
typedef VectorContainer< NodeIdentifier, Node > NodeContainer; | |||
typedef VectorContainer< LoadIdentifier, Load > LoadContainer; | |||
typedef VectorContainer< MaterialIdentifier, Material > MaterialContainer; | |||
/** Create types that are pointers to each of the container types. */ | |||
typedef typename ElementContainer::Pointer ElementContainerPointer; | |||
typedef typename ElementContainer::ConstPointer ElementContainerConstPointer; | |||
typedef typename NodeContainer::Pointer NodeContainerPointer; | |||
typedef typename NodeContainer::ConstPointer NodeContainerConstPointer; | |||
typedef typename LoadContainer::Pointer LoadContainerPointer; | |||
typedef typename LoadContainer::ConstPointer LoadContainerConstPointer; | |||
typedef typename MaterialContainer::Pointer MaterialContainerPointer; | |||
typedef typename MaterialContainer::ConstPointer MaterialContainerConstPointer; | |||
/** Create types that are iterators for each of the container types. */ | |||
typedef typename | |||
ElementContainerPointer::ConstIterator ElementContainerConstIterator; | |||
typedef typename | |||
ElementContainerPointer::Iterator ElementContainerIterator; | |||
typedef typename | |||
NodeContainerPointer::ConstIterator NodeContainerConstIterator; | |||
typedef typename | |||
NodeContainerPointer::Iterator NodeContainerIterator; | |||
typedef typename | |||
LoadContainerPointer::ConstIterator LoadContainerConstIterator; | |||
typedef typename | |||
LoadContainerPointer::Iterator LoadContainerIterator; | |||
typedef typename | |||
MaterialContainerPointer::ConstIterator MaterialContainerConstIterator; | |||
typedef typename | |||
MaterialContainerPointer::Iterator MaterialContainerIterator; | |||
/* ADD OTHER Public Methods */ | |||
protected: | |||
/** Constructor for use by New() method. */ | |||
FEMObject(); | |||
~FEMObject(); | |||
void PrintSelf(std::ostream& os, Indent indent) const; | |||
private: | |||
FEMObject(const Self&); //purposely not implemented | |||
void operator=(const Self&); //purposely not implemented | |||
ElementContainerPointer m_ElementContainer; | |||
NodeContainerPointer m_NodeContainer; | |||
LoadContainerPointer m_LoadContainer; | |||
MaterialContainerPointer m_MaterialContainer; | |||
}; // End Class: Mesh | |||
} // end namespace itk | |||
</source> | </source> |
Revision as of 01:50, 14 December 2010
Return to itk::FEM framework - V4
We are proposing to develop a new ITK object (itk::FEMObject) that will hold the finite element model and will have a parallel spatial object (itk::FEMSpatialObject). This will match the current implementation for itk::Mesh and itk::MeshSpatialObject.
Proposed itk::FEMObject Class
<source lang="cpp"> template <unsigned int VDimension = 3> class ITK_EXPORT FEMObject : public DataObject { public:
/** Standard class typedefs. */ typedef PointSet Self; typedef DataObject Superclass; typedef SmartPointer<Self> Pointer; typedef SmartPointer<const Self> ConstPointer; /** Method for creation through the object factory. */ itkNewMacro(Self);
/** Standard part of every itk Object. */ itkTypeMacro(FEMObject, DataObject);
itkStaticConstMacro(FEMDimension, unsigned int, VPointDimension); itkStaticConstMacro(MaxDimensions, unsigned int, 3);
typedef unsigned long ElementIdentifier; typedef unsigned long NodeIdentifier; typedef unsigned long LoadIdentifier; typedef unsigned long MaterialIdentifier;
typedef VectorContainer< ElementIdentifier, Element > ElementContainer; typedef VectorContainer< NodeIdentifier, Node > NodeContainer; typedef VectorContainer< LoadIdentifier, Load > LoadContainer; typedef VectorContainer< MaterialIdentifier, Material > MaterialContainer;
/** Create types that are pointers to each of the container types. */ typedef typename ElementContainer::Pointer ElementContainerPointer; typedef typename ElementContainer::ConstPointer ElementContainerConstPointer; typedef typename NodeContainer::Pointer NodeContainerPointer; typedef typename NodeContainer::ConstPointer NodeContainerConstPointer; typedef typename LoadContainer::Pointer LoadContainerPointer; typedef typename LoadContainer::ConstPointer LoadContainerConstPointer; typedef typename MaterialContainer::Pointer MaterialContainerPointer; typedef typename MaterialContainer::ConstPointer MaterialContainerConstPointer;
/** Create types that are iterators for each of the container types. */ typedef typename ElementContainerPointer::ConstIterator ElementContainerConstIterator; typedef typename ElementContainerPointer::Iterator ElementContainerIterator; typedef typename NodeContainerPointer::ConstIterator NodeContainerConstIterator; typedef typename NodeContainerPointer::Iterator NodeContainerIterator; typedef typename LoadContainerPointer::ConstIterator LoadContainerConstIterator; typedef typename LoadContainerPointer::Iterator LoadContainerIterator; typedef typename MaterialContainerPointer::ConstIterator MaterialContainerConstIterator; typedef typename MaterialContainerPointer::Iterator MaterialContainerIterator;
/* ADD OTHER Public Methods */
protected:
/** Constructor for use by New() method. */ FEMObject(); ~FEMObject(); void PrintSelf(std::ostream& os, Indent indent) const;
private:
FEMObject(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented
ElementContainerPointer m_ElementContainer; NodeContainerPointer m_NodeContainer; LoadContainerPointer m_LoadContainer; MaterialContainerPointer m_MaterialContainer;
}; // End Class: Mesh
} // end namespace itk
</source>