libMesh
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
libMesh::ExodusII_IO_Helper::Conversion Class Reference

#include <exodusII_io_helper.h>

Public Member Functions

 Conversion ()
 Constructor. More...
 
int get_node_map (int i) const
 
int get_inverse_node_map (int i) const
 
int get_side_map (int i) const
 
int get_inverse_side_map (int i) const
 
int get_shellface_map (int i) const
 
int get_inverse_shellface_map (int i) const
 
ElemType libmesh_elem_type () const
 
std::string exodus_elem_type () const
 
std::size_t get_shellface_index_offset () const
 

Public Attributes

const std::vector< int > * node_map
 Pointer to the node map for this element. More...
 
const std::vector< int > * inverse_node_map
 Pointer to the inverse node map for this element. More...
 
const std::vector< int > * side_map
 Pointer to the side map for this element. More...
 
const std::vector< int > * inverse_side_map
 Pointer to the inverse side map for this element. More...
 
const std::vector< int > * shellface_map
 Pointer to the shellface map for this element. More...
 
const std::vector< int > * inverse_shellface_map
 Pointer to the inverse shellface map for this element. More...
 
size_t shellface_index_offset
 The shellface index offset defines the offset due to a difference between libMesh and Exodus in indexing sidesets. More...
 
ElemType libmesh_type
 The canonical (i.e. More...
 
std::string exodus_type
 The string corresponding to the Exodus type for this element. More...
 

Static Public Attributes

static const int invalid_id = std::numeric_limits<int>::max()
 An invalid_id that can be returned to signal failure in case something goes wrong. More...
 

Detailed Description

Definition at line 834 of file exodusII_io_helper.h.

Constructor & Destructor Documentation

◆ Conversion()

libMesh::ExodusII_IO_Helper::Conversion::Conversion ( )
inline

Constructor.

Zero initializes all variables.

Definition at line 841 of file exodusII_io_helper.h.

842  : node_map(nullptr),
843  inverse_node_map(nullptr),
844  side_map(nullptr),
845  inverse_side_map(nullptr),
846  shellface_map(nullptr),
847  inverse_shellface_map(nullptr),
850  exodus_type("")
851  {}

Member Function Documentation

◆ exodus_elem_type()

std::string libMesh::ExodusII_IO_Helper::Conversion::exodus_elem_type ( ) const
Returns
The string corresponding to the Exodus type for this element.

Definition at line 3341 of file exodusII_io_helper.C.

3342 {
3343  return exodus_type;
3344 }

◆ get_inverse_node_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_inverse_node_map ( int  i) const
Returns
The ith component of the inverse node map for this element.

The inverse node map maps the libmesh node numbering to Exodus' node numbering.

Note
All elements except Hex27 currently have the same node numbering as libmesh elements.

Definition at line 3270 of file exodusII_io_helper.C.

3271 {
3272  if (!inverse_node_map)
3273  return i;
3274 
3275  libmesh_assert_less (i, inverse_node_map->size());
3276  return (*inverse_node_map)[i];
3277 }

◆ get_inverse_shellface_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_inverse_shellface_map ( int  i) const
Returns
The ith component of the inverse shellface map for this element.

Definition at line 3323 of file exodusII_io_helper.C.

3324 {
3325  if (!inverse_shellface_map)
3326  return i + 1;
3327 
3328  libmesh_assert_less (i, inverse_shellface_map->size());
3329  return (*inverse_shellface_map)[i];
3330 }

◆ get_inverse_side_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_inverse_side_map ( int  i) const
Returns
The ith component of the side map for this element.

The side map maps the libMesh side numbering format to this exodus's format.

Definition at line 3296 of file exodusII_io_helper.C.

3297 {
3298  // For identity side mappings, we our convention is to return a 1-based index.
3299  if (!inverse_side_map)
3300  return i + 1;
3301 
3302  libmesh_assert_less (i, inverse_side_map->size());
3303  return (*inverse_side_map)[i];
3304 }

◆ get_node_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_node_map ( int  i) const
Returns
The ith component of the node map for this element.

The node map maps the exodusII node numbering format to this library's format.

Definition at line 3259 of file exodusII_io_helper.C.

3260 {
3261  if (!node_map)
3262  return i;
3263 
3264  libmesh_assert_less (i, node_map->size());
3265  return (*node_map)[i];
3266 }

◆ get_shellface_index_offset()

std::size_t libMesh::ExodusII_IO_Helper::Conversion::get_shellface_index_offset ( ) const
Returns
The shellface index offset.

Definition at line 3351 of file exodusII_io_helper.C.

3352 {
3353  return shellface_index_offset;
3354 }

◆ get_shellface_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_shellface_map ( int  i) const
Returns
The ith component of the shellface map for this element.
Note
Nothing is currently using this.

Definition at line 3312 of file exodusII_io_helper.C.

3313 {
3314  if (!shellface_map)
3315  return i;
3316 
3317  libmesh_assert_less (i, shellface_map->size());
3318  return (*shellface_map)[i];
3319 }

◆ get_side_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_side_map ( int  i) const
Returns
The ith component of the side map for this element.

The side map maps the exodusII side numbering format to this library's format.

Definition at line 3281 of file exodusII_io_helper.C.

3282 {
3283  if (!side_map)
3284  return i;
3285 
3286  // If we asked for a side that doesn't exist, return an invalid_id
3287  // and allow higher-level code to handle it.
3288  if (static_cast<size_t>(i) >= side_map->size())
3289  return invalid_id;
3290 
3291  return (*side_map)[i];
3292 }

Referenced by libMesh::ExodusII_IO_Helper::read_sideset_data(), and libMesh::ExodusII_IO_Helper::write_sideset_data().

◆ libmesh_elem_type()

ElemType libMesh::ExodusII_IO_Helper::Conversion::libmesh_elem_type ( ) const
Returns
The canonical element type for this element.

The canonical element type is the standard element type understood by this library.

Definition at line 3334 of file exodusII_io_helper.C.

3335 {
3336  return libmesh_type;
3337 }

Member Data Documentation

◆ exodus_type

std::string libMesh::ExodusII_IO_Helper::Conversion::exodus_type

The string corresponding to the Exodus type for this element.

Definition at line 974 of file exodusII_io_helper.h.

◆ invalid_id

const int libMesh::ExodusII_IO_Helper::Conversion::invalid_id = std::numeric_limits<int>::max()
static

An invalid_id that can be returned to signal failure in case something goes wrong.

Definition at line 922 of file exodusII_io_helper.h.

Referenced by libMesh::ExodusII_IO::read().

◆ inverse_node_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::inverse_node_map

Pointer to the inverse node map for this element.

For all elements except for the Hex27, this is the same as the node map.

Definition at line 934 of file exodusII_io_helper.h.

◆ inverse_shellface_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::inverse_shellface_map

Pointer to the inverse shellface map for this element.

Definition at line 956 of file exodusII_io_helper.h.

◆ inverse_side_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::inverse_side_map

Pointer to the inverse side map for this element.

Definition at line 944 of file exodusII_io_helper.h.

◆ libmesh_type

ElemType libMesh::ExodusII_IO_Helper::Conversion::libmesh_type

The canonical (i.e.

standard for this library) element type.

Definition at line 969 of file exodusII_io_helper.h.

◆ node_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::node_map

Pointer to the node map for this element.

Definition at line 927 of file exodusII_io_helper.h.

◆ shellface_index_offset

size_t libMesh::ExodusII_IO_Helper::Conversion::shellface_index_offset

The shellface index offset defines the offset due to a difference between libMesh and Exodus in indexing sidesets.

This is relevant for shell elements, for example, since Exodus includes extra "shell face" sides in that case.

Definition at line 963 of file exodusII_io_helper.h.

◆ shellface_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::shellface_map

Pointer to the shellface map for this element.

Only the inverse is actually used currently, this one is provided for completeness and libmesh_ingore()d to avoid warnings.

Definition at line 951 of file exodusII_io_helper.h.

◆ side_map

const std::vector<int>* libMesh::ExodusII_IO_Helper::Conversion::side_map

Pointer to the side map for this element.

Definition at line 939 of file exodusII_io_helper.h.


The documentation for this class was generated from the following files:
libMesh::ExodusII_IO_Helper::Conversion::side_map
const std::vector< int > * side_map
Pointer to the side map for this element.
Definition: exodusII_io_helper.h:939
libMesh::ExodusII_IO_Helper::Conversion::libmesh_type
ElemType libmesh_type
The canonical (i.e.
Definition: exodusII_io_helper.h:969
libMesh::ExodusII_IO_Helper::Conversion::inverse_side_map
const std::vector< int > * inverse_side_map
Pointer to the inverse side map for this element.
Definition: exodusII_io_helper.h:944
libMesh::ExodusII_IO_Helper::Conversion::shellface_map
const std::vector< int > * shellface_map
Pointer to the shellface map for this element.
Definition: exodusII_io_helper.h:951
libMesh::ExodusII_IO_Helper::Conversion::node_map
const std::vector< int > * node_map
Pointer to the node map for this element.
Definition: exodusII_io_helper.h:927
libMesh::ExodusII_IO_Helper::Conversion::invalid_id
static const int invalid_id
An invalid_id that can be returned to signal failure in case something goes wrong.
Definition: exodusII_io_helper.h:922
libMesh::INVALID_ELEM
Definition: enum_elem_type.h:75
libMesh::ExodusII_IO_Helper::Conversion::exodus_type
std::string exodus_type
The string corresponding to the Exodus type for this element.
Definition: exodusII_io_helper.h:974
libMesh::ExodusII_IO_Helper::Conversion::inverse_shellface_map
const std::vector< int > * inverse_shellface_map
Pointer to the inverse shellface map for this element.
Definition: exodusII_io_helper.h:956
libMesh::ExodusII_IO_Helper::Conversion::shellface_index_offset
size_t shellface_index_offset
The shellface index offset defines the offset due to a difference between libMesh and Exodus in index...
Definition: exodusII_io_helper.h:963
libMesh::ExodusII_IO_Helper::Conversion::inverse_node_map
const std::vector< int > * inverse_node_map
Pointer to the inverse node map for this element.
Definition: exodusII_io_helper.h:934