Debian Codegraph @

packages/seacas/libraries/ioss/src/visualization/cgns/CatalystCGNSMeshBase.h

raw
1 // Copyright(C) 1999-2021 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #ifndef __CATALYST_CGNS_MESH_BASE_H
8 #define __CATALYST_CGNS_MESH_BASE_H
9
10 #ifndef __CATALYST_PLUGIN_BUILD
11 #include "iovs_export.h"
12 #else
13 #define IOVS_EXPORT
14 #endif
15
16 #include <string>
17 #include <vector>
18
19 namespace Iovs_cgns {
20
21 class IOVS_EXPORT CatalystCGNSMeshBase
22 {
23
24 public:
25 CatalystCGNSMeshBase() {};
26 virtual ~CatalystCGNSMeshBase() {};
27
28 // Description:
29 // Calls the ParaView Catalyst pipeline to run co-processing for this time iteration.
30 virtual void PerformCoProcessing(std::vector<int> &error_and_warning_codes,
31 std::vector<std::string> &error_and_warning_messages) = 0;
32
33 // Description:
34 // Sets time data for this ParaView Catalyst co-processing iteration.
35 // currentTime is the current Ioss simulation time and timeStep is
36 // the current time iteration count.
37 virtual void SetTimeData(double currentTime, int timeStep) = 0;
38
39 // Description:
40 // Clears all nodal and element variables
41 // Clears the global vtkPoints.
42 virtual void ReleaseMemory() = 0;
43
44 // Description:
45 // Collects memory usage information from all processors and
46 // writes the min, max, and mean to the log file. Also writes the
47 // min, max, and mean of the elapsed time since this method was
48 // last called.
49 virtual void logMemoryUsageAndTakeTimerReading() = 0;
50
51 virtual void Delete() = 0;
52
53 struct ZoneData
54 {
55 int zone_id;
56 std::string zone_name;
57 std::string data_name;
58 int ni;
59 int nj;
60 int nk;
61 int comp_count;
62 bool is_cell_field;
63 enum { T_DOUBLE, T_INT, T_INT64 } data_type;
64 union {
65 int *p_int;
66 int64_t *p_int64;
67 double *p_double;
68 } data;
69 int size;
70 };
71
72 virtual void AddStructuredZoneData(const ZoneData &zoneData) = 0;
73 };
74
75 } // namespace Iovs_cgns
76
77 #endif // __CATALYST_CGNS_MESH_BASE_H