IOSS 2.0
Loading...
Searching...
No Matches
CatalystExodusMeshBase.h
Go to the documentation of this file.
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_EXODUS_MESH_BASE_H
8#define __CATALYST_EXODUS_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
19namespace Iovs_exodus {
20
21 class IOVS_EXPORT CatalystExodusMeshBase
22 {
23
24 public:
27
28 // Description:
29 // Calls the ParaView Catalyst pipeline to run co-processing
30 // for this time iteration.
31 virtual void PerformCoProcessing(std::vector<int> &error_and_warning_codes,
32 std::vector<std::string> &error_and_warning_messages) = 0;
33
34 // Description:
35 // Sets time data for this ParaView Catalyst co-processing iteration.
36 // currentTime is the current Ioss simulation time and timeStep is
37 // the current time iteration count.
38 virtual void SetTimeData(double currentTime, int timeStep) = 0;
39
40 // Description:
41 // Collects memory usage information from all processors and
42 // writes the min, max, and mean to the log file. Also writes the
43 // min, max, and mean of the elapsed time since this method was
44 // last called.
46
47 // Description:
48 // Clears memory buffers used in mesh construction and field data
49 // for the current time-step. Clears the global vtkPoints.
50 virtual void ReleaseMemory() = 0;
51
52 virtual void Delete() = 0;
53
54 // Description:
55 // Creates a global variable
56 // Creates the global variable on all element blocks.
57 virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps,
58 const double *data) = 0;
59
60 // Description:
61 // Creates a global variable
62 // Creates the global variable on all element blocks.
63 virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps,
64 const int *data) = 0;
65
66 // Description:
67 // Creates a global variable
68 // Creates the global variable on all element blocks.
69 virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps,
70 const int64_t *data) = 0;
71
72 // Description:
73 // Initializes the global array of points
74 // defined by num_points, dimension (2,3), and data. Clears any existing data.
75 virtual void InitializeGlobalPoints(int num_points, int dimension, const double *data) = 0;
76
77 // Description:
78 // Initializes the element blocks to NULL data sets with ids and names in elemBlkIdNameList.
79 // This method must be called first.
80 using ElementBlockIdNameList = std::vector<std::pair<int, std::string>>;
81 virtual void InitializeElementBlocks(const ElementBlockIdNameList &elemBlkIdNameList) = 0;
82
83 // Description:
84 // Creates a vtkUnstructuredGrid
85 // that represents and element block in the Exodus II data. The global_points
86 // array contains all of the points in the Exodus II file.
87 virtual void CreateElementBlock(const char *elem_block_name, int elem_block_id,
88 const std::string &elem_type, int nodes_per_elem, int num_elem,
89 const int64_t *global_elem_ids, int *connectivity) = 0;
90
91 // Description:
92 // Creates a vtkUnstructuredGrid
93 // that represents and element block in the Exodus II data. The global_points
94 // array contains all of the points in the Exodus II file.
95 virtual void CreateElementBlock(const char *elem_block_name, int elem_block_id,
96 const std::string &elem_type, int nodes_per_elem, int num_elem,
97 const int64_t *global_elem_ids, int64_t *connectivity) = 0;
98
99 // Description:
100 // Creates an element variable
101 virtual void CreateElementVariable(const std::string &variable_name, int num_comps,
102 int elem_block_id, const double *data) = 0;
103
104 // Description:
105 // Creates an element variable
106 virtual void CreateElementVariable(const std::string &variable_name, int num_comps,
107 int elem_block_id, const int *data) = 0;
108
109 // Description:
110 // Creates an element variable
111 virtual void CreateElementVariable(const std::string &variable_name, int num_comps,
112 int elem_block_id, const int64_t *data) = 0;
113
114 // Description:
115 // Creates a nodal variable
116 virtual void CreateNodalVariable(const std::string &variable_name, int num_comps,
117 const double *data) = 0;
118
119 // Description:
120 // Creates a nodal variable
121 virtual void CreateNodalVariable(const std::string &variable_name, int num_comps,
122 const int *data) = 0;
123
124 // Description:
125 // Creates a nodal variable
126 virtual void CreateNodalVariable(const std::string &variable_name, int num_comps,
127 const int64_t *data) = 0;
128 };
129
130} // namespace Iovs_exodus
131
132#endif // __CATALYST_EXODUS_MESH_BASE_H
Definition CatalystExodusMeshBase.h:22
virtual void InitializeElementBlocks(const ElementBlockIdNameList &elemBlkIdNameList)=0
std::vector< std::pair< int, std::string > > ElementBlockIdNameList
Definition CatalystExodusMeshBase.h:80
virtual void logMemoryUsageAndTakeTimerReading()=0
virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int64_t *data)=0
virtual void CreateElementBlock(const char *elem_block_name, int elem_block_id, const std::string &elem_type, int nodes_per_elem, int num_elem, const int64_t *global_elem_ids, int64_t *connectivity)=0
virtual void CreateNodalVariable(const std::string &variable_name, int num_comps, const double *data)=0
virtual ~CatalystExodusMeshBase()
Definition CatalystExodusMeshBase.h:26
virtual void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const double *data)=0
virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int *data)=0
virtual void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const int *data)=0
virtual void CreateElementBlock(const char *elem_block_name, int elem_block_id, const std::string &elem_type, int nodes_per_elem, int num_elem, const int64_t *global_elem_ids, int *connectivity)=0
virtual void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const int64_t *data)=0
virtual void CreateGlobalVariable(const std::string &variable_name, int num_comps, const double *data)=0
virtual void CreateNodalVariable(const std::string &variable_name, int num_comps, const int64_t *data)=0
virtual void PerformCoProcessing(std::vector< int > &error_and_warning_codes, std::vector< std::string > &error_and_warning_messages)=0
virtual void CreateNodalVariable(const std::string &variable_name, int num_comps, const int *data)=0
CatalystExodusMeshBase()
Definition CatalystExodusMeshBase.h:25
virtual void SetTimeData(double currentTime, int timeStep)=0
virtual void InitializeGlobalPoints(int num_points, int dimension, const double *data)=0
A namespace for the visualization database format.
Definition CatalystExodusMesh.h:21