libMesh
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
libMesh::FEInterface Class Reference

This class provides an encapsulated access to all static public member functions of finite element classes. More...

#include <fe_interface.h>

Public Types

typedef unsigned int(* n_dofs_at_node_ptr) (const ElemType, const Order, const unsigned int)
 

Public Member Functions

virtual ~FEInterface ()
 Destructor. More...
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, Real &phi)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, RealGradient &phi)
 
template<>
void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, RealGradient &phi)
 

Static Public Member Functions

static unsigned int n_shape_functions (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int n_dofs (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int n_dofs_at_node (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
 
static n_dofs_at_node_ptr n_dofs_at_node_function (const unsigned int dim, const FEType &fe_t)
 
static unsigned int n_dofs_per_elem (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static void dofs_on_side (const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di)
 Fills the vector di with the local degree of freedom indices associated with side s of element elem Automatically decides which finite element class to use. More...
 
static void dofs_on_edge (const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di)
 Fills the vector di with the local degree of freedom indices associated with edge e of element elem Automatically decides which finite element class to use. More...
 
static void nodal_soln (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
 Build the nodal soln from the element soln. More...
 
static Point map (unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
 
static Point inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
static void inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
 
static bool on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE)
 
static Real shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
 
static Real shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p)
 
template<typename OutputType >
static void shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p, OutputType &phi)
 
template<typename OutputType >
static void shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p, OutputType &phi)
 
static void compute_data (const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
 Lets the appropriate child of FEBase compute the requested data for the input specified in data, and sets the values in data. More...
 
static void compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
 Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number. More...
 
static void compute_periodic_constraints (DofConstraints &constraints, DofMap &dof_map, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem)
 Computes the constraint matrix contributions (for periodic boundary conditions) corresponding to variable number var_number. More...
 
static unsigned int max_order (const FEType &fe_t, const ElemType &el_t)
 
static bool extra_hanging_dofs (const FEType &fe_t)
 
static FEFieldType field_type (const FEType &fe_type)
 
static FEFieldType field_type (const FEFamily &fe_family)
 
static unsigned int n_vec_dim (const MeshBase &mesh, const FEType &fe_type)
 

Private Member Functions

 FEInterface ()
 Empty constructor. More...
 

Static Private Member Functions

static bool is_InfFE_elem (const ElemType et)
 
static unsigned int ifem_n_shape_functions (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int ifem_n_dofs (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static unsigned int ifem_n_dofs_at_node (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
 
static unsigned int ifem_n_dofs_per_elem (const unsigned int dim, const FEType &fe_t, const ElemType t)
 
static void ifem_nodal_soln (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
 
static Point ifem_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
 
static Point ifem_inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
static void ifem_inverse_map (const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
 
static bool ifem_on_reference_element (const Point &p, const ElemType t, const Real eps)
 
static Real ifem_shape (const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
 
static Real ifem_shape (const unsigned int dim, const FEType &fe_t, const Elem *elem, const unsigned int i, const Point &p)
 
static void ifem_compute_data (const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
 

Detailed Description

This class provides an encapsulated access to all static public member functions of finite element classes.

Using this class, one need not worry about the correct finite element class.

Author
Daniel Dreyer
Date
2002-2007 Interface class which provides access to FE functions.

Definition at line 63 of file fe_interface.h.

Member Typedef Documentation

typedef unsigned int(* libMesh::FEInterface::n_dofs_at_node_ptr) (const ElemType, const Order, const unsigned int)

Definition at line 113 of file fe_interface.h.

Constructor & Destructor Documentation

libMesh::FEInterface::FEInterface ( )
private

Empty constructor.

Do not create an object of this type.

Definition at line 32 of file fe_interface.C.

33 {
34  libmesh_error_msg("ERROR: Do not define an object of this type.");
35 }
virtual libMesh::FEInterface::~FEInterface ( )
virtual

Destructor.

Definition at line 77 of file fe_interface.h.

References dim, n_dofs(), n_dofs_at_node(), and n_shape_functions().

77 {}

Member Function Documentation

void libMesh::FEInterface::compute_constraints ( DofConstraints constraints,
DofMap dof_map,
const unsigned int  variable_number,
const Elem elem 
)
static

Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number.

Definition at line 863 of file fe_interface.C.

References libMesh::BERNSTEIN, libMesh::CLOUGH, libMesh::FE< Dim, T >::compute_constraints(), libMesh::Elem::dim(), libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::L2_HIERARCHIC, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::libmesh_assert(), libMesh::SZABAB, and libMesh::DofMap::variable_type().

867 {
868  libmesh_assert(elem);
869 
870  const FEType & fe_t = dof_map.variable_type(variable_number);
871 
872  switch (elem->dim())
873  {
874  case 0:
875  case 1:
876  {
877  // No constraints in 0D/1D.
878  return;
879  }
880 
881 
882  case 2:
883  {
884  switch (fe_t.family)
885  {
886  case CLOUGH:
888  dof_map,
889  variable_number,
890  elem); return;
891 
892  case HERMITE:
894  dof_map,
895  variable_number,
896  elem); return;
897 
898  case LAGRANGE:
900  dof_map,
901  variable_number,
902  elem); return;
903 
904  case HIERARCHIC:
906  dof_map,
907  variable_number,
908  elem); return;
909 
910  case L2_HIERARCHIC:
912  dof_map,
913  variable_number,
914  elem); return;
915 
916  case LAGRANGE_VEC:
918  dof_map,
919  variable_number,
920  elem); return;
921 
922 
923 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
924  case SZABAB:
926  dof_map,
927  variable_number,
928  elem); return;
929 
930  case BERNSTEIN:
932  dof_map,
933  variable_number,
934  elem); return;
935 
936 #endif
937  default:
938  return;
939  }
940  }
941 
942 
943  case 3:
944  {
945  switch (fe_t.family)
946  {
947  case HERMITE:
949  dof_map,
950  variable_number,
951  elem); return;
952 
953  case LAGRANGE:
955  dof_map,
956  variable_number,
957  elem); return;
958 
959  case HIERARCHIC:
961  dof_map,
962  variable_number,
963  elem); return;
964 
965  case L2_HIERARCHIC:
967  dof_map,
968  variable_number,
969  elem); return;
970 
971  case LAGRANGE_VEC:
973  dof_map,
974  variable_number,
975  elem); return;
976 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
977  case SZABAB:
979  dof_map,
980  variable_number,
981  elem); return;
982 
983  case BERNSTEIN:
985  dof_map,
986  variable_number,
987  elem); return;
988 
989 #endif
990  default:
991  return;
992  }
993  }
994 
995 
996  default:
997  libmesh_error_msg("Invalid dimension = " << elem->dim());
998  }
999 }
libmesh_assert(j)
static void compute_constraints(DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to var...
void libMesh::FEInterface::compute_data ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
FEComputeData data 
)
static

Lets the appropriate child of FEBase compute the requested data for the input specified in data, and sets the values in data.

See this as a generalization of shape(). With infinite elements disabled, computes values for all shape functions of elem evaluated at p.

Note
On a p-refined element, fe_t.order should be the base order of the element.

Definition at line 827 of file fe_interface.C.

References ifem_compute_data(), libMesh::FEComputeData::init(), is_InfFE_elem(), n_dofs(), libMesh::FEType::order, libMesh::FEComputeData::p, libMesh::Elem::p_level(), libMesh::FEComputeData::shape, shape(), and libMesh::Elem::type().

Referenced by libMesh::MeshFunction::discontinuous_value(), libMesh::DTKEvaluator::evaluate(), libMesh::MeshFunction::operator()(), and libMesh::System::point_value().

