libMesh
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 237 of file reference_elem.C.

238 {
239  ElemType base_type = type_in;
240 
241  // For shell elements, use non shell type as the base type
242  if (type_in == TRISHELL3)
243  base_type = TRI3;
244 
245  if (type_in == QUADSHELL4)
246  base_type = QUAD4;
247 
248  if (type_in == QUADSHELL8)
249  base_type = QUAD8;
250 
251  init_ref_elem_table();
252 
253  // Throw an error if the user asked for an ElemType that we don't
254  // have a reference element for.
255  if (ref_elem_map[base_type] == nullptr || type_in == INVALID_ELEM)
256  libmesh_error_msg("No reference elem data available for ElemType " << type_in << " = " << Utility::enum_to_string(type_in) << ".");
257 
258  return *ref_elem_map[base_type];
259 }

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

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::PetscMatrix< libMesh::Number >::_get_submatrix(), libMesh::SlepcEigenSolver< libMesh::Number >::_solve_generalized_helper(), libMesh::SlepcEigenSolver< libMesh::Number >::_solve_standard_helper(), libMesh::PetscLinearSolver< Number >::adjoint_solve(), libMesh::RBThetaExpansion::attach_multiple_A_theta(), libMesh::RBThetaExpansion::attach_multiple_F_theta(), libMesh::RBThetaExpansion::attach_output_theta(), libMesh::FEMContext::attach_quadrature_rules(), libMesh::Parallel::Sort< KeyType, IdxType >::binsort(), libMesh::PetscNonlinearSolver< Number >::build_mat_null_space(), libMesh::System::calculate_norm(), libMesh::PetscVector< libMesh::Number >::create_subvector(), DMCreateGlobalVector_libMesh(), libMesh::NumericVector< Number >::get(), libMesh::SlepcEigenSolver< libMesh::Number >::init(), libMesh::PetscPreconditioner< T >::init(), libMesh::TimeSolver::init(), libMesh::PetscShellMatrix< T >::init(), libMesh::TaoOptimizationSolver< T >::init(), libMesh::PetscMatrix< libMesh::Number >::init(), libMesh::PetscNonlinearSolver< Number >::init(), libMesh::PetscLinearSolver< Number >::init(), libMesh::EpetraVector< T >::init(), libMesh::PetscVector< libMesh::Number >::init(), libMesh::PetscDMWrapper::init_and_attach_petscdm(), libMesh::PetscVector< libMesh::Number >::localize(), libMesh::MeshBase::partition(), libMesh::PetscMatrix< libMesh::Number >::print_matlab(), libMesh::PetscVector< libMesh::Number >::print_matlab(), libMesh::PetscMatrix< libMesh::Number >::print_personal(), libMesh::Elem::reference_elem(), libMesh::TimeSolver::reinit(), libMesh::PetscLinearSolver< Number >::restrict_solve_to(), libMesh::PetscDiffSolver::setup_petsc_data(), libMesh::TimeSolver::solve(), libMesh::PetscLinearSolver< Number >::solve(), libMesh::SlepcEigenSolver< libMesh::Number >::solve_generalized(), libMesh::SlepcEigenSolver< libMesh::Number >::solve_standard(), WhichNodeAmITest::testHexes(), WhichNodeAmITest::testPrisms(), WhichNodeAmITest::testPyramids(), WhichNodeAmITest::testTets(), libMesh::EpetraMatrix< T >::update_sparsity_pattern(), and libMesh::RBEvaluation::write_out_basis_functions().

libMesh::QUAD4
Definition: enum_elem_type.h:41
libMesh::TRI3
Definition: enum_elem_type.h:39
libMesh::Utility::enum_to_string
std::string enum_to_string(const T e)
libMesh::INVALID_ELEM
Definition: enum_elem_type.h:75
libMesh::QUADSHELL8
Definition: enum_elem_type.h:73
libMesh::QUADSHELL4
Definition: enum_elem_type.h:72
libMesh::TRISHELL3
Definition: enum_elem_type.h:71
libMesh::QUAD8
Definition: enum_elem_type.h:42
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33