IOSS 2.0
Loading...
Searching...
No Matches
CatalystExodusMesh.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_H
8#define __CATALYST_EXODUS_MESH_H
9
10#include "vtkNew.h"
11#include "vtkPartitionedDataSetCollection.h"
12#include <map>
13#include <vector>
16
17class vtkUnstructuredGrid;
18class vtkVariant;
19class vtkPoints;
20
21namespace Iovs_exodus {
22
24 {
25
27
28 public:
30
32
33 void PerformCoProcessing(std::vector<int> &error_and_warning_codes,
34 std::vector<std::string> &error_and_warning_messages);
35
36 void SetTimeData(double currentTime, int timeStep);
37
39
41
42 void Delete();
43
44 void CreateGlobalVariable(const std::string &variable_name, int num_comps, const double *data);
45
46 void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int *data);
47
48 void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int64_t *data);
49
50 void InitializeGlobalPoints(int num_points, int dimension, const double *data);
51
52 void InitializeElementBlocks(const ElementBlockIdNameList &elemBlockNameIdList);
53
54 void CreateElementBlock(const char *elem_block_name, int elem_block_id,
55 const std::string &elem_type, int nodes_per_elem, int num_elem,
56 const int64_t *global_elem_ids, int *connectivity);
57
58 void CreateElementBlock(const char *elem_block_name, int elem_block_id,
59 const std::string &elem_type, int nodes_per_elem, int num_elem,
60 const int64_t *global_elem_ids, int64_t *connectivity);
61
62 void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id,
63 const double *data);
64
65 void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id,
66 const int *data);
67
68 void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id,
69 const int64_t *data);
70
71 void CreateNodalVariable(const std::string &variable_name, int num_comps, const double *data);
72
73 void CreateNodalVariable(const std::string &variable_name, int num_comps, const int *data);
74
75 void CreateNodalVariable(const std::string &variable_name, int num_comps, const int64_t *data);
76
77 // Description:
78 // If true (the default), vector variables will contain a
79 // trailing underscore in their name. The default behavior
80 // is consistent with the ParaView Exodus II file reader.
82 void SetUnderscoreVectors(bool status);
83
84 // Description:
85 // If true (the default), displacements will be applied to the
86 // mesh nodes before being sent to the in-situ pipeline. The node
87 // displacement variable is called either DISPL or displ. The
88 // default behavior is consistent with the ParaView Exodus II
89 // file reader.
91 void SetApplyDisplacements(bool status);
92
93 vtkPartitionedDataSetCollection *getPartitionedDataSetCollection();
94
95 private:
96 std::map<int, std::map<int, int>> ebmap;
97 std::map<int, std::map<int, int>> ebmap_reverse;
98 std::map<int, std::map<int, int>> global_elem_id_map;
100 std::map<int, unsigned int> ebidmap;
101 double GetArrayValue(vtkVariant &v, const void *data, int index);
103 vtkPoints *global_points;
107
108 void CreateElementBlockInternal(const char *elem_block_name, int elem_block_id,
109 const std::string &elem_type, int nodes_per_elem, int num_elem,
110 vtkVariant &v, const int64_t *global_elem_ids,
111 void *connectivity);
112
113 void CreateGlobalVariableVariant(const std::string &variable_name, int num_comps, vtkVariant &v,
114 const void *data);
115 void CreateGlobalVariableInternal(const std::string &variable_name, int num_comps,
116 vtkUnstructuredGrid *ug, vtkVariant &v, const void *data);
117
118 void CreateNodalVariableVariant(const std::string &variable_name, int num_comps, vtkVariant &v,
119 const void *data);
120 void CreateNodalVariableInternal(const std::string &variable_name, int num_comps,
121 vtkUnstructuredGrid *ug, int element_block_id,
122 std::map<int, std::map<int, int>> &point_map, vtkVariant &v,
123 const void *data);
124
125 void CreateElementVariableVariant(const std::string &variable_name, int num_comps,
126 int elem_block_id, vtkVariant &v, const void *data);
127 void CreateElementVariableInternal(const std::string &variable_name, int num_comps,
128 vtkUnstructuredGrid *ug, vtkVariant &v, const void *data);
129
130 void ReleaseMemoryInternal(vtkUnstructuredGrid *ug);
131
135
136 vtkNew<vtkPartitionedDataSetCollection> vpdc;
141 const std::string ASSEMBLY_LABEL = "label";
142 const std::string ASSEMBLY_ROOT_NAME = "IOSS";
143 const std::string ASSEMBLY_ELEMENT_BLOCKS = "element_blocks";
146 vtkUnstructuredGrid *getUnstructuredGrid(int blockId);
147 };
148
149} // namespace Iovs_exodus
150
151#endif // __CATALYST_EXODUS_MESH_H
Definition CatalystManager.h:27
Definition CatalystExodusMeshBase.h:22
std::vector< std::pair< int, std::string > > ElementBlockIdNameList
Definition CatalystExodusMeshBase.h:80
Definition CatalystExodusMesh.h:24
void CreateGlobalVariableVariant(const std::string &variable_name, int num_comps, vtkVariant &v, const void *data)
Iovs::CatalystManager * catManager
Definition CatalystExodusMesh.h:137
CatalystExodusMesh & operator=(const CatalystExodusMesh &)=delete
void CreateNodalVariableInternal(const std::string &variable_name, int num_comps, vtkUnstructuredGrid *ug, int element_block_id, std::map< int, std::map< int, int > > &point_map, vtkVariant &v, const void *data)
std::vector< int > global_point_id_to_global_elem_id
Definition CatalystExodusMesh.h:99
vtkPoints * global_points
Definition CatalystExodusMesh.h:103
CatalystExodusMesh(Iovs::CatalystManager *cm, CatalystPipelineInfo &catalystPipelineInfo)
void CreateGlobalVariable(const std::string &variable_name, int num_comps, const double *data)
void InitializeElementBlocks(const ElementBlockIdNameList &elemBlockNameIdList)
void CreateNodalVariableVariant(const std::string &variable_name, int num_comps, vtkVariant &v, const void *data)
const std::string ASSEMBLY_ROOT_NAME
Definition CatalystExodusMesh.h:142
void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const int *data)
void PerformCoProcessing(std::vector< int > &error_and_warning_codes, std::vector< std::string > &error_and_warning_messages)
void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int *data)
std::map< int, std::map< int, int > > ebmap_reverse
Definition CatalystExodusMesh.h:97
CatalystPipelineInfo catalystPipelineInfo
Definition CatalystExodusMesh.h:140
double GetArrayValue(vtkVariant &v, const void *data, int index)
vtkUnstructuredGrid * getUnstructuredGrid(int blockId)
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)
void SetTimeData(double currentTime, int timeStep)
bool ApplyDisplacements
Definition CatalystExodusMesh.h:139
bool UnderscoreVectors
Definition CatalystExodusMesh.h:138
void CreateElementBlockInternal(const char *elem_block_name, int elem_block_id, const std::string &elem_type, int nodes_per_elem, int num_elem, vtkVariant &v, const int64_t *global_elem_ids, void *connectivity)
void SetUnderscoreVectors(bool status)
CatalystExodusMesh(const CatalystExodusMesh &)=delete
bool writeCatalystMesh
Definition CatalystExodusMesh.h:105
int num_global_points
Definition CatalystExodusMesh.h:104
void CreateGlobalVariableInternal(const std::string &variable_name, int num_comps, vtkUnstructuredGrid *ug, vtkVariant &v, const void *data)
void CreateNodalVariable(const std::string &variable_name, int num_comps, const int64_t *data)
void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const int64_t *data)
const std::string ASSEMBLY_LABEL
Definition CatalystExodusMesh.h:141
void InitializeGlobalPoints(int num_points, int dimension, const double *data)
void CreateElementVariable(const std::string &variable_name, int num_comps, int elem_block_id, const double *data)
std::map< int, std::map< int, int > > ebmap
Definition CatalystExodusMesh.h:96
const int PDS_UNSTRUCTURED_GRID_INDEX
Definition CatalystExodusMesh.h:144
void CreateElementVariableInternal(const std::string &variable_name, int num_comps, vtkUnstructuredGrid *ug, vtkVariant &v, const void *data)
std::map< int, std::map< int, int > > global_elem_id_map
Definition CatalystExodusMesh.h:98
const std::string ASSEMBLY_ELEMENT_BLOCKS
Definition CatalystExodusMesh.h:143
void CreateElementVariableVariant(const std::string &variable_name, int num_comps, int elem_block_id, vtkVariant &v, const void *data)
void CreateNodalVariable(const std::string &variable_name, int num_comps, const double *data)
std::string catalystMeshFilePrefix
Definition CatalystExodusMesh.h:106
vtkPartitionedDataSetCollection * getPartitionedDataSetCollection()
vtkNew< vtkPartitionedDataSetCollection > vpdc
Definition CatalystExodusMesh.h:136
void ReleaseMemoryInternal(vtkUnstructuredGrid *ug)
void CreateNodalVariable(const std::string &variable_name, int num_comps, const int *data)
std::map< int, unsigned int > ebidmap
Definition CatalystExodusMesh.h:100
void CreateGlobalVariable(const std::string &variable_name, int num_comps, const int64_t *data)
void SetApplyDisplacements(bool status)
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)
A namespace for the visualization database format.
Definition CatalystExodusMesh.h:21
Definition CatalystManager.h:53