831 {
832 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
833 
834  if (elem && is_InfFE_elem(elem->type()))
835  {
836  data.init();
837  ifem_compute_data(dim, fe_t, elem, data);
838  return;
839  }
840 
841 #endif
842 
843  FEType p_refined = fe_t;
844  p_refined.order = static_cast<Order>(p_refined.order + elem->p_level());
845 
846  const unsigned int n_dof = n_dofs (dim, p_refined, elem->type());
847  const Point & p = data.p;
848  data.shape.resize(n_dof);
849 
850  // set default values for all the output fields
851  data.init();
852 
853  for (unsigned int n=0; n<n_dof; n++)
854  data.shape[n] = shape(dim, p_refined, elem, n, p);
855 
856  return;
857 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:414
unsigned int dim
static void ifem_compute_data(const unsigned int dim, const FEType &fe_t, const Elem *elem, FEComputeData &data)
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
IterBase * data
Ideally this private member data should have protected access.
void libMesh::FEInterface::compute_periodic_constraints ( DofConstraints constraints,
DofMap dof_map,
const PeriodicBoundaries boundaries,
const MeshBase mesh,
const PointLocatorBase point_locator,
const unsigned int  variable_number,
const Elem elem 
)
static

Computes the constraint matrix contributions (for periodic boundary conditions) corresponding to variable number var_number.

Definition at line 1007 of file fe_interface.C.

References libMesh::FEGenericBase< OutputType >::compute_periodic_constraints().

1014 {
1015  // No element-specific optimizations currently exist
1017  dof_map,
1018  boundaries,
1019  mesh,
1020  point_locator,
1021  variable_number,
1022  elem);
1023 }
MeshBase & mesh
static void compute_periodic_constraints(DofConstraints &constraints, DofMap &dof_map, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for meshes with periodic boundary conditions) correspon...
Definition: fe_base.C:1655
void libMesh::FEInterface::dofs_on_edge ( const Elem *const  elem,
const unsigned int  dim,
const FEType fe_t,
unsigned int  e,
std::vector< unsigned int > &  di 
)
static

Fills the vector di with the local degree of freedom indices associated with edge e of element elem Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the base order of the element.

Definition at line 510 of file fe_interface.C.

References libMesh::FEType::order.

Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), and libMesh::BoundaryProjectSolution::operator()().

515 {
516  const Order o = fe_t.order;
517 
518  void_fe_with_vec_switch(dofs_on_edge(elem, o, e, di));
519 
520  libmesh_error_msg("We'll never get here!");
521 }
static void dofs_on_edge(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int e, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...
Definition: fe_interface.C:510
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
void libMesh::FEInterface::dofs_on_side ( const Elem *const  elem,
const unsigned int  dim,
const FEType fe_t,
unsigned int  s,
std::vector< unsigned int > &  di 
)
static

Fills the vector di with the local degree of freedom indices associated with side s of element elem Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the base order of the element.

Definition at line 495 of file fe_interface.C.

References libMesh::FEType::order.

Referenced by libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), and libMesh::BoundaryProjectSolution::operator()().

500 {
501  const Order o = fe_t.order;
502 
503  void_fe_with_vec_switch(dofs_on_side(elem, o, s, di));
504 
505  libmesh_error_msg("We'll never get here!");
506 }
static void dofs_on_side(const Elem *const elem, const unsigned int dim, const FEType &fe_t, unsigned int s, std::vector< unsigned int > &di)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
Definition: fe_interface.C:495
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
bool libMesh::FEInterface::extra_hanging_dofs ( const FEType fe_t)
static
Returns
true if separate degrees of freedom must be allocated for vertex DoFs and edge/face DoFs at a hanging node.

Definition at line 1402 of file fe_interface.C.

References libMesh::BERNSTEIN, libMesh::CLOUGH, libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::L2_HIERARCHIC, libMesh::L2_LAGRANGE, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL, libMesh::NEDELEC_ONE, libMesh::SUBDIVISION, libMesh::SZABAB, and libMesh::XYZ.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::DofMap::old_dof_indices(), and libMesh::DofMap::reinit().

1403 {
1404  switch (fe_t.family)
1405  {
1406  case LAGRANGE:
1407  case L2_LAGRANGE:
1408  case MONOMIAL:
1409  case L2_HIERARCHIC:
1410  case XYZ:
1411  case SUBDIVISION:
1412  case LAGRANGE_VEC:
1413  case NEDELEC_ONE:
1414  return false;
1415  case CLOUGH:
1416  case HERMITE:
1417  case HIERARCHIC:
1418 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
1419  case BERNSTEIN:
1420  case SZABAB:
1421 #endif
1422  default:
1423  return true;
1424  }
1425 }
FEFieldType libMesh::FEInterface::field_type ( const FEType fe_type)
static
FEFieldType libMesh::FEInterface::field_type ( const FEFamily fe_family)
static
Returns
The number of components of a vector-valued element. Scalar-valued elements return 1.

Definition at line 1432 of file fe_interface.C.

References libMesh::LAGRANGE_VEC, libMesh::NEDELEC_ONE, libMesh::TYPE_SCALAR, and libMesh::TYPE_VECTOR.

1433 {
1434  switch (fe_family)
1435  {
1436  case LAGRANGE_VEC:
1437  case NEDELEC_ONE:
1438  return TYPE_VECTOR;
1439  default:
1440  return TYPE_SCALAR;
1441  }
1442 }
void libMesh::FEInterface::ifem_compute_data ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
FEComputeData data 
)
staticprivate

Definition at line 830 of file fe_interface_inf_fe.C.

References libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, and libMesh::FEType::radial_family.

Referenced by compute_data().

834 {
835  switch (dim)
836  {
837  // 1D
838  case 1:
839  {
840  switch (fe_t.radial_family)
841  {
842  /*
843  * For no derivatives (and local coordinates, as
844  * given in \p p) the infinite element shapes
845  * are independent of mapping type
846  */
847  case INFINITE_MAP:
849  break;
850 
851  case JACOBI_20_00:
853  break;
854 
855  case JACOBI_30_00:
857  break;
858 
859  case LEGENDRE:
861  break;
862 
863  case LAGRANGE:
865  break;
866 
867  default:
868  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
869  }
870 
871  break;
872  }
873 
874 
875  // 2D
876  case 2:
877  {
878  switch (fe_t.radial_family)
879  {
880  case INFINITE_MAP:
882  break;
883 
884  case JACOBI_20_00:
886  break;
887 
888  case JACOBI_30_00:
890  break;
891 
892  case LEGENDRE:
894  break;
895 
896  case LAGRANGE:
898  break;
899 
900  default:
901  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
902  }
903 
904  break;
905  }
906 
907 
908  // 3D
909  case 3:
910  {
911  switch (fe_t.radial_family)
912  {
913  case INFINITE_MAP:
915  break;
916 
917  case JACOBI_20_00:
919  break;
920 
921  case JACOBI_30_00:
923  break;
924 
925  case LEGENDRE:
927  break;
928 
929  case LAGRANGE:
931  break;
932 
933  default:
934  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
935  }
936 
937  break;
938  }
939 
940 
941  default:
942  libmesh_error_msg("Invalid dim = " << dim);
943  break;
944  }
945 }
unsigned int dim
static void compute_data(const FEType &fe_t, const Elem *inf_elem, FEComputeData &data)
Generalized version of shape(), takes an Elem *.
IterBase * data
Ideally this private member data should have protected access.
Point libMesh::FEInterface::ifem_inverse_map ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const Point p,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
staticprivate

Definition at line 459 of file fe_interface_inf_fe.C.

References libMesh::CARTESIAN, libMesh::ELLIPSOIDAL, libMesh::FEType::inf_map, libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), and libMesh::SPHERICAL.

Referenced by inverse_map().

