VTK  9.4.20241217
Namespaces | Classes | Typedefs | Functions | Variables
CGNSRead Namespace Reference

This file defines functions used by vtkCGNSReader and vtkCGNSReaderInternal. More...

Namespaces

namespace  detail
 

Classes

class  BaseInformation
 
struct  CGNSVariable
 
struct  CGNSVector
 
class  FamilyInformation
 
struct  Variable
 
class  vtkCGNSArraySelection
 
class  vtkCGNSCache
 
class  vtkCGNSMetaData
 
struct  VTKVariable
 
class  ZoneBCInformation
 
class  ZoneInformation
 

Typedefs

typedef char char_33[33]
 

Functions

template<typename T >
int readNodeData (int cgioNum, double nodeId, std::vector< T > &data)
 Read data of the specified type from the given node.
 
template<typename T >
int readNodeDataAs (int cgioNum, double nodeId, std::vector< T > &data)
 
template<>
int readNodeData< char > (int cgioNum, double nodeId, std::vector< char > &data)
 
int readNodeStringData (int cgioNum, double nodeId, std::string &data)
 Read string data from the given node.
 
int getNodeChildrenId (int cgioNum, double fatherId, std::vector< double > &childrenIds)
 Read IDs of all children for the node with the given ID.
 
int readBaseIds (int cgioNum, double rootId, std::vector< double > &baseIds)
 Search for bases under the node with the given ID and read their IDs.
 
int readBaseCoreInfo (int cgioNum, double baseId, CGNSRead::BaseInformation &baseInfo)
 Read name, cell and physical dimensions for the given CGNSBase_t node.
 
int readBaseIteration (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
 Read timesteps information in the given BaseIterativeData_t node.
 
int readZoneIterInfo (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
 Read which type of pointers are used for temporal data in the given ZoneIterativeData_t node.
 
int readSolInfo (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
 Read data arrays information in the given FlowSolution_t node.
 
int readBaseFamily (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo, const std::string &parentPath="")
 Read base family information in the given Family_t node.
 
int readBaseReferenceState (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
 Read reference state information in the given ReferenceState_t node.
 
int readZoneInfo (int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
 Read general data array information in the given Zone_t node.
 
int readZoneInfo (int cgioNum, double zoneId, CGNSRead::ZoneInformation &zoneInfo)
 Read family name and boundary conditions information in the given Zone_t node.
 
void releaseIds (int cgioNum, const std::vector< double > &ids)
 Release all IDs in the vector.
 
bool compareName (const char_33 nameOne, const char_33 nameTwo)
 
void removeTrailingWhiteSpaces (char_33 name)
 
std::vector< CGNSVector >::iterator getVectorFromName (std::vector< CGNSVector > &vectorList, const char_33 name)
 
bool isACGNSVariable (const std::vector< CGNSVariable > &varList, const char_33 name)
 
void fillVectorsFromVars (std::vector< CGNSRead::CGNSVariable > &vars, std::vector< CGNSRead::CGNSVector > &vectors, int physicalDim)
 
int setUpRind (int cgioNum, double rindId, int *rind)
 
int getFirstNodeId (int cgioNum, double parentId, const char *label, double *id, const char *name=nullptr)
 Find the first node with the given label.
 
int get_section_connectivity (int cgioNum, double cgioSectionId, int dim, const cgsize_t *srcStart, const cgsize_t *srcEnd, const cgsize_t *srcStride, const cgsize_t *memStart, const cgsize_t *memEnd, const cgsize_t *memStride, const cgsize_t *memDim, vtkIdType *localElements)
 
int get_section_start_offset (int cgioNum, double cgioSectionId, int dim, const cgsize_t *srcStart, const cgsize_t *srcEnd, const cgsize_t *srcStride, const cgsize_t *memStart, const cgsize_t *memEnd, const cgsize_t *memStride, const cgsize_t *memDim, vtkIdType *localElementsIdx)
 
int get_section_parent_elements (int cgioNum, double cgioSectionId, int dim, const cgsize_t *srcStart, const cgsize_t *srcEnd, const cgsize_t *srcStride, const cgsize_t *memStart, const cgsize_t *memEnd, const cgsize_t *memStride, const cgsize_t *memDim, vtkIdType *localElementsIdx)
 
int GetVTKElemType (CGNS_ENUMT(ElementType_t) elemType, bool &higherOrderWarning, bool &cgnsOrderFlag)
 
void CGNS2VTKorder (vtkIdType size, const int *cells_types, vtkIdType *elements)
 
void ReorderMonoCellPointsCGNS2VTK (vtkIdType size, int cell_type, vtkIdType numPointsPerCell, vtkIdType *elements)
 
template<typename T , typename Y >
int get_XYZ_mesh (int cgioNum, const std::vector< double > &gridChildId, const std::size_t &nCoordsArray, int cellDim, vtkIdType nPts, const cgsize_t *srcStart, const cgsize_t *srcEnd, const cgsize_t *srcStride, const cgsize_t *memStart, const cgsize_t *memEnd, const cgsize_t *memStride, const cgsize_t *memDims, vtkPoints *points)
 
bool ReadBase (vtkCGNSReader *reader, const BaseInformation &baseInfo)
 Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).
 
bool ReadGridForZone (vtkCGNSReader *reader, const BaseInformation &baseInfo, const ZoneInformation &zoneInfo)
 Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).
 
bool ReadPatchesForBase (vtkCGNSReader *reader, const BaseInformation &)
 Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).
 
bool ReadSurfacesForBase (vtkCGNSReader *reader, const BaseInformation &)
 Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).
 
bool ReadPatch (vtkCGNSReader *reader, const BaseInformation &, const ZoneInformation &zoneInfo, const std::string &patchFamilyname)
 Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).
 

