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