465 {
466  switch (dim)
467  {
468  // 1D
469  case 1:
470  {
471  switch (fe_t.inf_map)
472  {
473  case CARTESIAN:
474  return InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
475 
476  case SPHERICAL:
477  case ELLIPSOIDAL:
478  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
479 
480  /*
481  case SPHERICAL:
482  return InfFE<1,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
483 
484  case ELLIPSOIDAL:
485  return InfFE<1,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
486  */
487 
488  default:
489  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
490  }
491  }
492 
493 
494  // 2D
495  case 2:
496  {
497  switch (fe_t.inf_map)
498  {
499  case CARTESIAN:
500  return InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
501 
502  case SPHERICAL:
503  case ELLIPSOIDAL:
504  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
505 
506  /*
507  case SPHERICAL:
508  return InfFE<2,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
509 
510  case ELLIPSOIDAL:
511  return InfFE<2,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
512  */
513 
514  default:
515  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
516  }
517  }
518 
519 
520  // 3D
521  case 3:
522  {
523  switch (fe_t.inf_map)
524  {
525  case CARTESIAN:
526  return InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, p, tolerance, secure);
527 
528  case SPHERICAL:
529  case ELLIPSOIDAL:
530  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
531 
532  /*
533  case SPHERICAL:
534  return InfFE<3,JACOBI_20_00,SPHERICAL>::inverse_map(elem, p, tolerance);
535 
536  case ELLIPSOIDAL:
537  return InfFE<3,JACOBI_20_00,ELLIPSOIDAL>::inverse_map(elem, p, tolerance);
538  */
539 
540  default:
541  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
542  }
543  }
544 
545  default:
546  libmesh_error_msg("Invalid dim = " << dim);
547  }
548 
549  libmesh_error_msg("We'll never get here!");
550  Point pt;
551  return pt;
552 }
unsigned int dim
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe_map.C:89
void libMesh::FEInterface::ifem_inverse_map ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
staticprivate

Definition at line 556 of file fe_interface_inf_fe.C.

References libMesh::CARTESIAN, libMesh::FEType::inf_map, and libMesh::InfFE< Dim, T_radial, T_map >::inverse_map().

563 {
564  switch (dim)
565  {
566  // 1D
567  case 1:
568  {
569  switch (fe_t.inf_map)
570  {
571  case CARTESIAN:
572  InfFE<1,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
573  return;
574 
575  default:
576  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
577  }
578  }
579 
580 
581  // 2D
582  case 2:
583  {
584  switch (fe_t.inf_map)
585  {
586  case CARTESIAN:
587  InfFE<2,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
588  return;
589 
590  default:
591  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
592  }
593  }
594 
595 
596  // 3D
597  case 3:
598  {
599  switch (fe_t.inf_map)
600  {
601  case CARTESIAN:
602  InfFE<3,JACOBI_20_00,CARTESIAN>::inverse_map(elem, physical_points, reference_points, tolerance, secure);
603  return;
604 
605  default:
606  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
607  }
608  }
609 
610  default:
611  libmesh_error_msg("Invalid dim = " << dim);
612  }
613 }
unsigned int dim
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe_map.C:89
Point libMesh::FEInterface::ifem_map ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const Point p 
)
staticprivate

Definition at line 428 of file fe_interface_inf_fe.C.

References libMesh::CARTESIAN, libMesh::ELLIPSOIDAL, libMesh::FEType::inf_map, libMesh::InfFE< Dim, T_radial, T_map >::map(), and libMesh::SPHERICAL.

Referenced by map().

432 {
433  switch (fe_t.inf_map)
434  {
435  case CARTESIAN:
436  {
437  switch (dim)
438  {
439  case 1:
440  return InfFE<1,JACOBI_20_00,CARTESIAN>::map(elem, p);
441  case 2:
442  return InfFE<2,JACOBI_20_00,CARTESIAN>::map(elem, p);
443  case 3:
444  return InfFE<3,JACOBI_20_00,CARTESIAN>::map(elem, p);
445  default:
446  libmesh_error_msg("Invalid dim = " << dim);
447  }
448  }
449  case SPHERICAL:
450  case ELLIPSOIDAL:
451  libmesh_not_implemented_msg("ERROR: Spherical and Ellipsoidal IFEMs not (yet) implemented.");
452  default:
453  libmesh_error_msg("Invalid map = " << fe_t.inf_map);
454  }
455 }
unsigned int dim
static Point map(const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40
unsigned int libMesh::FEInterface::ifem_n_dofs ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
staticprivate

Definition at line 74 of file fe_interface_inf_fe.C.

References libMesh::InfFE< Dim, T_radial, T_map >::n_dofs().

Referenced by n_dofs().

77 {
78  switch (dim)
79  {
80  // 1D
81  case 1:
82  /*
83  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
84  * is actually independent of T_radial and T_map, we can use
85  * just any T_radial and T_map
86  */
88 
89  // 2D
90  case 2:
92 
93  // 3D
94  case 3:
96 
97  default:
98  libmesh_error_msg("Unsupported dim = " << dim);
99  }
100 
101  libmesh_error_msg("We'll never get here!");
102  return 0;
103 }
unsigned int dim
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:55
unsigned int libMesh::FEInterface::ifem_n_dofs_at_node ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  n 
)
staticprivate

Definition at line 108 of file fe_interface_inf_fe.C.

References libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node().

Referenced by n_dofs_at_node().

112 {
113  switch (dim)
114  {
115  // 1D
116  case 1:
117  /*
118  * Since InfFE<Dim,T_radial,T_map>::n_dofs_at_node(...)
119  * is actually independent of T_radial and T_map, we can use
120  * just any T_radial and T_map
121  */
123 
124  // 2D
125  case 2:
127 
128  // 3D
129  case 3:
131 
132  default:
133  libmesh_error_msg("Unsupported dim = " << dim);
134  }
135 
136  libmesh_error_msg("We'll never get here!");
137  return 0;
138 }
static unsigned int n_dofs_at_node(const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
Definition: inf_fe_static.C:72
unsigned int dim
unsigned int libMesh::FEInterface::ifem_n_dofs_per_elem ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
staticprivate

Definition at line 144 of file fe_interface_inf_fe.C.

References libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem().

Referenced by n_dofs_per_elem().

147 {
148  switch (dim)
149  {
150  // 1D
151  case 1:
152  /*
153  * Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
154  * is actually independent of T_radial and T_map, we can use
155  * just any T_radial and T_map
156  */
158 
159  // 2D
160  case 2:
162 
163  // 3D
164  case 3:
166 
167  default:
168  libmesh_error_msg("Unsupported dim = " << dim);
169  }
170 
171  libmesh_error_msg("We'll never get here!");
172  return 0;
173 }
static unsigned int n_dofs_per_elem(const FEType &fet, const ElemType inf_elem_type)
unsigned int dim
unsigned int libMesh::FEInterface::ifem_n_shape_functions ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
staticprivate

Definition at line 39 of file fe_interface_inf_fe.C.

References libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions().

Referenced by n_shape_functions().

42 {
43  switch (dim)
44  {
45  // 1D
46  case 1:
47  /*
48  * Since InfFE<Dim,T_radial,T_map>::n_shape_functions(...)
49  * is actually independent of T_radial and T_map, we can use
50  * just any T_radial and T_map
51  */
53 
54  // 2D
55  case 2:
57 
58  // 3D
59  case 3:
61 
62  default:
63  libmesh_error_msg("Unsupported dim = " << dim);
64  }
65 
66  libmesh_error_msg("We'll never get here!");
67  return 0;
68 }
unsigned int dim
virtual unsigned int n_shape_functions() const libmesh_override
Definition: inf_fe.h:459
void libMesh::FEInterface::ifem_nodal_soln ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln 
)
staticprivate

Definition at line 178 of file fe_interface_inf_fe.C.

References libMesh::CARTESIAN, libMesh::FEType::inf_map, libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, libMesh::InfFE< Dim, T_radial, T_map >::nodal_soln(), and libMesh::FEType::radial_family.

