Skip to content

Commit

Permalink
Revert "Revert "Dynamic topology region file opening with group I/O (#…
Browse files Browse the repository at this point in the history
…469)" (…"

This reverts commit d828356.
  • Loading branch information
tokusanya authored and gdsjaar committed Jul 18, 2024
1 parent b8cfea3 commit 2f0ea9f
Show file tree
Hide file tree
Showing 12 changed files with 1,845 additions and 55 deletions.
5 changes: 5 additions & 0 deletions packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.C
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ namespace Ioss {

DatabaseIO::~DatabaseIO() = default;

Ioss::DataSize DatabaseIO::int_byte_size_data_size() const
{
return dbIntSizeAPI;
}

int DatabaseIO::int_byte_size_api() const
{
if (dbIntSizeAPI == USE_INT32_API) {
Expand Down
31 changes: 23 additions & 8 deletions packages/seacas/libraries/ioss/src/Ioss_DatabaseIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,18 @@ namespace Ioss {
return create_subgroup_nl(group_name);
}

bool open_root_group()
{
IOSS_FUNC_ENTER(m_);
return open_root_group_nl();
}

Ioss::NameList groups_describe(bool return_full_names = false)
{
IOSS_FUNC_ENTER(m_);
return groups_describe_nl(return_full_names);
}

/** \brief Set the database to the given State.
*
* All transitions must begin from the 'STATE_CLOSED' state or be to
Expand Down Expand Up @@ -502,6 +514,7 @@ namespace Ioss {
IOSS_NODISCARD virtual int int_byte_size_db() const = 0; //! Returns 4 or 8
IOSS_NODISCARD int int_byte_size_api() const; //! Returns 4 or 8
virtual void set_int_byte_size_api(Ioss::DataSize size) const;
IOSS_NODISCARD Ioss::DataSize int_byte_size_data_size() const;

/*!
* The owning region of this database.
Expand Down Expand Up @@ -737,6 +750,14 @@ namespace Ioss {
virtual void closeDatabase_nl() const;
virtual void flush_database_nl() const {}

virtual void release_memory_nl()
{
nodeMap.release_memory();
edgeMap.release_memory();
faceMap.release_memory();
elemMap.release_memory();
}

private:
virtual bool ok_nl(bool /* write_message */, std::string * /* error_message */,
int *bad_count) const
Expand All @@ -757,16 +778,10 @@ namespace Ioss {
return elemMap.global_to_local(global);
}

virtual void release_memory_nl()
{
nodeMap.release_memory();
edgeMap.release_memory();
faceMap.release_memory();
elemMap.release_memory();
}

virtual bool open_root_group_nl() { return false; }
virtual bool open_group_nl(const std::string & /* group_name */) { return false; }
virtual bool create_subgroup_nl(const std::string & /* group_name */) { return false; }
virtual Ioss::NameList groups_describe_nl(bool /* return_full_names */) { return Ioss::NameList(); }

virtual bool begin_nl(Ioss::State state) = 0;
virtual bool end_nl(Ioss::State state) = 0;
Expand Down
Loading

0 comments on commit 2f0ea9f

Please sign in to comment.