Variables

const std::map< CGNS_ENUMT(ElementType_t), int > CellDimensions
 

Detailed Description

This file defines functions used by vtkCGNSReader and vtkCGNSReaderInternal.

These functions are provided to simplify CGNS file reading through the low level CGIO interface.

Typedef Documentation

◆ char_33

typedef char CGNSRead::char_33[33]

Definition at line 102 of file vtkCGNSReaderInternal.h.

Function Documentation

◆ readNodeData()

template<typename T >
int CGNSRead::readNodeData ( int  cgioNum,
double  nodeId,
std::vector< T > &  data 
)
inline

Read data of the specified type from the given node.

Definition at line 26 of file cgio_helpers.h.

◆ readNodeDataAs()

template<typename T >
int CGNSRead::readNodeDataAs ( int  cgioNum,
double  nodeId,
std::vector< T > &  data 
)
inline

Definition at line 65 of file cgio_helpers.h.

◆ readNodeData< char >()

template<>
int CGNSRead::readNodeData< char > ( int  cgioNum,
double  nodeId,
std::vector< char > &  data 
)

◆ readNodeStringData()

int CGNSRead::readNodeStringData ( int  cgioNum,
double  nodeId,
std::string &  data 
)

Read string data from the given node.

◆ getNodeChildrenId()

int CGNSRead::getNodeChildrenId ( int  cgioNum,
double  fatherId,
std::vector< double > &  childrenIds 
)

Read IDs of all children for the node with the given ID.

◆ readBaseIds()

int CGNSRead::readBaseIds ( int  cgioNum,
double  rootId,
std::vector< double > &  baseIds 
)

Search for bases under the node with the given ID and read their IDs.

◆ readBaseCoreInfo()

int CGNSRead::readBaseCoreInfo ( int  cgioNum,
double  baseId,
CGNSRead::BaseInformation baseInfo 
)

Read name, cell and physical dimensions for the given CGNSBase_t node.

◆ readBaseIteration()

int CGNSRead::readBaseIteration ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo 
)

Read timesteps information in the given BaseIterativeData_t node.

◆ readZoneIterInfo()

int CGNSRead::readZoneIterInfo ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo 
)

Read which type of pointers are used for temporal data in the given ZoneIterativeData_t node.

◆ readSolInfo()

int CGNSRead::readSolInfo ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo 
)

Read data arrays information in the given FlowSolution_t node.

◆ readBaseFamily()

int CGNSRead::readBaseFamily ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo,
const std::string &  parentPath = "" 
)

Read base family information in the given Family_t node.

◆ readBaseReferenceState()

int CGNSRead::readBaseReferenceState ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo 
)

Read reference state information in the given ReferenceState_t node.

◆ readZoneInfo() [1/2]

int CGNSRead::readZoneInfo ( int  cgioNum,
double  nodeId,
CGNSRead::BaseInformation baseInfo 
)

Read general data array information in the given Zone_t node.

◆ readZoneInfo() [2/2]

int CGNSRead::readZoneInfo ( int  cgioNum,
double  zoneId,
CGNSRead::ZoneInformation zoneInfo 
)

Read family name and boundary conditions information in the given Zone_t node.

◆ releaseIds()

