25 #ifndef _ROCIN_BLOCK_H_
26 #define _ROCIN_BLOCK_H_
36 const std::string& units,
int nc, int32
i,
int nitems,
60 * std::
max(int32(1), (size[1] - 1))
61 * std::
max(int32(1), (size[0] - 1))),
63 {
m_name[3] += (size[1] > 1 ? (size[0] > 1 ? 3 : 2) : 1);
83 inline Block_HDF4(
const std::string& file,
const std::string& geomFile,
84 int32 indices[],
int paneId,
const std::string&
time,
85 const std::string& units,
int numNodes,
int ghostNodes)
109 struct VarInfo_CGNS {
111 VarInfo_CGNS(
const std::string &name,
char pos,
COM_Type dType,
112 const std::string& units,
int nc,
int i,
int nitems,
113 int ng,
bool is_null)
114 : m_name(name), m_position(pos), m_dataType(dType), m_units(units),
115 m_indices(nc, i), m_nitems(nitems), m_ng(ng), m_is_null(nc,is_null)
122 std::vector<int> m_indices;
125 std::vector<bool> m_is_null;
131 struct GridInfo_CGNS {
133 inline GridInfo_CGNS(
int* size,
int cellDim,
int ng)
134 : m_name(
":st0:"), m_numElements(size[cellDim]),
135 m_numGhostElements(ng)
136 { m_name[3] += cellDim; m_size[0] = size[0]; m_size[1] = m_size[2] = 1;
137 if (cellDim > 1) { m_size[1] = size[1]; m_numElements *= size[cellDim+1];
138 if (cellDim > 2) { m_size[2] = size[2]; m_numElements *= size[5]; }
142 inline GridInfo_CGNS(std::string name,
int ne,
int ng)
143 : m_name(name), m_numElements(ne), m_numGhostElements(ng)
144 { m_size[0] = 0; m_size[1] = 0; m_size[2] = 0; }
149 int m_numGhostElements;
159 inline Block_CGNS(
const std::string& file,
int B,
int Z,
int G,
int paneId,
160 const std::string&
time,
const std::string& units,
161 int numNodes,
int ghostNodes)
162 : m_file(file), m_B(B), m_Z(Z), m_G(G), m_W(0), m_P(0), m_C(0), m_E(0),
163 m_N(0), m_paneId(paneId), time_level(time), m_units(units),
164 m_numNodes(numNodes), m_numGhostNodes(ghostNodes)
177 std::string time_level;
181 std::vector<GridInfo_CGNS> m_gridInfo;
182 std::vector<VarInfo_CGNS> m_variables;
184 typedef std::multimap<std::string, Block_CGNS*> BlockMM_CGNS;
int m_numGhostElements
Number of ghost elements in a mesh.
int m_numGhostNodes
Number of ghost nodes in a mesh.
Struct containing necessary information on a mesh of a pane.
int COM_Type
Indices for derived data types.
std::vector< int32 > m_indices
HDF4 dataset indices for each component.
Block_HDF4(const std::string &file, const std::string &geomFile, int32 indices[], int paneId, const std::string &time, const std::string &units, int numNodes, int ghostNodes)
Constructor for fast initialization.
int m_ng
Number of ghost items.
int m_numNodes
Number of nodes in the mesh.
std::vector< bool > m_is_null
Whether or not a component in NULL.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
GridInfo_HDF4(std::string name, int ne, int ng, int32 i)
Constructor for quick initialization. Use for unstructured grids.
int32 m_indices[3]
HDF4 dataset indices of the nodal coordinates.
Struct containing necessary information for a pane.
std::string m_geomFile
External geometry file (may be empty).
char m_position
Location, 'w', 'p', 'n', or 'e'.
std::vector< GridInfo_HDF4 > m_gridInfo
Dimensions or conn table(s)
GridInfo_HDF4(int32 *size, int ng)
Constructor for quick initialization. Use for structured grids.
std::string m_file
Data file.
std::string m_name
Name of variable.
COM_Type m_dataType
Roccom datatype.
std::string m_units
Units of measurement.
Struct containing necessary information about an attribute in a window.
VarInfo_HDF4(const std::string &name, char pos, COM_Type dType, const std::string &units, int nc, int32 i, int nitems, int ng, bool is_null)
Constructor for quick initialization.
std::string m_units
The mesh's units of measurement.
int m_nitems
Total number of items.
int m_numElements
Number of elements in a mesh.
std::string m_name
Grid name ":st?:*", ":t3:*", ":B8:*", etc.
std::multimap< std::string, Block_HDF4 * > BlockMM_HDF4
unsigned long time()
Get the value of a system timer with a millisecond precision.
int32 m_size[3]
Grid dimensions (structured only).
std::vector< VarInfo_HDF4 > m_variables
Info on each variable.
int32 m_index
HDF4 dataset index of conn table (unstr only).
std::string time_level
The dataset's time stamp.