libMesh::ExodusII_IO_Helper::Conversion Class Reference

#include <exodusII_io_helper.h>

Public Member Functions

 Conversion (const int *nm, size_t nm_size, const int *inm, size_t inm_size, const int *sm, size_t sm_size, const int *ism, size_t ism_size, const ElemType ct, std::string ex_type)
 
 Conversion (const int *nm, size_t nm_size, const int *inm, size_t inm_size, const int *sm, size_t sm_size, const int *ism, size_t ism_size, const int *sfm, size_t sfm_size, const int *isfm, size_t isfm_size, size_t sfi_offset, const ElemType ct, std::string ex_type)
 
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 get_canonical_type () const
 
std::string exodus_elem_type () const
 
std::size_t get_shellface_index_offset () const
 

Static Public Attributes

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

Private Attributes

const int * node_map
 
size_t node_map_size
 
const int * inverse_node_map
 
size_t inverse_node_map_size
 
const int * side_map
 
size_t side_map_size
 
const int * inverse_side_map
 
size_t inverse_side_map_size
 
const int * shellface_map
 
size_t shellface_map_size
 
const int * inverse_shellface_map
 
size_t inverse_shellface_map_size
 
size_t shellface_index_offset
 
const ElemType canonical_type
 
const std::string exodus_type
 

Detailed Description

Definition at line 669 of file exodusII_io_helper.h.

Constructor & Destructor Documentation

◆ Conversion() [1/2]

libMesh::ExodusII_IO_Helper::Conversion::Conversion ( const int *  nm,
size_t  nm_size,
const int *  inm,
size_t  inm_size,
const int *  sm,
size_t  sm_size,
const int *  ism,
size_t  ism_size,
const ElemType  ct,
std::string  ex_type 
)
inline

Constructor. Initializes the const private member variables.

Definition at line 677 of file exodusII_io_helper.h.

687  : node_map(nm),
688  node_map_size(nm_size),
689  inverse_node_map(inm),
690  inverse_node_map_size(inm_size),
691  side_map(sm),
692  side_map_size(sm_size),
693  inverse_side_map(ism),
694  inverse_side_map_size(ism_size),
695  shellface_map(nullptr),
697  inverse_shellface_map(nullptr),
700  canonical_type(ct),
701  exodus_type(ex_type)
702  {}

◆ Conversion() [2/2]

libMesh::ExodusII_IO_Helper::Conversion::Conversion ( const int *  nm,
size_t  nm_size,
const int *  inm,
size_t  inm_size,
const int *  sm,
size_t  sm_size,
const int *  ism,
size_t  ism_size,
const int *  sfm,
size_t  sfm_size,
const int *  isfm,
size_t  isfm_size,
size_t  sfi_offset,
const ElemType  ct,
std::string  ex_type 
)
inline

Constructor. Initializes the const private member variables. In this case we also initialize shellface data.

Definition at line 708 of file exodusII_io_helper.h.

References inverse_node_map_size, inverse_shellface_map_size, inverse_side_map_size, libMesh::libmesh_ignore(), node_map_size, and shellface_map_size.

723  : node_map(nm),
724  node_map_size(nm_size),
725  inverse_node_map(inm),
726  inverse_node_map_size(inm_size),
727  side_map(sm),
728  side_map_size(sm_size),
729  inverse_side_map(ism),
730  inverse_side_map_size(ism_size),
731  shellface_map(sfm),
732  shellface_map_size(sfm_size),
733  inverse_shellface_map(isfm),
734  inverse_shellface_map_size(isfm_size),
735  shellface_index_offset(sfi_offset),
736  canonical_type(ct),
737  exodus_type(ex_type)
738  {
739  // libmesh_ignore variables that are only used in asserts to avoid
740  // compiler warnings.
746  }
void libmesh_ignore(const Args &...)

Member Function Documentation

◆ exodus_elem_type()

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

Definition at line 826 of file exodusII_io_helper.h.

References exodus_type.

Referenced by libMesh::Nemesis_IO_Helper::write_elements(), and libMesh::ExodusII_IO_Helper::write_elements().

826 { return exodus_type; }

◆ get_canonical_type()

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

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

Definition at line 821 of file exodusII_io_helper.h.

References canonical_type.

Referenced by libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), and libMesh::ExodusII_IO_Helper::write_elements().

◆ get_inverse_node_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_inverse_node_map ( int  i) const
inline
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 770 of file exodusII_io_helper.h.

References inverse_node_map, and inverse_node_map_size.

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

771  {
772  libmesh_assert_less (static_cast<size_t>(i), inverse_node_map_size);
773  return inverse_node_map[i];
774  }

◆ get_inverse_shellface_map()

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

Definition at line 809 of file exodusII_io_helper.h.

References inverse_shellface_map, and inverse_shellface_map_size.

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

810  {
811  libmesh_assert_less (static_cast<size_t>(i), inverse_shellface_map_size);
812  return inverse_shellface_map[i];
813  }

