IOSS 2.0
Loading...
Searching...
No Matches
Iovs_cgns_DatabaseIO.h
Go to the documentation of this file.
1// Copyright(C) 1999-2021, 2023 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 Iovs_cgns_DatabaseIO_h
8#define Iovs_cgns_DatabaseIO_h
9
10#include "Ioss_DatabaseIO.h"
12
13namespace Iovs_cgns {
14
16 {
17 public:
18 DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage,
19 Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props);
20
21 ~DatabaseIO() override;
22
23 std::string get_format() const override { return "Embedded CGNS Visualization"; }
24
25 unsigned entity_field_support() const override { return Ioss::REGION; }
26
27 int int_byte_size_db() const override { return int_byte_size_api(); }
28 void write_meta_data();
29
30 private:
31 bool begin_nl(Ioss::State state) override;
32 bool end_nl(Ioss::State state) override;
33
34 bool begin_state_nl(int state, double time) override;
35 bool end_state_nl(int state, double time) override;
36
37 void read_meta_data_nl() override;
38
39 int64_t get_field_internal(const Ioss::Region * /*reg*/, const Ioss::Field & /*field*/,
40 void * /*data*/, size_t /*data_size*/) const override
41 {
42 return 0;
43 }
44 int64_t get_field_internal(const Ioss::NodeBlock * /*nb*/, const Ioss::Field & /*field*/,
45 void * /*data*/, size_t /*data_size*/) const override
46 {
47 return 0;
48 }
49 int64_t get_field_internal(const Ioss::EdgeBlock * /*eb*/, const Ioss::Field & /*field*/,
50 void * /*data*/, size_t /*data_size*/) const override
51 {
52 return 0;
53 }
54 int64_t get_field_internal(const Ioss::FaceBlock * /*fb*/, const Ioss::Field & /*field*/,
55 void * /*data*/, size_t /*data_size*/) const override
56 {
57 return 0;
58 }
59 int64_t get_field_internal(const Ioss::ElementBlock * /*eb*/, const Ioss::Field & /*field*/,
60 void * /*data*/, size_t /*data_size*/) const override
61 {
62 return 0;
63 }
64 int64_t get_field_internal(const Ioss::SideBlock * /*sb*/, const Ioss::Field & /*field*/,
65 void * /*data*/, size_t /*data_size*/) const override
66 {
67 return 0;
68 }
69 int64_t get_field_internal(const Ioss::NodeSet * /*ns*/, const Ioss::Field & /*field*/,
70 void * /*data*/, size_t /*data_size*/) const override
71 {
72 return 0;
73 }
74 int64_t get_field_internal(const Ioss::EdgeSet * /*es*/, const Ioss::Field & /*field*/,
75 void * /*data*/, size_t /*data_size*/) const override
76 {
77 return 0;
78 }
79 int64_t get_field_internal(const Ioss::FaceSet * /*fs*/, const Ioss::Field & /*field*/,
80 void * /*data*/, size_t /*data_size*/) const override
81 {
82 return 0;
83 }
84 int64_t get_field_internal(const Ioss::ElementSet * /*es*/, const Ioss::Field & /*field*/,
85 void * /*data*/, size_t /*data_size*/) const override
86 {
87 return 0;
88 }
89 int64_t get_field_internal(const Ioss::SideSet * /*ss*/, const Ioss::Field & /*field*/,
90 void * /*data*/, size_t /*data_size*/) const override
91 {
92 return 0;
93 }
94 int64_t get_field_internal(const Ioss::CommSet * /*cs*/, const Ioss::Field & /*field*/,
95 void * /*data*/, size_t /*data_size*/) const override
96 {
97 return 0;
98 }
99 int64_t get_field_internal(const Ioss::StructuredBlock * /*sb*/, const Ioss::Field & /*field*/,
100 void * /*data*/, size_t /*data_size*/) const override
101 {
102 return 0;
103 }
104 int64_t get_field_internal(const Ioss::Assembly * /*as*/, const Ioss::Field & /*field*/,
105 void * /*data*/, size_t /*data_size*/) const override
106 {
107 return 0;
108 }
109 int64_t get_field_internal(const Ioss::Blob * /*bl*/, const Ioss::Field & /*field*/,
110 void * /*data*/, size_t /*data_size*/) const override
111 {
112 return 0;
113 }
114
115 int64_t put_field_internal(const Ioss::Region * /*reg*/, const Ioss::Field & /*field*/,
116 void * /*data*/, size_t /*data_size*/) const override
117 {
118 return 0;
119 }
120 int64_t put_field_internal(const Ioss::NodeBlock * /*nb*/, const Ioss::Field & /*field*/,
121 void * /*data*/, size_t /*data_size*/) const override
122 {
123 return 0;
124 }
125 int64_t put_field_internal(const Ioss::EdgeBlock * /*eb*/, const Ioss::Field & /*field*/,
126 void * /*data*/, size_t /*data_size*/) const override
127 {
128 return 0;
129 }
130 int64_t put_field_internal(const Ioss::FaceBlock * /*fb*/, const Ioss::Field & /*field*/,
131 void * /*data*/, size_t /*data_size*/) const override
132 {
133 return 0;
134 }
135 int64_t put_field_internal(const Ioss::ElementBlock * /*eb*/, const Ioss::Field & /*field*/,
136 void * /*data*/, size_t /*data_size*/) const override
137 {
138 return 0;
139 }
140 int64_t put_field_internal(const Ioss::SideBlock * /*sb*/, const Ioss::Field & /*field*/,
141 void * /*data*/, size_t /*data_size*/) const override
142 {
143 return 0;
144 }
145 int64_t put_field_internal(const Ioss::NodeSet * /*ns*/, const Ioss::Field & /*field*/,
146 void * /*data*/, size_t /*data_size*/) const override
147 {
148 return 0;
149 }
150 int64_t put_field_internal(const Ioss::EdgeSet * /*es*/, const Ioss::Field & /*field*/,
151 void * /*data*/, size_t /*data_size*/) const override
152 {
153 return 0;
154 }
155 int64_t put_field_internal(const Ioss::FaceSet * /*fs*/, const Ioss::Field & /*field*/,
156 void * /*data*/, size_t /*data_size*/) const override
157 {
158 return 0;
159 }
160 int64_t put_field_internal(const Ioss::ElementSet * /*es*/, const Ioss::Field & /*field*/,
161 void * /*data*/, size_t /*data_size*/) const override
162 {
163 return 0;
164 }
165 int64_t put_field_internal(const Ioss::SideSet * /*ss*/, const Ioss::Field & /*field*/,
166 void * /*data*/, size_t /*data_size*/) const override
167 {
168 return 0;
169 }
170 int64_t put_field_internal(const Ioss::CommSet * /*cs*/, const Ioss::Field & /*field*/,
171 void * /*data*/, size_t /*data_size*/) const override
172 {
173 return 0;
174 }
175 int64_t put_field_internal(const Ioss::StructuredBlock *sb, const Ioss::Field &field,
176 void *data, size_t data_size) const override;
177 int64_t put_field_internal(const Ioss::Assembly * /*as*/, const Ioss::Field & /*field*/,
178 void * /*data*/, size_t /*data_size*/) const override
179 {
180 return 0;
181 }
182 int64_t put_field_internal(const Ioss::Blob * /*bl*/, const Ioss::Field & /*field*/,
183 void * /*data*/, size_t /*data_size*/) const override
184 {
185 return 0;
186 }
187
188 std::unique_ptr<CatalystCGNSMeshBase> catCGNSMesh;
191 const Ioss::StructuredBlock *sb) const;
192 void createIdOutput();
193 void outputId(const std::string idName, std::vector<int64_t> &ids, bool isCellField,
194 const Ioss::StructuredBlock *sb);
195 };
196} // namespace Iovs_cgns
197
198#endif
int Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:64
A homogeneous collection of other GroupingEntities.
Definition Ioss_Assembly.h:31
A homogeneous collection of other GroupingEntities.
Definition Ioss_Blob.h:31
Definition Ioss_CommSet.h:27
An input or output Database.
Definition Ioss_DatabaseIO.h:63
IOSS_NODISCARD int int_byte_size_api() const
Returns 4 or 8.
Definition Ioss_DatabaseIO.C:384
DatabaseIO()=delete
A collection of element edges with the same topology.
Definition Ioss_EdgeBlock.h:29
A collection of element edges.
Definition Ioss_EdgeSet.h:30
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
A collection of elements.
Definition Ioss_ElementSet.h:30
A collection of element faces with the same topology.
Definition Ioss_FaceBlock.h:29
A collection of element faces.
Definition Ioss_FaceSet.h:30
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
A collection of all nodes in the region.
Definition Ioss_NodeBlock.h:33
A collection of nodes.
Definition Ioss_NodeSet.h:29
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
A collection of element sides having the same topology.
Definition Ioss_SideBlock.h:37
A collection of element sides.
Definition Ioss_SideSet.h:29
A structured zone – i,j,k.
Definition Ioss_StructuredBlock.h:91
Definition Iovs_cgns_DatabaseIO.h:16
int64_t get_field_internal(const Ioss::ElementBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:59
int64_t get_field_internal(const Ioss::FaceBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:54
int64_t get_field_internal(const Ioss::ElementSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:84
void write_meta_data()
Definition Iovs_cgns_DatabaseIO.C:81
int64_t get_field_internal(const Ioss::Assembly *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:104
int64_t get_field_internal(const Ioss::NodeBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:44
int64_t put_field_internal(const Ioss::SideBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:140
int64_t get_field_internal(const Ioss::EdgeBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:49
int64_t get_field_internal(const Ioss::SideBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:64
int64_t put_field_internal(const Ioss::ElementSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:160
void outputId(const std::string idName, std::vector< int64_t > &ids, bool isCellField, const Ioss::StructuredBlock *sb)
Definition Iovs_cgns_DatabaseIO.C:114
int64_t put_field_internal(const Ioss::NodeBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:120
bool begin_state_nl(int state, double time) override
Definition Iovs_cgns_DatabaseIO.C:55
int64_t put_field_internal(const Ioss::SideSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:165
bool end_nl(Ioss::State state) override
Definition Iovs_cgns_DatabaseIO.C:43
unsigned entity_field_support() const override
Definition Iovs_cgns_DatabaseIO.h:25
bool begin_nl(Ioss::State state) override
Definition Iovs_cgns_DatabaseIO.C:41
std::string get_format() const override
Definition Iovs_cgns_DatabaseIO.h:23
bool isIdOutputCreated
Definition Iovs_cgns_DatabaseIO.h:189
int64_t put_field_internal(const Ioss::Region *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:115
int64_t get_field_internal(const Ioss::Region *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:39
int64_t get_field_internal(const Ioss::EdgeSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:74
~DatabaseIO() override
Definition Iovs_cgns_DatabaseIO.C:39
std::unique_ptr< CatalystCGNSMeshBase > catCGNSMesh
Definition Iovs_cgns_DatabaseIO.h:188
int64_t put_field_internal(const Ioss::ElementBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:135
int64_t put_field_internal(const Ioss::Blob *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:182
void initZoneDataFromStructuredBlock(CatalystCGNSMeshBase::ZoneData &zoneData, const Ioss::StructuredBlock *sb) const
Definition Iovs_cgns_DatabaseIO.C:129
int64_t put_field_internal(const Ioss::EdgeBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:125
int64_t put_field_internal(const Ioss::EdgeSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:150
bool end_state_nl(int state, double time) override
Definition Iovs_cgns_DatabaseIO.C:66
int64_t get_field_internal(const Ioss::CommSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:94
int64_t get_field_internal(const Ioss::Blob *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:109
void read_meta_data_nl() override
Definition Iovs_cgns_DatabaseIO.C:79
int64_t put_field_internal(const Ioss::Assembly *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:177
int64_t put_field_internal(const Ioss::FaceSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:155
int64_t get_field_internal(const Ioss::SideSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:89
int64_t get_field_internal(const Ioss::StructuredBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:99
int int_byte_size_db() const override
Definition Iovs_cgns_DatabaseIO.h:27
void createIdOutput()
Definition Iovs_cgns_DatabaseIO.C:91
int64_t get_field_internal(const Ioss::FaceSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:79
int64_t put_field_internal(const Ioss::FaceBlock *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:130
int64_t put_field_internal(const Ioss::CommSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:170
int64_t put_field_internal(const Ioss::NodeSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:145
int64_t get_field_internal(const Ioss::NodeSet *, const Ioss::Field &, void *, size_t) const override
Definition Iovs_cgns_DatabaseIO.h:69
State
Access states for a database.
Definition Ioss_State.h:15
DatabaseUsage
Specifies how an Ioss::DatabaseIO object will be used.
Definition Ioss_DBUsage.h:13
@ REGION
Definition Ioss_EntityType.h:25
Definition CatalystCGNSMesh.h:19
Definition CatalystCGNSMeshBase.h:54