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...
 
int dim
 The element dimension; useful since we don't seem to have a cheap way to look this up from ElemType. More...
 
int n_nodes
 The number of nodes per element; useful likewise. 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 1090 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 1097 of file exodusII_io_helper.h.

1098  : node_map(nullptr),
1099  inverse_node_map(nullptr),
1100  side_map(nullptr),
1101  inverse_side_map(nullptr),
1102  shellface_map(nullptr),
1103  inverse_shellface_map(nullptr),
1106  dim(0),
1107  n_nodes(0),
1108  exodus_type("")
1109  {}
const std::vector< int > * node_map
Pointer to the node map for this element.
const std::vector< int > * inverse_side_map
Pointer to the inverse side map for this element.
std::string exodus_type
The string corresponding to the Exodus type for this element.
int n_nodes
The number of nodes per element; useful likewise.
const std::vector< int > * inverse_shellface_map
Pointer to the inverse shellface map for this element.
int dim
The element dimension; useful since we don&#39;t seem to have a cheap way to look this up from ElemType...
const std::vector< int > * shellface_map
Pointer to the shellface map for this element.
const std::vector< int > * side_map
Pointer to the side map for this element.
size_t shellface_index_offset
The shellface index offset defines the offset due to a difference between libMesh and Exodus in index...
const std::vector< int > * inverse_node_map
Pointer to the inverse node map for this element.
ElemType libmesh_type
The canonical (i.e.

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 4835 of file exodusII_io_helper.C.

4836 {
4837  return exodus_type;
4838 }
std::string exodus_type
The string corresponding to the Exodus type for this element.

◆ 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 4764 of file exodusII_io_helper.C.

4765 {
4766  if (!inverse_node_map)
4767  return i;
4768 
4769  libmesh_assert_less (i, inverse_node_map->size());
4770  return (*inverse_node_map)[i];
4771 }
const std::vector< int > * inverse_node_map
Pointer to the inverse node map for this element.

◆ 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 4817 of file exodusII_io_helper.C.

4818 {
4819  if (!inverse_shellface_map)
4820  return i + 1;
4821 
4822  libmesh_assert_less (i, inverse_shellface_map->size());
4823  return (*inverse_shellface_map)[i];
4824 }
const std::vector< int > * inverse_shellface_map
Pointer to the inverse shellface map for this element.

◆ 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 4790 of file exodusII_io_helper.C.

4791 {
4792  // For identity side mappings, we our convention is to return a 1-based index.
4793  if (!inverse_side_map)
4794  return i + 1;
4795 
4796  libmesh_assert_less (i, inverse_side_map->size());
4797  return (*inverse_side_map)[i];
4798 }
const std::vector< int > * inverse_side_map
Pointer to the inverse side map for this element.

◆ 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 4753 of file exodusII_io_helper.C.

4754 {
4755  if (!node_map)
4756  return i;
4757 
4758  libmesh_assert_less (i, node_map->size());
4759  return (*node_map)[i];
4760 }
const std::vector< int > * node_map
Pointer to the node map for this element.

◆ 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 4845 of file exodusII_io_helper.C.

4846 {
4847  return shellface_index_offset;
4848 }
size_t shellface_index_offset
The shellface index offset defines the offset due to a difference between libMesh and Exodus in index...

◆ 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 4806 of file exodusII_io_helper.C.

4807 {
4808  if (!shellface_map)
4809  return i;
4810 
4811  libmesh_assert_less (i, shellface_map->size());
4812  return (*shellface_map)[i];
4813 }
const std::vector< int > * shellface_map
Pointer to the shellface map for this element.

◆ 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 4775 of file exodusII_io_helper.C.

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

4776 {
4777  if (!side_map)
4778  return i;
4779 
4780  // If we asked for a side that doesn't exist, return an invalid_id
4781  // and allow higher-level code to handle it.
4782  if (static_cast<size_t>(i) >= side_map->size())
4783  return invalid_id;
4784 
4785  return (*side_map)[i];
4786 }
static const int invalid_id
An invalid_id that can be returned to signal failure in case something goes wrong.
const std::vector< int > * side_map
Pointer to the side map for this element.

◆ 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 4828 of file exodusII_io_helper.C.

4829 {
4830  return libmesh_type;
4831 }
ElemType libmesh_type
The canonical (i.e.

Member Data Documentation

◆ dim

int libMesh::ExodusII_IO_Helper::Conversion::dim

The element dimension; useful since we don't seem to have a cheap way to look this up from ElemType.

Definition at line 1233 of file exodusII_io_helper.h.

◆ exodus_type

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

The string corresponding to the Exodus type for this element.

Definition at line 1243 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 1180 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 1192 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 1214 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 1202 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 1227 of file exodusII_io_helper.h.

◆ n_nodes

int libMesh::ExodusII_IO_Helper::Conversion::n_nodes

The number of nodes per element; useful likewise.

Definition at line 1238 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 1185 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 1221 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 1209 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 1197 of file exodusII_io_helper.h.


The documentation for this class was generated from the following files: