libMesh::ExodusII_IO_Helper::ElementMaps Class Reference

#include <exodusII_io_helper.h>

Public Member Functions

 ElementMaps ()
 
ExodusII_IO_Helper::Conversion assign_conversion (std::string type_str)
 
ExodusII_IO_Helper::Conversion assign_conversion (const ElemType type)
 

Static Public Attributes

static const int edge2_node_map [2] = {0, 1}
 
static const int edge3_node_map [3] = {0, 1, 2}
 
static const int edge_edge_map [2] = {0, 1}
 
static const int edge_inverse_edge_map [2] = {1, 2}
 
static const int quad4_node_map [4] = {0, 1, 2, 3}
 
static const int quad8_node_map [8] = {0, 1, 2, 3, 4, 5, 6, 7}
 
static const int quad9_node_map [9] = {0, 1, 2, 3, 4, 5, 6, 7, 8}
 
static const int tri3_node_map [3] = {0, 1, 2}
 
static const int tri6_node_map [6] = {0, 1, 2, 3, 4, 5}
 
static const int tri_edge_map [3] = {0, 1, 2}
 
static const int quad_edge_map [4] = {0, 1, 2, 3}
 
static const int tri_inverse_edge_map [3] = {1, 2, 3}
 
static const int quad_inverse_edge_map [4] = {1, 2, 3, 4}
 
static const int hex8_node_map [8] = {0, 1, 2, 3, 4, 5, 6, 7}
 
static const int hex20_node_map [20]
 
static const int hex27_node_map [27]
 
static const int hex27_inverse_node_map [27]
 
static const int tet4_node_map [4] = {0, 1, 2, 3}
 
static const int tet10_node_map [10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
 
static const int prism6_node_map [6] = {0, 1, 2, 3, 4, 5}
 
static const int prism15_node_map [15]
 
static const int prism18_node_map [18]
 
static const int pyramid5_node_map [5] = {0, 1, 2, 3, 4}
 
static const int pyramid14_node_map [14] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}
 
static const int hex_face_map [6] = {1, 2, 3, 4, 0, 5}
 
static const int hex27_face_map [6] = {1, 2, 3, 4, 0, 5}
 
static const int tet_face_map [4] = {1, 2, 3, 0}
 
static const int prism_face_map [5] = {1, 2, 3, 0, 4}
 
static const int pyramid_face_map [5] = {-1,-1,-1,-1,-1}
 
static const int hex_inverse_face_map [6] = {5, 1, 2, 3, 4, 6}
 
static const int hex27_inverse_face_map [6] = {5, 1, 2, 3, 4, 6}
 
static const int tet_inverse_face_map [4] = {4, 1, 2, 3}
 
static const int prism_inverse_face_map [5] = {4, 1, 2, 3, 5}
 
static const int pyramid_inverse_face_map [5] = {-1,-1,-1,-1,-1}
 

Detailed Description

Definition at line 739 of file exodusII_io_helper.h.

Constructor & Destructor Documentation

libMesh::ExodusII_IO_Helper::ElementMaps::ElementMaps ( )
inline

Constructor.

Definition at line 746 of file exodusII_io_helper.h.

746 {}

Member Function Documentation

ExodusII_IO_Helper::Conversion libMesh::ExodusII_IO_Helper::ElementMaps::assign_conversion ( std::string  type_str)
Returns
a conversion object given an element type name.

Definition at line 1831 of file exodusII_io_helper.C.

References libMeshEnums::EDGE2, and libMesh::err.

Referenced by libMesh::Nemesis_IO_Helper::build_element_and_node_maps(), libMesh::Nemesis_IO_Helper::compute_internal_and_border_elems_and_internal_nodes(), libMesh::Nemesis_IO::read(), libMesh::ExodusII_IO::read(), libMesh::ExodusII_IO_Helper::write_elements(), libMesh::Nemesis_IO_Helper::write_elements(), libMesh::ExodusII_IO_Helper::write_elements_discontinuous(), libMesh::ExodusII_IO_Helper::write_sidesets(), and libMesh::Nemesis_IO_Helper::write_sidesets().

