IOSS 2.0
Loading...
Searching...
No Matches
Ionull_DatabaseIO.h
Go to the documentation of this file.
1// Copyright(C) 2023, 2024 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// -*- Mode: c++ -*-
8#pragma once
9
10#include "Ioss_DBUsage.h"
11#include "Ioss_DatabaseIO.h"
12#include <stddef.h>
13#include <stdint.h>
14#include <string>
15
16#include "Ioss_CodeTypes.h"
17#include "Ioss_DataSize.h"
18#include "Ioss_State.h"
19#include "ionull_export.h"
20
21namespace Ioss {
22 class GroupingEntity;
23 class Region;
24 class EntityBlock;
25 class NodeBlock;
26 class EdgeBlock;
27 class FaceBlock;
28 class ElementBlock;
29 class EntitySet;
30 class Field;
31 class NodeSet;
32 class EdgeSet;
33 class FaceSet;
34 class ElementSet;
35 class SideBlock;
36 class SideSet;
37 class StructuredBlock;
38 class CommSet;
39 class ElementTopology;
40 class Assembly;
41 class Blob;
42 class PropertyManager;
43} // namespace Ioss
44
45namespace Ionull {
46 class IONULL_EXPORT DatabaseIO : public Ioss::DatabaseIO
47 {
48 public:
49 DatabaseIO(Ioss::Region *region, const std::string &filename, Ioss::DatabaseUsage db_usage,
50 Ioss_MPI_Comm communicator, const Ioss::PropertyManager &props);
51
52 IOSS_NODISCARD std::string get_format() const override { return "Null"; }
53
54 // Check capabilities of input/output database... Returns an
55 // unsigned int with the supported Ioss::EntityTypes or'ed
56 // together. If "return_value & Ioss::EntityType" is set, then the
57 // database supports that type (e.g. return_value & Ioss::FACESET)
58 IOSS_NODISCARD unsigned entity_field_support() const override;
59
60 IOSS_NODISCARD int int_byte_size_db() const override { return 8; }
61 void set_int_byte_size_api(Ioss::DataSize) const override {}
62
63 bool begin_nl(Ioss::State state) override;
64 bool end_nl(Ioss::State state) override;
65
66 bool begin_state_nl(int state, double time) override;
67 bool end_state_nl(int state, double time) override;
68
69 IOSS_NODISCARD bool ok_nl(bool, std::string *, int *) const override { return true; }
70
71 private:
72 // Input only database -- these will never be called...
88
89 void read_meta_data_nl() override;
90 void get_step_times_nl() override {}
91
92 int64_t put_field_internal(const Ioss::Region *reg, const Ioss::Field &field, void *data,
93 size_t data_size) const override;
94 int64_t put_field_internal(const Ioss::Blob *blob, const Ioss::Field &field, void *data,
95 size_t data_size) const override;
96 int64_t put_field_internal(const Ioss::Assembly *assem, const Ioss::Field &field, void *data,
97 size_t data_size) const override;
98 int64_t put_field_internal(const Ioss::NodeBlock *nb, const Ioss::Field &field, void *data,
99 size_t data_size) const override;
100 int64_t put_field_internal(const Ioss::EdgeBlock *eb, const Ioss::Field &field, void *data,
101 size_t data_size) const override;
102 int64_t put_field_internal(const Ioss::FaceBlock *eb, const Ioss::Field &field, void *data,
103 size_t data_size) const override;
104 int64_t put_field_internal(const Ioss::StructuredBlock *sb, const Ioss::Field &field,
105 void *data, size_t data_size) const override;
106 int64_t put_field_internal(const Ioss::ElementBlock *eb, const Ioss::Field &field, void *data,
107 size_t data_size) const override;
108 int64_t put_field_internal(const Ioss::SideBlock *fb, const Ioss::Field &field, void *data,
109 size_t data_size) const override;
110 int64_t put_field_internal(const Ioss::NodeSet *ns, const Ioss::Field &field, void *data,
111 size_t data_size) const override;
112 int64_t put_field_internal(const Ioss::EdgeSet *ns, const Ioss::Field &field, void *data,
113 size_t data_size) const override;
114 int64_t put_field_internal(const Ioss::FaceSet *ns, const Ioss::Field &field, void *data,
115 size_t data_size) const override;
116 int64_t put_field_internal(const Ioss::ElementSet *ns, const Ioss::Field &field, void *data,
117 size_t data_size) const override;
118 int64_t put_field_internal(const Ioss::SideSet *ss, const Ioss::Field &field, void *data,
119 size_t data_size) const override;
120 int64_t put_field_internal(const Ioss::CommSet *cs, const Ioss::Field &field, void *data,
121 size_t data_size) const override;
122 };
123} // namespace Ionull
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
int Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:64
#define IOSS_NOOP_GFI(type)
Definition Ioss_CodeTypes.h:114
Definition Ionull_DatabaseIO.h:47
void get_step_times_nl() override
Definition Ionull_DatabaseIO.h:90
IOSS_NODISCARD bool ok_nl(bool, std::string *, int *) const override
Definition Ionull_DatabaseIO.h:69
IOSS_NODISCARD int int_byte_size_db() const override
Definition Ionull_DatabaseIO.h:60
IOSS_NODISCARD std::string get_format() const override
Definition Ionull_DatabaseIO.h:52
void set_int_byte_size_api(Ioss::DataSize) const override
Returns 4 or 8.
Definition Ionull_DatabaseIO.h:61
A homogeneous collection of other GroupingEntities.
Definition Ioss_Assembly.h:31
A homogeneous collection of other GroupingEntities.
Definition Ioss_Blob.h:31
Definition Ioss_CommSet.h:27
An input or output Database.
Definition Ioss_DatabaseIO.h:63
A collection of element edges with the same topology.
Definition Ioss_EdgeBlock.h:29
A collection of element edges.
Definition Ioss_EdgeSet.h:30
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
A collection of elements.
Definition Ioss_ElementSet.h:30
A collection of element faces with the same topology.
Definition Ioss_FaceBlock.h:29
A collection of element faces.
Definition Ioss_FaceSet.h:30
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
A collection of all nodes in the region.
Definition Ioss_NodeBlock.h:33
A collection of nodes.
Definition Ioss_NodeSet.h:29
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
A collection of element sides having the same topology.
Definition Ioss_SideBlock.h:37
A collection of element sides.
Definition Ioss_SideSet.h:29
A structured zone – i,j,k.
Definition Ioss_StructuredBlock.h:91
Definition Ionull_DatabaseIO.C:22
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
State
Access states for a database.
Definition Ioss_State.h:15
DataSize
The number of bytes used to store an integer type.
Definition Ioss_DataSize.h:13
DatabaseUsage
Specifies how an Ioss::DatabaseIO object will be used.
Definition Ioss_DBUsage.h:13