libMesh
Loading...
Searching...
No Matches
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.
 
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.
 
const std::vector< int > * inverse_node_map
 Pointer to the inverse node map for this element.
 
const std::vector< int > * side_map
 Pointer to the side map for this element.
 
const std::vector< int > * inverse_side_map
 Pointer to the inverse side map for this element.
 
const std::vector< int > * shellface_map
 Pointer to the shellface map for this element.
 
const std::vector< int > * inverse_shellface_map
 Pointer to the inverse shellface 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 indexing sidesets.
 
ElemType libmesh_type
 The canonical (i.e.
 
int dim
 The element dimension; useful since we don't seem to have a cheap way to look this up from ElemType.
 
int n_nodes
 The number of nodes per element; useful likewise.
 
std::string exodus_type
 The string corresponding to the Exodus type for this element.
 

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.
 

Detailed Description

Definition at line 1163 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 1170 of file exodusII_io_helper.h.

1171 : node_map(nullptr),
1172 inverse_node_map(nullptr),
1173 side_map(nullptr),
1174 inverse_side_map(nullptr),
1175 shellface_map(nullptr),
1176 inverse_shellface_map(nullptr),
1179 dim(0),
1180 n_nodes(0),
1181 exodus_type("")
1182 {}
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_side_map
Pointer to the inverse side map for this element.
const std::vector< int > * inverse_shellface_map
Pointer to the inverse shellface map for this element.
std::string exodus_type
The string corresponding to the Exodus type for this element.
int dim
The element dimension; useful since we don'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 > * node_map
Pointer to the node map for this element.
const std::vector< int > * side_map
Pointer to the side map for this element.
const std::vector< int > * inverse_node_map
Pointer to the inverse node map for this element.
int n_nodes
The number of nodes per element; useful likewise.

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

5543{
5544 return exodus_type;
5545}

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

5472{
5473 if (!inverse_node_map)
5474 return i;
5475
5476 libmesh_assert_less (i, inverse_node_map->size());
5477 return (*inverse_node_map)[i];
5478}

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

5525{
5527 return i + 1;
5528
5529 libmesh_assert_less (i, inverse_shellface_map->size());
5530 return (*inverse_shellface_map)[i];
5531}

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

5498{
5499 // For identity side mappings, we our convention is to return a 1-based index.
5500 if (!inverse_side_map)
5501 return i + 1;
5502
5503 libmesh_assert_less (i, inverse_side_map->size());
5504 return (*inverse_side_map)[i];
5505}

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

5461{
5462 if (!node_map)
5463 return i;
5464
5465 libmesh_assert_less (i, node_map->size());
5466 return (*node_map)[i];
5467}

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

5553{
5555}

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

5514{
5515 if (!shellface_map)
5516 return i;
5517
5518 libmesh_assert_less (i, shellface_map->size());
5519 return (*shellface_map)[i];
5520}

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

5483{
5484 if (!side_map)
5485 return i;
5486
5487 // If we asked for a side that doesn't exist, return an invalid_id
5488 // and allow higher-level code to handle it.
5489 if (static_cast<size_t>(i) >= side_map->size())
5490 return invalid_id;
5491
5492 return (*side_map)[i];
5493}
static const int invalid_id
An invalid_id that can be returned to signal failure in case something goes wrong.

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

5536{
5537 return libmesh_type;
5538}

Referenced by libMesh::ExodusII_IO_Helper::read_elem_in_block().

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

Referenced by libMesh::ExodusII_IO_Helper::read_elem_in_block().

◆ exodus_type

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

The string corresponding to the Exodus type for this element.

Definition at line 1316 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 1253 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 1265 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 1287 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 1275 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 1300 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 1311 of file exodusII_io_helper.h.

Referenced by libMesh::ExodusII_IO_Helper::read_elem_in_block().

◆ node_map

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

Pointer to the node map for this element.

Definition at line 1258 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 1294 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 1282 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 1270 of file exodusII_io_helper.h.


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