1832 {
1833  init_element_equivalence_map();
1834 
1835  // Do only upper-case comparisons
1836  std::transform(type_str.begin(), type_str.end(), type_str.begin(), ::toupper);
1837 
1838  std::map<std::string, libMeshEnums::ElemType>::iterator it =
1839  element_equivalence_map.find(type_str);
1840 
1841  if (it != element_equivalence_map.end())
1842  return assign_conversion( it->second );
1843  else
1844  {
1845  libMesh::err << "ERROR! Unrecognized element type_str: " << type_str << std::endl;
1846  libmesh_error();
1847  }
1848 
1849  libmesh_error();
1850 
1851  // dummy return value, we won't get here
1852  return assign_conversion (EDGE2);
1853 }
ExodusII_IO_Helper::Conversion libMesh::ExodusII_IO_Helper::ElementMaps::assign_conversion ( const ElemType  type)
Returns
a conversion object given an element type.

Definition at line 1857 of file exodusII_io_helper.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID14, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

1858 {
1859  switch (type)
1860  {
1861  case EDGE2:
1862  {
1863  const Conversion conv(edge2_node_map,
1864  ARRAY_LENGTH(edge2_node_map),
1865  edge2_node_map, // inverse node map same as forward node map
1866  ARRAY_LENGTH(edge2_node_map),
1867  edge_edge_map,
1868  ARRAY_LENGTH(edge_edge_map),
1870  ARRAY_LENGTH(edge_inverse_edge_map),
1871  EDGE2, "EDGE2");
1872  return conv;
1873  }
1874  case EDGE3:
1875  {
1876  const Conversion conv(edge3_node_map,
1877  ARRAY_LENGTH(edge3_node_map),
1878  edge3_node_map, // inverse node map same as forward node map
1879  ARRAY_LENGTH(edge3_node_map),
1880  edge_edge_map,
1881  ARRAY_LENGTH(edge_edge_map),
1883  ARRAY_LENGTH(edge_inverse_edge_map),
1884  EDGE3, "EDGE3");
1885  return conv;
1886  }
1887  case QUAD4:
1888  {
1889  const Conversion conv(quad4_node_map,
1890  ARRAY_LENGTH(quad4_node_map),
1891  quad4_node_map, // inverse node map same as forward node map
1892  ARRAY_LENGTH(quad4_node_map),
1893  quad_edge_map,
1894  ARRAY_LENGTH(quad_edge_map),
1896  ARRAY_LENGTH(quad_inverse_edge_map),
1897  QUAD4,
1898  "QUAD4");
1899  return conv;
1900  }
1901 
1902  case QUAD8:
1903  {
1904  const Conversion conv(quad8_node_map,
1905  ARRAY_LENGTH(quad8_node_map),
1906  quad8_node_map, // inverse node map same as forward node map
1907  ARRAY_LENGTH(quad8_node_map),
1908  quad_edge_map,
1909  ARRAY_LENGTH(quad_edge_map),
1911  ARRAY_LENGTH(quad_inverse_edge_map),
1912  QUAD8,
1913  "QUAD8");
1914  return conv;
1915  }
1916 
1917  case QUAD9:
1918  {
1919  const Conversion conv(quad9_node_map,
1920  ARRAY_LENGTH(quad9_node_map),
1921  quad9_node_map, // inverse node map same as forward node map
1922  ARRAY_LENGTH(quad9_node_map),
1923  quad_edge_map,
1924  ARRAY_LENGTH(quad_edge_map),
1926  ARRAY_LENGTH(quad_inverse_edge_map),
1927  QUAD9,
1928  "QUAD9");
1929  return conv;
1930  }
1931 
1932  case TRI3:
1933  {
1934  const Conversion conv(tri3_node_map,
1935  ARRAY_LENGTH(tri3_node_map),
1936  tri3_node_map, // inverse node map same as forward node map
1937  ARRAY_LENGTH(tri3_node_map),
1938  tri_edge_map,
1939  ARRAY_LENGTH(tri_edge_map),
1941  ARRAY_LENGTH(tri_inverse_edge_map),
1942  TRI3,
1943  "TRI3");
1944  return conv;
1945  }
1946 
1947  case TRI6:
1948  {
1949  const Conversion conv(tri6_node_map,
1950  ARRAY_LENGTH(tri6_node_map),
1951  tri6_node_map, // inverse node map same as forward node map
1952  ARRAY_LENGTH(tri6_node_map),
1953  tri_edge_map,
1954  ARRAY_LENGTH(tri_edge_map),
1956  ARRAY_LENGTH(tri_inverse_edge_map),
1957  TRI6,
1958  "TRI6");
1959  return conv;
1960  }
1961 
1962  case HEX8:
1963  {
1964  const Conversion conv(hex8_node_map,
1965  ARRAY_LENGTH(hex8_node_map),
1966  hex8_node_map, // inverse node map same as forward node map
1967  ARRAY_LENGTH(hex8_node_map),
1968  hex_face_map,
1969  ARRAY_LENGTH(hex_face_map),
1971  ARRAY_LENGTH(hex_inverse_face_map),
1972  HEX8,
1973  "HEX8");
1974  return conv;
1975  }
1976 
1977  case HEX20:
1978  {
1979  const Conversion conv(hex20_node_map,
1980  ARRAY_LENGTH(hex20_node_map),
1981  hex20_node_map, // inverse node map same as forward node map
1982  ARRAY_LENGTH(hex20_node_map),
1983  hex_face_map,
1984  ARRAY_LENGTH(hex_face_map),
1986  ARRAY_LENGTH(hex_inverse_face_map),
1987  HEX20,
1988  "HEX20");
1989  return conv;
1990  }
1991 
1992  case HEX27:
1993  {
1994  const Conversion conv(hex27_node_map,
1995  ARRAY_LENGTH(hex27_node_map),
1996  hex27_inverse_node_map, // different inverse node map for Hex27!
1997  ARRAY_LENGTH(hex27_inverse_node_map),
1999  ARRAY_LENGTH(hex27_face_map),
2001  ARRAY_LENGTH(hex27_inverse_face_map),
2002  HEX27,
2003  "HEX27");
2004  return conv;
2005  }
2006 
2007  case TET4:
2008  {
2009  const Conversion conv(tet4_node_map,
2010  ARRAY_LENGTH(tet4_node_map),
2011  tet4_node_map, // inverse node map same as forward node map
2012  ARRAY_LENGTH(tet4_node_map),
2013  tet_face_map,
2014  ARRAY_LENGTH(tet_face_map),
2016  ARRAY_LENGTH(tet_inverse_face_map),
2017  TET4,
2018  "TETRA4");
2019  return conv;
2020  }
2021 
2022  case TET10:
2023  {
2024  const Conversion conv(tet10_node_map,
2025  ARRAY_LENGTH(tet10_node_map),
2026  tet10_node_map, // inverse node map same as forward node map
2027  ARRAY_LENGTH(tet10_node_map),
2028  tet_face_map,
2029  ARRAY_LENGTH(tet_face_map),
2031  ARRAY_LENGTH(tet_inverse_face_map),
2032  TET10,
2033  "TETRA10");
2034  return conv;
2035  }
2036 
2037  case PRISM6:
2038  {
2039  const Conversion conv(prism6_node_map,
2040  ARRAY_LENGTH(prism6_node_map),
2041  prism6_node_map, // inverse node map same as forward node map
2042  ARRAY_LENGTH(prism6_node_map),
2044  ARRAY_LENGTH(prism_face_map),
2046  ARRAY_LENGTH(prism_inverse_face_map),
2047  PRISM6,
2048  "WEDGE");
2049  return conv;
2050  }
2051 
2052  case PRISM15:
2053  {
2054  const Conversion conv(prism15_node_map,
2055  ARRAY_LENGTH(prism15_node_map),
2056  prism15_node_map, // inverse node map same as forward node map
2057  ARRAY_LENGTH(prism15_node_map),
2059  ARRAY_LENGTH(prism_face_map),
2061  ARRAY_LENGTH(prism_inverse_face_map),
2062  PRISM15,
2063  "WEDGE15");
2064  return conv;
2065  }
2066 
2067  case PRISM18:
2068  {
2069  const Conversion conv(prism18_node_map,
2070  ARRAY_LENGTH(prism18_node_map),
2071  prism18_node_map, // inverse node map same as forward node map
2072  ARRAY_LENGTH(prism18_node_map),
2074  ARRAY_LENGTH(prism_face_map),
2076  ARRAY_LENGTH(prism_inverse_face_map),
2077  PRISM18,
2078  "WEDGE18");
2079  return conv;
2080  }
2081 
2082  case PYRAMID5:
2083  {
2084  const Conversion conv(pyramid5_node_map,
2085  ARRAY_LENGTH(pyramid5_node_map),
2086  pyramid5_node_map, // inverse node map same as forward node map
2087  ARRAY_LENGTH(pyramid5_node_map),
2089  ARRAY_LENGTH(pyramid_face_map),
2091  ARRAY_LENGTH(pyramid_inverse_face_map),
2092  PYRAMID5,
2093  "PYRAMID5");
2094  return conv;
2095  }
2096 
2097  case PYRAMID14:
2098  {
2099  const Conversion conv(pyramid14_node_map,
2100  ARRAY_LENGTH(pyramid14_node_map),
2101  pyramid14_node_map, // inverse node map same as forward node map
2102  ARRAY_LENGTH(pyramid14_node_map),
2104  ARRAY_LENGTH(pyramid_face_map),
2106  ARRAY_LENGTH(pyramid_inverse_face_map),
2107  PYRAMID14,
2108  "PYRAMID14");
2109  return conv;
2110  }
2111 
2112  default:
2113  libmesh_error();
2114  }
2115 
2116  libmesh_error();
2117 
2118  // dummy return value, we will never get here
2119  const Conversion conv(tri3_node_map,
2120  ARRAY_LENGTH(tri3_node_map),
2121  tri3_node_map, // inverse node map same as forward node map
2122  ARRAY_LENGTH(tri3_node_map),
2123  tri_edge_map,
2124  ARRAY_LENGTH(tri_edge_map),
2126  ARRAY_LENGTH(tri_inverse_edge_map),
2127  TRI3,
2128  "TRI3");
2129  return conv;
2130 }

