VtkMeshReader< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <VtkMeshReader.hpp>

Inherits AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for VtkMeshReader< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 VtkMeshReader (std::string pathBaseName)
 VtkMeshReader (vtkUnstructuredGrid *p_vtkUnstructuredGrid)
virtual ~VtkMeshReader ()
unsigned GetNumElements () const
unsigned GetNumCableElements () const
unsigned GetNumNodes () const
unsigned GetNumFaces () const
unsigned GetNumEdges () const
unsigned GetNumElementAttributes () const
unsigned GetNumCableElementAttributes () const
unsigned GetNumFaceAttributes () const
void Reset ()
void Initialize ()
std::vector< doubleGetNextNode ()
ElementData GetNextElementData ()
ElementData GetNextFaceData ()
ElementData GetNextCableElementData ()
void GetCellData (std::string dataName, std::vector< double > &dataPayload)
void GetPointData (std::string dataName, std::vector< double > &dataPayload)
void GetCellData (std::string dataName, std::vector< c_vector< double, SPACE_DIM > > &dataPayload)
void GetPointData (std::string dataName, std::vector< c_vector< double, SPACE_DIM > > &dataPayload)
vtkUnstructuredGrid * OutputMeshAsVtkUnstructuredGrid ()

Private Member Functions

void CommonConstructor ()

Private Attributes

vtkSmartPointer
< vtkUnstructuredGrid > 
mpVtkUnstructuredGrid
vtkGeometryFilter * mpVtkGeometryFilter
vtkFeatureEdges * mpVtkFilterEdges
bool mIndexFromZero
std::ifstream mVtuFile
unsigned mNumNodes
unsigned mNumElements
unsigned mNumFaces
unsigned mNumCableElements
unsigned mNodesRead
unsigned mElementsRead
unsigned mFacesRead
unsigned mBoundaryFacesRead
unsigned mBoundaryFacesSkipped
unsigned mCableElementsRead
unsigned mNumNodeAttributes
unsigned mMaxNodeBdyMarker
unsigned mNumElementAttributes
unsigned mNumFaceAttributes
unsigned mNumCableElementAttributes
unsigned mOrderOfElements
unsigned mNodesPerElement
int mVtkCellType

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class VtkMeshReader< ELEMENT_DIM, SPACE_DIM >

VtkMeshReader

Reads a mesh (and data) from VTK .vtu format (that's an XML-based, data compressed unstructured mesh)

Definition at line 80 of file VtkMeshReader.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader ( std::string  pathBaseName  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader ( vtkUnstructuredGrid *  p_vtkUnstructuredGrid  )  [inline]

Alternative constructor, takes a vtkUnstructuredGrid that is already in memory as an input parameter rather than a .vtu file

Parameters:
p_vtkUnstructuredGrid Pointer to a vtkUnstructuredGrid object

Definition at line 201 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::~VtkMeshReader (  )  [inline, virtual]

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor (  )  [inline, private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData ( std::string  dataName,
std::vector< c_vector< double, SPACE_DIM > > &  dataPayload 
) [inline]
Returns:
an std::vector containing the vector-directed vtkCellData with attribute name specified Throws if the attribute name does not exist
Parameters:
dataName Name of the cell data
dataPayload in which to store the result

Definition at line 452 of file VtkMeshReader.cpp.

References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData ( std::string  dataName,
std::vector< double > &  dataPayload 
) [inline]
Returns:
an std::vector containing the vtkCellData with attribute name specified Throws if the attribute name does not exist
Parameters:
dataName Name of the cell data
dataPayload in which to store the result

Definition at line 429 of file VtkMeshReader.cpp.

References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementData VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElementAttributes (  )  const [inline, virtual]
Returns:
mNumCableElementAttributes

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 274 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElementAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements (  )  const [inline, virtual]
Returns:
the mNumCableElements

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 244 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumEdges (  )  const [inline]
Returns:
mNumFaces (synonym of GetNumFaces() method)

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 262 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes (  )  const [inline, virtual]
Returns:
mNumElementAttributes

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 268 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements (  )  const [inline, virtual]
Returns:
the mNumElements

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 238 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes (  )  const [inline, virtual]
Returns:
mNumFaceAttributes

Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 280 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces (  )  const [inline, virtual]
Returns:
mNumFaces (synonym of GetNumEdges() method)

Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.

Definition at line 256 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes (  )  const [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData ( std::string  dataName,
std::vector< c_vector< double, SPACE_DIM > > &  dataPayload 
) [inline]
Returns:
an std::vector containing the vector-directed vtkPointData with attribute name specified Throws if the attribute name does not exist
Parameters:
dataName Name of the point data
dataPayload in which to store the result

Definition at line 505 of file VtkMeshReader.cpp.

References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData ( std::string  dataName,
std::vector< double > &  dataPayload 
) [inline]
Returns:
an std::vector containing the vtkPointData with attribute name specified Throws if the attribute name does not exist
Parameters:
dataName Name of the point data
dataPayload in which to store the result

Definition at line 481 of file VtkMeshReader.cpp.

References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Initialize (  )  [inline]

Deletes the vtkUnstructuredGrid and vtkGeometryFilter in preparation for deletion of the mesh reader (should) not be called if the vtkUnstructuredGrid is still required elsewhere, e.g. in an AdaptiveTetrahedralMesh or an AdaptiveBidomainProblem.

Definition at line 297 of file VtkMeshReader.cpp.

References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
vtkUnstructuredGrid * VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::OutputMeshAsVtkUnstructuredGrid (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset (  )  [inline, virtual]

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead [private]

Number of boundary faces read from file so far

Definition at line 105 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesSkipped [private]

Number of (not) boundary faces skipped

Definition at line 106 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mCableElementsRead [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead [private]

Number of elements read from file so far

Definition at line 103 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead [private]

Number of faces read from file so far

Definition at line 104 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero [private]

True if input data is numbered from zero, false otherwise

Definition at line 93 of file VtkMeshReader.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mMaxNodeBdyMarker [private]

Is the maximum node boundary marker

Definition at line 111 of file VtkMeshReader.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead [private]

Number of nodes read from file so far

Definition at line 102 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElementAttributes [private]

Is the number of attributes stored for each cable

Definition at line 114 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElementAttributes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes [private]

Is the number of attributes stored for each element

Definition at line 112 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes [private]

Is the number of attributes stored for each face

Definition at line 113 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaceAttributes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodeAttributes [private]

Is the number of attributes stored at each node

Definition at line 110 of file VtkMeshReader.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mOrderOfElements [private]

Order of the elements (i.e. linear, quadratic, cubic FE basis functions

Definition at line 116 of file VtkMeshReader.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
vtkFeatureEdges* VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkFilterEdges [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
vtkGeometryFilter* VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkGeometryFilter [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
vtkSmartPointer<vtkUnstructuredGrid> VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
int VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mVtkCellType [private]

Enumerated as VTK_TETRA in 3D and VTK_TRIANGLE in 2D. The VTK method GetCellType() returns an int, but this is documented as being non-negative

Definition at line 119 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::ifstream VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mVtuFile [private]

Location of the .vtu file

Definition at line 95 of file VtkMeshReader.hpp.

Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2