Referenced by nodal_soln().

183 {
184  switch (dim)
185  {
186 
187  // 1D
188  case 1:
189  {
190  switch (fe_t.radial_family)
191  {
192  case INFINITE_MAP:
193  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
194 
195  case JACOBI_20_00:
196  {
197  switch (fe_t.inf_map)
198  {
199  case CARTESIAN:
200  {
202  break;
203  }
204  default:
205  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
206  }
207  break;
208  }
209 
210  case JACOBI_30_00:
211  {
212  switch (fe_t.inf_map)
213  {
214  case CARTESIAN:
215  {
217  break;
218  }
219  default:
220  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
221  }
222  break;
223  }
224 
225  case LEGENDRE:
226  {
227  switch (fe_t.inf_map)
228  {
229  case CARTESIAN:
230  {
231  InfFE<1,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
232  break;
233  }
234  default:
235  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
236  }
237  break;
238  }
239 
240  case LAGRANGE:
241  {
242  switch (fe_t.inf_map)
243  {
244  case CARTESIAN:
245  {
246  InfFE<1,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
247  break;
248  }
249  default:
250  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
251  }
252  break;
253  }
254 
255  default:
256  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fe_t.radial_family);
257  }
258 
259  break;
260  }
261 
262 
263 
264 
265  // 2D
266  case 2:
267  {
268  switch (fe_t.radial_family)
269  {
270  case INFINITE_MAP:
271  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
272 
273  case JACOBI_20_00:
274  {
275  switch (fe_t.inf_map)
276  {
277  case CARTESIAN:
278  {
280  break;
281  }
282  default:
283  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
284  }
285  break;
286  }
287 
288  case JACOBI_30_00:
289  {
290  switch (fe_t.inf_map)
291  {
292  case CARTESIAN:
293  {
295  break;
296  }
297  default:
298  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
299  }
300  break;
301  }
302 
303  case LEGENDRE:
304  {
305  switch (fe_t.inf_map)
306  {
307  case CARTESIAN:
308  {
309  InfFE<2,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
310  break;
311  }
312  default:
313  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
314  }
315  break;
316  }
317 
318  case LAGRANGE:
319  {
320  switch (fe_t.inf_map)
321  {
322  case CARTESIAN:
323  {
324  InfFE<2,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
325  break;
326  }
327  default:
328  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
329  }
330  break;
331  }
332 
333  default:
334  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fe_t.radial_family);
335  }
336 
337  break;
338  }
339 
340 
341 
342 
343  // 3D
344  case 3:
345  {
346  switch (fe_t.radial_family)
347  {
348  case INFINITE_MAP:
349  libmesh_error_msg("ERROR: INFINITE_MAP is not a valid shape family for radial approximation.");
350 
351  case JACOBI_20_00:
352  {
353  switch (fe_t.inf_map)
354  {
355  case CARTESIAN:
356  {
358  break;
359  }
360  default:
361  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
362  }
363  break;
364  }
365 
366  case JACOBI_30_00:
367  {
368  switch (fe_t.inf_map)
369  {
370  case CARTESIAN:
371  {
373  break;
374  }
375  default:
376  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
377  }
378  break;
379  }
380 
381  case LEGENDRE:
382  {
383  switch (fe_t.inf_map)
384  {
385  case CARTESIAN:
386  {
387  InfFE<3,LEGENDRE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
388  break;
389  }
390  default:
391  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
392  }
393  break;
394  }
395 
396  case LAGRANGE:
397  {
398  switch (fe_t.inf_map)
399  {
400  case CARTESIAN:
401  {
402  InfFE<3,LAGRANGE,CARTESIAN>::nodal_soln(fe_t, elem, elem_soln, nodal_soln);
403  break;
404  }
405  default:
406  libmesh_error_msg("ERROR: Spherical & Ellipsoidal IFEMs not implemented.");
407  }
408  break;
409  }
410 
411 
412 
413  default:
414  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fe_t.radial_family);
415  }
416 
417  break;
418  }
419 
420  default:
421  libmesh_error_msg("Invalid dim = " << dim);
422  }
423 }
unsigned int dim
static void nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Build the nodal soln from the element soln.
Definition: fe_interface.C:526
static void nodal_soln(const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Usually, this method would build the nodal soln from the element soln.
bool libMesh::FEInterface::ifem_on_reference_element ( const Point p,
const ElemType  t,
const Real  eps 
)
staticprivate

Definition at line 618 of file fe_interface_inf_fe.C.

References libMesh::FEAbstract::on_reference_element().

621 {
622  return FEBase::on_reference_element(p,t,eps);
623 }
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
Definition: fe_abstract.C:557
Real libMesh::FEInterface::ifem_shape ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  i,
const Point p 
)
staticprivate

Definition at line 628 of file fe_interface_inf_fe.C.

References libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, libMesh::FEType::radial_family, and libMesh::InfFE< Dim, T_radial, T_map >::shape().

Referenced by shape().

633 {
634  switch (dim)
635  {
636  // 1D
637  case 1:
638  {
639  switch (fe_t.radial_family)
640  {
641  /*
642  * For no derivatives (and local coordinates, as
643  * given in \p p) the infinite element shapes
644  * are independent of mapping type
645  */
646  case INFINITE_MAP:
647  return InfFE<1,INFINITE_MAP,CARTESIAN>::shape(fe_t, t, i, p);
648 
649  case JACOBI_20_00:
650  return InfFE<1,JACOBI_20_00,CARTESIAN>::shape(fe_t, t, i, p);
651 
652  case JACOBI_30_00:
653  return InfFE<1,JACOBI_30_00,CARTESIAN>::shape(fe_t, t, i, p);
654 
655  case LEGENDRE:
656  return InfFE<1,LEGENDRE,CARTESIAN>::shape(fe_t, t, i, p);
657 
658  case LAGRANGE:
659  return InfFE<1,LAGRANGE,CARTESIAN>::shape(fe_t, t, i, p);
660 
661  default:
662  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
663  }
664  }
665 
666 
667  // 2D
668  case 2:
669  {
670  switch (fe_t.radial_family)
671  {
672  case INFINITE_MAP:
673  return InfFE<2,INFINITE_MAP,CARTESIAN>::shape(fe_t, t, i, p);
674 
675  case JACOBI_20_00:
676  return InfFE<2,JACOBI_20_00,CARTESIAN>::shape(fe_t, t, i, p);
677 
678  case JACOBI_30_00:
679  return InfFE<2,JACOBI_30_00,CARTESIAN>::shape(fe_t, t, i, p);
680 
681  case LEGENDRE:
682  return InfFE<2,LEGENDRE,CARTESIAN>::shape(fe_t, t, i, p);
683 
684  case LAGRANGE:
685  return InfFE<2,LAGRANGE,CARTESIAN>::shape(fe_t, t, i, p);
686 
687  default:
688  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
689  }
690  }
691 
692 
693  // 3D
694  case 3:
695  {
696  switch (fe_t.radial_family)
697  {
698  case INFINITE_MAP:
699  return InfFE<3,INFINITE_MAP,CARTESIAN>::shape(fe_t, t, i, p);
700 
701  case JACOBI_20_00:
702  return InfFE<3,JACOBI_20_00,CARTESIAN>::shape(fe_t, t, i, p);
703 
704  case JACOBI_30_00:
705  return InfFE<3,JACOBI_30_00,CARTESIAN>::shape(fe_t, t, i, p);
706 
707  case LEGENDRE:
708  return InfFE<3,LEGENDRE,CARTESIAN>::shape(fe_t, t, i, p);
709 
710  case LAGRANGE:
711  return InfFE<3,LAGRANGE,CARTESIAN>::shape(fe_t, t, i, p);
712 
713  default:
714  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
715  }
716  }
717 
718  default:
719  libmesh_error_msg("Invalid dim = " << dim);
720  }
721 
722  libmesh_error_msg("We'll never get here!");
723  return 0.;
724 }
unsigned int dim
static Real shape(const FEType &fet, const ElemType t, const unsigned int i, const Point &p)
Real libMesh::FEInterface::ifem_shape ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const unsigned int  i,
const Point p 
)
staticprivate