void CGNSRead::releaseIds ( int  cgioNum,
const std::vector< double > &  ids 
)

Release all IDs in the vector.

◆ ReadBase()

bool CGNSRead::ReadBase ( vtkCGNSReader reader,
const BaseInformation baseInfo 
)

Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).

◆ ReadGridForZone()

bool CGNSRead::ReadGridForZone ( vtkCGNSReader reader,
const BaseInformation baseInfo,
const ZoneInformation zoneInfo 
)

Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).

◆ ReadPatchesForBase()

bool CGNSRead::ReadPatchesForBase ( vtkCGNSReader reader,
const BaseInformation  
)

Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).

◆ ReadSurfacesForBase()

bool CGNSRead::ReadSurfacesForBase ( vtkCGNSReader reader,
const BaseInformation  
)

Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).

◆ ReadPatch()

bool CGNSRead::ReadPatch ( vtkCGNSReader reader,
const BaseInformation ,
const ZoneInformation zoneInfo,
const std::string &  patchFamilyname 
)

Helpers to encapsulate all logic to read various nodes (zones, bc patches etc.).

◆ compareName()

bool CGNSRead::compareName ( const char_33  nameOne,
const char_33  nameTwo 
)
inline

Definition at line 372 of file vtkCGNSReaderInternal.h.

◆ removeTrailingWhiteSpaces()

void CGNSRead::removeTrailingWhiteSpaces ( char_33  name)
inline

Definition at line 379 of file vtkCGNSReaderInternal.h.

◆ getVectorFromName()

std::vector< CGNSVector >::iterator CGNSRead::getVectorFromName ( std::vector< CGNSVector > &  vectorList,
const char_33  name 
)
inline

Definition at line 393 of file vtkCGNSReaderInternal.h.

◆ isACGNSVariable()

bool CGNSRead::isACGNSVariable ( const std::vector< CGNSVariable > &  varList,
const char_33  name 
)
inline

Definition at line 408 of file vtkCGNSReaderInternal.h.

◆ fillVectorsFromVars()

void CGNSRead::fillVectorsFromVars ( std::vector< CGNSRead::CGNSVariable > &  vars,
std::vector< CGNSRead::CGNSVector > &  vectors,
int  physicalDim 
)

◆ setUpRind()

int CGNSRead::setUpRind ( int  cgioNum,
double  rindId,
int *  rind 
)

◆ getFirstNodeId()

int CGNSRead::getFirstNodeId ( int  cgioNum,
double  parentId,
const char *  label,
double *  id,
const char *  name = nullptr 
)

Find the first node with the given label.

If name is non-NULL, then the first node with given label that has the given name as well.

◆ get_section_connectivity()

int CGNSRead::get_section_connectivity ( int  cgioNum,
double  cgioSectionId,
int  dim,
const cgsize_t *  srcStart,
const cgsize_t *  srcEnd,
const cgsize_t *  srcStride,
const cgsize_t *  memStart,
const cgsize_t *  memEnd,
const cgsize_t *  memStride,
const cgsize_t *  memDim,
vtkIdType localElements 
)

◆ get_section_start_offset()

int CGNSRead::get_section_start_offset ( int  cgioNum,
double  cgioSectionId,
int  dim,
const cgsize_t *  srcStart,
const cgsize_t *  srcEnd,
const cgsize_t *  srcStride,
const cgsize_t *  memStart,
const cgsize_t *  memEnd,
const cgsize_t *  memStride,
const cgsize_t *  memDim,
vtkIdType localElementsIdx 
)

◆ get_section_parent_elements()

int CGNSRead::get_section_parent_elements ( int  cgioNum,
double  cgioSectionId,
int  dim,
const cgsize_t *  srcStart,
const cgsize_t *  srcEnd,
const cgsize_t *  srcStride,
const cgsize_t *  memStart,
const cgsize_t *  memEnd,
const cgsize_t *  memStride,
const cgsize_t *  memDim,
vtkIdType localElementsIdx 
)

◆ GetVTKElemType()

int CGNSRead::GetVTKElemType ( CGNS_ENUMT(ElementType_t)  elemType,
bool &  higherOrderWarning,
bool &  cgnsOrderFlag 
)

◆ CGNS2VTKorder()

void CGNSRead::CGNS2VTKorder ( vtkIdType  size,
const int *  cells_types,
vtkIdType elements 
)

◆ ReorderMonoCellPointsCGNS2VTK()