◆ get_inverse_side_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_inverse_side_map ( int  i) const
inline
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 790 of file exodusII_io_helper.h.

References inverse_side_map, and inverse_side_map_size.

Referenced by libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO_Helper::write_sidesets(), and libMesh::ExodusII_IO_Helper::write_sidesets().

791  {
792  libmesh_assert_less (static_cast<size_t>(i), inverse_side_map_size);
793  return inverse_side_map[i];
794  }

◆ get_node_map()

int libMesh::ExodusII_IO_Helper::Conversion::get_node_map ( int  i) const
inline
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 754 of file exodusII_io_helper.h.

References node_map, and node_map_size.

Referenced by libMesh::Nemesis_IO_Helper::build_element_and_node_maps().

755  {
756  libmesh_assert_less (static_cast<size_t>(i), node_map_size);
757  return node_map[i];
758  }

◆ get_shellface_index_offset()

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

Definition at line 831 of file exodusII_io_helper.h.

References shellface_index_offset.

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

◆ get_shellface_map()

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

Definition at line 800 of file exodusII_io_helper.h.

References shellface_map, and shellface_map_size.

801  {
802  libmesh_assert_less (static_cast<size_t>(i), shellface_map_size);
803  return shellface_map[i];
804  }

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

Referenced by libMesh::Nemesis_IO::read(), and libMesh::ExodusII_IO::read().

2492 {
2493  // If we asked for a side that doesn't exist, return an invalid_id
2494  // and allow higher-level code to handle it.
2495  if (static_cast<size_t>(i) >= side_map_size)
2496  return invalid_id;
2497 
2498  return side_map[i];
2499 }

Member Data Documentation

◆ canonical_type

const ElemType libMesh::ExodusII_IO_Helper::Conversion::canonical_type
private

The canonical (i.e. standard for this library) element type.

Definition at line 920 of file exodusII_io_helper.h.

Referenced by get_canonical_type().

◆ exodus_type

const std::string libMesh::ExodusII_IO_Helper::Conversion::exodus_type
private

The string corresponding to the Exodus type for this element

Definition at line 925 of file exodusII_io_helper.h.

Referenced by exodus_elem_type().

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

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

◆ inverse_node_map

const int* libMesh::ExodusII_IO_Helper::Conversion::inverse_node_map
private

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

Referenced by get_inverse_node_map().

◆ inverse_node_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::inverse_node_map_size
private

The size of the inverse node map array, this helps with bounds checking and is only used in asserts.

Definition at line 862 of file exodusII_io_helper.h.

Referenced by Conversion(), and get_inverse_node_map().

◆ inverse_shellface_map

const int* libMesh::ExodusII_IO_Helper::Conversion::inverse_shellface_map
private

Pointer to the inverse shellface map for this element.

Definition at line 901 of file exodusII_io_helper.h.

Referenced by get_inverse_shellface_map().

◆ inverse_shellface_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::inverse_shellface_map_size
private

The size of the inverse shellface map array, this helps with bounds checking and is only used in asserts.

Definition at line 907 of file exodusII_io_helper.h.

Referenced by Conversion(), and get_inverse_shellface_map().

◆ inverse_side_map

const int* libMesh::ExodusII_IO_Helper::Conversion::inverse_side_map
private

Pointer to the inverse side map for this element.

Definition at line 877 of file exodusII_io_helper.h.

Referenced by get_inverse_side_map().

◆ inverse_side_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::inverse_side_map_size
private

The size of the inverse side map array, this helps with bounds checking and is only used in asserts.

Definition at line 883 of file exodusII_io_helper.h.

Referenced by Conversion(), and get_inverse_side_map().

◆ node_map

const int* libMesh::ExodusII_IO_Helper::Conversion::node_map
private

Pointer to the node map for this element.

Definition at line 843 of file exodusII_io_helper.h.

Referenced by get_node_map().

◆ node_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::node_map_size
private

The size of the node map array, this helps with bounds checking and is only used in asserts.

Definition at line 849 of file exodusII_io_helper.h.

Referenced by Conversion(), and get_node_map().

◆ shellface_index_offset

size_t libMesh::ExodusII_IO_Helper::Conversion::shellface_index_offset
private

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

Referenced by get_shellface_index_offset().

◆ shellface_map

const int* libMesh::ExodusII_IO_Helper::Conversion::shellface_map
private

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

Referenced by get_shellface_map().

◆ shellface_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::shellface_map_size
private

The size of the shellface map array, this helps with bounds checking and is only used in asserts.

Definition at line 896 of file exodusII_io_helper.h.

Referenced by Conversion(), and get_shellface_map().

◆ side_map

const int* libMesh::ExodusII_IO_Helper::Conversion::side_map
private

Pointer to the side map for this element.

Definition at line 867 of file exodusII_io_helper.h.

◆ side_map_size

size_t libMesh::ExodusII_IO_Helper::Conversion::side_map_size
private

The size of the side map array, this helps with bounds checking...

Definition at line 872 of file exodusII_io_helper.h.


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