Definition at line 729 of file fe_interface_inf_fe.C.

References libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, libMesh::FEType::radial_family, and libMesh::InfFE< Dim, T_radial, T_map >::shape().

734 {
735  switch (dim)
736  {
737  // 1D
738  case 1:
739  {
740  switch (fe_t.radial_family)
741  {
742  /*
743  * For no derivatives (and local coordinates, as
744  * given in \p p) the infinite element shapes
745  * are independent of mapping type
746  */
747  case INFINITE_MAP:
748  return InfFE<1,INFINITE_MAP,CARTESIAN>::shape(fe_t, elem, i, p);
749 
750  case JACOBI_20_00:
751  return InfFE<1,JACOBI_20_00,CARTESIAN>::shape(fe_t, elem, i, p);
752 
753  case JACOBI_30_00:
754  return InfFE<1,JACOBI_30_00,CARTESIAN>::shape(fe_t, elem, i, p);
755 
756  case LEGENDRE:
757  return InfFE<1,LEGENDRE,CARTESIAN>::shape(fe_t, elem, i, p);
758 
759  case LAGRANGE:
760  return InfFE<1,LAGRANGE,CARTESIAN>::shape(fe_t, elem, i, p);
761 
762  default:
763  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
764  }
765  }
766 
767 
768  // 2D
769  case 2:
770  {
771  switch (fe_t.radial_family)
772  {
773  case INFINITE_MAP:
774  return InfFE<2,INFINITE_MAP,CARTESIAN>::shape(fe_t, elem, i, p);
775 
776  case JACOBI_20_00:
777  return InfFE<2,JACOBI_20_00,CARTESIAN>::shape(fe_t, elem, i, p);
778 
779  case JACOBI_30_00:
780  return InfFE<2,JACOBI_30_00,CARTESIAN>::shape(fe_t, elem, i, p);
781 
782  case LEGENDRE:
783  return InfFE<2,LEGENDRE,CARTESIAN>::shape(fe_t, elem, i, p);
784 
785  case LAGRANGE:
786  return InfFE<2,LAGRANGE,CARTESIAN>::shape(fe_t, elem, i, p);
787 
788  default:
789  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
790  }
791  }
792 
793 
794  // 3D
795  case 3:
796  {
797  switch (fe_t.radial_family)
798  {
799  case INFINITE_MAP:
800  return InfFE<3,INFINITE_MAP,CARTESIAN>::shape(fe_t, elem, i, p);
801 
802  case JACOBI_20_00:
803  return InfFE<3,JACOBI_20_00,CARTESIAN>::shape(fe_t, elem, i, p);
804 
805  case JACOBI_30_00:
806  return InfFE<3,JACOBI_30_00,CARTESIAN>::shape(fe_t, elem, i, p);
807 
808  case LEGENDRE:
809  return InfFE<3,LEGENDRE,CARTESIAN>::shape(fe_t, elem, i, p);
810 
811  case LAGRANGE:
812  return InfFE<3,LAGRANGE,CARTESIAN>::shape(fe_t, elem, i, p);
813 
814  default:
815  libmesh_error_msg("Invalid radial family = " << fe_t.radial_family);
816  }
817  }
818 
819  default:
820  libmesh_error_msg("Invalid dim = " << dim);
821  }
822 
823  libmesh_error_msg("We'll never get here!");
824  return 0.;
825 }
unsigned int dim
static Real shape(const FEType &fet, const ElemType t, const unsigned int i, const Point &p)
Point libMesh::FEInterface::inverse_map ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const Point p,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
static
Returns
The location (on the reference element) of the point p located in physical space. This function requires inverting the (probably nonlinear) transformation map, so it is not trivial. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence $ \{ p_n \} $, and the iteration is terminated when $ \|p - p_n\| < \mbox{\texttt{tolerance}} $

Definition at line 569 of file fe_interface.C.

References ifem_inverse_map(), is_InfFE_elem(), and libMesh::Elem::type().

