libMesh
Loading...
Searching...
No Matches
Functions
libMesh::ReferenceElem Namespace Reference

This namespace implements singleton reference elements for each fundamental element type supported by libMesh. More...

Functions

const Elemget (const ElemType type_in)
 

Detailed Description

This namespace implements singleton reference elements for each fundamental element type supported by libMesh.

Author
Benjamin S. Kirk
Date
2013

Namespace providing access to reference geometric element types.

Function Documentation

◆ get()

const Elem & libMesh::ReferenceElem::get ( const ElemType  type_in)
Returns
A constant reference to the reference element of the user-requested type.

Definition at line 254 of file reference_elem.C.

255{
256 ElemType base_type = type_in;
257
258 // For shell elements, use non shell type as the base type
259 if (type_in == TRISHELL3)
260 base_type = TRI3;
261
262 if (type_in == QUADSHELL4)
263 base_type = QUAD4;
264
265 if (type_in == QUADSHELL8)
266 base_type = QUAD8;
267
268 if (type_in == QUADSHELL9)
269 base_type = QUAD9;
270
271 init_ref_elem_table();
272
273 // Throw an error if the user asked for an ElemType that we don't
274 // have a reference element for.
275 libmesh_error_msg_if(ref_elem_map[base_type] == nullptr || type_in == INVALID_ELEM,
276 "No reference elem data available for ElemType " << type_in
277 << " = " << Utility::enum_to_string(type_in) << ".");
278
279 return *ref_elem_map[base_type];
280}
std::string enum_to_string(const T e)
ElemType
Defines an enum for geometric element types.

References libMesh::Utility::enum_to_string(), libMesh::INVALID_ELEM, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::QUADSHELL9, libMesh::TRI3, and libMesh::TRISHELL3.

Referenced by NodalNeighborsTest::do_test(), main(), libMesh::Elem::reference_elem(), SideVertexAverageNormalTest::testEdge2(), SideVertexAverageNormalTest::testEdge3(), VolumeTest::testEdge4Invertible(), SideVertexAverageNormalTest::testHexes(), WhichNodeAmITest::testHexes(), SideVertexAverageNormalTest::testPrisms(), WhichNodeAmITest::testPrisms(), VolumeTest::testPyramid5TrueCentroid(), SideVertexAverageNormalTest::testPyramids(), WhichNodeAmITest::testPyramids(), VolumeTest::testQuad4TrueCentroid(), SideVertexAverageNormalTest::testQuads(), SideVertexAverageNormalTest::testTets(), WhichNodeAmITest::testTets(), VolumeTest::testTri3TrueCentroid(), SideVertexAverageNormalTest::testTris(), and MeshSmootherTest::testVariationalSmoother().