Loading...
Searching...
No Matches
Functions
bitpit::vtk Namespace Reference

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]

template<class T >
void bitpit::vtk::allocate ( std::vector< T > & data,
int n )

Allocates memory to hold data

Template Parameters
Ttemplate class
Parameters
[in]datacontainer to hold data
[in]nsize of data

Definition at line 20 of file VTKUtils.tpp.

◆ allocate() [2/2]

template<class T >
void bitpit::vtk::allocate ( T & data,
int n )

Allocates memory to hold data

Template Parameters
Ttemplate class
Parameters
[in]datacontainer to hold data
[in]nsize 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]fieldField 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]typeVTKDataType 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]codVTKFormat 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]locVTKLocation 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]fieldField 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]linestring to be converted
[out]fieldField 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]strstring read in DataArray header
[out]typeVTKDataType 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]strstring read in DataArray header
[out]codVTKFormat
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]strstring read in DataArray header
[out]locVTKLocation
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]typeelement type
Returns
number of vertices of element type

Definition at line 35 of file VTKUtils.cpp.

--- layout: doxygen_footer ---