Utility fuctions for VTK. More...
Functions | |
template<class T> | |
void | allocate (std::vector< T > &, int) |
template<class T> | |
void | allocate (T &, int) |
std::string | convertDataArrayToString (const VTKField &) |
std::string | convertEnumToString (VTKDataType) |
std::string | convertEnumToString (VTKFormat) |
std::string | convertEnumToString (VTKLocation) |
std::string | convertPDataArrayToString (const VTKField &) |
bool | convertStringToDataArray (const std::string &, VTKField &) |
bool | convertStringToEnum (const std::string &, VTKDataType &) |
bool | convertStringToEnum (const std::string &, VTKFormat &) |
bool | convertStringToEnum (const std::string &, VTKLocation &) |
uint8_t | getElementNodeCount (VTKElementType) |
Detailed Description
Utility fuctions for VTK.
Function Documentation
◆ allocate() [1/2]
void bitpit::vtk::allocate | ( | std::vector< T > & | data, |
int | n ) |
Allocates memory to hold data
- Template Parameters
-
T template class
- Parameters
-
[in] data container to hold data [in] n size of data
Definition at line 20 of file VTKUtils.tpp.
◆ allocate() [2/2]
void bitpit::vtk::allocate | ( | T & | data, |
int | n ) |
Allocates memory to hold data
- Template Parameters
-
T template class
- Parameters
-
[in] data container to hold data [in] n size of data
Definition at line 8 of file VTKUtils.tpp.
◆ convertDataArrayToString()
std::string bitpit::vtk::convertDataArrayToString | ( | const VTKField & | field | ) |
Converts a Field information to string as requested by VTK format.
- Parameters
-
[in] field Field information
- Returns
- string in VTK format
Definition at line 144 of file VTKUtils.cpp.
◆ convertEnumToString() [1/3]
std::string bitpit::vtk::convertEnumToString | ( | VTKDataType | type | ) |
Converts a VTKDataType into string for DataArray format
- Parameters
-
[in] type VTKDataType to be converted
- Returns
- string to be used in DataArray
Definition at line 229 of file VTKUtils.cpp.
◆ convertEnumToString() [2/3]
std::string bitpit::vtk::convertEnumToString | ( | VTKFormat | cod | ) |
Converts a VTKFormat into string for DataArray format
- Parameters
-
[in] cod VTKFormat to be converted
- Returns
- string to be used in DataArray
Definition at line 210 of file VTKUtils.cpp.
◆ convertEnumToString() [3/3]
std::string bitpit::vtk::convertEnumToString | ( | VTKLocation | loc | ) |
Converts a VTKLocation into string for DataArray format
- Parameters
-
[in] loc VTKLocation to be converted
- Returns
- string to be used in DataArray
Definition at line 191 of file VTKUtils.cpp.
◆ convertPDataArrayToString()
std::string bitpit::vtk::convertPDataArrayToString | ( | const VTKField & | field | ) |
Converts a parallel field information to string as requested by VTK format.
- Parameters
-
[in] field Field information
- Returns
- string in VTK format
Definition at line 171 of file VTKUtils.cpp.
◆ convertStringToDataArray()
bool bitpit::vtk::convertStringToDataArray | ( | const std::string & | line, |
VTKField & | field ) |
Converts a string into a Field information.
- Parameters
-
[in] line string to be converted [out] field Field information
- Returns
- true if successful
Definition at line 84 of file VTKUtils.cpp.
◆ convertStringToEnum() [1/3]
bool bitpit::vtk::convertStringToEnum | ( | const std::string & | str, |
VTKDataType & | type ) |
Converts a std::string as read in vtk file to VTKDataType
- Parameters
-
[in] str string read in DataArray header [out] type VTKDataType to be converted
- Returns
- if str contained expected value
Definition at line 313 of file VTKUtils.cpp.
◆ convertStringToEnum() [2/3]
bool bitpit::vtk::convertStringToEnum | ( | const std::string & | str, |
VTKFormat & | cod ) |
Converts a std::string as read in vtk file to VTKFormat
- Parameters
-
[in] str string read in DataArray header [out] cod VTKFormat
- Returns
- if str contained expected value
Definition at line 289 of file VTKUtils.cpp.
◆ convertStringToEnum() [3/3]
bool bitpit::vtk::convertStringToEnum | ( | const std::string & | str, |
VTKLocation & | loc ) |
Converts a std::string as read in vtk file to VTKLocation
- Parameters
-
[in] str string read in DataArray header [out] loc VTKLocation
- Returns
- if str contained expected value
Definition at line 265 of file VTKUtils.cpp.
◆ getElementNodeCount()
uint8_t bitpit::vtk::getElementNodeCount | ( | VTKElementType | type | ) |
Returns number of vertices for a given element type. Codification of element type according to http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf
- Parameters
-
[in] type element type
- Returns
- number of vertices of element type
Definition at line 35 of file VTKUtils.cpp.