Member Data Documentation

const int libMesh::ExodusII_IO_Helper::ElementMaps::edge2_node_map = {0, 1}
static

1D node maps. These define mappings from ExodusII-formatted element numberings. The Edge2 node map. Use this map for linear elements in 1D.

Definition at line 756 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::edge3_node_map = {0, 1, 2}
static

The Edge3 node map. Use this map for quadratic elements in 1D.

Definition at line 761 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::edge_edge_map = {0, 1}
static

1D edge maps Maps the Exodus edge numbering for line elements. Useful for reading sideset information.

Definition at line 772 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::edge_inverse_edge_map = {1, 2}
static

Maps the Exodus edge numbering for line elements. Useful for writing sideset information.

Definition at line 778 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex20_node_map
static
Initial value:
= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19}

The Hex20 node map. Use this map for serendipity hexahedral elements in 3D.

Definition at line 857 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex27_face_map = {1, 2, 3, 4, 0, 5}
static

Maps the Exodus face numbering for 27-noded hexahedrals. Useful for reading sideset information.

Definition at line 926 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex27_inverse_face_map = {5, 1, 2, 3, 4, 6}
static

Maps the Exodus face numbering for 27-noded hexahedrals. Useful for writing sideset information.

Definition at line 956 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex27_inverse_node_map
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
26, 20, 25, 24, 22, 21, 23}