Referenced by libMesh::HPCoarsenTest::add_projection(), assemble_ellipticdg(), assemble_poisson(), libMesh::FEMContext::build_new_fe(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::InfQuad4::contains_point(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), libMesh::MeshFunction::discontinuous_gradient(), libMesh::MeshFunction::discontinuous_value(), libMesh::DTKEvaluator::evaluate(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), inverse_map(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::MeshFunction::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::Elem::point_test(), libMesh::System::point_value(), libMesh::JumpErrorEstimator::reinit_sides(), libMesh::HPCoarsenTest::select_refinement(), NavierSystem::side_constraint(), FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

575 {
576 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
577 
578  if (is_InfFE_elem(elem->type()))
579  return ifem_inverse_map(dim, fe_t, elem, p,tolerance, secure);
580 
581 #endif
582 
583  fe_with_vec_switch(inverse_map(elem, p, tolerance, secure));
584 
585  libmesh_error_msg("We'll never get here!");
586  return Point();
587 }
unsigned int dim
static Point ifem_inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
static Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: fe_interface.C:569
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
void libMesh::FEInterface::inverse_map ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
static
Returns
The location (on the reference element) of the points physical_points located in physical space. This function requires inverting the (probably nonlinear) transformation map, so it is not trivial. The location of each point on the reference element is returned in the vector reference_points. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence $ \{ p_n \} $, and the iteration is terminated when $ \|p - p_n\| < \mbox{\texttt{tolerance}} $

Definition at line 592 of file fe_interface.C.

References libMesh::err, ifem_inverse_map(), inverse_map(), is_InfFE_elem(), libMesh::TypeVector< T >::size(), and libMesh::Elem::type().

599 {
600  const std::size_t n_pts = physical_points.size();
601 
602  // Resize the vector
603  reference_points.resize(n_pts);
604 
605  if (n_pts == 0)
606  {
607  libMesh::err << "WARNING: empty vector physical_points!"
608  << std::endl;
609  libmesh_here();
610  return;
611  }
612 
613 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
614 
615  if (is_InfFE_elem(elem->type()))
616  {
617  ifem_inverse_map(dim, fe_t, elem, physical_points, reference_points, tolerance, secure);
618  return;
619  // libmesh_not_implemented();
620  }
621 
622 #endif
623 
624  void_fe_with_vec_switch(inverse_map(elem, physical_points, reference_points, tolerance, secure));
625 
626  libmesh_error_msg("We'll never get here!");
627 }
OStreamProxy err
unsigned int dim
static Point ifem_inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
static Point inverse_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: fe_interface.C:569
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
bool libMesh::FEInterface::is_InfFE_elem ( const ElemType  et)
staticprivate
Returns
true if et is an element to be processed by class InfFE, false otherwise or when !LIBMESH_ENABLE_INFINITE_ELEMENTS.

Definition at line 468 of file fe_interface.h.

References libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, and libMesh::INFQUAD6.

Referenced by compute_data(), inverse_map(), map(), n_dofs(), n_dofs_at_node(), n_dofs_per_elem(), n_shape_functions(), nodal_soln(), and shape().

469 {
470  return false;
471 }
Point libMesh::FEInterface::map ( unsigned int  dim,
const FEType fe_t,
const Elem elem,
const Point p 
)
static
Returns
The point in physical space corresponding to the reference point p which is passed in.

Definition at line 550 of file fe_interface.C.

References ifem_map(), is_InfFE_elem(), and libMesh::Elem::type().

Referenced by libMesh::Elem::point_test().

554 {
555 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
556  if (is_InfFE_elem(elem->type()))
557  return ifem_map(dim, fe_t, elem, p);
558 #endif
559  fe_with_vec_switch(map(elem, p));
560 
561  libmesh_error_msg("We'll never get here!");
562  return Point();
563 }
static Point map(unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
Definition: fe_interface.C:550
unsigned int dim
static Point ifem_map(const unsigned int dim, const FEType &fe_t, const Elem *elem, const Point &p)
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
unsigned int libMesh::FEInterface::max_order ( const FEType fe_t,
const ElemType el_t 
)
static
Returns
The maximum polynomial degree that the given finite element family can support on the given geometric element.

Definition at line 1029 of file fe_interface.C.

References libMesh::BERNSTEIN, libMesh::CLOUGH, libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::FEType::family, libMesh::HERMITE, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::HIERARCHIC, libMesh::L2_HIERARCHIC, libMesh::L2_LAGRANGE, libMesh::LAGRANGE, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL, libMesh::NEDELEC_ONE, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::SUBDIVISION, libMesh::SZABAB, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI3SUBDIVISION, libMesh::TRI6, libMesh::TRISHELL3, and libMesh::XYZ.

Referenced by libMesh::DofMap::reinit().

1031 {
1032  // Yeah, I know, infinity is much larger than 11, but our
1033  // solvers don't seem to like high degree polynomials, and our
1034  // quadrature rules and number_lookups tables
1035  // need to go up higher.
1036  const unsigned int unlimited = 11;
1037 
1038  // If we used 0 as a default, then elements missing from this
1039  // table (e.g. infinite elements) would be considered broken.
1040  const unsigned int unknown = unlimited;
1041 
1042  switch (fe_t.family)
1043  {
1044  case LAGRANGE:
1045  case L2_LAGRANGE: // TODO: L2_LAGRANGE can have higher "max_order" than LAGRANGE
1046  case LAGRANGE_VEC:
1047  switch (el_t)
1048  {
1049  case EDGE2:
1050  case EDGE3:
1051  case EDGE4:
1052  return 3;
1053  case TRI3:
1054  case TRISHELL3:
1055  return 1;
1056  case TRI6:
1057  return 2;
1058  case QUAD4:
1059  case QUADSHELL4:
1060  return 1;
1061  case QUAD8:
1062  case QUADSHELL8:
1063  case QUAD9:
1064  return 2;
1065  case TET4:
1066  return 1;
1067  case TET10:
1068  return 2;
1069  case HEX8:
1070  return 1;
1071  case HEX20:
1072  case HEX27:
1073  return 2;
1074  case PRISM6:
1075  return 1;
1076  case PRISM15:
1077  case PRISM18:
1078  return 2;
1079  case PYRAMID5:
1080  return 1;
1081  case PYRAMID13:
1082  case PYRAMID14:
1083  return 2;
1084  default:
1085  return unknown;
1086  }
1087  break;
1088  case MONOMIAL:
1089  switch (el_t)
1090  {
1091  case EDGE2:
1092  case EDGE3:
1093  case EDGE4:
1094  case TRI3:
1095  case TRISHELL3:
1096  case TRI6:
1097  case QUAD4:
1098  case QUADSHELL4:
1099  case QUAD8:
1100  case QUADSHELL8:
1101  case QUAD9:
1102  case TET4:
1103  case TET10:
1104  case HEX8:
1105  case HEX20:
1106  case HEX27:
1107  case PRISM6:
1108  case PRISM15:
1109  case PRISM18:
1110  case PYRAMID5:
1111  case PYRAMID13:
1112  case PYRAMID14:
1113  return unlimited;
1114  default:
1115  return unknown;
1116  }
1117  break;
1118 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
1119  case BERNSTEIN:
1120  switch (el_t)
1121  {
1122  case EDGE2:
1123  case EDGE3:
1124  case EDGE4:
1125  return unlimited;
1126  case TRI3:
1127  case TRISHELL3:
1128  return 1;
1129  case TRI6:
1130  return 6;
1131  case QUAD4:
1132  case QUADSHELL4:
1133  return 1;
1134  case QUAD8:
1135  case QUADSHELL8:
1136  case QUAD9:
1137  return unlimited;
1138  case TET4:
1139  return 1;
1140  case TET10:
1141  return 2;
1142  case HEX8:
1143  return 1;
1144  case HEX20:
1145  return 2;
1146  case HEX27:
1147  return 4;
1148  case PRISM6:
1149  case PRISM15:
1150  case PRISM18:
1151  case PYRAMID5:
1152  case PYRAMID13:
1153  case PYRAMID14:
1154  return 0;
1155  default:
1156  return unknown;
1157  }
1158  break;
1159  case SZABAB:
1160  switch (el_t)
1161  {
1162  case EDGE2:
1163  return 1;
1164  case EDGE3:
1165  case EDGE4:
1166  return 7;
1167  case TRI3:
1168  case TRISHELL3:
1169  return 1;
1170  case TRI6:
1171  return 7;
1172  case QUAD4:
1173  case QUADSHELL4:
1174  return 1;
1175  case QUAD8:
1176  case QUADSHELL8:
1177  case QUAD9:
1178  return 7;
1179  case TET4:
1180  case TET10:
1181  case HEX8:
1182  case HEX20:
1183  case HEX27:
1184  case PRISM6:
1185  case PRISM15:
1186  case PRISM18:
1187  case PYRAMID5:
1188  case PYRAMID13:
1189  case PYRAMID14:
1190  return 0;
1191  default:
1192  return unknown;
1193  }
1194  break;
1195 #endif
1196  case XYZ:
1197  switch (el_t)
1198  {
1199  case EDGE2:
1200  case EDGE3:
1201  case EDGE4:
1202  case TRI3:
1203  case TRISHELL3:
1204  case TRI6:
1205  case QUAD4:
1206  case QUADSHELL4:
1207  case QUAD8:
1208  case QUADSHELL8:
1209  case QUAD9:
1210  case TET4:
1211  case TET10:
1212  case HEX8:
1213  case HEX20:
1214  case HEX27:
1215  case PRISM6:
1216  case PRISM15:
1217  case PRISM18:
1218  case PYRAMID5:
1219  case PYRAMID13:
1220  case PYRAMID14:
1221  return unlimited;
1222  default:
1223  return unknown;
1224  }
1225  break;
1226  case CLOUGH:
1227  switch (el_t)
1228  {
1229  case EDGE2:
1230  case EDGE3:
1231  return 3;
1232  case EDGE4:
1233  case TRI3:
1234  case TRISHELL3:
1235  return 0;
1236  case TRI6:
1237  return 3;
1238  case QUAD4:
1239  case QUADSHELL4:
1240  case QUAD8:
1241  case QUADSHELL8:
1242  case QUAD9:
1243  case TET4:
1244  case TET10:
1245  case HEX8:
1246  case HEX20:
1247  case HEX27:
1248  case PRISM6:
1249  case PRISM15:
1250  case PRISM18:
1251  case PYRAMID5:
1252  case PYRAMID13:
1253  case PYRAMID14:
1254  return 0;
1255  default:
1256  return unknown;
1257  }
1258  break;
1259  case HERMITE:
1260  switch (el_t)
1261  {
1262  case EDGE2:
1263  case EDGE3:
1264  return unlimited;
1265  case EDGE4:
1266  case TRI3:
1267  case TRISHELL3:
1268  case TRI6:
1269  return 0;
1270  case QUAD4:
1271  case QUADSHELL4:
1272  return 3;
1273  case QUAD8:
1274  case QUADSHELL8:
1275  case QUAD9:
1276  return unlimited;
1277  case TET4:
1278  case TET10:
1279  return 0;
1280  case HEX8:
1281  return 3;
1282  case HEX20:
1283  case HEX27:
1284  return unlimited;
1285  case PRISM6:
1286  case PRISM15:
1287  case PRISM18:
1288  case PYRAMID5:
1289  case PYRAMID13:
1290  case PYRAMID14:
1291  return 0;
1292  default:
1293  return unknown;
1294  }
1295  break;
1296  case HIERARCHIC:
1297  switch (el_t)
1298  {
1299  case EDGE2:
1300  case EDGE3:
1301  case EDGE4:
1302  return unlimited;
1303  case TRI3:
1304  case TRISHELL3:
1305  return 1;
1306  case TRI6:
1307  return unlimited;
1308  case QUAD4:
1309  case QUADSHELL4:
1310  return 1;
1311  case QUAD8:
1312  case QUADSHELL8:
1313  case QUAD9:
1314  return unlimited;
1315  case TET4:
1316  case TET10:
1317  return 0;
1318  case HEX8:
1319  case HEX20:
1320  return 1;
1321  case HEX27:
1322  return unlimited;
1323  case PRISM6:
1324  case PRISM15:
1325  case PRISM18:
1326  case PYRAMID5:
1327  case PYRAMID13:
1328  case PYRAMID14:
1329  return 0;
1330  default:
1331  return unknown;
1332  }
1333  break;
1334  case L2_HIERARCHIC:
1335  switch (el_t)
1336  {
1337  case EDGE2:
1338  case EDGE3:
1339  case EDGE4:
1340  return unlimited;
1341  case TRI3:
1342  case TRISHELL3:
1343  return 1;
1344  case TRI6:
1345  return unlimited;
1346  case QUAD4:
1347  case QUADSHELL4:
1348  return 1;
1349  case QUAD8:
1350  case QUADSHELL8:
1351  case QUAD9:
1352  return unlimited;
1353  case TET4:
1354  case TET10:
1355  return 0;
1356  case HEX8:
1357  case HEX20:
1358  return 1;
1359  case HEX27:
1360  return unlimited;
1361  case PRISM6:
1362  case PRISM15:
1363  case PRISM18:
1364  case PYRAMID5:
1365  case PYRAMID13:
1366  case PYRAMID14:
1367  return 0;
1368  default:
1369  return unknown;
1370  }
1371  break;
1372  case SUBDIVISION:
1373  switch (el_t)
1374  {
1375  case TRI3SUBDIVISION:
1376  return unlimited;
1377  default:
1378  return unknown;
1379  }
1380  break;
1381  case NEDELEC_ONE:
1382  switch (el_t)
1383  {
1384  case TRI6:
1385  case QUAD8:
1386  case QUAD9:
1387  case HEX20:
1388  case HEX27:
1389  return 1;
1390  default:
1391  return 0;
1392  }
1393  break;
1394  default:
1395  return 0;
1396  break;
1397  }
1398 }
unsigned int libMesh::FEInterface::n_dofs ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
static
Returns
The number of shape functions associated with this finite element. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 414 of file fe_interface.C.

References ifem_n_dofs(), is_InfFE_elem(), and libMesh::FEType::order.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), compute_data(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs(), libMesh::HPCoarsenTest::select_refinement(), and ~FEInterface().

417 {
418 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
419 
420  if (is_InfFE_elem(t))
421  return ifem_n_dofs(dim, fe_t, t);
422 
423 #endif
424 
425  const Order o = fe_t.order;
426 
427  fe_with_vec_switch(n_dofs(t, o));
428 
429  libmesh_error_msg("We'll never get here!");
430  return 0;
431 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:414
unsigned int dim
static unsigned int ifem_n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
unsigned int libMesh::FEInterface::n_dofs_at_node ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  n 
)
static
Returns
The number of dofs at node n for a finite element of type fe_t. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 436 of file fe_interface.C.

References ifem_n_dofs_at_node(), is_InfFE_elem(), and libMesh::FEType::order.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::DofMap::constrain_p_dofs(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node(), n_dofs_at_node_function(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::DofMap::reinit(), and ~FEInterface().

440 {
441 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
442 
443  if (is_InfFE_elem(t))
444  return ifem_n_dofs_at_node(dim, fe_t, t, n);
445 
446 #endif
447 
448  const Order o = fe_t.order;
449 
450  fe_with_vec_switch(n_dofs_at_node(t, o, n));
451 
452  libmesh_error_msg("We'll never get here!");
453  return 0;
454 }
unsigned int dim
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
static unsigned int ifem_n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
FEInterface::n_dofs_at_node_ptr libMesh::FEInterface::n_dofs_at_node_function ( const unsigned int  dim,
const FEType fe_t 
)
static
Returns
A function which evaluates n_dofs_at_node for the requested FE type and dimension.

Definition at line 459 of file fe_interface.C.

References libmesh_nullptr, and n_dofs_at_node().

Referenced by libMesh::DofMap::_dof_indices(), and libMesh::DofMap::old_dof_indices().

461 {
462  fe_with_vec_switch(n_dofs_at_node);
463 
464  libmesh_error_msg("We'll never get here!");
465  return libmesh_nullptr;
466 }
const class libmesh_nullptr_t libmesh_nullptr
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:436
unsigned int libMesh::FEInterface::n_dofs_per_elem ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
static
Returns
The number of dofs interior to the element, not associated with any interior nodes. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 473 of file fe_interface.C.

References ifem_n_dofs_per_elem(), is_InfFE_elem(), and libMesh::FEType::order.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices(), libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem(), libMesh::DofMap::old_dof_indices(), and libMesh::DofMap::reinit().

476 {
477 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
478 
479  if (is_InfFE_elem(t))
480  return ifem_n_dofs_per_elem(dim, fe_t, t);
481 
482 #endif
483 
484  const Order o = fe_t.order;
485 
486  fe_with_vec_switch(n_dofs_per_elem(t, o));
487 
488  libmesh_error_msg("We'll never get here!");
489  return 0;
490 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:473
unsigned int dim
static unsigned int ifem_n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
unsigned int libMesh::FEInterface::n_shape_functions ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t 
)
static
Returns
The number of shape functions associated with this finite element of type fe_t. Automatically decides which finite element class to use.

On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 385 of file fe_interface.C.

References ifem_n_shape_functions(), is_InfFE_elem(), and libMesh::FEType::order.

Referenced by ~FEInterface().

388 {
389 
390 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
391  /*
392  * Since the FEType, stored in DofMap/(some System child), has to
393  * be the _same_ for InfFE and FE, we have to catch calls
394  * to infinite elements through the element type.
395  */
396 
397  if (is_InfFE_elem(t))
398  return ifem_n_shape_functions(dim, fe_t, t);
399 
400 #endif
401 
402  const Order o = fe_t.order;
403 
404  fe_with_vec_switch(n_shape_functions(t, o));
405 
406  libmesh_error_msg("We'll never get here!");
407  return 0;
408 }
static unsigned int ifem_n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
unsigned int dim
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:385
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
unsigned int libMesh::FEInterface::n_vec_dim ( const MeshBase mesh,
const FEType fe_type 
)
static
Returns
The number of components of a vector-valued element. Scalar-valued elements return 1.

Definition at line 1444 of file fe_interface.C.

References libMesh::FEType::family, libMesh::LAGRANGE_VEC, libMesh::MeshBase::mesh_dimension(), and libMesh::NEDELEC_ONE.

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::EquationSystems::build_parallel_solution_vector(), and libMesh::EquationSystems::build_variable_names().

1446 {
1447  switch (fe_type.family)
1448  {
1449  //FIXME: We currently assume that the number of vector components is tied
1450  // to the mesh dimension. This will break for mixed-dimension meshes.
1451  case LAGRANGE_VEC:
1452  case NEDELEC_ONE:
1453  return mesh.mesh_dimension();
1454  default:
1455  return 1;
1456  }
1457 }
MeshBase & mesh
void libMesh::FEInterface::nodal_soln ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln 
)
static

Build the nodal soln from the element soln.

This is the solution that will be plotted. Automatically passes the request to the appropriate finite element class member. To indicate that results from this specific implementation of nodal_soln should not be used, the vector nodal_soln is returned empty.

On a p-refined element, fe_t.order should be the base order of the element.

Definition at line 526 of file fe_interface.C.

References ifem_nodal_soln(), is_InfFE_elem(), libMesh::FEType::order, and libMesh::Elem::type().

Referenced by libMesh::EquationSystems::build_discontinuous_solution_vector(), libMesh::EquationSystems::build_parallel_solution_vector(), libMesh::EnsightIO::write_scalar_ascii(), and libMesh::EnsightIO::write_vector_ascii().

531 {
532 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
533 
534  if (is_InfFE_elem(elem->type()))
535  {
536  ifem_nodal_soln(dim, fe_t, elem, elem_soln, nodal_soln);
537  return;
538  }
539 
540 #endif
541 
542  const Order order = fe_t.order;
543 
544  void_fe_with_vec_switch(nodal_soln(elem, order, elem_soln, nodal_soln));
545 }
unsigned int dim
static void ifem_nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
static void nodal_soln(const unsigned int dim, const FEType &fe_t, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Build the nodal soln from the element soln.
Definition: fe_interface.C:526
bool libMesh::FEInterface::on_reference_element ( const Point p,
const ElemType  t,
const Real  eps = TOLERANCE 
)
static
Returns
true if the point p is located on the reference element for element type t, false otherwise.

Since we are doing floating point comparisons, the parameter eps can be specified to indicate a tolerance. For example, $ \xi \le 1 $ becomes $ \xi \le 1 + \epsilon $.

Definition at line 631 of file fe_interface.C.

References libMesh::FEAbstract::on_reference_element().

Referenced by libMesh::InfQuad4::contains_point(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), and libMesh::Elem::point_test().

634 {
635  return FEBase::on_reference_element(p,t,eps);
636 }
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
Definition: fe_abstract.C:557
Real libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  i,
const Point p 
)
static
Returns
The value of the $ i^{th} $ shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.

Definition at line 641 of file fe_interface.C.

References ifem_shape(), is_InfFE_elem(), and libMesh::FEType::order.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), compute_data(), libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), shape(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), and NavierSystem::side_constraint().

646 {
647 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
648 
649  if (is_InfFE_elem(t))
650  return ifem_shape(dim, fe_t, t, i, p);
651 
652 #endif
653 
654  const Order o = fe_t.order;
655 
656  fe_switch(shape(t,o,i,p));
657 
658  libmesh_error_msg("We'll never get here!");
659  return 0.;
660 }
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
Real libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const unsigned int  i,
const Point p 
)
static
Returns
The value of the $ i^{th} $ shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate finite element class member.
Note
On a p-refined element, fe_t.order should be the base order of the element.

Definition at line 662 of file fe_interface.C.

References ifem_shape(), is_InfFE_elem(), libMesh::FEType::order, shape(), and libMesh::Elem::type().

667 {
668 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
669 
670  if (elem && is_InfFE_elem(elem->type()))
671  return ifem_shape(dim, fe_t, elem, i, p);
672 
673 #endif
674 
675  const Order o = fe_t.order;
676 
677  fe_switch(shape(elem,o,i,p));
678 
679  libmesh_error_msg("We'll never get here!");
680  return 0.;
681 }
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
template<typename OutputType >
static void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  i,
const Point p,
OutputType &  phi 
)
static
Returns
The value of the $ i^{th} $ shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
template<typename OutputType >
static void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const unsigned int  i,
const Point p,
OutputType &  phi 
)
static
Returns
The value of the $ i^{th} $ shape function at point p. This method allows you to specify the dimension, element type, and order directly. Automatically passes the request to the appropriate scalar finite element class member.
Note
On a p-refined element, fe_t.order should be the total order of the element.
template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  i,
const Point p,
Real phi 
)

