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 1142 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 1149 of file exodusII_io_helper.h.

1150  : node_map(nullptr),
1151  inverse_node_map(nullptr),
1152  side_map(nullptr),
1153  inverse_side_map(nullptr),
1154  shellface_map(nullptr),
1155  inverse_shellface_map(nullptr),
1158  dim(0),
1159  n_nodes(0),
1160  exodus_type("")
1161  {}
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 5042 of file exodusII_io_helper.C.

5043 {
5044  return exodus_type;
5045 }
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 4971 of file exodusII_io_helper.C.

4972 {
4973  if (!inverse_node_map)
4974  return i;
4975 
4976  libmesh_assert_less (i, inverse_node_map->size());
4977  return (*inverse_node_map)[i];
4978 }
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 5024 of file exodusII_io_helper.C.

5025 {
5026  if (!inverse_shellface_map)
5027  return i + 1;
5028 
5029  libmesh_assert_less (i, inverse_shellface_map->size());
5030  return (*inverse_shellface_map)[i];
5031 }
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 4997 of file exodusII_io_helper.C.

4998 {
4999  // For identity side mappings, we our convention is to return a 1-based index.
5000  if (!inverse_side_map)
5001  return i + 1;
5002 
5003  libmesh_assert_less (i, inverse_side_map->size());
5004  return (*inverse_side_map)[i];
5005 }
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 4960 of file exodusII_io_helper.C.

4961 {
4962  if (!node_map)
4963  return i;
4964 
4965  libmesh_assert_less (i, node_map->size());
4966  return (*node_map)[i];
4967 }
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 5052 of file exodusII_io_helper.C.

5053 {
5054  return shellface_index_offset;
5055 }
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 5013 of file exodusII_io_helper.C.

5014 {
5015  if (!shellface_map)
5016  return i;
5017 
5018  libmesh_assert_less (i, shellface_map->size());
5019  return (*shellface_map)[i];
5020 }
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 4982 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().

4983 {
4984  if (!side_map)
4985  return i;
4986 
4987  // If we asked for a side that doesn't exist, return an invalid_id
4988  // and allow higher-level code to handle it.
4989  if (static_cast<size_t>(i) >= side_map->size())
4990  return invalid_id;
4991 
4992  return (*side_map)[i];
4993 }
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 5035 of file exodusII_io_helper.C.

5036 {
5037  return libmesh_type;
5038 }
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 1285 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 1295 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 1232 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 1244 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 1266 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 1254 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 1279 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 1290 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 1237 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 1273 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 1261 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 1249 of file exodusII_io_helper.h.


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