IOSS 2.0

Ioss_DatabaseIO.h
Go to the documentation of this file.
1 // Copyright(C) 1999-2017 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 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following
14 // disclaimer in the documentation and/or other materials provided
15 // with the distribution.
16 //
17 // * Neither the name of NTESS nor the names of its
18 // contributors may be used to endorse or promote products derived
19 // from this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33 #ifndef IOSS_Ioss_DatabaseIO_h
34 #define IOSS_Ioss_DatabaseIO_h
35
36 #include <Ioss_BoundingBox.h>
37 #include <Ioss_CodeTypes.h>
38 #include <Ioss_DBUsage.h> // for DatabaseUsage, etc
39 #include <Ioss_DataSize.h> // for DataSize
40 #include <Ioss_EntityType.h> // for EntityType
41 #include <Ioss_Map.h>
42 #include <Ioss_ParallelUtils.h> // for ParallelUtils
43 #include <Ioss_PropertyManager.h> // for PropertyManager
44 #include <Ioss_State.h> // for State, State::STATE_INVALID
45 #include <Ioss_SurfaceSplit.h> // for SurfaceSplitType
46 #include <chrono>
47 #include <cstddef> // for size_t, nullptr
48 #include <cstdint> // for int64_t
49 #include <map> // for map
50 #include <string> // for string
51 #include <utility> // for pair
52 #include <vector> // for vector
53
54 namespace Ioss {
55 class CommSet;
56 class EdgeBlock;
57 class EdgeSet;
58 class ElementBlock;
59 class ElementSet;
60 class ElementTopology;
61 class FaceBlock;
62 class FaceSet;
63 class Field;
64 class GroupingEntity;
65 class NodeBlock;
66 class NodeSet;
67 class Region;
68 class SideBlock;
69 class SideSet;
70 class StructuredBlock;
71 } // namespace Ioss
72
73 namespace Ioss {
74 class EntityBlock;
75
76 // Contains (parent_element, side) topology pairs
77 using TopoContainer = std::vector<std::pair<const ElementTopology *, const ElementTopology *>>;
78
79 /** \brief An input or output Database.
80 *
81 */
82 class DatabaseIO
83 {
84 public:
85 friend class SerializeIO;
86
87 /** \brief Check to see if database state is OK.
88 *
89 * \param[in] write_message If true, then output a warning message indicating the problem.
90 * \param[in,out] error_message If non-null on input, then a warning message on output.
91 * \param[in,out] bad_count If non-null on input, then count of the number of processors
92 * where the file does not exist on output. If ok returns false, but
93 * *bad_count==0,
94 * then the routine does not support this argument.
95 * \returns True if database state is OK. False if not.
96 */
97 bool ok(bool write_message = false, std::string *error_message = nullptr,
98 int *bad_count = nullptr) const
99 {
100 IOSS_FUNC_ENTER(m_);
101 return ok__(write_message, error_message, bad_count);
102 }
103
104 // Check capabilities of input/output database... Returns an
105 // unsigned int with the supported Ioss::EntityTypes or'ed
106 // together. If "return_value & Ioss::EntityType" is set, then the
107 // database supports that type (e.g. return_value & Ioss::FACESET)
108 virtual unsigned entity_field_support() const = 0;
109
110 bool using_parallel_io() const { return usingParallelIO; }
111
112 /** \brief Get the local (process-specific) node number corresponding to a global node number.
113 *
114 * \param[in] global The global node number
115 * \param[in] must_exist If true, error will occur if the global node number is not
116 * mapped to any local node number on the current process.
117 * \returns The local node number
118 */
119 int64_t node_global_to_local(int64_t global, bool must_exist) const
120 {
121 IOSS_FUNC_ENTER(m_);
122 return node_global_to_local__(global, must_exist);
123 }
124
125 int64_t element_global_to_local(int64_t global) const
126 {
127 IOSS_FUNC_ENTER(m_);
128 return element_global_to_local__(global);
129 }
130
131 /** If there is a single block of nodes in the model, then it is
132 * considered a node_major() database. If instead the nodes are
133 * local to each element block or structured block, then it is
134 * not a node_major database. Exodus is node major, CGNS is not.
135 */
136 virtual bool node_major() const { return true; }
137
138 virtual ~DatabaseIO();
139
140 // Eliminate as much memory as possible, but still retain meta data information
141 // Typically, eliminate the maps...
142 void release_memory()
143 {
144 IOSS_FUNC_ENTER(m_);
145 release_memory__();
146 }
147
148 // Do anything that might be needed to the database prior to it
149 // being closed and destructed.
150 virtual void finalize_database() {}
151
152 // Let's save the name on disk after Filename gets modified, e.g: decoded_filename
153 void set_pfsname(const std::string &name) const { pfsName = name; }
154
155 std::string get_pfsname() const { return pfsName; }
156
157 /** \brief this will be the name in BB namespace
158 */
159 void set_dwname(const std::string &name) const { bbName = name; }
160
161 std::string get_dwname() const
162 {
163 if (!bbName.empty() && !is_input() && using_dw()) {
164 return bbName;
165 }
166 else {
167 return get_filename();
168 }
169 }
170
171 /** \brief We call this ONLY after we assure that using_dw() is TRUE
172 * \ returns mount point of Datawarp namespace, e.g: `/opt/cray/....<jobid>`
173 */
174 std::string get_dwPath() const { return dwPath; }
175
176 /** Determine whether Cray Datawarp module is loaded and we have BB capacity allocated for this
177 * job ( i.e: DW_JOB_STRIPED is set) && IOSS property to use DATAWARP is set to Y/YES (i.e
178 * environmental variable ENABLE_DATAWARP) . If we are using DW then set some pathnames for
179 * writing directly to BB instead of PFS(i.e Lustre)
180 */
181 void check_setDW() const;
182
183 /** Set if Cray Datawarp exists and allocated space is found , i.e PATH to DW name space
184 */
185 bool using_dw() const { return usingDataWarp; }
186
187 /** \brief Get the file name associated with the database.
188 *
189 * \returns The database file name.
190 */
191 std::string get_filename() const { return DBFilename; }
192
193 /** For the database types that support it, return an integer `handle`
194 * through which a client can directly access the underlying file.
195 * Please use sparingly and with discretion. Basically, a kluge
196 */
197 virtual int get_file_pointer() const { return 0; }
198
199 /** \brief Get a file-per-processor filename associated with the database.
200 *
201 * \ returns The file-per-processor name for a file on this processor.
202 */
203 const std::string &decoded_filename() const;
204
205 /** Return a string specifying underlying format of database (exodus, cgns, ...) */
206 virtual const std::string get_format() const = 0;
207
208 /** \brief Determine whether the database is an input database.
209 *
210 * \returns True if the database is an input database. False otherwise.
211 */
212 bool is_input() const { return isInput; }
213
214 /** \brief Get the Ioss::DatabaseUsage type of the database.
215 *
216 * \returns The Ioss::DatabaseUsage type of the database.
217 */
218 Ioss::DatabaseUsage usage() const { return dbUsage; }
219
220 /** \brief Determine whether the database needs information about process ownership of nodes.
221 *
222 * \returns True if database needs information about process ownership of nodes.
223 */
224 virtual bool needs_shared_node_information() const { return false; }
225
226 Ioss::IfDatabaseExistsBehavior open_create_behavior() const;
227
228 //! This function is used to create the path to an output directory (or history, restart, etc.)
229 // if it does not exist. Called by all processors. Will throw exception if path does not
230 // specify a valid directory or if the path cannot be created.
231 void create_path(const std::string &filename) const;
232
233 void set_region(Region *region) { region_ = region; }
234
235 /** \brief If we are planning to use BB(aka Burst Buffer) service, we will call
236 * simple C API provided by Cray DataWarp module.
237 *
238 * Note: We would only like to use BB during write to avoid cache coherency issues during
239 * read. `dwPath` is the DW namespace which gets set during runtime from environment variable
240 * DW_JOB_STRIPED. Afterword, `using_dw()` function is used extensively for filename redirection
241 * for all related subsequent functions(e.g: get_filename, get_file_ptr etc) once burst buffer
242 * is found and set to be used.
243 */
244 void openDW(const std::string &filename) const;
245
246 /** \brief Function which invokes stageout from BB to Disk, prior to completion of final close
247 */
248 void closeDW() const;
249
250 void openDatabase() const
251 {
252 IOSS_FUNC_ENTER(m_);
253 openDatabase__();
254 }
255
256 void closeDatabase() const
257 {
258 IOSS_FUNC_ENTER(m_);
259 closeDatabase__();
260 }
261
262 void flush_database() const
263 {
264 IOSS_FUNC_ENTER(m_);
265 flush_database__();
266 }
267
268 /** \brief If a database type supports groups and if the database
269 * contains groups, open the specified group.
270 *
271 * If the group_name begins with '/', it specifies the absolute path
272 * name from the root with '/' separating groups. Otherwise, the
273 * group_name specifies a child group of the currently active group.
274 * If group_name == "/" then the root group is opened.
275 *
276 * \param[in] group_name The name of the group to open.
277 * \returns True if successful.
278 */
279 bool open_group(const std::string &group_name)
280 {
281 IOSS_FUNC_ENTER(m_);
282 return open_group__(group_name);
283 }
284
285 /** \brief If a database type supports groups, create the specified
286 * group as a child of the current group.
287 *
288 * The name of the group must not contain a '/' character.
289 * If the command is successful, then the group will be the
290 * active group for all subsequent writes to the database.
291 *
292 * \param[in] group_name The name of the subgroup to create.
293 * \returns True if successful.
294 */
295 bool create_subgroup(const std::string &group_name)
296 {
297 IOSS_FUNC_ENTER(m_);
298 return create_subgroup__(group_name);
299 }
300
301 /** \brief Set the database to the given State.
302 *
303 * All transitions must begin from the 'STATE_CLOSED' state or be to
304 * the 'STATE_CLOSED' state (There are no nested begin/end pairs at
305 * this time.)
306 *
307 * The database state is automatically set when Region::begin_mode is called
308 * for its associated region, so it may not be necessary to call this method
309 * directly.
310 *
311 * \param[in] state The new State to which the database should be set.
312 * \returns True if successful.
313 *
314 */
315 bool begin(Ioss::State state)
316 {
317 IOSS_FUNC_ENTER(m_);
318 return begin__(state);
319 }
320
321 /** \brief Return the database to STATE_CLOSED.
322 *
323 * The database is automatically set to STATE_CLOSED when Region::end_mode
324 * is called for its associated region, so it may not be necessary to call this
325 * method directly.
326 *
327 * \param[in] state The State to end, i.e. the current state.
328 * \returns True if successful.
329 *
330 */
331 bool end(Ioss::State state)
332 {
333 IOSS_FUNC_ENTER(m_);
334 return end__(state);
335 }
336
337 bool begin_state(int state, double time);
338 bool end_state(int state, double time);
339
340 // Metadata-related functions.
341 void read_meta_data()
342 {
343 IOSS_FUNC_ENTER(m_);
344 return read_meta_data__();
345 }
346
347 void get_step_times()
348 {
349 IOSS_FUNC_ENTER(m_);
350 return get_step_times__();
351 }
352
353 virtual bool internal_edges_available() const { return false; }
354 virtual bool internal_faces_available() const { return false; }
355
356 // Information Records:
357
358 /** \brief Get all information records (informative strings) for the database.
359 *
360 * \returns The informative strings.
361 */
362 const std::vector<std::string> &get_information_records() const { return informationRecords; }
363 void add_information_records(const std::vector<std::string> &info);
364 void add_information_record(const std::string &info);
365
366 // QA Records:
367
368 /** \brief Get all QA records, each of which consists of 4 strings, from the database
369 *
370 * The 4 strings that make up a database QA record are:
371 *
372 * 1. A descriptive code name, such as the application that modified the database.
373 *
374 * 2. A descriptive string, such as the version of the application that modified the database.
375 *
376 * 3. A relevant date, such as the date the database was modified.
377 *
378 * 4. A relevant time, such as the time the database was modified.
379 *
380 * \returns All QA records in a single vector. Every 4 consecutive elements of the
381 * vector make up a single QA record.
382 */
383 const std::vector<std::string> &get_qa_records() const { return qaRecords; }
384 void add_qa_record(const std::string &code, const std::string &code_qa, const std::string &date,
385 const std::string &time);
386
387 bool get_logging() const { return doLogging && !singleProcOnly; }
388 void set_logging(bool on_off) { doLogging = on_off; }
389
390 // The get_field and put_field functions are just a wrapper around the
391 // pure virtual get_field_internal and put_field_internal functions,
392 // but this lets me add some debug/checking/common code to the
393 // functions without having to do it in the calling code or in the
394 // derived classes code. This also fulfills the heuristic that a
395 // public interface should not contain pure virtual functions.
396 template <typename T>
397 int64_t get_field(const T *reg, const Field &field, void *data, size_t data_size) const
398 {
399 IOSS_FUNC_ENTER(m_);
400 verify_and_log(reg, field, 1);
401 int64_t retval = get_field_internal(reg, field, data, data_size);
402 verify_and_log(nullptr, field, 1);
403 return retval;
404 }
405
406 template <typename T>
407 int64_t put_field(const T *reg, const Field &field, void *data, size_t data_size) const
408 {
409 IOSS_FUNC_ENTER(m_);
410 verify_and_log(reg, field, 0);
411 int64_t retval = put_field_internal(reg, field, data, data_size);
412 verify_and_log(nullptr, field, 0);
413 return retval;
414 }
415
416 /** Determine whether application will make field data get/put calls parallel consistently.
417 *
418 * True is default and required for parallel-io databases.
419 * Even if false, metadata operations must be called by all processors.
420 *
421 * \returns True if application will make field data get/put calls parallel consistently.
422 *
423 */
424 bool is_parallel_consistent() const { return isParallelConsistent; }
425 void set_parallel_consistency(bool on_off) { isParallelConsistent = on_off; }
426
427 bool get_use_generic_canonical_name() const { return useGenericCanonicalName; }
428 void set_use_generic_canonical_name(bool yes_no) { useGenericCanonicalName = yes_no; }
429
430 bool ignore_database_names() const { return ignoreDatabaseNames; }
431 void ignore_database_names(bool yes_no) { ignoreDatabaseNames = yes_no; }
432
433 /** \brief Get the length of the longest name in the database file.
434 *
435 * \returns The length, or 0 for unlimited.
436 */
437 virtual int maximum_symbol_length() const { return 0; } // Default is unlimited...
438 virtual void set_maximum_symbol_length(int /* requested_symbol_size */) {
439 } // Default does nothing...
440
441 char get_field_separator() const { return fieldSeparator; }
442 bool get_field_recognition() const { return enableFieldRecognition; }
443 void set_field_separator(char separator);
444 void set_field_recognition(bool yes_no) { enableFieldRecognition = yes_no; }
445
446 void set_lower_case_variable_names(bool true_false) const
447 {
448 lowerCaseVariableNames = true_false;
449 }
450
451 /* \brief Set the method used to split sidesets into homogeneous blocks.
452 *
453 * \param[in] split_type The desired method.
454 *
455 */
456 void set_surface_split_type(Ioss::SurfaceSplitType split_type) { splitType = split_type; }
457 Ioss::SurfaceSplitType get_surface_split_type() const { return splitType; }
458
459 void set_block_omissions(const std::vector<std::string> &omissions,
460 const std::vector<std::string> &inclusions = {});
461
462 void get_block_adjacencies(const Ioss::ElementBlock *eb,
463 std::vector<std::string> &block_adjacency) const
464 {
465 return get_block_adjacencies__(eb, block_adjacency);
466 }
467 void compute_block_membership(Ioss::SideBlock * efblock,
468 std::vector<std::string> &block_membership) const
469 {
470 return compute_block_membership__(efblock, block_membership);
471 }
472
473 AxisAlignedBoundingBox get_bounding_box(const Ioss::ElementBlock *eb) const;
474 AxisAlignedBoundingBox get_bounding_box(const Ioss::StructuredBlock *sb) const;
475
476 virtual int int_byte_size_db() const = 0; //! Returns 4 or 8
477 int int_byte_size_api() const; //! Returns 4 or 8
478 virtual void set_int_byte_size_api(Ioss::DataSize size) const;
479
480 /*!
481 * The owning region of this database.
482 */
483 Region *get_region() const { return region_; }
484
485 /*!
486 * The overlay_count specifies the number of restart outputs
487 * which will be overlaid on top of the currently written
488 * step before advancing to the next step on the restart
489 * database.
490 *
491 * For example, if restarts are being output every 0.1
492 * seconds and the overlay count is specified as 2, then
493 * restart will write time 0.1 to step 1 of the database.
494 * It will then write 0.2 and 0.3 also to step 1. It will
495 * then increment the database step and write 0.4 to step 2;
496 * overlay 0.5 and 0.6 on step 2... At the end of the
497 * analysis, assuming it runs to completion, the database
498 * would have times 0.3, 0.6, 0.9, ... However, if there
499 * were a problem during the analysis, the last step on the
500 * database would contain an intermediate step.
501 *
502 * The cycle_count specifies the number of restart steps
503 * which will be written to the restart database before
504 * previously written steps are overwritten.
505 *
506 * For example, if the cycle count is 5 and restart is written every 0.1
507 * seconds, the restart system will write data at times 0.1, 0.2, 0.3,
508 * 0.4, 0.5 to the database.
509 *
510 * It will then overwrite the first step with data from time 0.6, the
511 * second with time 0.7. At time 0.8, the database would contain data at
512 * times 0.6, 0.7, 0.8, 0.4, 0.5. Note that time will not necessarily be
513 * monotonically increasing on a database that specifies the cycle
514 * count.
515 *
516 * The cycle count and overlay count can both be used at the same time
517 * also. The basic formula is:
518 *
519 * db_step = (((output_step - 1) / overlay) % cycle) + 1
520 *
521 * where "output_step" is the step that this would have been on the
522 * database in a normal write (1,2,3,....) and "db_step" is the step
523 * number that this will be written to.
524 *
525 * If you only want the last step available on the database,
526 * use set_cycle_count(1)
527 */
528 void set_cycle_count(int count) const { cycleCount = count; }
529 int get_cycle_count() const { return cycleCount; }
530 void set_overlay_count(int count) const { overlayCount = count; }
531 int get_overlay_count() const { return overlayCount; }
532 void set_file_per_state(bool yes_no) const { filePerState = yes_no; }
533 bool get_file_per_state() const { return filePerState; }
534
535 void set_time_scale_factor(double factor) { timeScaleFactor = factor; }
536
537 const Ioss::ParallelUtils & util() const { return util_; }
538 const Ioss::PropertyManager &get_property_manager() const { return properties; }
539 /** \brief Get the processor that this mesh database is on.
540 *
541 * \returns The processor that this mesh database is on.
542 */
543 int parallel_rank() const { return myProcessor; }
544 int parallel_size() const { return util().parallel_size(); }
545 bool is_parallel() const { return isParallel; }
546
547 void progress(const std::string &output) const
548 {
549 if (m_enableTracing) {
550 util().progress(output);
551 }
552 }
553
554 protected:
555 DatabaseIO(Region *region, std::string filename, Ioss::DatabaseUsage db_usage,
556 MPI_Comm communicator, const Ioss::PropertyManager &props);
557
558 /*!
559 * The properties member data contains properties that can be
560 * used to set database-specific options. Examples include
561 * compression, name lengths, integer sizes, floating point
562 * sizes. By convention, the property name is all
563 * uppercase. Some existing properties recognized by the Exodus
564 * DatabaseIO class are:
565 *
566 * | Property | Value
567 * |-----------------------|-------------------
568 * | COMPRESSION_LEVEL | In the range [0..9]. A value of 0 indicates no compression
569 * | COMPRESSION_SHUFFLE | (true/false) to enable/disable hdf5's shuffle compression
570 * algorithm.
571 * | FILE_TYPE | netcdf4
572 * | MAXIMUM_NAME_LENGTH | Maximum length of names that will be returned/passed via api call.
573 * | INTEGER_SIZE_DB | 4 or 8 indicating byte size of integers stored on the database.
574 * | INTEGER_SIZE_API | 4 or 8 indicating byte size of integers used in api functions.
575 * | LOGGING | (true/false) to enable/disable logging of field input/output
576 */
577
578 Ioss::PropertyManager properties;
579
580 /*!
581 * Utility function that may be used by derived classes.
582 * Determines whether all elements in the model have the same side
583 * topology. This can be used to speed-up certain algorithms since
584 * they don't have to check each side (or group of sides)
585 * individually.
586 */
587 void set_common_side_topology() const;
588 ElementTopology *commonSideTopology{nullptr};
589
590 template <typename T>
591 void create_groups(const std::string &property_name, EntityType type,
592 const std::string &type_name, const T *set_type);
593 template <typename T>
594 void create_group(EntityType type, const std::string &type_name,
595 const std::vector<std::string> &group_spec, const T *set_type);
596
597 // Create new sets as groups of existing exodus sets...
598 void handle_groups();
599
600 /*!
601 * Filename that this Database is connected with. Derived
602 * DatabaseIO classes may need to change this if the passed in
603 * filename is not the same as the filename actually used E.g.,
604 * the Ioex_DatabaseIO (exodusII) changes if this is a parallel
605 * run since the passed in filename is just the basename, not the
606 * processor-specific filename.
607 */
608 std::string originalDBFilename;
609 std::string DBFilename;
610 mutable std::string decodedFilename;
611
612 /*!
613 * `bbName` is a temporary swizzled name which resides inside Burst Buffer namespace.
614 * This is a private trivial mapped name vs original `DBFilename` (which resides in
615 * permanent storage backed by parallel filesystem.
616 * `dwPath` is global BB mountpoint for current job with requested capacity via SLURM \c \#DW
617 * directive. `usingDataWarp` -- a boolean, for convenience of use so that we don't have to do
618 * getenv() calls to see if BB present.
619 */
620 mutable std::string bbName{};
621 mutable std::string pfsName{};
622 mutable std::string dwPath{};
623
624 mutable Ioss::State dbState{STATE_INVALID};
625
626 int myProcessor{0}; //!< number of processor this database is for
627
628 int64_t nodeCount{0};
629 int64_t elementCount{0};
630
631 /*!
632 * Check the topology of all face/element pairs in the model and
633 * fill the "TopoContainer faceTopology" variable with the
634 * unique pairs. This information is used for the
635 * faceblock/facesets and edgeblock/edgesets. If the
636 * 'topo_dimension' is 2, then face/element pairs are generated; if
637 * 'topo_dimension' is 1, then edge/element pairs are generated.
638 */
639 void check_side_topology() const;
640
641 /// Used to speed up faceblock/edgeblock calculations.
642 TopoContainer sideTopology;
643
644 /*! Typically used for restart output, but can be used for all output...
645 * Maximum number of states on the output file. Overwrite the existing
646 * steps in a cyclic manner once exceed this count. Note that this breaks
647 * the convention that times be monotonically increasing on an exodusII file.
648 * Used by derived classes if they support this capability...
649 */
650 mutable int cycleCount{0};
651
652 mutable int overlayCount{0};
653
654 /*! Scale the time read/written from/to the file by the specified
655 scaleFactor. If the datbase times are 0.1, 0.2, 0.3 and the
656 scaleFactor is 20, then the application will think that the
657 times read are 20, 40, 60.
658
659 If specified for an output database, then the analysis time
660 is divided by the scaleFactor time prior to output.
661 */
662 double timeScaleFactor{1.0};
663
664 Ioss::SurfaceSplitType splitType{SPLIT_BY_TOPOLOGIES};
665 Ioss::DatabaseUsage dbUsage;
666
667 mutable Ioss::DataSize dbIntSizeAPI{USE_INT32_API};
668
669 /*! EXPERIMENTAL If this is true, then each state (timestep)
670 * output will be directed to a separate file. Currently this is
671 * only implemented for the exodus (parallel or serial, single
672 * file or fpp) database type.
673 */
674 mutable bool filePerState{false};
675 mutable bool usingDataWarp{false};
676 bool isParallel{false}; //!< true if running in parallel
677
678 mutable bool lowerCaseVariableNames{true};
679 bool usingParallelIO{false};
680
681 // List of element blocks that should be omitted or included from
682 // this model. Surfaces will take this into account while
683 // splitting; however, node and nodesets will not be filtered
684 // (perhaps this will be done at a later time...) NOTE: All local
685 // element ids and offsets are still calculated assuming that the
686 // blocks exist in the model...
687 // Only one of these can have values and the other must be empty.
688 std::vector<std::string> blockOmissions;
689 std::vector<std::string> blockInclusions;
690
691 std::vector<std::string> informationRecords;
692 std::vector<std::string> qaRecords;
693
694 //---Node Map -- Maps internal (1..NUMNP) ids to global ids used on the
695 // application side. global = nodeMap[local]
696 mutable Ioss::Map nodeMap{"node", DBFilename, myProcessor};
697 mutable Ioss::Map edgeMap{"edge", DBFilename, myProcessor};
698 mutable Ioss::Map faceMap{"face", DBFilename, myProcessor};
699 mutable Ioss::Map elemMap{"element", DBFilename, myProcessor};
700
701 mutable std::vector<std::vector<bool>> blockAdjacency;
702
703 virtual void openDatabase__() const;
704 virtual void closeDatabase__() const;
705 virtual void flush_database__() const {}
706
707 private:
708 virtual bool ok__(bool /* write_message */, std::string * /* error_message */,
709 int *bad_count) const
710 {
711 if (bad_count != nullptr) {
712 *bad_count = 0;
713 }
714 return dbState != Ioss::STATE_INVALID;
715 }
716
717 virtual int64_t node_global_to_local__(int64_t global, bool must_exist) const
718 {
719 return nodeMap.global_to_local(global, must_exist);
720 }
721
722 virtual int64_t element_global_to_local__(int64_t global) const
723 {
724 return elemMap.global_to_local(global);
725 }
726
727 virtual void release_memory__()
728 {
729 nodeMap.release_memory();
730 edgeMap.release_memory();
731 faceMap.release_memory();
732 elemMap.release_memory();
733 }
734
735 virtual bool open_group__(const std::string & /* group_name */) { return false; }
736 virtual bool create_subgroup__(const std::string & /* group_name */) { return false; }
737
738 virtual bool begin__(Ioss::State state) = 0;
739 virtual bool end__(Ioss::State state) = 0;
740
741 virtual void read_meta_data__() = 0;
742 virtual void get_step_times__() {}
743
744 virtual bool begin_state__(int state, double time);
745 virtual bool end_state__(int state, double time);
746
747 void get_block_adjacencies__(const Ioss::ElementBlock *eb,
748 std::vector<std::string> &block_adjacency) const;
749
750 virtual void compute_block_membership__(Ioss::SideBlock * /* efblock */,
751 std::vector<std::string> & /* block_membership */) const
752 {
753 }
754
755 void compute_block_adjacencies() const;
756
757 void verify_and_log(const GroupingEntity *ge, const Field &field, int in_out) const;
758
759 virtual int64_t get_field_internal(const Region *reg, const Field &field, void *data,
760 size_t data_size) const = 0;
761 virtual int64_t get_field_internal(const NodeBlock *nb, const Field &field, void *data,
762 size_t data_size) const = 0;
763 virtual int64_t get_field_internal(const EdgeBlock *nb, const Field &field, void *data,
764 size_t data_size) const = 0;
765 virtual int64_t get_field_internal(const FaceBlock *nb, const Field &field, void *data,
766 size_t data_size) const = 0;
767 virtual int64_t get_field_internal(const ElementBlock *eb, const Field &field, void *data,
768 size_t data_size) const = 0;
769 virtual int64_t get_field_internal(const SideBlock *fb, const Field &field, void *data,
770 size_t data_size) const = 0;
771 virtual int64_t get_field_internal(const NodeSet *ns, const Field &field, void *data,
772 size_t data_size) const = 0;
773 virtual int64_t get_field_internal(const EdgeSet *ns, const Field &field, void *data,
774 size_t data_size) const = 0;
775 virtual int64_t get_field_internal(const FaceSet *ns, const Field &field, void *data,
776 size_t data_size) const = 0;
777 virtual int64_t get_field_internal(const ElementSet *ns, const Field &field, void *data,
778 size_t data_size) const = 0;
779 virtual int64_t get_field_internal(const SideSet *fs, const Field &field, void *data,
780 size_t data_size) const = 0;
781 virtual int64_t get_field_internal(const CommSet *cs, const Field &field, void *data,
782 size_t data_size) const = 0;
783 virtual int64_t get_field_internal(const StructuredBlock * /*sb*/, const Field & /*field*/,
784 void * /*data*/, size_t /*data_size*/) const
785 {
786 return 0;
787 }
788
789 virtual int64_t put_field_internal(const Region *reg, const Field &field, void *data,
790 size_t data_size) const = 0;
791 virtual int64_t put_field_internal(const NodeBlock *nb, const Field &field, void *data,
792 size_t data_size) const = 0;
793 virtual int64_t put_field_internal(const EdgeBlock *nb, const Field &field, void *data,
794 size_t data_size) const = 0;
795 virtual int64_t put_field_internal(const FaceBlock *nb, const Field &field, void *data,
796 size_t data_size) const = 0;
797 virtual int64_t put_field_internal(const ElementBlock *eb, const Field &field, void *data,
798 size_t data_size) const = 0;
799 virtual int64_t put_field_internal(const SideBlock *fb, const Field &field, void *data,
800 size_t data_size) const = 0;
801 virtual int64_t put_field_internal(const NodeSet *ns, const Field &field, void *data,
802 size_t data_size) const = 0;
803 virtual int64_t put_field_internal(const EdgeSet *ns, const Field &field, void *data,
804 size_t data_size) const = 0;
805 virtual int64_t put_field_internal(const FaceSet *ns, const Field &field, void *data,
806 size_t data_size) const = 0;
807 virtual int64_t put_field_internal(const ElementSet *ns, const Field &field, void *data,
808 size_t data_size) const = 0;
809 virtual int64_t put_field_internal(const SideSet *fs, const Field &field, void *data,
810 size_t data_size) const = 0;
811 virtual int64_t put_field_internal(const CommSet *cs, const Field &field, void *data,
812 size_t data_size) const = 0;
813 virtual int64_t put_field_internal(const StructuredBlock * /*sb*/, const Field & /*field*/,
814 void * /*data*/, size_t /*data_size*/) const
815 {
816 return 0;
817 }
818
819 DatabaseIO() = delete;
820 DatabaseIO(const DatabaseIO &) = delete;
821 DatabaseIO &operator=(const DatabaseIO &) = delete;
822
823 mutable std::map<std::string, AxisAlignedBoundingBox> elementBlockBoundingBoxes;
824
825 Ioss::ParallelUtils util_; // Encapsulate parallel and other utility functions.
826 #if defined(IOSS_THREADSAFE)
827 protected:
828 mutable std::mutex m_;
829
830 private:
831 #endif
832 Region *region_{nullptr};
833 char fieldSeparator{'_'};
834 bool enableFieldRecognition{true};
835 bool isInput;
836 bool isParallelConsistent{
837 true}; // True if application will make field data get/put calls parallel
838 // consistently.
839 // True is default and required for parallel-io databases.
840 // Even if false, metadata operations must be called by all processors
841
842 bool singleProcOnly; // True if history or heartbeat which is only written from proc 0...
843 bool doLogging{false}; // True if logging field input/output
844 bool useGenericCanonicalName{
845 false}; // True if "block_id" is used as canonical name instead of the name
846 // given on the mesh file e.g. "fireset". Both names are still aliases.
847 bool ignoreDatabaseNames{false}; // True if "block_{id}" used as canonical name; ignore any
848 // names on database.
849 mutable bool blockAdjacenciesCalculated{false}; // True if the lazy creation of
850 // block adjacencies has been calculated.
851
852 bool m_timeStateInOut{false};
853 bool m_enableTracing{false};
854 std::chrono::time_point<std::chrono::high_resolution_clock>
855 m_stateStart; // Used for optional output step timing.
856 };
857 } // namespace Ioss
858 #endif
Ioss::SerializeIO
Class SerializeIO is a sentry class which performs serialization for mesh database I/O.
Definition: Ioss_SerializeIO.h:81
Ioss::DatabaseIO::verify_and_log
void verify_and_log(const GroupingEntity *ge, const Field &field, int in_out) const
Definition: Ioss_DatabaseIO.C:476
Ioss::DatabaseIO::m_timeStateInOut
bool m_timeStateInOut
Definition: Ioss_DatabaseIO.h:852
Ioss::DatabaseIO::get_dwname
std::string get_dwname() const
Definition: Ioss_DatabaseIO.h:161
Ioss::DatabaseIO::set_overlay_count
void set_overlay_count(int count) const
Definition: Ioss_DatabaseIO.h:530
Ioss::DatabaseIO::nodeMap
Ioss::Map nodeMap
Definition: Ioss_DatabaseIO.h:696
Ioss_DBUsage.h
Ioss::DatabaseIO::is_input
bool is_input() const
Determine whether the database is an input database.
Definition: Ioss_DatabaseIO.h:212
Ioss::DatabaseIO::ok__
virtual bool ok__(bool, std::string *, int *bad_count) const
Definition: Ioss_DatabaseIO.h:708
Ioss::DatabaseIO::useGenericCanonicalName
bool useGenericCanonicalName
Definition: Ioss_DatabaseIO.h:844
Ioss::Field
Holds metadata for bulk data associated with a GroupingEntity.
Definition: Ioss_Field.h:47
Ioss::DatabaseIO::set_lower_case_variable_names
void set_lower_case_variable_names(bool true_false) const
Definition: Ioss_DatabaseIO.h:446
Ioss::DatabaseIO::isInput
bool isInput
Definition: Ioss_DatabaseIO.h:835
Ioss::STATE_INVALID
Definition: Ioss_State.h:43
Ioss::DatabaseIO::read_meta_data
void read_meta_data()
Definition: Ioss_DatabaseIO.h:341
Ioss::DatabaseIO::set_pfsname
void set_pfsname(const std::string &name) const
Definition: Ioss_DatabaseIO.h:153
Ioss::DatabaseIO::blockOmissions
std::vector< std::string > blockOmissions
Definition: Ioss_DatabaseIO.h:688
Ioss::DatabaseIO::decodedFilename
std::string decodedFilename
Definition: Ioss_DatabaseIO.h:610
Ioss::DatabaseIO::progress
void progress(const std::string &output) const
Definition: Ioss_DatabaseIO.h:547
Ioss::DatabaseIO::check_side_topology
void check_side_topology() const
Definition: Ioss_DatabaseIO.C:715
Ioss::DatabaseIO::openDW
void openDW(const std::string &filename) const
If we are planning to use BB(aka Burst Buffer) service, we will call simple C API provided by Cray Da...
Definition: Ioss_DatabaseIO.C:318
Ioss::DatabaseIO::informationRecords
std::vector< std::string > informationRecords
Definition: Ioss_DatabaseIO.h:691
Ioss_Map.h
Ioss::DatabaseIO::timeScaleFactor
double timeScaleFactor
Definition: Ioss_DatabaseIO.h:662
Ioss::DatabaseIO::get_step_times__
virtual void get_step_times__()
Definition: Ioss_DatabaseIO.h:742
Ioss::USE_INT32_API
Definition: Ioss_DataSize.h:40
Ioss::DatabaseIO::is_parallel
bool is_parallel() const
Definition: Ioss_DatabaseIO.h:545
Ioss::DatabaseIO::set_common_side_topology
void set_common_side_topology() const
Definition: Ioss_DatabaseIO.C:637
Ioss::DatabaseIO::get_field_internal
virtual int64_t get_field_internal(const Region *reg, const Field &field, void *data, size_t data_size) const =0
Ioss::DatabaseIO::set_parallel_consistency
void set_parallel_consistency(bool on_off)
Definition: Ioss_DatabaseIO.h:425
Ioss_DataSize.h
Ioss::DatabaseIO::ok
bool ok(bool write_message=false, std::string *error_message=nullptr, int *bad_count=nullptr) const
Check to see if database state is OK.
Definition: Ioss_DatabaseIO.h:97
Ioss::DatabaseIO::release_memory
void release_memory()
Definition: Ioss_DatabaseIO.h:142
Ioss::DatabaseIO::blockAdjacenciesCalculated
bool blockAdjacenciesCalculated
Definition: Ioss_DatabaseIO.h:849
Ioss::DatabaseIO::using_dw
bool using_dw() const
Definition: Ioss_DatabaseIO.h:185
Ioss::DatabaseIO::doLogging
bool doLogging
Definition: Ioss_DatabaseIO.h:843
Ioss::DatabaseIO::get_file_pointer
virtual int get_file_pointer() const
Definition: Ioss_DatabaseIO.h:197
Ioss::DatabaseIO::blockInclusions
std::vector< std::string > blockInclusions
Definition: Ioss_DatabaseIO.h:689
Ioss::DatabaseIO::element_global_to_local__
virtual int64_t element_global_to_local__(int64_t global) const
Definition: Ioss_DatabaseIO.h:722
Ioss::DatabaseIO::set_time_scale_factor
void set_time_scale_factor(double factor)
Definition: Ioss_DatabaseIO.h:535
Ioss::DatabaseIO::get_file_per_state
bool get_file_per_state() const
Definition: Ioss_DatabaseIO.h:533
Ioss::DatabaseIO::open_create_behavior
Ioss::IfDatabaseExistsBehavior open_create_behavior() const
Definition: Ioss_DatabaseIO.C:381
Ioss::DatabaseIO::create_path
void create_path(const std::string &filename) const
This function is used to create the path to an output directory (or history, restart,...
Definition: Ioss_DatabaseIO.C:397
Ioss::DatabaseIO::get_field_separator
char get_field_separator() const
Definition: Ioss_DatabaseIO.h:441
Ioss::IfDatabaseExistsBehavior
IfDatabaseExistsBehavior
Definition: Ioss_DBUsage.h:56
IOSS_FUNC_ENTER
#define IOSS_FUNC_ENTER(m)
Definition: Ioss_CodeTypes.h:130
Ioss::DatabaseIO::read_meta_data__
virtual void read_meta_data__()=0
Ioss::DatabaseIO::fieldSeparator
char fieldSeparator
Definition: Ioss_DatabaseIO.h:833
Ioss::DatabaseIO::qaRecords
std::vector< std::string > qaRecords
Definition: Ioss_DatabaseIO.h:692
Ioss::DatabaseIO::get_format
virtual const std::string get_format() const =0
Ioss::DatabaseIO::create_groups
void create_groups(const std::string &property_name, EntityType type, const std::string &type_name, const T *set_type)
Definition: Ioss_DatabaseIO.C:536
Ioss::Map::release_memory
void release_memory()
Definition: Ioss_Map.C:108
Ioss::DatabaseIO::get_bounding_box
AxisAlignedBoundingBox get_bounding_box(const Ioss::ElementBlock *eb) const
Definition: Ioss_DatabaseIO.C:1078
Ioss::EdgeBlock
A collection of element edges with the same topology.
Definition: Ioss_EdgeBlock.h:53
Ioss::DatabaseUsage
DatabaseUsage
Specifies how an Ioss::DatabaseIO object will be used.
Definition: Ioss_DBUsage.h:40
Ioss::DatabaseIO::sideTopology
TopoContainer sideTopology
Used to speed up faceblock/edgeblock calculations.
Definition: Ioss_DatabaseIO.h:642
Ioss
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:66
Ioss::State
State
Access states for a database.
Definition: Ioss_State.h:42
Ioss::DatabaseIO::blockAdjacency
std::vector< std::vector< bool > > blockAdjacency
Definition: Ioss_DatabaseIO.h:701
Ioss::DatabaseIO::begin
bool begin(Ioss::State state)
Set the database to the given State.
Definition: Ioss_DatabaseIO.h:315
Ioss::DatabaseIO::m_stateStart
std::chrono::time_point< std::chrono::high_resolution_clock > m_stateStart
Definition: Ioss_DatabaseIO.h:855
Ioss::Region
A grouping entity that contains other grouping entities.
Definition: Ioss_Region.h:98
Ioss::DatabaseIO::get_qa_records
const std::vector< std::string > & get_qa_records() const
Get all QA records, each of which consists of 4 strings, from the database.
Definition: Ioss_DatabaseIO.h:383
Ioss::SurfaceSplitType
SurfaceSplitType
Method used to split sidesets into homogeneous blocks.
Definition: Ioss_SurfaceSplit.h:38
Ioss::DatabaseIO::filePerState
bool filePerState
Definition: Ioss_DatabaseIO.h:674
Ioss::DatabaseIO::get_step_times
void get_step_times()
Definition: Ioss_DatabaseIO.h:347
Ioss::DatabaseIO::get_property_manager
const Ioss::PropertyManager & get_property_manager() const
Definition: Ioss_DatabaseIO.h:538
Ioss::DatabaseIO::get_dwPath
std::string get_dwPath() const
We call this ONLY after we assure that using_dw() is TRUE \ returns mount point of Datawarp namespace...
Definition: Ioss_DatabaseIO.h:174
Ioss::NodeSet
A collection of nodes.
Definition: Ioss_NodeSet.h:53
Ioss::DatabaseIO::closeDatabase__
virtual void closeDatabase__() const
Definition: Ioss_DatabaseIO.C:379
Ioss::DatabaseIO::add_qa_record
void add_qa_record(const std::string &code, const std::string &code_qa, const std::string &date, const std::string &time)
Add a QA record, which consists of 4 strings, to the database.
Definition: Ioss_DatabaseIO.C:692
Ioss::DatabaseIO::cycleCount
int cycleCount
Definition: Ioss_DatabaseIO.h:650
Ioss::DatabaseIO::set_field_separator
void set_field_separator(char separator)
Set the character used to separate a field suffix from the field basename when recognizing vector,...
Definition: Ioss_DatabaseIO.C:259
Ioss::FaceSet
A collection of element faces.
Definition: Ioss_FaceSet.h:54
Ioss::StructuredBlock
A structured zone – i,j,k.
Definition: Ioss_StructuredBlock.h:103
Ioss::SPLIT_BY_TOPOLOGIES
Definition: Ioss_SurfaceSplit.h:40
Ioss::DatabaseIO::closeDW
void closeDW() const
Function which invokes stageout from BB to Disk, prior to completion of final close.
Definition: Ioss_DatabaseIO.C:353
Ioss::DatabaseIO::set_block_omissions
void set_block_omissions(const std::vector< std::string > &omissions, const std::vector< std::string > &inclusions={})
Definition: Ioss_DatabaseIO.C:701
Ioss::DatabaseIO::decoded_filename
const std::string & decoded_filename() const
Get a file-per-processor filename associated with the database.
Definition: Ioss_DatabaseIO.C:452
Ioss::DatabaseIO::put_field_internal
virtual int64_t put_field_internal(const Region *reg, const Field &field, void *data, size_t data_size) const =0
Ioss::DatabaseIO::entity_field_support
virtual unsigned entity_field_support() const =0
Ioss::PropertyManager
A collection of Ioss::Property objects.
Definition: Ioss_PropertyManager.h:49
Ioss::DatabaseIO::get_block_adjacencies__
void get_block_adjacencies__(const Ioss::ElementBlock *eb, std::vector< std::string > &block_adjacency) const
Definition: Ioss_DatabaseIO.C:776
Ioss::DatabaseIO::pfsName
std::string pfsName
Definition: Ioss_DatabaseIO.h:621
Ioss::DatabaseIO::singleProcOnly
bool singleProcOnly
Definition: Ioss_DatabaseIO.h:842
Ioss::DatabaseIO::elementCount
int64_t elementCount
Definition: Ioss_DatabaseIO.h:629
Ioss::DatabaseIO::put_field_internal
virtual int64_t put_field_internal(const StructuredBlock *, const Field &, void *, size_t) const
Definition: Ioss_DatabaseIO.h:813
Ioss::EdgeSet
A collection of element edges.
Definition: Ioss_EdgeSet.h:54
Ioss::ElementSet
A collection of elements.
Definition: Ioss_ElementSet.h:54
Ioss_ParallelUtils.h
Ioss::DatabaseIO::ignore_database_names
void ignore_database_names(bool yes_no)
Definition: Ioss_DatabaseIO.h:431
Ioss::DatabaseIO::set_field_recognition
void set_field_recognition(bool yes_no)
Definition: Ioss_DatabaseIO.h:444
Ioss::DatabaseIO::open_group__
virtual bool open_group__(const std::string &)
Definition: Ioss_DatabaseIO.h:735
Ioss::DatabaseIO::begin__
virtual bool begin__(Ioss::State state)=0
Ioss::DatabaseIO::util
const Ioss::ParallelUtils & util() const
Definition: Ioss_DatabaseIO.h:537
Ioss::EntityType
EntityType
The particular type of GroupingEntity.
Definition: Ioss_EntityType.h:39
Ioss::CommSet
Definition: Ioss_CommSet.h:51
Ioss_EntityType.h
Ioss::DatabaseIO::begin_state
bool begin_state(int state, double time)
Definition: Ioss_DatabaseIO.C:487
Ioss::DatabaseIO::edgeMap
Ioss::Map edgeMap
Definition: Ioss_DatabaseIO.h:697
Ioss::DatabaseIO::get_field_recognition
bool get_field_recognition() const
Definition: Ioss_DatabaseIO.h:442
Ioss::DatabaseIO::myProcessor
int myProcessor
number of processor this database is for
Definition: Ioss_DatabaseIO.h:626
Ioss::DatabaseIO::begin_state__
virtual bool begin_state__(int state, double time)
Definition: Ioss_DatabaseIO.C:507
Ioss::DatabaseIO::usage
Ioss::DatabaseUsage usage() const
Get the Ioss::DatabaseUsage type of the database.
Definition: Ioss_DatabaseIO.h:218
Ioss::DatabaseIO::nodeCount
int64_t nodeCount
Definition: Ioss_DatabaseIO.h:628
Ioss::DatabaseIO::enableFieldRecognition
bool enableFieldRecognition
Definition: Ioss_DatabaseIO.h:834
Ioss::FaceBlock
A collection of element faces with the same topology.
Definition: Ioss_FaceBlock.h:53
Ioss::DatabaseIO::end__
virtual bool end__(Ioss::State state)=0
Ioss::DatabaseIO::get_block_adjacencies
void get_block_adjacencies(const Ioss::ElementBlock *eb, std::vector< std::string > &block_adjacency) const
Definition: Ioss_DatabaseIO.h:462
Ioss::DatabaseIO::overlayCount
int overlayCount
Definition: Ioss_DatabaseIO.h:652
Ioss::DatabaseIO::properties
Ioss::PropertyManager properties
Definition: Ioss_DatabaseIO.h:578
Ioss::DatabaseIO::internal_faces_available
virtual bool internal_faces_available() const
Definition: Ioss_DatabaseIO.h:354
Ioss::DatabaseIO::get_pfsname
std::string get_pfsname() const
Definition: Ioss_DatabaseIO.h:155
Ioss::DatabaseIO::get_use_generic_canonical_name
bool get_use_generic_canonical_name() const
Definition: Ioss_DatabaseIO.h:427
Ioss::DatabaseIO::get_logging
bool get_logging() const
Definition: Ioss_DatabaseIO.h:387
Ioss::DatabaseIO::put_field
int64_t put_field(const T *reg, const Field &field, void *data, size_t data_size) const
Definition: Ioss_DatabaseIO.h:407
Ioss::DatabaseIO
An input or output Database.
Definition: Ioss_DatabaseIO.h:82
Ioss::DatabaseIO::DatabaseIO
DatabaseIO()=delete
Ioss::DatabaseIO::set_region
void set_region(Region *region)
Definition: Ioss_DatabaseIO.h:233
Ioss::DatabaseIO::compute_block_adjacencies
void compute_block_adjacencies() const
Definition: Ioss_DatabaseIO.C:818
Ioss::DatabaseIO::commonSideTopology
ElementTopology * commonSideTopology
Definition: Ioss_DatabaseIO.h:588
Ioss::DatabaseIO::flush_database
void flush_database() const
Definition: Ioss_DatabaseIO.h:262
Ioss::DatabaseIO::isParallel
bool isParallel
true if running in parallel
Definition: Ioss_DatabaseIO.h:676
Ioss::AxisAlignedBoundingBox
Definition: Ioss_BoundingBox.h:37
Ioss::DatabaseIO::elemMap
Ioss::Map elemMap
Definition: Ioss_DatabaseIO.h:699
Ioss::DatabaseIO::isParallelConsistent
bool isParallelConsistent
Definition: Ioss_DatabaseIO.h:836
Ioss_State.h
Ioss::SideBlock
A collection of element sides having the same topology.
Definition: Ioss_SideBlock.h:59
Ioss::DatabaseIO::compute_block_membership
void compute_block_membership(Ioss::SideBlock *efblock, std::vector< std::string > &block_membership) const
Definition: Ioss_DatabaseIO.h:467
Ioss::DatabaseIO::finalize_database
virtual void finalize_database()
Definition: Ioss_DatabaseIO.h:150
Ioss::DatabaseIO::region_
Region * region_
Definition: Ioss_DatabaseIO.h:832
Ioss::DatabaseIO::create_subgroup__
virtual bool create_subgroup__(const std::string &)
Definition: Ioss_DatabaseIO.h:736
Ioss::DatabaseIO::create_group
void create_group(EntityType type, const std::string &type_name, const std::vector< std::string > &group_spec, const T *set_type)
Definition: Ioss_DatabaseIO.C:566
Ioss::DatabaseIO::is_parallel_consistent
bool is_parallel_consistent() const
Definition: Ioss_DatabaseIO.h:424
Ioss::DatabaseIO::set_surface_split_type
void set_surface_split_type(Ioss::SurfaceSplitType split_type)
Definition: Ioss_DatabaseIO.h:456
Ioss::Map::global_to_local
int64_t global_to_local(int64_t global, bool must_exist=true) const
Definition: Ioss_Map.C:554
Ioss::DatabaseIO::get_region
Region * get_region() const
Definition: Ioss_DatabaseIO.h:483
Ioss::DatabaseIO::originalDBFilename
std::string originalDBFilename
Definition: Ioss_DatabaseIO.h:608
Ioss::DatabaseIO::ignore_database_names
bool ignore_database_names() const
Definition: Ioss_DatabaseIO.h:430
Ioss_PropertyManager.h
Ioss::DatabaseIO::set_logging
void set_logging(bool on_off)
Definition: Ioss_DatabaseIO.h:388
Ioss::DatabaseIO::release_memory__
virtual void release_memory__()
Definition: Ioss_DatabaseIO.h:727
Ioss::DatabaseIO::set_maximum_symbol_length
virtual void set_maximum_symbol_length(int)
Definition: Ioss_DatabaseIO.h:438
Ioss_SurfaceSplit.h
Ioss::DatabaseIO::closeDatabase
void closeDatabase() const
Definition: Ioss_DatabaseIO.h:256
Ioss::DatabaseIO::bbName
std::string bbName
Definition: Ioss_DatabaseIO.h:620
Ioss::DatabaseIO::get_information_records
const std::vector< std::string > & get_information_records() const
Get all information records (informative strings) for the database.
Definition: Ioss_DatabaseIO.h:362
Ioss::DatabaseIO::faceMap
Ioss::Map faceMap
Definition: Ioss_DatabaseIO.h:698
Ioss::DatabaseIO::usingDataWarp
bool usingDataWarp
Definition: Ioss_DatabaseIO.h:675
Ioss::DatabaseIO::lowerCaseVariableNames
bool lowerCaseVariableNames
Definition: Ioss_DatabaseIO.h:678
Ioss::DatabaseIO::splitType
Ioss::SurfaceSplitType splitType
Definition: Ioss_DatabaseIO.h:664
Ioss::DatabaseIO::add_information_record
void add_information_record(const std::string &info)
Add an information record (an informative string) to the database.
Definition: Ioss_DatabaseIO.C:677
Ioss::ParallelUtils::parallel_size
int parallel_size() const
Definition: Ioss_ParallelUtils.C:234
Ioss::ElementBlock
A collection of elements having the same topology.
Definition: Ioss_ElementBlock.h:48
Ioss::DatabaseIO::int_byte_size_api
int int_byte_size_api() const
Returns 4 or 8.
Definition: Ioss_DatabaseIO.C:237
Ioss::DatabaseIO::node_global_to_local__
virtual int64_t node_global_to_local__(int64_t global, bool must_exist) const
Definition: Ioss_DatabaseIO.h:717
Ioss::DatabaseIO::create_subgroup
bool create_subgroup(const std::string &group_name)
If a database type supports groups, create the specified group as a child of the current group.
Definition: Ioss_DatabaseIO.h:295
Ioss::DatabaseIO::maximum_symbol_length
virtual int maximum_symbol_length() const
Get the length of the longest name in the database file.
Definition: Ioss_DatabaseIO.h:437
Ioss::ElementTopology
Represents an element topology.
Definition: Ioss_ElementTopology.h:72
Ioss::DatabaseIO::parallel_size
int parallel_size() const
Definition: Ioss_DatabaseIO.h:544
anonymous_namespace{Ioss_Field.C}::error_message
void error_message(const Ioss::Field &field, Ioss::Field::BasicType requested_type)
Definition: Ioss_Field.C:64
Ioss::DatabaseIO::end_state
bool end_state(int state, double time)
Definition: Ioss_DatabaseIO.C:495
Ioss::Map
Definition: Ioss_Map.h:52
Ioss::TopoContainer
std::vector< std::pair< const ElementTopology *, const ElementTopology * > > TopoContainer
Definition: Ioss_DatabaseIO.h:77
Ioss::DatabaseIO::end_state__
virtual bool end_state__(int state, double time)
Definition: Ioss_DatabaseIO.C:509
Ioss::DatabaseIO::int_byte_size_db
virtual int int_byte_size_db() const =0
Ioss::DatabaseIO::using_parallel_io
bool using_parallel_io() const
Definition: Ioss_DatabaseIO.h:110
Ioss::DatabaseIO::add_information_records
void add_information_records(const std::vector< std::string > &info)
Add multiple information records (informative strings) to the database.
Definition: Ioss_DatabaseIO.C:667
Ioss::DatabaseIO::set_cycle_count
void set_cycle_count(int count) const
Definition: Ioss_DatabaseIO.h:528
anonymous_namespace{cth_pressure_map.C}::data
std::vector< char > data
Definition: cth_pressure_map.C:74
Ioss::DatabaseIO::needs_shared_node_information
virtual bool needs_shared_node_information() const
Determine whether the database needs information about process ownership of nodes.
Definition: Ioss_DatabaseIO.h:224
Ioss::ParallelUtils
Definition: Ioss_ParallelUtils.h:49
Ioss::DatabaseIO::set_use_generic_canonical_name
void set_use_generic_canonical_name(bool yes_no)
Definition: Ioss_DatabaseIO.h:428
Ioss::DatabaseIO::node_major
virtual bool node_major() const
Definition: Ioss_DatabaseIO.h:136
Ioss::DatabaseIO::check_setDW
void check_setDW() const
Definition: Ioss_DatabaseIO.C:277
Ioss::DatabaseIO::handle_groups
void handle_groups()
Definition: Ioss_DatabaseIO.C:511
Ioss::DatabaseIO::internal_edges_available
virtual bool internal_edges_available() const
Definition: Ioss_DatabaseIO.h:353
Ioss::DatabaseIO::get_overlay_count
int get_overlay_count() const
Definition: Ioss_DatabaseIO.h:531
Ioss::DatabaseIO::usingParallelIO
bool usingParallelIO
Definition: Ioss_DatabaseIO.h:679
Ioss::DatabaseIO::get_cycle_count
int get_cycle_count() const
Definition: Ioss_DatabaseIO.h:529
Ioss::NodeBlock
A collection of all nodes in the region.
Definition: Ioss_NodeBlock.h:53
Ioss::DatabaseIO::elementBlockBoundingBoxes
std::map< std::string, AxisAlignedBoundingBox > elementBlockBoundingBoxes
Definition: Ioss_DatabaseIO.h:823
Ioss::DatabaseIO::DBFilename
std::string DBFilename
Definition: Ioss_DatabaseIO.h:609
Ioss::DatabaseIO::set_dwname
void set_dwname(const std::string &name) const
this will be the name in BB namespace
Definition: Ioss_DatabaseIO.h:159
Ioss::DatabaseIO::m_enableTracing
bool m_enableTracing
Definition: Ioss_DatabaseIO.h:853
Ioss::DatabaseIO::get_field
int64_t get_field(const T *reg, const Field &field, void *data, size_t data_size) const
Definition: Ioss_DatabaseIO.h:397
Ioss::DatabaseIO::node_global_to_local
int64_t node_global_to_local(int64_t global, bool must_exist) const
Get the local (process-specific) node number corresponding to a global node number.
Definition: Ioss_DatabaseIO.h:119
Ioss::DatabaseIO::get_field_internal
virtual int64_t get_field_internal(const StructuredBlock *, const Field &, void *, size_t) const
Definition: Ioss_DatabaseIO.h:783
Ioss::DatabaseIO::set_int_byte_size_api
virtual void set_int_byte_size_api(Ioss::DataSize size) const
Returns 4 or 8.
Definition: Ioss_DatabaseIO.C:249
Ioss_BoundingBox.h
Ioss::DatabaseIO::parallel_rank
int parallel_rank() const
Get the processor that this mesh database is on.
Definition: Ioss_DatabaseIO.h:543
Ioss::DatabaseIO::get_filename
std::string get_filename() const
Get the file name associated with the database.
Definition: Ioss_DatabaseIO.h:191
anonymous_namespace{io_info.C}::name
std::string name(const Ioss::GroupingEntity *entity)
Definition: io_info.C:89
Ioss::DatabaseIO::set_file_per_state
void set_file_per_state(bool yes_no) const
Definition: Ioss_DatabaseIO.h:532
MPI_Comm
int MPI_Comm
Definition: Ioss_CodeTypes.h:96
Ioss::DatabaseIO::util_
Ioss::ParallelUtils util_
Definition: Ioss_DatabaseIO.h:825
Ioss::DatabaseIO::flush_database__
virtual void flush_database__() const
Definition: Ioss_DatabaseIO.h:705
Ioss::DataSize
DataSize
The number of bytes used to store an integer type.
Definition: Ioss_DataSize.h:40
Ioss::DatabaseIO::dbIntSizeAPI
Ioss::DataSize dbIntSizeAPI
Definition: Ioss_DatabaseIO.h:667
Ioss::DatabaseIO::dbUsage
Ioss::DatabaseUsage dbUsage
Definition: Ioss_DatabaseIO.h:665
Ioss::DatabaseIO::operator=
DatabaseIO & operator=(const DatabaseIO &)=delete
Ioss::SideSet
A collection of element sides.
Definition: Ioss_SideSet.h:53
Ioss::DatabaseIO::openDatabase
void openDatabase() const
Definition: Ioss_DatabaseIO.h:250
Ioss::GroupingEntity
Base class for all 'grouping' entities. The following derived classes are typical:
Definition: Ioss_GroupingEntity.h:93
Ioss_CodeTypes.h
Ioss::DatabaseIO::element_global_to_local
int64_t element_global_to_local(int64_t global) const
Definition: Ioss_DatabaseIO.h:125
Ioss::DatabaseIO::end
bool end(Ioss::State state)
Return the database to STATE_CLOSED.
Definition: Ioss_DatabaseIO.h:331
Ioss::DatabaseIO::compute_block_membership__
virtual void compute_block_membership__(Ioss::SideBlock *, std::vector< std::string > &) const
Definition: Ioss_DatabaseIO.h:750
Ioss::DatabaseIO::dbState
Ioss::State dbState
Definition: Ioss_DatabaseIO.h:624
Ioss::DatabaseIO::ignoreDatabaseNames
bool ignoreDatabaseNames
Definition: Ioss_DatabaseIO.h:847
Ioss::ParallelUtils::progress
void progress(const std::string &output) const
Definition: Ioss_ParallelUtils.C:522
Ioss::DatabaseIO::open_group
bool open_group(const std::string &group_name)
If a database type supports groups and if the database contains groups, open the specified group.
Definition: Ioss_DatabaseIO.h:279
Ioss::DatabaseIO::openDatabase__
virtual void openDatabase__() const
Definition: Ioss_DatabaseIO.C:377
Ioss::DatabaseIO::~DatabaseIO
virtual ~DatabaseIO()
Ioss::DatabaseIO::dwPath
std::string dwPath
Definition: Ioss_DatabaseIO.h:622
Ioss::DatabaseIO::get_surface_split_type
Ioss::SurfaceSplitType get_surface_split_type() const
Definition: Ioss_DatabaseIO.h:457