Skip to main content

Post-processing tools 2023 R2

dvs_mesh_chunk_interface.h

Last update: 17.04.2023
Go to the documentation of this file.
1 /**************************************************************
2 *
3 * (C) 2022 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
4 *
5 * Restricted Rights Legend
6 *
7 * Use, duplication, or disclosure of this
8 * software and its documentation by the
9 * Government is subject to restrictions as
10 * set forth in subdivision [(b)(3)(ii)] of
11 * the Rights in Technical Data and Computer
12 * Software clause at 52.227-7013.
13 *
14 **************************************************************
15 */
16 
24 #ifndef ___DVS_MESH_CHUNK_INTERFACE_H___
25 #define ___DVS_MESH_CHUNK_INTERFACE_H___
26 
29 
31 #include "dvs_object_interface.h"
32 #include "dvs_var_interface.h"
33 #include "dvs_hash_interface.h"
34 #include "dvs_var_hash_interface.h"
35 
36 namespace DVS
37 {
38 
48 class IMeshChunk : public DVS::IHash, public DVS::IVarHash
49 {
50 public:
51 
52  IMeshChunk() = default;
53  virtual ~IMeshChunk() = default;
54  IMeshChunk(IMeshChunk&&) = default;
56  IMeshChunk(const IMeshChunk&) = default;
57  IMeshChunk& operator=(const IMeshChunk&) = default;
58 
63  enum MeshType
64  {
65  UNKNOWN = 0,
69  };
70 
75  enum Axis
76  {
77  X = 0,
78  Y = 1,
79  Z = 2,
80  };
81 
87  virtual MeshType get_type() const = 0;
88 
94  virtual const DVS::IObject* get_object() const = 0;
95 
101  virtual float get_time() const = 0;
102 
108  virtual uint32_t get_rank() const = 0;
109 
115  virtual uint32_t get_chunk() const = 0;
116 
131  virtual dvs_ret get_coords_size(uint32_t& component_size) = 0;
132 
155  virtual dvs_ret get_coords(float* x_coords, float* y_coords, float* z_coords) = 0;
156 
175  virtual dvs_ret get_coords_interleaved(float* coords) = 0;
176 
192  virtual dvs_ret get_coords_curv_size(uint32_t& component_size) = 0;
193 
224  virtual dvs_ret get_coords_curv(float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3],
225  float* x_coords, float* y_coords, float* z_coords) = 0;
226 
254  virtual dvs_ret get_coords_curv_interleaved(float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3],
255  float* coords) = 0;
256 
274  virtual dvs_ret get_coords_parallele_size(uint32_t& i_vals_size, uint32_t& j_vals_size, uint32_t& k_vals_size) = 0;
275 
311  virtual dvs_ret get_coords_parallele(float origin[3],
312  float dir_vec_i[3], float dir_vec_j[3], float dir_vec_k[3],
313  float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3],
314  float* i_vals, float* j_vals, float* k_vals) = 0;
315 
328  virtual dvs_ret get_num_variables(uint32_t& num_vars) const = 0;
329 
339  virtual const DVS::IVar* get_variable(uint32_t index) const = 0;
340 
362  virtual dvs_ret get_variable_data(uint32_t index, uint32_t* num_values, float* array) = 0;
363 
383  virtual dvs_ret get_variable_data(const IVar* var, uint32_t* num_values, float* array) = 0;
384 
398  virtual dvs_ret get_num_element_blocks(uint32_t& num_elem_blocks) const = 0;
399 
410  virtual dvs_ret get_element_block_types(dvs_element_type* element_types) const = 0;
411 
422  virtual DVS::IElementBlock* get_element_block(uint32_t index) = 0;
423 
438 };
439 
440 } //namespace DVS
441 
442 #endif //___DVS_MESH_CHUNK_INTERFACE_H___
Element Block Interface for DVS Reader API.
Interface to get hash information from DVS objects.
Mesh Chunk Interface for DVS Reader API.
virtual ~IMeshChunk()=default
default
IMeshChunk & operator=(IMeshChunk &&)=default
default
virtual dvs_ret get_coords_size(uint32_t &component_size)=0
Get the size of each coordinate component for unstructured meshes.
IMeshChunk & operator=(const IMeshChunk &)=default
default
virtual float get_time() const =0
Get the time for this mesh chunk.
Axis
The AXIS or IJK component to request.
@ X
The X axis (or i component for structured parts)
@ Z
The Z axis (or k component for structured parts)
@ Y
The X axis (or j component for structured parts)
virtual dvs_ret get_coords_interleaved(float *coords)=0
Get the coords for a unstructured meshes interleaved in a single array.
virtual dvs_ret get_element_block_types(dvs_element_type *element_types) const =0
Get an array of the element block types for this mesh chunk.
virtual DVS::IElementBlock * get_element_block_by_type(dvs_element_type type)=0
Get the element block by element type.
virtual dvs_ret get_coords_curv_interleaved(float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *coords)=0
Get the coords for structured curvilinear meshes interleaved in a single array.
virtual DVS::IElementBlock * get_element_block(uint32_t index)=0
Get the element block by index.
virtual dvs_ret get_num_element_blocks(uint32_t &num_elem_blocks) const =0
Get the number of element blocks for this mesh chunk.
virtual uint32_t get_chunk() const =0
Get the chunk for this mesh chunk.
virtual uint32_t get_rank() const =0
Get the rank for the mesh chunk.
IMeshChunk()=default
default
virtual dvs_ret get_coords_curv_size(uint32_t &component_size)=0
Get the size of each coordinate component for structured curvilinear meshes.
virtual dvs_ret get_coords(float *x_coords, float *y_coords, float *z_coords)=0
Get the coordinates for an unstructured mesh.
IMeshChunk(IMeshChunk &&)=default
default
virtual dvs_ret get_num_variables(uint32_t &num_vars) const =0
Get the number of nodal variables this mesh chunk has data for.
MeshType
The different mesh types allowed.
@ PARALLELEPIPED
Parallelepiped structured mesh data.
@ UNKNOWN
Unknown, a problem occurred.
@ CURVILINEAR
Curvilinear structured mesh data.
@ UNSTRUCTURED
Unstructured mesh data.
virtual dvs_ret get_coords_curv(float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *x_coords, float *y_coords, float *z_coords)=0
Get coordinate data for a structured curvilinear mesh.
IMeshChunk(const IMeshChunk &)=default
support copying
virtual dvs_ret get_coords_parallele(float origin[3], float dir_vec_i[3], float dir_vec_j[3], float dir_vec_k[3], float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *i_vals, float *j_vals, float *k_vals)=0
Get the ijk mesh information for structured parallelepiped mesh chunks.
virtual MeshType get_type() const =0
Get the type of mesh chunk.
virtual dvs_ret get_variable_data(uint32_t index, uint32_t *num_values, float *array)=0
Get the variable data by index.
virtual dvs_ret get_coords_parallele_size(uint32_t &i_vals_size, uint32_t &j_vals_size, uint32_t &k_vals_size)=0
Get the size of each ijk component for structured parallelpiped meshes.
virtual dvs_ret get_variable_data(const IVar *var, uint32_t *num_values, float *array)=0
Get the variable data by variable.
virtual const DVS::IObject * get_object() const =0
Get the object definiton this mesh chunk is associated with.
virtual const DVS::IVar * get_variable(uint32_t index) const =0
Get the variable definition associates with the nodal variable for this index.
Interface for part/plot objects for DVS Reader API.
Interface to get variable hash information from DVS objects.
Interface for variables for the DVS Reader API.
DVS Reader API Element Block Interface.
DVS Reader API Hash Interface.
DVS Reader API Object Interface.
DVS Reader API Variable Hash Interface.
DVS Reader API Variable Interface.
Contains enums used in C/C++ API.
dvs_element_type
List of macro generated enums.
Contains errors used in the DVS C/C++ API.
int32_t dvs_ret
Return value of methods, TODO.