Definition at line 684 of file fe_interface.C.

References ifem_shape(), is_InfFE_elem(), and shape().

690 {
691 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
692 
693  if (is_InfFE_elem(t))
694  {
695  phi = ifem_shape(dim, fe_t, t, i, p);
696  return;
697  }
698 
699 #endif
700 
701  const Order o = fe_t.order;
702 
703  switch(dim)
704  {
705  case 0:
706  fe_scalar_vec_error_switch(0, shape(t,o,i,p), phi = , ; break;);
707  break;
708  case 1:
709  fe_scalar_vec_error_switch(1, shape(t,o,i,p), phi = , ; break;);
710  break;
711  case 2:
712  fe_scalar_vec_error_switch(2, shape(t,o,i,p), phi = , ; break;);
713  break;
714  case 3:
715  fe_scalar_vec_error_switch(3, shape(t,o,i,p), phi = , ; break;);
716  break;
717  default:
718  libmesh_error_msg("Invalid dimension = " << dim);
719  }
720 
721  return;
722 }
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const unsigned int  i,
const Point p,
Real phi 
)

Definition at line 725 of file fe_interface.C.

References ifem_shape(), is_InfFE_elem(), and shape().

731 {
732 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
733 
734  if (elem && is_InfFE_elem(elem->type()))
735  {
736  phi = ifem_shape(dim, fe_t, elem, i, p);
737  return;
738  }
739 #endif
740 
741  const Order o = fe_t.order;
742 
743  switch(dim)
744  {
745  case 0:
746  fe_scalar_vec_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
747  break;
748  case 1:
749  fe_scalar_vec_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
750  break;
751  case 2:
752  fe_scalar_vec_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
753  break;
754  case 3:
755  fe_scalar_vec_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
756  break;
757  default:
758  libmesh_error_msg("Invalid dimension = " << dim);
759  }
760 
761  return;
762 }
static Real ifem_shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static bool is_InfFE_elem(const ElemType et)
Definition: fe_interface.h:468
template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const ElemType  t,
const unsigned int  i,
const Point p,
RealGradient phi 
)

