VTK
9.4.20241218
|
Functions | |
int | MPIGetRank () |
Get current MPI rank from MPIGetComm. | |
int | MPIGetSize () |
Get current MPI size from MPIGetComm. | |
pugi::xml_document | XMLDocument (const std::string &input, bool debugMode, const std::string &hint) |
Get safely a pugi::xml_document from XML as a string. | |
pugi::xml_node | XMLNode (std::string nodeName, const pugi::xml_document &xmlDocument, bool debugMode, const std::string &hint, bool isMandatory=true, bool isUnique=false) |
Get safely a pugi::xml_document from a pugmi::xml_document. | |
pugi::xml_node | XMLNode (std::string nodeName, const pugi::xml_node &upperNode, bool debugMode, const std::string &hint, bool isMandatory=true, bool isUnique=false) |
Overloaded version that gets a XML node from inside another node called upperNode. | |
std::string | FileToString (const std::string &fileName) |
Translate file contents to string. | |
pugi::xml_attribute | XMLAttribute (std::string attributeName, const pugi::xml_node &node, bool debugMode, const std::string &hint, bool isMandatory=true) |
Get a node attribute identified by its key. | |
std::string | SetToCSV (const std::set< std::string > &input) noexcept |
Convert a set of strings into a csv "string1,string2,string3" string. | |
template<class T > | |
std::vector< T > | StringToVector (const std::string &input) noexcept |
Converts a single string "s1 s2 s3" list to a vector vector ={ "s1", "s2", "s3" };. | |
std::size_t | TotalElements (const std::vector< std::size_t > &dimensions) noexcept |
Return product of all dimensions components to get the total number of elements. | |
types::DataSet | XMLInitDataSet (const pugi::xml_node &dataSetNode, const std::set< std::string > &specialNames) |
Initialize DataSet structure from parsing a pugi::xml_node, loops through DataArray nodes. | |
template<class T > | |
vtkSmartPointer< vtkDataArray > | NewDataArray () |
Return a derived class of vtkDataArray specialized for supported types. | |
vtkSmartPointer< vtkIdTypeArray > | NewDataArrayIdType () |
Special type for vtkIdTypeArray. | |
adios2::Box< adios2::Dims > | PartitionCart1D (const adios2::Dims &shape) |
Simple partition to load balance shape across viz processes. | |
template<class T , class U > | |
std::vector< T > | MapKeysToVector (const std::map< T, U > &input) noexcept |
Map's keys to a vector. | |
template<class T > | |
void | Print (const std::vector< T > &input, const std::string &name) |
Print a vector with an associated name. | |
size_t | LinearizePoint (const adios2::Dims &shape, const adios2::Dims &point) noexcept |
Linear index for a point within a box with shape dimensions from zero origin. | |
std::string | GetFileName (const std::string &fileName) noexcept |
Set the appropriate file name based on recognized user input. | |
std::string | GetEngineType (const std::string &fileName) noexcept |
Set the appropriate engine type based on recognized user input. | |
bool | EndsWith (const std::string &input, const std::string &ends) noexcept |
Check if input ends with a certain (ends) string. | |
int vtx::helper::MPIGetRank | ( | ) |
Get current MPI rank from MPIGetComm.
int vtx::helper::MPIGetSize | ( | ) |
Get current MPI size from MPIGetComm.
pugi::xml_document vtx::helper::XMLDocument | ( | const std::string & | input, |
bool | debugMode, | ||
const std::string & | hint | ||
) |
Get safely a pugi::xml_document from XML as a string.
input | entire XML contents as a string or file, depending on bool isFile |
debugMode | true: safe mode throws exceptions |
hint | add extra information on exceptions |
std::invalid_argument |
pugi::xml_node vtx::helper::XMLNode | ( | std::string | nodeName, |
const pugi::xml_document & | xmlDocument, | ||
bool | debugMode, | ||
const std::string & | hint, | ||
bool | isMandatory = true , |
||
bool | isUnique = false |
||
) |
Get safely a pugi::xml_document from a pugmi::xml_document.
nodeName | input node to be found |
xmlDocument | input document |
debugMode | true: safe mode throws exceptions |
hint | add extra information on exceptions |
isMandatory | true: throws exception if node is not found |
isUnique | true: throws exception if node exist more than once |
std::invalid_argument |
pugi::xml_node vtx::helper::XMLNode | ( | std::string | nodeName, |
const pugi::xml_node & | upperNode, | ||
bool | debugMode, | ||
const std::string & | hint, | ||
bool | isMandatory = true , |
||
bool | isUnique = false |
||
) |
Overloaded version that gets a XML node from inside another node called upperNode.
nodeName | input node to be found |
upperNode | input node to search inside for nodeName |
debugMode | true: safe mode throws exceptions |
hint | add extra information on exceptions |
isMandatory | true: throws exception if node is not found |
isUnique | true: throws exception if node exist more than once |
std::invalid_argument |
std::string vtx::helper::FileToString | ( | const std::string & | fileName | ) |
Translate file contents to string.
fileName | input |
pugi::xml_attribute vtx::helper::XMLAttribute | ( | std::string | attributeName, |
const pugi::xml_node & | node, | ||
bool | debugMode, | ||
const std::string & | hint, | ||
bool | isMandatory = true |
||
) |
Get a node attribute identified by its key.
attributeName | input xml attribute to be found |
node | input node to search inside for attributeName |
debugMode | true: safe mode throws exceptions |
hint | add extra information on exceptions |
isMandatory | true: throws exception if node is not found |
std::invalid_argument |
|
noexcept |
Convert a set of strings into a csv "string1,string2,string3" string.
input | set of ordered strings |
|
noexcept |
Converts a single string "s1 s2 s3" list to a vector vector ={ "s1", "s2", "s3" };.
input |
|
noexcept |
Return product of all dimensions components to get the total number of elements.
dimensions | input |
types::DataSet vtx::helper::XMLInitDataSet | ( | const pugi::xml_node & | dataSetNode, |
const std::set< std::string > & | specialNames | ||
) |
Initialize DataSet structure from parsing a pugi::xml_node, loops through DataArray nodes.
dataSetNode | input |
specialNames | input check for vector components even if |
vtkSmartPointer< vtkDataArray > vtx::helper::NewDataArray | ( | ) |
Return a derived class of vtkDataArray specialized for supported types.
vtkSmartPointer< vtkIdTypeArray > vtx::helper::NewDataArrayIdType | ( | ) |
Special type for vtkIdTypeArray.
adios2::Box< adios2::Dims > vtx::helper::PartitionCart1D | ( | const adios2::Dims & | shape | ) |
Simple partition to load balance shape across viz processes.
shape | input |
|
noexcept |
Map's keys to a vector.
input | map |
void vtx::helper::Print | ( | const std::vector< T > & | input, |
const std::string & | name | ||
) |
Print a vector with an associated name.
For debugging purposes.
input | vector data |
name | input name |
|
noexcept |
Linear index for a point within a box with shape dimensions from zero origin.
shape | input shape box |
point | input point |
|
noexcept |
Set the appropriate file name based on recognized user input.
fileName | input from user selected file |
|
noexcept |
Set the appropriate engine type based on recognized user input.
fileName | input from user selected file |
|
noexcept |
Check if input ends with a certain (ends) string.
input | string input |
ends | ending string to check in input |