// Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with // NTESS, the U.S. Government retains certain rights in this software. // // See packages/seacas/LICENSE for details #pragma once #include // for vector namespace Excn { struct Block; struct CommunicationMetaData; template struct Mesh; template struct NodeSet; template struct SideSet; } // namespace Excn /*! * This set of classes provides a thin wrapper around the exodusII * internals. It supplants several of the exodusII API calls in * order to avoid ncredef calls which totally rewrite the existing * database and can be very expensive. These routines provide all * required variable, dimension, and attribute definitions to the * underlying netcdf file with only a single ncredef call. * * To use the application must create an Excn::Internals instance * and call the Excn::Internals::write_meta_data() function. This * function requires several classes as arguments including: *
    *
  • Mesh -- defines mesh global metadata *
  • Block -- defines metadata for each block *
  • NodeSet -- defines metadata for each nodeset *
  • SideSet -- defines metadata for each sideset *
  • CommunicationMetaData -- global metadata relating to * parallel info. *
* * Calling Excn::Internals::write_meta_data(), replaces the * following exodusII and nemesis API calls: *
    *
  • ex_put_init(), *
  • ex_put_elem_block(), *
  • ex_put_node_set_param(), *
  • ex_put_side_set_param(), *
  • ne_put_init_info(), *
  • ne_put_loadbal_param(), *
  • ne_put_cmap_params(), *
*/ namespace Excn { class Redefine { public: explicit Redefine(int exoid); ~Redefine(); private: int exodusFilePtr; }; class Internals { public: explicit Internals(int exoid, int maximum_name_length); template int write_meta_data(const Mesh &mesh, const std::vector &blocks, const std::vector> &nodesets, const std::vector> &sidesets, const CommunicationMetaData &comm); private: template int put_metadata(const Mesh &mesh, const CommunicationMetaData &comm); int put_metadata(const std::vector &blocks); template int put_metadata(const std::vector> &nodesets); template int put_metadata(const std::vector> &sidesets); template int put_non_define_data(const Mesh &mesh, const CommunicationMetaData &comm); int put_non_define_data(const std::vector &blocks); template int put_non_define_data(const std::vector> &nodesets); template int put_non_define_data(const std::vector> &sidesets); int exodusFilePtr; int maximumNameLength; }; } // namespace Excn