Chaste
Release::2017.1
|
#include <VtkMeshReader.hpp>
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 |
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.
VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader | ( | std::string | pathBaseName | ) |
Constructor
pathBaseName | Full file path of the input file |
Definition at line 48 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mVtuFile.
VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader | ( | vtkUnstructuredGrid * | p_vtkUnstructuredGrid | ) |
Alternative constructor, takes a vtkUnstructuredGrid that is already in memory as an input parameter rather than a .vtu file
p_vtkUnstructuredGrid | Pointer to a vtkUnstructuredGrid object |
Definition at line 199 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
|
virtual |
Destructor
Definition at line 223 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkFilterEdges, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkGeometryFilter.
|
private |
Common constructor which uses the vtkUnstructuredGrid object. The main constructors need to make sure that mpVtkUnstructuredGrid is assigned properly.
Definition at line 87 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElementAttributes, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElements, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkFilterEdges, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkGeometryFilter, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mVtkCellType, and NEVER_REACHED.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader().
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData | ( | std::string | dataName, |
std::vector< double > & | dataPayload | ||
) |
dataName | Name of the cell data |
dataPayload | in which to store the result |
Definition at line 421 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData | ( | std::string | dataName, |
std::vector< c_vector< double, SPACE_DIM > > & | dataPayload | ||
) |
dataName | Name of the cell data |
dataPayload | in which to store the result |
Definition at line 444 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 341 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mCableElementsRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElements, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 314 of file VtkMeshReader.cpp.
References ElementData::AttributeValue, EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mVtkCellType, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 367 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesSkipped, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkFilterEdges, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkGeometryFilter, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid, NEVER_REACHED, and ElementData::NodeIndices.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 295 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 272 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElementAttributes.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 242 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumCableElements.
unsigned VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumEdges | ( | ) | const |
Definition at line 260 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 266 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElementAttributes.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 236 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumElements.
|
virtual |
Reimplemented from AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 278 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaceAttributes.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 254 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumFaces.
|
virtual |
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 248 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes.
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData | ( | std::string | dataName, |
std::vector< double > & | dataPayload | ||
) |
dataName | Name of the point data |
dataPayload | in which to store the result |
Definition at line 473 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
void VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData | ( | std::string | dataName, |
std::vector< c_vector< double, SPACE_DIM > > & | dataPayload | ||
) |
dataName | Name of the point data |
dataPayload | in which to store the result |
Definition at line 497 of file VtkMeshReader.cpp.
References EXCEPTION, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNumNodes, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
vtkUnstructuredGrid * VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::OutputMeshAsVtkUnstructuredGrid | ( | ) |
Definition at line 526 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mpVtkUnstructuredGrid.
|
virtual |
Resets mNodesRead, mElementsRead, mFacesRead and mBoundaryFacesRead to zero (for another pass through the mesh from the beginning
Implements AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >.
Definition at line 284 of file VtkMeshReader.cpp.
References VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mBoundaryFacesSkipped, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mCableElementsRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mElementsRead, VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mFacesRead, and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::mNodesRead.
|
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().
|
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().
|
private |
Number of cable elements read in.
Definition at line 107 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset().
|
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().
|
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().
|
private |
True if input data is numbered from zero, false otherwise
Definition at line 93 of file VtkMeshReader.hpp.
|
private |
Is the maximum node boundary marker
Definition at line 111 of file VtkMeshReader.hpp.
|
private |
Number of nodes per element
Definition at line 117 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData().
|
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().
|
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().
|
private |
Number of cable elements in the mesh.
Definition at line 100 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumCableElements().
|
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().
|
private |
Number of elements in the mesh
Definition at line 98 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements().
|
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().
|
private |
Number of faces in the mesh
Definition at line 99 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumEdges(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumFaces().
|
private |
Is the number of attributes stored at each node
Definition at line 110 of file VtkMeshReader.hpp.
|
private |
Number of nodes in the mesh
Definition at line 97 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData().
|
private |
Order of the elements (i.e. linear, quadratic, cubic FE basis functions
Definition at line 116 of file VtkMeshReader.hpp.
|
private |
VTK edge filter object to extract the boundary elements in 2D
Definition at line 91 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::~VtkMeshReader().
|
private |
VTK geometry filter object to extract the surface elements
Definition at line 88 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::~VtkMeshReader().
|
private |
vtkUnstructuredGrid object: the rest of the class acts as an interface to this
Definition at line 85 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::CommonConstructor(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetCellData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextCableElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextFaceData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::GetPointData(), VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::OutputMeshAsVtkUnstructuredGrid(), and VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader().
|
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().
|
private |
Location of the .vtu file
Definition at line 95 of file VtkMeshReader.hpp.
Referenced by VtkMeshReader< ELEMENT_DIM, SPACE_DIM >::VtkMeshReader().