Definition at line 765 of file fe_interface.C.

References shape().

771 {
772  // This even does not handle infinite elements at all!?
773  const Order o = fe_t.order;
774 
775  switch(dim)
776  {
777  case 0:
778  fe_vector_scalar_error_switch(0, shape(t,o,i,p), phi = , ; break;);
779  break;
780  case 1:
781  fe_vector_scalar_error_switch(1, shape(t,o,i,p), phi = , ; break;);
782  break;
783  case 2:
784  fe_vector_scalar_error_switch(2, shape(t,o,i,p), phi = , ; break;);
785  break;
786  case 3:
787  fe_vector_scalar_error_switch(3, shape(t,o,i,p), phi = , ; break;);
788  break;
789  default:
790  libmesh_error_msg("Invalid dimension = " << dim);
791  }
792 
793  return;
794 }
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
template<>
void libMesh::FEInterface::shape ( const unsigned int  dim,
const FEType fe_t,
const Elem elem,
const unsigned int  i,
const Point p,
RealGradient phi 
)

Definition at line 797 of file fe_interface.C.

References shape().

803 {
804  const Order o = fe_t.order;
805 
806  switch(dim)
807  {
808  case 0:
809  fe_vector_scalar_error_switch(0, shape(elem,o,i,p), phi = , ; break;);
810  break;
811  case 1:
812  fe_vector_scalar_error_switch(1, shape(elem,o,i,p), phi = , ; break;);
813  break;
814  case 2:
815  fe_vector_scalar_error_switch(2, shape(elem,o,i,p), phi = , ; break;);
816  break;
817  case 3:
818  fe_vector_scalar_error_switch(3, shape(elem,o,i,p), phi = , ; break;);
819  break;
820  default:
821  libmesh_error_msg("Invalid dimension = " << dim);
822  }
823 
824  return;
825 }
unsigned int dim
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
Definition: fe_interface.C:641
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32

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