void CGNSRead::ReorderMonoCellPointsCGNS2VTK ( vtkIdType  size,
int  cell_type,
vtkIdType  numPointsPerCell,
vtkIdType elements 
)

◆ get_XYZ_mesh()

template<typename T , typename Y >
int CGNSRead::get_XYZ_mesh ( int  cgioNum,
const std::vector< double > &  gridChildId,
const std::size_t &  nCoordsArray,
int  cellDim,
vtkIdType  nPts,
const cgsize_t *  srcStart,
const cgsize_t *  srcEnd,
const cgsize_t *  srcStride,
const cgsize_t *  memStart,
const cgsize_t *  memEnd,
const cgsize_t *  memStride,
const cgsize_t *  memDims,
vtkPoints points 
)

Definition at line 458 of file vtkCGNSReaderInternal.h.

Variable Documentation

◆ CellDimensions

const std::map<CGNS_ENUMT(ElementType_t), int> CGNSRead::CellDimensions
Initial value:
= {
{ CGNS_ENUMV(ElementTypeUserDefined), -1 }, { CGNS_ENUMV(ElementTypeNull), -1 },
{ CGNS_ENUMV(NODE), 0 }, { CGNS_ENUMV(BAR_2), 1 }, { CGNS_ENUMV(BAR_3), 1 },
{ CGNS_ENUMV(TRI_3), 2 }, { CGNS_ENUMV(TRI_6), 2 }, { CGNS_ENUMV(QUAD_4), 2 },
{ CGNS_ENUMV(QUAD_8), 2 }, { CGNS_ENUMV(QUAD_9), 2 }, { CGNS_ENUMV(TETRA_4), 3 },
{ CGNS_ENUMV(TETRA_10), 3 }, { CGNS_ENUMV(PYRA_5), 3 }, { CGNS_ENUMV(PYRA_14), 3 },
{ CGNS_ENUMV(PENTA_6), 3 }, { CGNS_ENUMV(PENTA_15), 3 }, { CGNS_ENUMV(PENTA_18), 3 },
{ CGNS_ENUMV(HEXA_8), 3 }, { CGNS_ENUMV(HEXA_20), 3 }, { CGNS_ENUMV(HEXA_27), 3 },
{ CGNS_ENUMV(MIXED), -1 }, { CGNS_ENUMV(PYRA_13), 3 }, { CGNS_ENUMV(NGON_n), 2 },
{ CGNS_ENUMV(NFACE_n), 3 }, { CGNS_ENUMV(BAR_4), 1 }, { CGNS_ENUMV(TRI_9), 2 },
{ CGNS_ENUMV(TRI_10), 2 }, { CGNS_ENUMV(QUAD_12), 2 }, { CGNS_ENUMV(QUAD_16), 2 },
{ CGNS_ENUMV(TETRA_16), 3 }, { CGNS_ENUMV(TETRA_20), 3 }, { CGNS_ENUMV(PYRA_21), 3 },
{ CGNS_ENUMV(PYRA_29), 3 }, { CGNS_ENUMV(PYRA_30), 3 }, { CGNS_ENUMV(PENTA_24), 3 },
{ CGNS_ENUMV(PENTA_38), 3 }, { CGNS_ENUMV(PENTA_40), 3 }, { CGNS_ENUMV(HEXA_32), 3 },
{ CGNS_ENUMV(HEXA_56), 3 }, { CGNS_ENUMV(HEXA_64), 3 }, { CGNS_ENUMV(BAR_5), 1 },
{ CGNS_ENUMV(TRI_12), 2 }, { CGNS_ENUMV(TRI_15), 2 }, { CGNS_ENUMV(QUAD_P4_16), 2 },
{ CGNS_ENUMV(QUAD_25), 2 }, { CGNS_ENUMV(TETRA_22), 3 }, { CGNS_ENUMV(TETRA_34), 3 },
{ CGNS_ENUMV(TETRA_35), 3 }, { CGNS_ENUMV(PYRA_P4_29), 3 }, { CGNS_ENUMV(PYRA_50), 3 },
{ CGNS_ENUMV(PYRA_55), 3 }, { CGNS_ENUMV(PENTA_33), 3 }, { CGNS_ENUMV(PENTA_66), 3 },
{ CGNS_ENUMV(PENTA_75), 3 }, { CGNS_ENUMV(HEXA_44), 3 }, { CGNS_ENUMV(HEXA_98), 3 },
{ CGNS_ENUMV(HEXA_125), 3 }
}
#define NODE

Definition at line 106 of file vtkCGNSReaderInternal.h.