20VTK_ABI_NAMESPACE_BEGIN
 
   26inline int readNodeData(
int cgioNum, 
double nodeId, std::vector<T>& data)
 
   32  constexpr const char* dtName = CGNSRead::detail::cgns_type_name<T>();
 
   34  if (cgio_get_dimensions(cgioNum, nodeId, &ndim, dimVals) != CG_OK)
 
   36    cgio_error_exit(
"cgio_get_dimensions");
 
   41  for (n = 0; n < ndim; n++)
 
   52  if (cgio_read_all_data_type(cgioNum, nodeId, dtName, data.data()) != CG_OK)
 
   68  char dtype[CGIO_MAX_DATATYPE_LENGTH + 1];
 
   69  if (cgio_get_data_type(cgioNum, nodeId, dtype) != CG_OK)
 
   71    cgio_error_exit(
"cgio_get_data_type");
 
   75  if (strcmp(dtype, 
"I4") == 0)
 
   77    std::vector<vtkTypeInt32> i32vector;
 
   78    readNodeData<vtkTypeInt32>(cgioNum, nodeId, i32vector);
 
   79    data.resize(i32vector.size());
 
   80    std::copy(i32vector.begin(), i32vector.end(), data.begin());
 
   82  else if (strcmp(dtype, 
"I8") == 0)
 
   84    std::vector<vtkTypeInt64> i64vector;
 
   85    readNodeData<vtkTypeInt64>(cgioNum, nodeId, i64vector);
 
   86    data.resize(i64vector.size());
 
   87    std::copy(i64vector.begin(), i64vector.end(), data.begin());
 
   89  else if (strcmp(dtype, 
"R4") == 0)
 
   91    std::vector<float> fvector;
 
   92    readNodeData<float>(cgioNum, nodeId, fvector);
 
   93    data.resize(fvector.size());
 
   94    std::copy(fvector.begin(), fvector.end(), data.begin());
 
   96  else if (strcmp(dtype, 
"R8") == 0)
 
   98    std::vector<double> dvector;
 
   99    readNodeData<double>(cgioNum, nodeId, dvector);
 
  100    data.resize(dvector.size());
 
  101    std::copy(dvector.begin(), dvector.end(), data.begin());
 
  131int readBaseIds(
int cgioNum, 
double rootId, std::vector<double>& baseIds);
 
  157  const std::string& parentPath = 
"");
 
This file defines functions used by vtkCGNSReader and vtkCGNSReaderInternal.
 
int readBaseReferenceState(int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
Read reference state information in the given ReferenceState_t node.
 
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 readBaseCoreInfo(int cgioNum, double baseId, CGNSRead::BaseInformation &baseInfo)
Read name, cell and physical dimensions for the given CGNSBase_t node.
 
int readNodeDataAs(int cgioNum, double nodeId, std::vector< T > &data)
 
int readBaseFamily(int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo, const std::string &parentPath="")
Read base family information in the given Family_t node.
 
void releaseIds(int cgioNum, const std::vector< double > &ids)
Release all IDs in the vector.
 
int readSolInfo(int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
Read data arrays information in the given FlowSolution_t node.
 
int readNodeData< char >(int cgioNum, double nodeId, std::vector< char > &data)
 
int readNodeData(int cgioNum, double nodeId, std::vector< T > &data)
Read data of the specified type from the given node.
 
int readBaseIteration(int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
Read timesteps information in the given BaseIterativeData_t node.
 
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 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 readZoneInfo(int cgioNum, double nodeId, CGNSRead::BaseInformation &baseInfo)
Read general data array information in the given Zone_t node.