The Hex27 inverse node map. Use this map for writing tri-quadratic hexahedral elements in 3D.

Definition at line 869 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex27_node_map
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
21, 25, 24, 26, 23, 22, 20}

The Hex27 node map. Use this map for reading tri-quadratic hexahedral elements in 3D.

Definition at line 863 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex8_node_map = {0, 1, 2, 3, 4, 5, 6, 7}
static

3D maps. These define mappings from ExodusII-formatted element numberings. The Hex8 node map. Use this map for bi-linear hexahedral elements in 3D.

Definition at line 851 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex_face_map = {1, 2, 3, 4, 0, 5}
static

3D face maps. Maps the Exodus face numbering for general hexahedrals. Useful for reading sideset information.

Definition at line 920 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::hex_inverse_face_map = {5, 1, 2, 3, 4, 6}
static

Maps the Exodus face numbering for general hexahedrals. Useful for writing sideset information.

Definition at line 950 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::prism15_node_map
static
Initial value:
= {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14}

The Prism15 node map. Use this map for "serendipity" prisms in 3D.

Definition at line 892 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::prism18_node_map
static
Initial value:
= {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17}

The Prism18 node map.

Definition at line 897 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::prism6_node_map = {0, 1, 2, 3, 4, 5}
static

The Prism6 node map.

