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

4863 {
4864  return exodus_type;
4865 }
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 4791 of file exodusII_io_helper.C.

4792 {
4793  if (!inverse_node_map)
4794  return i;
4795 
4796  libmesh_assert_less (i, inverse_node_map->size());
4797  return (*inverse_node_map)[i];
4798 }
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 4844 of file exodusII_io_helper.C.

4845 {
4846  if (!inverse_shellface_map)
4847  return i + 1;
4848 
4849  libmesh_assert_less (i, inverse_shellface_map->size());
4850  return (*inverse_shellface_map)[i];
4851 }
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 4817 of file exodusII_io_helper.C.

4818 {
4819  // For identity side mappings, we our convention is to return a 1-based index.
4820  if (!inverse_side_map)
4821  return i + 1;
4822 
4823  libmesh_assert_less (i, inverse_side_map->size());
4824  return (*inverse_side_map)[i];
4825 }
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 4780 of file exodusII_io_helper.C.

4781 {
4782  if (!node_map)
4783  return i;
4784 
4785  libmesh_assert_less (i, node_map->size());
4786  return (*node_map)[i];
4787 }
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 4872 of file exodusII_io_helper.C.

4873 {
4874  return shellface_index_offset;
4875 }
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 4833 of file exodusII_io_helper.C.

4834 {
4835  if (!shellface_map)
4836  return i;
4837 
4838  libmesh_assert_less (i, shellface_map->size());
4839  return (*shellface_map)[i];
4840 }
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 4802 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().

4803 {
4804  if (!side_map)
4805  return i;
4806 
4807  // If we asked for a side that doesn't exist, return an invalid_id
4808  // and allow higher-level code to handle it.
4809  if (static_cast<size_t>(i) >= side_map->size())
4810  return invalid_id;
4811 
4812  return (*side_map)[i];
4813 }
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 4855 of file exodusII_io_helper.C.

4856 {
4857  return libmesh_type;
4858 }
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: