IOSS 2.0
Loading...
Searching...
No Matches
Ioexnl Namespace Reference

A namespace for the exodus database format. More...

Namespaces

namespace  anonymous_namespace{Ioexnl_BaseDatabaseIO.C}
 

Classes

struct  Assembly
 
class  BaseDatabaseIO
 
struct  Blob
 
struct  CommunicationMap
 
struct  CommunicationMetaData
 
class  DatabaseIO
 
struct  EdgeBlock
 
struct  EdgeSet
 
struct  ElemBlock
 
struct  ElemSet
 
struct  FaceBlock
 
struct  FaceSet
 
class  IOFactory
 
class  Mesh
 
struct  NameTopoKeyCompare
 
struct  NameTopoKeyHash
 
struct  NodeBlock
 
struct  NodeSet
 
class  Redefine
 
struct  SideSet
 
class  SuperElement
 

Typedefs

using VariableNameMap = std::map<std::string, int, std::less<>>
 
using ValueContainer = std::vector<double>
 
using EntityIdSet = std::set<std::pair<int64_t, int64_t>>
 
using SideSetSet = std::set<std::string>
 
using SideSetMap = std::map<std::string, const std::string, std::less<>>
 
using NameTopoKey = std::pair<std::string, const Ioss::ElementTopology *>
 
using TopologyMap = tsl::hopscotch_map<NameTopoKey, int, NameTopoKeyHash>
 

Functions

void update_last_time_attribute (int exodusFilePtr, double value)
 
Ioss::EntityType map_exodus_type (ex_entity_type type)
 
ex_entity_type map_exodus_type (Ioss::EntityType type)
 
bool read_last_time_attribute (int exodusFilePtr, double *value)
 
bool check_processor_info (const std::string &filename, int exodusFilePtr, int processor_count, int processor_id)
 
bool type_match (const std::string &type, const char *substring)
 
void decode_surface_name (Ioexnl::SideSetMap &fs_map, Ioexnl::SideSetSet &fs_set, const std::string &name)
 
bool set_id (const Ioss::GroupingEntity *entity, Ioexnl::EntityIdSet *idset)
 
int64_t extract_id (const std::string &name_id)
 
int64_t get_id (const Ioss::GroupingEntity *entity, Ioexnl::EntityIdSet *idset)
 
bool find_displacement_field (Ioss::NameList &fields, const Ioss::GroupingEntity *block, int ndim, std::string *disp_name)
 
void fix_bad_name (char *name)
 
void exodus_error (int exoid, int lineno, const char *function, const char *filename)
 
void exodus_error (int exoid, int lineno, const char *function, const char *filename, const std::string &extra)
 
void write_coordinate_frames (int exoid, const Ioss::CoordinateFrameContainer &frames)
 
bool filter_node_list (Ioss::Int64Vector &nodes, const std::vector< unsigned char > &node_connectivity_status)
 
void filter_element_list (Ioss::Region *region, Ioss::Int64Vector &elements, Ioss::Int64Vector &sides, bool remove_omitted_elements)
 
void separate_surface_element_sides (Ioss::Int64Vector &element, Ioss::Int64Vector &sides, Ioss::Region *region, Ioexnl::TopologyMap &topo_map, Ioexnl::TopologyMap &side_map, Ioss::SurfaceSplitType split_type, const std::string &surface_name)
 
void write_reduction_attributes (int exoid, const Ioss::GroupingEntity *ge)
 
IOSS_NODISCARD IOEXNL_EXPORT const char * Version ()
 
IOEXNL_EXPORT int add_map_fields (int exoid, Ioss::ElementBlock *block, int64_t my_element_count, size_t name_length)
 
IOEXNL_EXPORT void add_coordinate_frames (int exoid, Ioss::Region *region)
 
IOSS_NODISCARD IOEXNL_EXPORT std::string get_entity_name (int exoid, ex_entity_type type, int64_t id, const std::string &basename, int length, bool &db_has_name)
 
template<typename T >
void filter_node_list (T *data, std::vector< T > &dbvals, const std::vector< int64_t > &active_node_index)
 
template<typename T >
void write_reduction_attributes (int exoid, const std::vector< T * > &entities)
 

Detailed Description

A namespace for the exodus database format.

A namespace for the file-per-process version of the parallel exodus database format.

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 Internals instance and call the 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 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(),

Typedef Documentation

◆ EntityIdSet

using Ioexnl::EntityIdSet = std::set<std::pair<int64_t, int64_t>>

◆ NameTopoKey

using Ioexnl::NameTopoKey = std::pair<std::string, const Ioss::ElementTopology *>

◆ SideSetMap

using Ioexnl::SideSetMap = std::map<std::string, const std::string, std::less<>>

◆ SideSetSet

using Ioexnl::SideSetSet = std::set<std::string>

◆ TopologyMap

◆ ValueContainer

using Ioexnl::ValueContainer = std::vector<double>

◆ VariableNameMap

using Ioexnl::VariableNameMap = std::map<std::string, int, std::less<>>

Function Documentation

◆ add_coordinate_frames()

IOEXNL_EXPORT void Ioexnl::add_coordinate_frames ( int exoid,
Ioss::Region * region )

◆ add_map_fields()

IOEXNL_EXPORT int Ioexnl::add_map_fields ( int exoid,
Ioss::ElementBlock * block,
int64_t my_element_count,
size_t name_length )

◆ check_processor_info()

IOSS_NODISCARD IOEXNL_EXPORT bool Ioexnl::check_processor_info ( const std::string & filename,
int exodusFilePtr,
int processor_count,
int processor_id )

◆ decode_surface_name()

IOEXNL_EXPORT void Ioexnl::decode_surface_name ( Ioexnl::SideSetMap & fs_map,
Ioexnl::SideSetSet & fs_set,
const std::string & name )

◆ exodus_error() [1/2]

IOEXNL_EXPORT void Ioexnl::exodus_error ( int exoid,
int lineno,
const char * function,
const char * filename )

◆ exodus_error() [2/2]

IOEXNL_EXPORT void Ioexnl::exodus_error ( int exoid,
int lineno,
const char * function,
const char * filename,
const std::string & extra )

◆ extract_id()

IOSS_NODISCARD IOEXNL_EXPORT int64_t Ioexnl::extract_id ( const std::string & name_id)

◆ filter_element_list()

IOEXNL_EXPORT void Ioexnl::filter_element_list ( Ioss::Region * region,
Ioss::Int64Vector & elements,
Ioss::Int64Vector & sides,
bool remove_omitted_elements )

◆ filter_node_list() [1/2]

IOEXNL_EXPORT bool Ioexnl::filter_node_list ( Ioss::Int64Vector & nodes,
const std::vector< unsigned char > & node_connectivity_status )

◆ filter_node_list() [2/2]

template<typename T >
void Ioexnl::filter_node_list ( T * data,
std::vector< T > & dbvals,
const std::vector< int64_t > & active_node_index )

◆ find_displacement_field()

IOEXNL_EXPORT bool Ioexnl::find_displacement_field ( Ioss::NameList & fields,
const Ioss::GroupingEntity * block,
int ndim,
std::string * disp_name )

◆ fix_bad_name()

IOEXNL_EXPORT void Ioexnl::fix_bad_name ( char * name)

◆ get_entity_name()

IOSS_NODISCARD IOEXNL_EXPORT std::string Ioexnl::get_entity_name ( int exoid,
ex_entity_type type,
int64_t id,
const std::string & basename,
int length,
bool & db_has_name )

◆ get_id()

IOEXNL_EXPORT int64_t Ioexnl::get_id ( const Ioss::GroupingEntity * entity,
Ioexnl::EntityIdSet * idset )

◆ map_exodus_type() [1/2]

IOSS_NODISCARD IOEXNL_EXPORT Ioss::EntityType Ioexnl::map_exodus_type ( ex_entity_type type)

◆ map_exodus_type() [2/2]

IOSS_NODISCARD IOEXNL_EXPORT ex_entity_type Ioexnl::map_exodus_type ( Ioss::EntityType type)

◆ read_last_time_attribute()

IOEXNL_EXPORT bool Ioexnl::read_last_time_attribute ( int exodusFilePtr,
double * value )

◆ separate_surface_element_sides()

IOEXNL_EXPORT void Ioexnl::separate_surface_element_sides ( Ioss::Int64Vector & element,
Ioss::Int64Vector & sides,
Ioss::Region * region,
Ioexnl::TopologyMap & topo_map,
Ioexnl::TopologyMap & side_map,
Ioss::SurfaceSplitType split_type,
const std::string & surface_name )

◆ set_id()

IOEXNL_EXPORT bool Ioexnl::set_id ( const Ioss::GroupingEntity * entity,
Ioexnl::EntityIdSet * idset )

◆ type_match()

IOSS_NODISCARD IOEXNL_EXPORT bool Ioexnl::type_match ( const std::string & type,
const char * substring )

◆ update_last_time_attribute()

IOEXNL_EXPORT void Ioexnl::update_last_time_attribute ( int exodusFilePtr,
double value )

◆ Version()

IOSS_NODISCARD IOEXNL_EXPORT const char * Ioexnl::Version ( )

◆ write_coordinate_frames()

IOEXNL_EXPORT void Ioexnl::write_coordinate_frames ( int exoid,
const Ioss::CoordinateFrameContainer & frames )

◆ write_reduction_attributes() [1/2]

IOEXNL_EXPORT void Ioexnl::write_reduction_attributes ( int exoid,
const Ioss::GroupingEntity * ge )

◆ write_reduction_attributes() [2/2]

template<typename T >
void Ioexnl::write_reduction_attributes ( int exoid,
const std::vector< T * > & entities )