Definition at line 886 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::prism_face_map = {1, 2, 3, 0, 4}
static

Maps the Exodus face numbering for general prisms. Useful for reading sideset information.

Definition at line 938 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::prism_inverse_face_map = {4, 1, 2, 3, 5}
static

Maps the Exodus face numbering for general prisms. Useful for writing sideset information.

Definition at line 968 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::pyramid14_node_map = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}
static

The Pyramid5 node map. Use this map for biquadratic pyramid elements in 3D.

Definition at line 909 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::pyramid5_node_map = {0, 1, 2, 3, 4}
static

The Pyramid5 node map. Use this map for linear pyramid elements in 3D.

Definition at line 903 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::pyramid_face_map = {-1,-1,-1,-1,-1}
static

Maps the Exodus face numbering for general pyramids. Useful for reading sideset information.

Definition at line 944 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::pyramid_inverse_face_map = {-1,-1,-1,-1,-1}
static

Maps the Exodus face numbering for general pyramids. Useful for writing sideset information.

Definition at line 974 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::quad4_node_map = {0, 1, 2, 3}
static

2D node maps. These define mappings from ExodusII-formatted element numberings. The Quad4 node map. Use this map for bi-linear quadrilateral elements in 2D.

Definition at line 789 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::quad8_node_map = {0, 1, 2, 3, 4, 5, 6, 7}
static

The Quad8 node map. Use this map for serendipity quadrilateral elements in 2D.

Definition at line 795 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::quad9_node_map = {0, 1, 2, 3, 4, 5, 6, 7, 8}
static

The Quad9 node map. Use this map for bi-quadratic quadrilateral elements in 2D.

Definition at line 801 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::quad_edge_map = {0, 1, 2, 3}
static

Maps the Exodus edge numbering for quadrilaterals. Useful for reading sideset information.

Definition at line 828 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::quad_inverse_edge_map = {1, 2, 3, 4}
static

Maps the Exodus edge numbering for quadrilaterals. Useful for writing sideset information.

Definition at line 840 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tet10_node_map = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
static

The Tet10 node map. Use this map for quadratic tetrahedral elements in 3D.

Definition at line 881 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tet4_node_map = {0, 1, 2, 3}
static

The Tet4 node map. Use this map for linear tetrahedral elements in 3D.

Definition at line 875 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tet_face_map = {1, 2, 3, 0}
static

Maps the Exodus face numbering for general tetrahedrals. Useful for reading sideset information.

Definition at line 932 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tet_inverse_face_map = {4, 1, 2, 3}
static

Maps the Exodus face numbering for general tetrahedrals. Useful for writing sideset information.

Definition at line 962 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tri3_node_map = {0, 1, 2}
static

The Tri3 node map. Use this map for linear triangles in 2D.

Definition at line 806 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tri6_node_map = {0, 1, 2, 3, 4, 5}
static

The Tri6 node map. Use this map for quadratic triangular elements in 2D.

Definition at line 812 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tri_edge_map = {0, 1, 2}
static

2D edge maps Maps the Exodus edge numbering for triangles. Useful for reading sideset information.

Definition at line 822 of file exodusII_io_helper.h.

const int libMesh::ExodusII_IO_Helper::ElementMaps::tri_inverse_edge_map = {1, 2, 3}
static

Maps the Exodus edge numbering for triangles. Useful for writing sideset information.

Definition at line 834 of file exodusII_io_helper.h.


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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:19 UTC

Hosted By:
SourceForge.net Logo