libMesh
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Attributes | Friends | List of all members
libMesh::InfFE< Dim, T_radial, T_map > Class Template Reference

A specific instantiation of the FEBase class. More...

#include <fe.h>

Inheritance diagram for libMesh::InfFE< Dim, T_radial, T_map >:
[legend]

Public Types

typedef OutputType OutputShape
 Convenient typedefs for gradients of output, hessians of output, and potentially-complex-valued versions of same. More...
 
typedef TensorTools::IncrementRank< OutputShape >::type OutputGradient
 
typedef TensorTools::IncrementRank< OutputGradient >::type OutputTensor
 
typedef TensorTools::DecrementRank< OutputShape >::type OutputDivergence
 
typedef TensorTools::MakeNumber< OutputShape >::type OutputNumber
 
typedef TensorTools::IncrementRank< OutputNumber >::type OutputNumberGradient
 
typedef TensorTools::IncrementRank< OutputNumberGradient >::type OutputNumberTensor
 
typedef TensorTools::DecrementRank< OutputNumber >::type OutputNumberDivergence
 

Public Member Functions

 InfFE (const FEType &fet)
 Constructor and empty destructor. More...
 
 ~InfFE ()
 
virtual FEContinuity get_continuity () const override
 
virtual bool is_hierarchic () const override
 
virtual void reinit (const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 This is at the core of this class. More...
 
virtual void reinit (const Elem *inf_elem, const unsigned int s, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 Reinitializes all the physical element-dependent data based on the side of an infinite element. More...
 
virtual void edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 Not implemented yet. More...
 
virtual void side_map (const Elem *, const Elem *, const unsigned int, const std::vector< Point > &, std::vector< Point > &) override
 Computes the reference space quadrature points on the side of an element based on the side quadrature points. More...
 
virtual void attach_quadrature_rule (QBase *q) override
 The use of quadrature rules with the InfFE class is somewhat different from the approach of the FE class. More...
 
virtual unsigned int n_shape_functions () const override
 
virtual unsigned int n_quadrature_points () const override
 
template<>
std::unique_ptr< FEGenericBase< Real > > build (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< RealGradient > > build (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< Real > > build_InfFE (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< RealGradient > > build_InfFE (const unsigned int, const FEType &)
 
const std::vector< std::vector< OutputShape > > & get_phi () const
 
const std::vector< std::vector< OutputGradient > > & get_dphi () const
 
const std::vector< std::vector< OutputShape > > & get_curl_phi () const
 
const std::vector< std::vector< OutputDivergence > > & get_div_phi () const
 
const std::vector< std::vector< OutputShape > > & get_dphidx () const
 
const std::vector< std::vector< OutputShape > > & get_dphidy () const
 
const std::vector< std::vector< OutputShape > > & get_dphidz () const
 
const std::vector< std::vector< OutputShape > > & get_dphidxi () const
 
const std::vector< std::vector< OutputShape > > & get_dphideta () const
 
const std::vector< std::vector< OutputShape > > & get_dphidzeta () const
 
const std::vector< std::vector< OutputTensor > > & get_d2phi () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidx2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxdy () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxdz () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidy2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidydz () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidz2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxi2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxideta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxidzeta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phideta2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidetadzeta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidzeta2 () const
 
const std::vector< OutputGradient > & get_dphase () const
 
const std::vector< Real > & get_Sobolev_weight () const
 
const std::vector< RealGradient > & get_Sobolev_dweight () const
 
void print_phi (std::ostream &os) const
 Prints the value of each shape function at each quadrature point. More...
 
void print_dphi (std::ostream &os) const
 Prints the value of each shape function's derivative at each quadrature point. More...
 
void print_d2phi (std::ostream &os) const
 Prints the value of each shape function's second derivatives at each quadrature point. More...
 
unsigned int get_dim () const
 
const std::vector< Point > & get_xyz () const
 
const std::vector< Real > & get_JxW () const
 
const std::vector< RealGradient > & get_dxyzdxi () const
 
const std::vector< RealGradient > & get_dxyzdeta () const
 
const std::vector< RealGradient > & get_dxyzdzeta () const
 
const std::vector< RealGradient > & get_d2xyzdxi2 () const
 
const std::vector< RealGradient > & get_d2xyzdeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdzeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdxideta () const
 
const std::vector< RealGradient > & get_d2xyzdxidzeta () const
 
const std::vector< RealGradient > & get_d2xyzdetadzeta () const
 
const std::vector< Real > & get_dxidx () const
 
const std::vector< Real > & get_dxidy () const
 
const std::vector< Real > & get_dxidz () const
 
const std::vector< Real > & get_detadx () const
 
const std::vector< Real > & get_detady () const
 
const std::vector< Real > & get_detadz () const
 
const std::vector< Real > & get_dzetadx () const
 
const std::vector< Real > & get_dzetady () const
 
const std::vector< Real > & get_dzetadz () const
 
const std::vector< std::vector< Point > > & get_tangents () const
 
const std::vector< Point > & get_normals () const
 
const std::vector< Real > & get_curvatures () const
 
ElemType get_type () const
 
unsigned int get_p_level () const
 
FEType get_fe_type () const
 
Order get_order () const
 
void set_fe_order (int new_order)
 Sets the base FE order of the finite element. More...
 
FEFamily get_family () const
 
const FEMapget_fe_map () const
 
FEMapget_fe_map ()
 
void print_JxW (std::ostream &os) const
 Prints the Jacobian times the weight for each quadrature point. More...
 
void print_xyz (std::ostream &os) const
 Prints the spatial location of each quadrature point (on the physical element). More...
 
void print_info (std::ostream &os) const
 Prints all the relevant information about the current element. More...
 

Static Public Member Functions

static Real shape (const FEType &fet, const ElemType t, const unsigned int i, const Point &p)
 
static Real shape (const FEType &fet, const Elem *elem, const unsigned int i, const Point &p)
 
static Real shape_deriv (const FEType &fet, const Elem *inf_elem, const unsigned int i, const unsigned int j, const Point &p)
 
static Real shape_deriv (const FEType &fet, const ElemType inf_elem_type, const unsigned int i, const unsigned int j, const Point &p)
 
static void compute_data (const FEType &fe_t, const Elem *inf_elem, FEComputeData &data)
 Generalized version of shape(), takes an Elem *. More...
 
static unsigned int n_shape_functions (const FEType &fet, const ElemType t)
 
static unsigned int n_dofs (const FEType &fet, const ElemType inf_elem_type)
 
static unsigned int n_dofs_at_node (const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
 
static unsigned int n_dofs_per_elem (const FEType &fet, const ElemType inf_elem_type)
 
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. More...
 
static Point map (const Elem *inf_elem, const Point &reference_point)
 
static Point inverse_map (const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
 
static void inverse_map (const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true)
 
static std::unique_ptr< FEGenericBasebuild (const unsigned int dim, const FEType &type)
 Builds a specific finite element type. More...
 
static std::unique_ptr< FEGenericBasebuild_InfFE (const unsigned int dim, const FEType &type)
 Builds a specific infinite element type. More...
 
static void compute_proj_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, using generic projections. More...
 
static void coarsened_dof_values (const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const unsigned int var, const bool use_old_dof_indices=false)
 Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children. More...
 
static void coarsened_dof_values (const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const bool use_old_dof_indices=false)
 Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children. 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 meshes with periodic boundary conditions) corresponding to variable number var_number, using generic projections. More...
 
static bool on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE)
 
static void get_refspace_nodes (const ElemType t, std::vector< Point > &nodes)
 
static void compute_node_constraints (NodeConstraints &constraints, const Elem *elem)
 Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry. More...
 
static void compute_periodic_node_constraints (NodeConstraints &constraints, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const Elem *elem)
 Computes the node position constraint equation contributions (for meshes with periodic boundary conditions) More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 

Protected Member Functions

void update_base_elem (const Elem *inf_elem)
 Updates the protected member base_elem to the appropriate base element for the given inf_elem. More...
 
virtual void init_base_shape_functions (const std::vector< Point > &, const Elem *) override
 Do not use this derived member in InfFE<Dim,T_radial,T_map>. More...
 
void init_radial_shape_functions (const Elem *inf_elem, const std::vector< Point > *radial_pts=nullptr)
 Some of the member data only depend on the radial part of the infinite element. More...
 
void init_shape_functions (const std::vector< Point > &radial_qp, const std::vector< Point > &base_qp, const Elem *inf_elem)
 Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta, etc. More...
 
void init_face_shape_functions (const std::vector< Point > &, const Elem *inf_side)
 Initialize all the data fields like weight, phi, etc for the side s. More...
 
void combine_base_radial (const Elem *inf_elem)
 Combines the shape functions, which were formed in init_shape_functions(Elem *), with geometric data. More...
 
virtual void compute_shape_functions (const Elem *, const std::vector< Point > &) override
 After having updated the jacobian and the transformation from local to global coordinates in FEAbstract::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx/y/z, dphasedx/y/z, dweight. More...
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
void determine_calculations ()
 Determine which values are to be calculated, for both the FE itself and for the FEMap. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 

Static Protected Member Functions

static Real eval (Real v, Order o_radial, unsigned int i)
 
static Real eval_deriv (Real v, Order o_radial, unsigned int i)
 
static void compute_node_indices (const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
 Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associated to the node outer_node_index of an infinite element of type inf_elem_type. More...
 
static void compute_node_indices_fast (const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
 Does the same as compute_node_indices(), but stores the maps for the current element type. More...
 
static void compute_shape_indices (const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
 Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (0 in the base, \( \ge 1 \) further out) associated to the shape with global index i of an infinite element of type inf_elem_type. More...
 

Protected Attributes

std::vector< Realdist
 the radial distance of the base nodes from the origin More...
 
std::vector< Realdweightdv
 the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points. More...
 
std::vector< Realsom
 the radial decay \( 1/r \) in local coordinates. More...
 
std::vector< Realdsomdv
 the first local derivative of the radial decay \( 1/r \) in local coordinates. More...
 
std::vector< std::vector< Real > > mode
 the radial approximation shapes in local coordinates Needed when setting up the overall shape functions. More...
 
std::vector< std::vector< Real > > dmodedv
 the first local derivative of the radial approximation shapes. More...
 
std::vector< std::vector< Real > > radial_map
 the radial mapping shapes in local coordinates More...
 
std::vector< std::vector< Real > > dradialdv_map
 the first local derivative of the radial mapping shapes More...
 
std::vector< Realdphasedxi
 the first local derivative (for 3D, the first in the base) of the phase term in local coordinates. More...
 
std::vector< Realdphasedeta
 the second local derivative (for 3D, the second in the base) of the phase term in local coordinates. More...
 
std::vector< Realdphasedzeta
 the third local derivative (for 3D, the derivative in radial direction) of the phase term in local coordinates. More...
 
std::vector< unsigned int_radial_node_index
 The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current infinite element. More...
 
std::vector< unsigned int_base_node_index
 The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current element. More...
 
std::vector< unsigned int_radial_shape_index
 The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element. More...
 
std::vector< unsigned int_base_shape_index
 The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element. More...
 
unsigned int _n_total_approx_sf
 The number of total approximation shape functions for the current configuration. More...
 
unsigned int _n_total_qp
 The total number of quadrature points for the current configuration. More...
 
std::vector< Real_total_qrule_weights
 this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be used More...
 
std::unique_ptr< QBasebase_qrule
 The quadrature rule for the base element associated with the current infinite element. More...
 
std::unique_ptr< QBaseradial_qrule
 The quadrature rule for the base element associated with the current infinite element. More...
 
std::unique_ptr< Elembase_elem
 The base element associated with the current infinite element. More...
 
std::unique_ptr< FEBasebase_fe
 Have a FE<Dim-1,T_base> handy for base approximation. More...
 
FEType current_fe_type
 This FEType stores the characteristics for which the data structures phi, phi_map etc are currently initialized. More...
 
std::unique_ptr< FETransformationBase< OutputType > > _fe_trans
 Object that handles computing shape function values, gradients, etc in the physical domain. More...
 
std::vector< std::vector< OutputShape > > phi
 Shape function values. More...
 
std::vector< std::vector< OutputGradient > > dphi
 Shape function derivative values. More...
 
std::vector< std::vector< OutputShape > > curl_phi
 Shape function curl values. More...
 
std::vector< std::vector< OutputDivergence > > div_phi
 Shape function divergence values. More...
 
std::vector< std::vector< OutputShape > > dphidxi
 Shape function derivatives in the xi direction. More...
 
std::vector< std::vector< OutputShape > > dphideta
 Shape function derivatives in the eta direction. More...
 
std::vector< std::vector< OutputShape > > dphidzeta
 Shape function derivatives in the zeta direction. More...
 
std::vector< std::vector< OutputShape > > dphidx
 Shape function derivatives in the x direction. More...
 
std::vector< std::vector< OutputShape > > dphidy
 Shape function derivatives in the y direction. More...
 
std::vector< std::vector< OutputShape > > dphidz
 Shape function derivatives in the z direction. More...
 
std::vector< std::vector< OutputTensor > > d2phi
 Shape function second derivative values. More...
 
std::vector< std::vector< OutputShape > > d2phidxi2
 Shape function second derivatives in the xi direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxideta
 Shape function second derivatives in the xi-eta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxidzeta
 Shape function second derivatives in the xi-zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phideta2
 Shape function second derivatives in the eta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidetadzeta
 Shape function second derivatives in the eta-zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidzeta2
 Shape function second derivatives in the zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidx2
 Shape function second derivatives in the x direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxdy
 Shape function second derivatives in the x-y direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxdz
 Shape function second derivatives in the x-z direction. More...
 
std::vector< std::vector< OutputShape > > d2phidy2
 Shape function second derivatives in the y direction. More...
 
std::vector< std::vector< OutputShape > > d2phidydz
 Shape function second derivatives in the y-z direction. More...
 
std::vector< std::vector< OutputShape > > d2phidz2
 Shape function second derivatives in the z direction. More...
 
std::vector< OutputGradientdphase
 Used for certain infinite element families: the first derivatives of the phase term in global coordinates, over all quadrature points. More...
 
std::vector< RealGradientdweight
 Used for certain infinite element families: the global derivative of the additional radial weight \( 1/{r^2} \), over all quadrature points. More...
 
std::vector< Realweight
 Used for certain infinite element families: the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points. More...
 
std::unique_ptr< FEMap_fe_map
 
const unsigned int dim
 The dimensionality of the object. More...
 
bool calculations_started
 Have calculations with this object already been started? Then all get_* functions should already have been called. More...
 
bool calculate_map
 Are we calculating mapping functions? More...
 
bool calculate_phi
 Should we calculate shape functions? More...
 
bool calculate_dphi
 Should we calculate shape function gradients? More...
 
bool calculate_d2phi
 Should we calculate shape function hessians? More...
 
const bool calculate_d2phi =false
 
bool calculate_curl_phi
 Should we calculate shape function curls? More...
 
bool calculate_div_phi
 Should we calculate shape function divergences? More...
 
bool calculate_dphiref
 Should we calculate reference shape function gradients? More...
 
FEType fe_type
 The finite element type for this object. More...
 
ElemType elem_type
 The element type the current data structures are set up for. More...
 
unsigned int _p_level
 The p refinement level the current data structures are set up for. More...
 
QBaseqrule
 A pointer to the quadrature rule employed. More...
 
bool shapes_on_quadrature
 A flag indicating if current data structures correspond to quadrature rule points. More...
 

Static Protected Attributes

static Counts _counts
 Actually holds the data. More...
 
static Threads::atomic< unsigned int_n_objects
 The number of objects. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static bool _enable_print_counter = true
 Flag to control whether reference count information is printed when print_info is called. More...
 

Private Member Functions

virtual bool shapes_need_reinit () const override
 

Static Private Attributes

static ElemType _compute_node_indices_fast_current_elem_type = INVALID_ELEM
 When compute_node_indices_fast() is used, this static variable remembers the element type for which the static variables in compute_node_indices_fast() are currently set. More...
 
static bool _warned_for_nodal_soln = false
 static members that are used to issue warning messages only once. More...
 
static bool _warned_for_shape = false
 
static bool _warned_for_dshape = false
 

Friends

template<unsigned int friend_Dim, FEFamily friend_T_radial, InfMapType friend_T_map>
class InfFE
 Make all InfFE<Dim,T_radial,T_map> classes friends of each other, so that the protected eval() may be accessed. More...
 
class InfFEMap
 

Detailed Description

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
class libMesh::InfFE< Dim, T_radial, T_map >

A specific instantiation of the FEBase class.

This class is templated, and specific template instantiations will result in different Infinite Element families, similar to the FE class. InfFE builds a FE<Dim-1,T_base>, and most of the requests related to the base are handed over to this object. All methods related to the radial part are collected in the class InfFERadial. Similarly, most of the static methods concerning base approximation are contained in InfFEBase.

Having different shape approximation families in radial direction introduces the requirement for an additional Order in this class. Therefore, the FEType internals change when infinite elements are enabled. When the specific infinite element type is not known at compile time, use the FEBase::build() member to create abstract (but still optimized) infinite elements at run time.

The node numbering scheme is the one from the current infinite element. Each node in the base holds exactly the same number of dofs as an adjacent conventional FE would contain. The nodes further out hold the additional dof necessary for radial approximation. The order of the outer nodes' components is such that the radial shapes have highest priority, followed by the base shapes.

Author
Daniel Dreyer
Date
2003

Base class for all the infinite geometric element types.

Definition at line 40 of file fe.h.

Member Typedef Documentation

◆ Counts

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ OutputDivergence

template<typename OutputType>
typedef TensorTools::DecrementRank<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputDivergence
inherited

Definition at line 121 of file fe_base.h.

◆ OutputGradient

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputGradient
inherited

Definition at line 119 of file fe_base.h.

◆ OutputNumber

template<typename OutputType>
typedef TensorTools::MakeNumber<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputNumber
inherited

Definition at line 122 of file fe_base.h.

◆ OutputNumberDivergence

template<typename OutputType>
typedef TensorTools::DecrementRank<OutputNumber>::type libMesh::FEGenericBase< OutputType >::OutputNumberDivergence
inherited

Definition at line 125 of file fe_base.h.

◆ OutputNumberGradient

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputNumber>::type libMesh::FEGenericBase< OutputType >::OutputNumberGradient
inherited

Definition at line 123 of file fe_base.h.

◆ OutputNumberTensor

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputNumberGradient>::type libMesh::FEGenericBase< OutputType >::OutputNumberTensor
inherited

Definition at line 124 of file fe_base.h.

◆ OutputShape

template<typename OutputType>
typedef OutputType libMesh::FEGenericBase< OutputType >::OutputShape
inherited

Convenient typedefs for gradients of output, hessians of output, and potentially-complex-valued versions of same.

Definition at line 118 of file fe_base.h.

◆ OutputTensor

template<typename OutputType>
typedef TensorTools::IncrementRank<OutputGradient>::type libMesh::FEGenericBase< OutputType >::OutputTensor
inherited

Definition at line 120 of file fe_base.h.

Constructor & Destructor Documentation

◆ InfFE()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
libMesh::InfFE< Dim, T_radial, T_map >::InfFE ( const FEType fet)
explicit

Constructor and empty destructor.

Initializes some data structures. Builds a FE<Dim-1,T_base> object to handle approximation in the base, so that there is no need to template InfFE<Dim,T_radial,T_map> also with respect to the base approximation T_base.

The same remarks concerning compile-time optimization for FE also hold for InfFE. Use the FEBase::build_InfFE(const unsigned int, const FEType &) method to build specific instantiations of InfFE at run time.

Definition at line 39 of file inf_fe.C.

39  :
40  FEBase (Dim, fet),
41 
43  _n_total_qp (0),
44 
45  // initialize the current_fe_type to all the same
46  // values as \p fet (since the FE families and coordinate
47  // map type should not change), but use an invalid order
48  // for the radial part (since this is the only order
49  // that may change!).
50  // the data structures like \p phi etc are not initialized
51  // through the constructor, but through reinit()
52  current_fe_type (FEType(fet.order,
53  fet.family,
55  fet.radial_family,
56  fet.inf_map))
57 
58 {
59  // Sanity checks
60  libmesh_assert_equal_to (T_radial, fe_type.radial_family);
61  libmesh_assert_equal_to (T_map, fe_type.inf_map);
62 
63  // build the base_fe object
64  if (Dim != 1)
65  base_fe = FEBase::build(Dim-1, fet);
66 }

References libMesh::InfFE< Dim, T_radial, T_map >::base_fe, libMesh::FEGenericBase< OutputType >::build(), libMesh::FEAbstract::fe_type, libMesh::FEType::inf_map, and libMesh::FEType::radial_family.

◆ ~InfFE()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
libMesh::InfFE< Dim, T_radial, T_map >::~InfFE ( )
inline

Definition at line 244 of file inf_fe.h.

244 {}

Member Function Documentation

◆ attach_quadrature_rule()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule ( QBase q)
overridevirtual

The use of quadrature rules with the InfFE class is somewhat different from the approach of the FE class.

While the FE class requires an appropriately initialized quadrature rule object, and simply uses it, the InfFE class requires only the quadrature rule object of the current FE class. From this QBase *, it determines the necessary data, and builds two appropriate quadrature classes, one for radial, and another for base integration, using the convenient QBase::build() method.

Implements libMesh::FEAbstract.

Definition at line 71 of file inf_fe.C.

72 {
73  libmesh_assert(q);
75 
76  const Order base_int_order = q->get_order();
77  const Order radial_int_order = static_cast<Order>(2 * (static_cast<unsigned int>(fe_type.radial_order.get_order()) + 1) +2);
78  const unsigned int qrule_dim = q->get_dim();
79 
80  if (Dim != 1)
81  {
82  // build a Dim-1 quadrature rule of the type that we received
83  base_qrule = QBase::build(q->type(), qrule_dim-1, base_int_order);
84  base_fe->attach_quadrature_rule(base_qrule.get());
85  }
86 
87  // in radial direction, always use Gauss quadrature
88  radial_qrule = libmesh_make_unique<QGauss>(1, radial_int_order);
89 
90  // Maybe helpful to store the QBase *
91  // with which we initialized our own quadrature rules.
92  // Used e.g. in \p InfFE::reinit(elem,side)
93  qrule = q;
94 }

References libMesh::QBase::build(), libMesh::QBase::get_dim(), libMesh::QBase::get_order(), libMesh::libmesh_assert(), and libMesh::QBase::type().

◆ build() [1/3]

template<>
std::unique_ptr< FEGenericBase< Real > > libMesh::FEGenericBase< Real >::build ( const unsigned int  dim,
const FEType fet 
)
inherited

Definition at line 186 of file fe_base.C.

188 {
189  switch (dim)
190  {
191  // 0D
192  case 0:
193  {
194  switch (fet.family)
195  {
196  case CLOUGH:
197  return libmesh_make_unique<FE<0,CLOUGH>>(fet);
198 
199  case HERMITE:
200  return libmesh_make_unique<FE<0,HERMITE>>(fet);
201 
202  case LAGRANGE:
203  return libmesh_make_unique<FE<0,LAGRANGE>>(fet);
204 
205  case L2_LAGRANGE:
206  return libmesh_make_unique<FE<0,L2_LAGRANGE>>(fet);
207 
208  case HIERARCHIC:
209  return libmesh_make_unique<FE<0,HIERARCHIC>>(fet);
210 
211  case L2_HIERARCHIC:
212  return libmesh_make_unique<FE<0,L2_HIERARCHIC>>(fet);
213 
214  case MONOMIAL:
215  return libmesh_make_unique<FE<0,MONOMIAL>>(fet);
216 
217 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
218  case SZABAB:
219  return libmesh_make_unique<FE<0,SZABAB>>(fet);
220 
221  case BERNSTEIN:
222  return libmesh_make_unique<FE<0,BERNSTEIN>>(fet);
223 
224  case RATIONAL_BERNSTEIN:
225  return libmesh_make_unique<FE<0,RATIONAL_BERNSTEIN>>(fet);
226 #endif
227 
228  case XYZ:
229  return libmesh_make_unique<FEXYZ<0>>(fet);
230 
231  case SCALAR:
232  return libmesh_make_unique<FEScalar<0>>(fet);
233 
234  default:
235  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
236  }
237  }
238  // 1D
239  case 1:
240  {
241  switch (fet.family)
242  {
243  case CLOUGH:
244  return libmesh_make_unique<FE<1,CLOUGH>>(fet);
245 
246  case HERMITE:
247  return libmesh_make_unique<FE<1,HERMITE>>(fet);
248 
249  case LAGRANGE:
250  return libmesh_make_unique<FE<1,LAGRANGE>>(fet);
251 
252  case L2_LAGRANGE:
253  return libmesh_make_unique<FE<1,L2_LAGRANGE>>(fet);
254 
255  case HIERARCHIC:
256  return libmesh_make_unique<FE<1,HIERARCHIC>>(fet);
257 
258  case L2_HIERARCHIC:
259  return libmesh_make_unique<FE<1,L2_HIERARCHIC>>(fet);
260 
261  case MONOMIAL:
262  return libmesh_make_unique<FE<1,MONOMIAL>>(fet);
263 
264 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
265  case SZABAB:
266  return libmesh_make_unique<FE<1,SZABAB>>(fet);
267 
268  case BERNSTEIN:
269  return libmesh_make_unique<FE<1,BERNSTEIN>>(fet);
270 
271  case RATIONAL_BERNSTEIN:
272  return libmesh_make_unique<FE<1,RATIONAL_BERNSTEIN>>(fet);
273 #endif
274 
275  case XYZ:
276  return libmesh_make_unique<FEXYZ<1>>(fet);
277 
278  case SCALAR:
279  return libmesh_make_unique<FEScalar<1>>(fet);
280 
281  default:
282  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
283  }
284  }
285 
286 
287  // 2D
288  case 2:
289  {
290  switch (fet.family)
291  {
292  case CLOUGH:
293  return libmesh_make_unique<FE<2,CLOUGH>>(fet);
294 
295  case HERMITE:
296  return libmesh_make_unique<FE<2,HERMITE>>(fet);
297 
298  case LAGRANGE:
299  return libmesh_make_unique<FE<2,LAGRANGE>>(fet);
300 
301  case L2_LAGRANGE:
302  return libmesh_make_unique<FE<2,L2_LAGRANGE>>(fet);
303 
304  case HIERARCHIC:
305  return libmesh_make_unique<FE<2,HIERARCHIC>>(fet);
306 
307  case L2_HIERARCHIC:
308  return libmesh_make_unique<FE<2,L2_HIERARCHIC>>(fet);
309 
310  case MONOMIAL:
311  return libmesh_make_unique<FE<2,MONOMIAL>>(fet);
312 
313 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
314  case SZABAB:
315  return libmesh_make_unique<FE<2,SZABAB>>(fet);
316 
317  case BERNSTEIN:
318  return libmesh_make_unique<FE<2,BERNSTEIN>>(fet);
319 
320  case RATIONAL_BERNSTEIN:
321  return libmesh_make_unique<FE<2,RATIONAL_BERNSTEIN>>(fet);
322 #endif
323 
324  case XYZ:
325  return libmesh_make_unique<FEXYZ<2>>(fet);
326 
327  case SCALAR:
328  return libmesh_make_unique<FEScalar<2>>(fet);
329 
330  case SUBDIVISION:
331  return libmesh_make_unique<FESubdivision>(fet);
332 
333  default:
334  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
335  }
336  }
337 
338 
339  // 3D
340  case 3:
341  {
342  switch (fet.family)
343  {
344  case CLOUGH:
345  libmesh_error_msg("ERROR: Clough-Tocher elements currently only support 1D and 2D");
346 
347  case HERMITE:
348  return libmesh_make_unique<FE<3,HERMITE>>(fet);
349 
350  case LAGRANGE:
351  return libmesh_make_unique<FE<3,LAGRANGE>>(fet);
352 
353  case L2_LAGRANGE:
354  return libmesh_make_unique<FE<3,L2_LAGRANGE>>(fet);
355 
356  case HIERARCHIC:
357  return libmesh_make_unique<FE<3,HIERARCHIC>>(fet);
358 
359  case L2_HIERARCHIC:
360  return libmesh_make_unique<FE<3,L2_HIERARCHIC>>(fet);
361 
362  case MONOMIAL:
363  return libmesh_make_unique<FE<3,MONOMIAL>>(fet);
364 
365 #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
366  case SZABAB:
367  return libmesh_make_unique<FE<3,SZABAB>>(fet);
368 
369  case BERNSTEIN:
370  return libmesh_make_unique<FE<3,BERNSTEIN>>(fet);
371 
372  case RATIONAL_BERNSTEIN:
373  return libmesh_make_unique<FE<3,RATIONAL_BERNSTEIN>>(fet);
374 #endif
375 
376  case XYZ:
377  return libmesh_make_unique<FEXYZ<3>>(fet);
378 
379  case SCALAR:
380  return libmesh_make_unique<FEScalar<3>>(fet);
381 
382  default:
383  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
384  }
385  }
386 
387  default:
388  libmesh_error_msg("Invalid dimension dim = " << dim);
389  }
390 }

◆ build() [2/3]

template<>
std::unique_ptr< FEGenericBase< RealGradient > > libMesh::FEGenericBase< RealGradient >::build ( const unsigned int  dim,
const FEType fet 
)
inherited

Definition at line 396 of file fe_base.C.

398 {
399  switch (dim)
400  {
401  // 0D
402  case 0:
403  {
404  switch (fet.family)
405  {
406  case LAGRANGE_VEC:
407  return libmesh_make_unique<FELagrangeVec<0>>(fet);
408 
409  case MONOMIAL_VEC:
410  return libmesh_make_unique<FEMonomialVec<0>>(fet);
411 
412  default:
413  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
414  }
415  }
416  case 1:
417  {
418  switch (fet.family)
419  {
420  case LAGRANGE_VEC:
421  return libmesh_make_unique<FELagrangeVec<1>>(fet);
422 
423  case MONOMIAL_VEC:
424  return libmesh_make_unique<FEMonomialVec<1>>(fet);
425 
426  default:
427  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
428  }
429  }
430  case 2:
431  {
432  switch (fet.family)
433  {
434  case LAGRANGE_VEC:
435  return libmesh_make_unique<FELagrangeVec<2>>(fet);
436 
437  case MONOMIAL_VEC:
438  return libmesh_make_unique<FEMonomialVec<2>>(fet);
439 
440  case NEDELEC_ONE:
441  return libmesh_make_unique<FENedelecOne<2>>(fet);
442 
443  default:
444  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
445  }
446  }
447  case 3:
448  {
449  switch (fet.family)
450  {
451  case LAGRANGE_VEC:
452  return libmesh_make_unique<FELagrangeVec<3>>(fet);
453 
454  case MONOMIAL_VEC:
455  return libmesh_make_unique<FEMonomialVec<3>>(fet);
456 
457  case NEDELEC_ONE:
458  return libmesh_make_unique<FENedelecOne<3>>(fet);
459 
460  default:
461  libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
462  }
463  }
464 
465  default:
466  libmesh_error_msg("Invalid dimension dim = " << dim);
467  } // switch(dim)
468 }

◆ build() [3/3]

template<typename OutputType>
static std::unique_ptr<FEGenericBase> libMesh::FEGenericBase< OutputType >::build ( const unsigned int  dim,
const FEType type 
)
staticinherited

Builds a specific finite element type.

A std::unique_ptr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.

The build call will fail if the OutputType of this class is not compatible with the output required for the requested type

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), assemble(), LinearElasticity::assemble(), assemble_1D(), assemble_biharmonic(), assemble_cd(), assemble_elasticity(), assemble_ellipticdg(), assemble_helmholtz(), assemble_laplace(), assemble_mass(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_wave(), libMesh::FEMContext::cached_fe(), libMesh::System::calculate_norm(), libMesh::FEInterface::compute_data(), compute_jacobian(), compute_residual(), LinearElasticity::compute_stresses(), compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::MeshFunction::discontinuous_gradient(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), libMesh::RBEIMAssembly::initialize_fe(), integrate_function(), LaplaceYoung::jacobian(), LargeDeformationElasticity::jacobian(), main(), OverlappingCouplingFunctor::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectEdges::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectSides::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::ProjectInteriors::operator()(), libMesh::System::point_hessian(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), LaplaceYoung::residual(), LargeDeformationElasticity::residual(), libMesh::HPCoarsenTest::select_refinement(), RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), and libMesh::Elem::volume().

◆ build_InfFE() [1/3]

template<>
std::unique_ptr< FEGenericBase< Real > > libMesh::FEGenericBase< Real >::build_InfFE ( const unsigned int  dim,
const FEType fet 
)
inherited

Definition at line 481 of file fe_base.C.

483 {
484  switch (dim)
485  {
486 
487  // 1D
488  case 1:
489  {
490  switch (fet.radial_family)
491  {
492  case INFINITE_MAP:
493  libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << fet.radial_family);
494 
495  case JACOBI_20_00:
496  {
497  switch (fet.inf_map)
498  {
499  case CARTESIAN:
500  return libmesh_make_unique<InfFE<1,JACOBI_20_00,CARTESIAN>>(fet);
501 
502  default:
503  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
504  }
505  }
506 
507  case JACOBI_30_00:
508  {
509  switch (fet.inf_map)
510  {
511  case CARTESIAN:
512  return libmesh_make_unique<InfFE<1,JACOBI_30_00,CARTESIAN>>(fet);
513 
514  default:
515  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
516  }
517  }
518 
519  case LEGENDRE:
520  {
521  switch (fet.inf_map)
522  {
523  case CARTESIAN:
524  return libmesh_make_unique<InfFE<1,LEGENDRE,CARTESIAN>>(fet);
525 
526  default:
527  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
528  }
529  }
530 
531  case LAGRANGE:
532  {
533  switch (fet.inf_map)
534  {
535  case CARTESIAN:
536  return libmesh_make_unique<InfFE<1,LAGRANGE,CARTESIAN>>(fet);
537 
538  default:
539  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
540  }
541  }
542 
543  default:
544  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
545  }
546  }
547 
548 
549 
550 
551  // 2D
552  case 2:
553  {
554  switch (fet.radial_family)
555  {
556  case INFINITE_MAP:
557  libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << fet.radial_family);
558 
559  case JACOBI_20_00:
560  {
561  switch (fet.inf_map)
562  {
563  case CARTESIAN:
564  return libmesh_make_unique<InfFE<2,JACOBI_20_00,CARTESIAN>>(fet);
565 
566  default:
567  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
568  }
569  }
570 
571  case JACOBI_30_00:
572  {
573  switch (fet.inf_map)
574  {
575  case CARTESIAN:
576  return libmesh_make_unique<InfFE<2,JACOBI_30_00,CARTESIAN>>(fet);
577 
578  default:
579  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
580  }
581  }
582 
583  case LEGENDRE:
584  {
585  switch (fet.inf_map)
586  {
587  case CARTESIAN:
588  return libmesh_make_unique<InfFE<2,LEGENDRE,CARTESIAN>>(fet);
589 
590  default:
591  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
592  }
593  }
594 
595  case LAGRANGE:
596  {
597  switch (fet.inf_map)
598  {
599  case CARTESIAN:
600  return libmesh_make_unique<InfFE<2,LAGRANGE,CARTESIAN>>(fet);
601 
602  default:
603  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
604  }
605  }
606 
607  default:
608  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
609  }
610  }
611 
612 
613 
614 
615  // 3D
616  case 3:
617  {
618  switch (fet.radial_family)
619  {
620  case INFINITE_MAP:
621  libmesh_error_msg("ERROR: Don't build an infinite element with FEFamily = " << fet.radial_family);
622 
623  case JACOBI_20_00:
624  {
625  switch (fet.inf_map)
626  {
627  case CARTESIAN:
628  return libmesh_make_unique<InfFE<3,JACOBI_20_00,CARTESIAN>>(fet);
629 
630  default:
631  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
632  }
633  }
634 
635  case JACOBI_30_00:
636  {
637  switch (fet.inf_map)
638  {
639  case CARTESIAN:
640  return libmesh_make_unique<InfFE<3,JACOBI_30_00,CARTESIAN>>(fet);
641 
642  default:
643  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
644  }
645  }
646 
647  case LEGENDRE:
648  {
649  switch (fet.inf_map)
650  {
651  case CARTESIAN:
652  return libmesh_make_unique<InfFE<3,LEGENDRE,CARTESIAN>>(fet);
653 
654  default:
655  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
656  }
657  }
658 
659  case LAGRANGE:
660  {
661  switch (fet.inf_map)
662  {
663  case CARTESIAN:
664  return libmesh_make_unique<InfFE<3,LAGRANGE,CARTESIAN>>(fet);
665 
666  default:
667  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
668  }
669  }
670 
671  default:
672  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
673  }
674  }
675 
676  default:
677  libmesh_error_msg("Invalid dimension dim = " << dim);
678  }
679 }

◆ build_InfFE() [2/3]

template<typename OutputType>
static std::unique_ptr<FEGenericBase> libMesh::FEGenericBase< OutputType >::build_InfFE ( const unsigned int  dim,
const FEType type 
)
staticinherited

Builds a specific infinite element type.

A std::unique_ptr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.

The build call will fail if the OutputShape of this class is not compatible with the output required for the requested type

Referenced by assemble_SchroedingerEquation(), assemble_wave(), libMesh::FEMContext::cached_fe(), libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), and InfFERadialTest::testSingleOrder().

◆ build_InfFE() [3/3]

template<>
std::unique_ptr< FEGenericBase< RealGradient > > libMesh::FEGenericBase< RealGradient >::build_InfFE ( const unsigned int  ,
const FEType  
)
inherited

Definition at line 685 of file fe_base.C.

687 {
688  // No vector types defined... YET.
689  libmesh_not_implemented();
690  return std::unique_ptr<FEVectorBase>();
691 }

◆ coarsened_dof_values() [1/2]

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::coarsened_dof_values ( const NumericVector< Number > &  global_vector,
const DofMap dof_map,
const Elem coarse_elem,
DenseVector< Number > &  coarse_dofs,
const bool  use_old_dof_indices = false 
)
staticinherited

Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children.

Computes a vector of coefficients corresponding to all dof_indices.

Definition at line 1373 of file fe_base.C.

1378 {
1379  Ue.resize(0);
1380 
1381  for (unsigned int v=0; v != dof_map.n_variables(); ++v)
1382  {
1383  DenseVector<Number> Usub;
1384 
1385  coarsened_dof_values(old_vector, dof_map, elem, Usub,
1386  v, use_old_dof_indices);
1387 
1388  Ue.append (Usub);
1389  }
1390 }

◆ coarsened_dof_values() [2/2]

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::coarsened_dof_values ( const NumericVector< Number > &  global_vector,
const DofMap dof_map,
const Elem coarse_elem,
DenseVector< Number > &  coarse_dofs,
const unsigned int  var,
const bool  use_old_dof_indices = false 
)
staticinherited

Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children.

Computes a vector of coefficients corresponding to dof_indices for only the single given var

Definition at line 822 of file fe_base.C.

828 {
829  // Side/edge local DOF indices
830  std::vector<unsigned int> new_side_dofs, old_side_dofs;
831 
832  // FIXME: what about 2D shells in 3D space?
833  unsigned int dim = elem->dim();
834 
835  // Cache n_children(); it's a virtual call but it's const.
836  const unsigned int n_children = elem->n_children();
837 
838  // We use local FE objects for now
839  // FIXME: we should use more, external objects instead for efficiency
840  const FEType & base_fe_type = dof_map.variable_type(var);
841  std::unique_ptr<FEGenericBase<OutputShape>> fe
842  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
843  std::unique_ptr<FEGenericBase<OutputShape>> fe_coarse
844  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
845 
846  std::unique_ptr<QBase> qrule (base_fe_type.default_quadrature_rule(dim));
847  std::unique_ptr<QBase> qedgerule (base_fe_type.default_quadrature_rule(1));
848  std::unique_ptr<QBase> qsiderule (base_fe_type.default_quadrature_rule(dim-1));
849  std::vector<Point> coarse_qpoints;
850 
851  // The values of the shape functions at the quadrature
852  // points
853  const std::vector<std::vector<OutputShape>> & phi_values =
854  fe->get_phi();
855  const std::vector<std::vector<OutputShape>> & phi_coarse =
856  fe_coarse->get_phi();
857 
858  // The gradients of the shape functions at the quadrature
859  // points on the child element.
860  const std::vector<std::vector<OutputGradient>> * dphi_values =
861  nullptr;
862  const std::vector<std::vector<OutputGradient>> * dphi_coarse =
863  nullptr;
864 
865  const FEContinuity cont = fe->get_continuity();
866 
867  if (cont == C_ONE)
868  {
869  const std::vector<std::vector<OutputGradient>> &
870  ref_dphi_values = fe->get_dphi();
871  dphi_values = &ref_dphi_values;
872  const std::vector<std::vector<OutputGradient>> &
873  ref_dphi_coarse = fe_coarse->get_dphi();
874  dphi_coarse = &ref_dphi_coarse;
875  }
876 
877  // The Jacobian * quadrature weight at the quadrature points
878  const std::vector<Real> & JxW =
879  fe->get_JxW();
880 
881  // The XYZ locations of the quadrature points on the
882  // child element
883  const std::vector<Point> & xyz_values =
884  fe->get_xyz();
885 
886 
887 
888  FEType fe_type = base_fe_type, temp_fe_type;
889  const ElemType elem_type = elem->type();
890  fe_type.order = static_cast<Order>(fe_type.order +
891  elem->max_descendant_p_level());
892 
893  // Number of nodes on parent element
894  const unsigned int n_nodes = elem->n_nodes();
895 
896  // Number of dofs on parent element
897  const unsigned int new_n_dofs =
899 
900  // Fixed vs. free DoFs on edge/face projections
901  std::vector<char> dof_is_fixed(new_n_dofs, false); // bools
902  std::vector<int> free_dof(new_n_dofs, 0);
903 
906  Ue.resize(new_n_dofs); Ue.zero();
907 
908 
909  // When coarsening, in general, we need a series of
910  // projections to ensure a unique and continuous
911  // solution. We start by interpolating nodes, then
912  // hold those fixed and project edges, then
913  // hold those fixed and project faces, then
914  // hold those fixed and project interiors
915 
916  // Copy node values first
917  {
918  std::vector<dof_id_type> node_dof_indices;
919  if (use_old_dof_indices)
920  dof_map.old_dof_indices (elem, node_dof_indices, var);
921  else
922  dof_map.dof_indices (elem, node_dof_indices, var);
923 
924  unsigned int current_dof = 0;
925  for (unsigned int n=0; n!= n_nodes; ++n)
926  {
927  // FIXME: this should go through the DofMap,
928  // not duplicate dof_indices code badly!
929  const unsigned int my_nc =
931  elem_type, n);
932  if (!elem->is_vertex(n))
933  {
934  current_dof += my_nc;
935  continue;
936  }
937 
938  temp_fe_type = base_fe_type;
939  // We're assuming here that child n shares vertex n,
940  // which is wrong on non-simplices right now
941  // ... but this code isn't necessary except on elements
942  // where p refinement creates more vertex dofs; we have
943  // no such elements yet.
944  /*
945  if (elem->child_ptr(n)->p_level() < elem->p_level())
946  {
947  temp_fe_type.order =
948  static_cast<Order>(temp_fe_type.order +
949  elem->child_ptr(n)->p_level());
950  }
951  */
952  const unsigned int nc =
953  FEInterface::n_dofs_at_node (dim, temp_fe_type,
954  elem_type, n);
955  for (unsigned int i=0; i!= nc; ++i)
956  {
957  Ue(current_dof) =
958  old_vector(node_dof_indices[current_dof]);
959  dof_is_fixed[current_dof] = true;
960  current_dof++;
961  }
962  }
963  }
964 
965  // In 3D, project any edge values next
966  if (dim > 2 && cont != DISCONTINUOUS)
967  for (auto e : elem->edge_index_range())
968  {
970  e, new_side_dofs);
971 
972  const unsigned int n_new_side_dofs =
973  cast_int<unsigned int>(new_side_dofs.size());
974 
975  // Some edge dofs are on nodes and already
976  // fixed, others are free to calculate
977  unsigned int free_dofs = 0;
978  for (unsigned int i=0; i != n_new_side_dofs; ++i)
979  if (!dof_is_fixed[new_side_dofs[i]])
980  free_dof[free_dofs++] = i;
981  Ke.resize (free_dofs, free_dofs); Ke.zero();
982  Fe.resize (free_dofs); Fe.zero();
983  // The new edge coefficients
984  DenseVector<Number> Uedge(free_dofs);
985 
986  // Add projection terms from each child sharing
987  // this edge
988  for (unsigned int c=0; c != n_children; ++c)
989  {
990  if (!elem->is_child_on_edge(c,e))
991  continue;
992  const Elem * child = elem->child_ptr(c);
993 
994  std::vector<dof_id_type> child_dof_indices;
995  if (use_old_dof_indices)
996  dof_map.old_dof_indices (child,
997  child_dof_indices, var);
998  else
999  dof_map.dof_indices (child,
1000  child_dof_indices, var);
1001  const unsigned int child_n_dofs =
1002  cast_int<unsigned int>
1003  (child_dof_indices.size());
1004 
1005  temp_fe_type = base_fe_type;
1006  temp_fe_type.order =
1007  static_cast<Order>(temp_fe_type.order +
1008  child->p_level());
1009 
1011  temp_fe_type, e, old_side_dofs);
1012 
1013  // Initialize both child and parent FE data
1014  // on the child's edge
1015  fe->attach_quadrature_rule (qedgerule.get());
1016  fe->edge_reinit (child, e);
1017  const unsigned int n_qp = qedgerule->n_points();
1018 
1019  FEMap::inverse_map (dim, elem, xyz_values,
1020  coarse_qpoints);
1021 
1022  fe_coarse->reinit(elem, &coarse_qpoints);
1023 
1024  // Loop over the quadrature points
1025  for (unsigned int qp=0; qp<n_qp; qp++)
1026  {
1027  // solution value at the quadrature point
1028  OutputNumber fineval = libMesh::zero;
1029  // solution grad at the quadrature point
1030  OutputNumberGradient finegrad;
1031 
1032  // Sum the solution values * the DOF
1033  // values at the quadrature point to
1034  // get the solution value and gradient.
1035  for (unsigned int i=0; i<child_n_dofs;
1036  i++)
1037  {
1038  fineval +=
1039  (old_vector(child_dof_indices[i])*
1040  phi_values[i][qp]);
1041  if (cont == C_ONE)
1042  finegrad += (*dphi_values)[i][qp] *
1043  old_vector(child_dof_indices[i]);
1044  }
1045 
1046  // Form edge projection matrix
1047  for (unsigned int sidei=0, freei=0; sidei != n_new_side_dofs; ++sidei)
1048  {
1049  unsigned int i = new_side_dofs[sidei];
1050  // fixed DoFs aren't test functions
1051  if (dof_is_fixed[i])
1052  continue;
1053  for (unsigned int sidej=0, freej=0; sidej != n_new_side_dofs; ++sidej)
1054  {
1055  unsigned int j =
1056  new_side_dofs[sidej];
1057  if (dof_is_fixed[j])
1058  Fe(freei) -=
1059  TensorTools::inner_product(phi_coarse[i][qp],
1060  phi_coarse[j][qp]) *
1061  JxW[qp] * Ue(j);
1062  else
1063  Ke(freei,freej) +=
1064  TensorTools::inner_product(phi_coarse[i][qp],
1065  phi_coarse[j][qp]) *
1066  JxW[qp];
1067  if (cont == C_ONE)
1068  {
1069  if (dof_is_fixed[j])
1070  Fe(freei) -=
1071  TensorTools::inner_product((*dphi_coarse)[i][qp],
1072  (*dphi_coarse)[j][qp]) *
1073  JxW[qp] * Ue(j);
1074  else
1075  Ke(freei,freej) +=
1076  TensorTools::inner_product((*dphi_coarse)[i][qp],
1077  (*dphi_coarse)[j][qp]) *
1078  JxW[qp];
1079  }
1080  if (!dof_is_fixed[j])
1081  freej++;
1082  }
1083  Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp],
1084  fineval) * JxW[qp];
1085  if (cont == C_ONE)
1086  Fe(freei) +=
1087  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1088  freei++;
1089  }
1090  }
1091  }
1092  Ke.cholesky_solve(Fe, Uedge);
1093 
1094  // Transfer new edge solutions to element
1095  for (unsigned int i=0; i != free_dofs; ++i)
1096  {
1097  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1099  std::abs(ui - Uedge(i)) < TOLERANCE);
1100  ui = Uedge(i);
1101  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1102  }
1103  }
1104 
1105  // Project any side values (edges in 2D, faces in 3D)
1106  if (dim > 1 && cont != DISCONTINUOUS)
1107  for (auto s : elem->side_index_range())
1108  {
1110  s, new_side_dofs);
1111 
1112  const unsigned int n_new_side_dofs =
1113  cast_int<unsigned int>(new_side_dofs.size());
1114 
1115  // Some side dofs are on nodes/edges and already
1116  // fixed, others are free to calculate
1117  unsigned int free_dofs = 0;
1118  for (unsigned int i=0; i != n_new_side_dofs; ++i)
1119  if (!dof_is_fixed[new_side_dofs[i]])
1120  free_dof[free_dofs++] = i;
1121  Ke.resize (free_dofs, free_dofs); Ke.zero();
1122  Fe.resize (free_dofs); Fe.zero();
1123  // The new side coefficients
1124  DenseVector<Number> Uside(free_dofs);
1125 
1126  // Add projection terms from each child sharing
1127  // this side
1128  for (unsigned int c=0; c != n_children; ++c)
1129  {
1130  if (!elem->is_child_on_side(c,s))
1131  continue;
1132  const Elem * child = elem->child_ptr(c);
1133 
1134  std::vector<dof_id_type> child_dof_indices;
1135  if (use_old_dof_indices)
1136  dof_map.old_dof_indices (child,
1137  child_dof_indices, var);
1138  else
1139  dof_map.dof_indices (child,
1140  child_dof_indices, var);
1141  const unsigned int child_n_dofs =
1142  cast_int<unsigned int>
1143  (child_dof_indices.size());
1144 
1145  temp_fe_type = base_fe_type;
1146  temp_fe_type.order =
1147  static_cast<Order>(temp_fe_type.order +
1148  child->p_level());
1149 
1151  temp_fe_type, s, old_side_dofs);
1152 
1153  // Initialize both child and parent FE data
1154  // on the child's side
1155  fe->attach_quadrature_rule (qsiderule.get());
1156  fe->reinit (child, s);
1157  const unsigned int n_qp = qsiderule->n_points();
1158 
1159  FEMap::inverse_map (dim, elem, xyz_values,
1160  coarse_qpoints);
1161 
1162  fe_coarse->reinit(elem, &coarse_qpoints);
1163 
1164  // Loop over the quadrature points
1165  for (unsigned int qp=0; qp<n_qp; qp++)
1166  {
1167  // solution value at the quadrature point
1168  OutputNumber fineval = libMesh::zero;
1169  // solution grad at the quadrature point
1170  OutputNumberGradient finegrad;
1171 
1172  // Sum the solution values * the DOF
1173  // values at the quadrature point to
1174  // get the solution value and gradient.
1175  for (unsigned int i=0; i<child_n_dofs;
1176  i++)
1177  {
1178  fineval +=
1179  old_vector(child_dof_indices[i]) *
1180  phi_values[i][qp];
1181  if (cont == C_ONE)
1182  finegrad += (*dphi_values)[i][qp] *
1183  old_vector(child_dof_indices[i]);
1184  }
1185 
1186  // Form side projection matrix
1187  for (unsigned int sidei=0, freei=0; sidei != n_new_side_dofs; ++sidei)
1188  {
1189  unsigned int i = new_side_dofs[sidei];
1190  // fixed DoFs aren't test functions
1191  if (dof_is_fixed[i])
1192  continue;
1193  for (unsigned int sidej=0, freej=0; sidej != n_new_side_dofs; ++sidej)
1194  {
1195  unsigned int j =
1196  new_side_dofs[sidej];
1197  if (dof_is_fixed[j])
1198  Fe(freei) -=
1199  TensorTools::inner_product(phi_coarse[i][qp],
1200  phi_coarse[j][qp]) *
1201  JxW[qp] * Ue(j);
1202  else
1203  Ke(freei,freej) +=
1204  TensorTools::inner_product(phi_coarse[i][qp],
1205  phi_coarse[j][qp]) *
1206  JxW[qp];
1207  if (cont == C_ONE)
1208  {
1209  if (dof_is_fixed[j])
1210  Fe(freei) -=
1211  TensorTools::inner_product((*dphi_coarse)[i][qp],
1212  (*dphi_coarse)[j][qp]) *
1213  JxW[qp] * Ue(j);
1214  else
1215  Ke(freei,freej) +=
1216  TensorTools::inner_product((*dphi_coarse)[i][qp],
1217  (*dphi_coarse)[j][qp]) *
1218  JxW[qp];
1219  }
1220  if (!dof_is_fixed[j])
1221  freej++;
1222  }
1223  Fe(freei) += TensorTools::inner_product(fineval, phi_coarse[i][qp]) * JxW[qp];
1224  if (cont == C_ONE)
1225  Fe(freei) +=
1226  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1227  freei++;
1228  }
1229  }
1230  }
1231  Ke.cholesky_solve(Fe, Uside);
1232 
1233  // Transfer new side solutions to element
1234  for (unsigned int i=0; i != free_dofs; ++i)
1235  {
1236  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1238  std::abs(ui - Uside(i)) < TOLERANCE);
1239  ui = Uside(i);
1240  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1241  }
1242  }
1243 
1244  // Project the interior values, finally
1245 
1246  // Some interior dofs are on nodes/edges/sides and
1247  // already fixed, others are free to calculate
1248  unsigned int free_dofs = 0;
1249  for (unsigned int i=0; i != new_n_dofs; ++i)
1250  if (!dof_is_fixed[i])
1251  free_dof[free_dofs++] = i;
1252  Ke.resize (free_dofs, free_dofs); Ke.zero();
1253  Fe.resize (free_dofs); Fe.zero();
1254  // The new interior coefficients
1255  DenseVector<Number> Uint(free_dofs);
1256 
1257  // Add projection terms from each child
1258  for (auto & child : elem->child_ref_range())
1259  {
1260  std::vector<dof_id_type> child_dof_indices;
1261  if (use_old_dof_indices)
1262  dof_map.old_dof_indices (&child,
1263  child_dof_indices, var);
1264  else
1265  dof_map.dof_indices (&child,
1266  child_dof_indices, var);
1267  const unsigned int child_n_dofs =
1268  cast_int<unsigned int>
1269  (child_dof_indices.size());
1270 
1271  // Initialize both child and parent FE data
1272  // on the child's quadrature points
1273  fe->attach_quadrature_rule (qrule.get());
1274  fe->reinit (&child);
1275  const unsigned int n_qp = qrule->n_points();
1276 
1277  FEMap::inverse_map (dim, elem, xyz_values, coarse_qpoints);
1278 
1279  fe_coarse->reinit(elem, &coarse_qpoints);
1280 
1281  // Loop over the quadrature points
1282  for (unsigned int qp=0; qp<n_qp; qp++)
1283  {
1284  // solution value at the quadrature point
1285  OutputNumber fineval = libMesh::zero;
1286  // solution grad at the quadrature point
1287  OutputNumberGradient finegrad;
1288 
1289  // Sum the solution values * the DOF
1290  // values at the quadrature point to
1291  // get the solution value and gradient.
1292  for (unsigned int i=0; i<child_n_dofs; i++)
1293  {
1294  fineval +=
1295  (old_vector(child_dof_indices[i]) *
1296  phi_values[i][qp]);
1297  if (cont == C_ONE)
1298  finegrad += (*dphi_values)[i][qp] *
1299  old_vector(child_dof_indices[i]);
1300  }
1301 
1302  // Form interior projection matrix
1303  for (unsigned int i=0, freei=0;
1304  i != new_n_dofs; ++i)
1305  {
1306  // fixed DoFs aren't test functions
1307  if (dof_is_fixed[i])
1308  continue;
1309  for (unsigned int j=0, freej=0; j !=
1310  new_n_dofs; ++j)
1311  {
1312  if (dof_is_fixed[j])
1313  Fe(freei) -=
1314  TensorTools::inner_product(phi_coarse[i][qp],
1315  phi_coarse[j][qp]) *
1316  JxW[qp] * Ue(j);
1317  else
1318  Ke(freei,freej) +=
1319  TensorTools::inner_product(phi_coarse[i][qp],
1320  phi_coarse[j][qp]) *
1321  JxW[qp];
1322  if (cont == C_ONE)
1323  {
1324  if (dof_is_fixed[j])
1325  Fe(freei) -=
1326  TensorTools::inner_product((*dphi_coarse)[i][qp],
1327  (*dphi_coarse)[j][qp]) *
1328  JxW[qp] * Ue(j);
1329  else
1330  Ke(freei,freej) +=
1331  TensorTools::inner_product((*dphi_coarse)[i][qp],
1332  (*dphi_coarse)[j][qp]) *
1333  JxW[qp];
1334  }
1335  if (!dof_is_fixed[j])
1336  freej++;
1337  }
1338  Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp], fineval) *
1339  JxW[qp];
1340  if (cont == C_ONE)
1341  Fe(freei) += TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1342  freei++;
1343  }
1344  }
1345  }
1346  Ke.cholesky_solve(Fe, Uint);
1347 
1348  // Transfer new interior solutions to element
1349  for (unsigned int i=0; i != free_dofs; ++i)
1350  {
1351  Number & ui = Ue(free_dof[i]);
1353  std::abs(ui - Uint(i)) < TOLERANCE);
1354  ui = Uint(i);
1355  // We should be fixing all dofs by now; no need to keep track of
1356  // that unless we're debugging
1357 #ifndef NDEBUG
1358  dof_is_fixed[free_dof[i]] = true;
1359 #endif
1360  }
1361 
1362 #ifndef NDEBUG
1363  // Make sure every DoF got reached!
1364  for (unsigned int i=0; i != new_n_dofs; ++i)
1365  libmesh_assert(dof_is_fixed[i]);
1366 #endif
1367 }

Referenced by libMesh::JumpErrorEstimator::estimate_error(), and libMesh::ExactErrorEstimator::estimate_error().

◆ combine_base_radial()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::combine_base_radial ( const Elem inf_elem)
protected

Combines the shape functions, which were formed in init_shape_functions(Elem *), with geometric data.

Has to be called every time the geometric configuration changes. Afterward, the fields are ready to be used to compute global derivatives, the jacobian etc, see FEAbstract::compute_map().

Definition at line 751 of file inf_fe.C.

752 {
753  libmesh_assert(inf_elem);
754  // at least check whether the base element type is correct.
755  // otherwise this version of computing dist would give problems
756  libmesh_assert_equal_to (base_elem->type(),
757  InfFEBase::get_elem_type(inf_elem->type()));
758 
759  // Start logging the combination of radial and base parts
760  LOG_SCOPE("combine_base_radial()", "InfFE");
761 
762  // zero the phase, since it is to be summed up
763  std::fill (dphasedxi.begin(), dphasedxi.end(), 0.);
764  std::fill (dphasedeta.begin(), dphasedeta.end(), 0.);
765  std::fill (dphasedzeta.begin(), dphasedzeta.end(), 0.);
766 
767 
768  const unsigned int n_base_mapping_sf = cast_int<unsigned int>(dist.size());
769  const Point origin = inf_elem->origin();
770 
771  // for each new infinite element, compute the radial distances
772  for (unsigned int n=0; n<n_base_mapping_sf; n++)
773  dist[n] = Point(base_elem->point(n) - origin).norm();
774 
775 
776  switch (Dim)
777  {
778  // 1D
779  case 1:
780  {
781  libmesh_not_implemented();
782  break;
783  }
784 
785  // 2D
786  case 2:
787  {
788  libmesh_not_implemented();
789  break;
790  }
791 
792  // 3D
793  case 3:
794  {
795  // fast access to the approximation and mapping shapes of base_fe
796  const std::vector<std::vector<Real>> & S = base_fe->phi;
797  const std::vector<std::vector<Real>> & Ss = base_fe->dphidxi;
798  const std::vector<std::vector<Real>> & St = base_fe->dphideta;
799  const std::vector<std::vector<Real>> & S_map = (base_fe->get_fe_map()).get_phi_map();
800  const std::vector<std::vector<Real>> & Ss_map = (base_fe->get_fe_map()).get_dphidxi_map();
801  const std::vector<std::vector<Real>> & St_map = (base_fe->get_fe_map()).get_dphideta_map();
802 
803  const unsigned int n_radial_qp = cast_int<unsigned int>(som.size());
804  if (radial_qrule)
805  libmesh_assert_equal_to(n_radial_qp, radial_qrule->n_points());
806  const unsigned int n_base_qp = cast_int<unsigned int>(S_map[0].size());
807  if (base_qrule)
808  libmesh_assert_equal_to(n_base_qp, base_qrule->n_points());
809 
810  const unsigned int n_total_mapping_sf =
811  cast_int<unsigned int>(radial_map.size()) * n_base_mapping_sf;
812 
813  const unsigned int n_total_approx_sf =
815  base_fe->n_shape_functions();
816 
817 
818  // compute the phase term derivatives
819  {
820  unsigned int tp=0;
821  for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qps
822  for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qps
823  {
824  // sum over all base shapes, to get the average distance
825  for (unsigned int i=0; i<n_base_mapping_sf; i++)
826  {
827  dphasedxi[tp] += Ss_map[i][bp] * dist[i] * radial_map [1][rp];
828  dphasedeta[tp] += St_map[i][bp] * dist[i] * radial_map [1][rp];
829  dphasedzeta[tp] += S_map [i][bp] * dist[i] * dradialdv_map[1][rp];
830  }
831 
832  tp++;
833 
834  } // loop radial and base qps
835  }
836 
837  libmesh_assert_equal_to (phi.size(), n_total_approx_sf);
838  libmesh_assert_equal_to (dphidxi.size(), n_total_approx_sf);
839  libmesh_assert_equal_to (dphideta.size(), n_total_approx_sf);
840  libmesh_assert_equal_to (dphidzeta.size(), n_total_approx_sf);
841 
842  // compute the overall approximation shape functions,
843  // pick the appropriate radial and base shapes through using
844  // _base_shape_index and _radial_shape_index
845  for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qps
846  for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qps
847  for (unsigned int ti=0; ti<n_total_approx_sf; ti++) // over _all_ approx_sf
848  {
849  // let the index vectors take care of selecting the appropriate base/radial shape
850  const unsigned int bi = _base_shape_index [ti];
851  const unsigned int ri = _radial_shape_index[ti];
852  phi [ti][bp+rp*n_base_qp] = S [bi][bp] * mode[ri][rp] * som[rp];
853  dphidxi [ti][bp+rp*n_base_qp] = Ss[bi][bp] * mode[ri][rp] * som[rp];
854  dphideta [ti][bp+rp*n_base_qp] = St[bi][bp] * mode[ri][rp] * som[rp];
855  dphidzeta[ti][bp+rp*n_base_qp] = S [bi][bp]
856  * (dmodedv[ri][rp] * som[rp] + mode[ri][rp] * dsomdv[rp]);
857  }
858 
859  std::vector<std::vector<Real>> & phi_map = this->_fe_map->get_phi_map();
860  std::vector<std::vector<Real>> & dphidxi_map = this->_fe_map->get_dphidxi_map();
861  std::vector<std::vector<Real>> & dphideta_map = this->_fe_map->get_dphideta_map();
862  std::vector<std::vector<Real>> & dphidzeta_map = this->_fe_map->get_dphidzeta_map();
863 
864  libmesh_assert_equal_to (phi_map.size(), n_total_mapping_sf);
865  libmesh_assert_equal_to (dphidxi_map.size(), n_total_mapping_sf);
866  libmesh_assert_equal_to (dphideta_map.size(), n_total_mapping_sf);
867  libmesh_assert_equal_to (dphidzeta_map.size(), n_total_mapping_sf);
868 
869  // compute the overall mapping functions,
870  // pick the appropriate radial and base entries through using
871  // _base_node_index and _radial_node_index
872  for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qps
873  for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qps
874  for (unsigned int ti=0; ti<n_total_mapping_sf; ti++) // over all mapping shapes
875  {
876  // let the index vectors take care of selecting the appropriate base/radial mapping shape
877  const unsigned int bi = _base_node_index [ti];
878  const unsigned int ri = _radial_node_index[ti];
879  phi_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * radial_map [ri][rp];
880  dphidxi_map [ti][bp+rp*n_base_qp] = Ss_map[bi][bp] * radial_map [ri][rp];
881  dphideta_map [ti][bp+rp*n_base_qp] = St_map[bi][bp] * radial_map [ri][rp];
882  dphidzeta_map[ti][bp+rp*n_base_qp] = S_map [bi][bp] * dradialdv_map[ri][rp];
883  }
884 
885  break;
886  }
887 
888  default:
889  libmesh_error_msg("Unsupported Dim = " << Dim);
890  }
891 }

References libMesh::InfFEBase::get_elem_type(), libMesh::libmesh_assert(), libMesh::InfFERadial::n_dofs(), std::norm(), libMesh::Elem::origin(), and libMesh::Elem::type().

◆ compute_data()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::compute_data ( const FEType fe_t,
const Elem inf_elem,
FEComputeData data 
)
static

Generalized version of shape(), takes an Elem *.

The data contains both input and output parameters. For frequency domain simulations, the complex-valued shape is returned. In time domain both the computed shape, and the phase is returned.

Note
The phase (proportional to the distance of the Point data.p from the envelope) is actually a measure how far into the future the results are.

Definition at line 337 of file inf_fe_static.C.

340 {
341  libmesh_assert(inf_elem);
342  libmesh_assert_not_equal_to (Dim, 0);
343 
344  const Order o_radial (fet.radial_order);
345  const Order radial_mapping_order (InfFERadial::mapping_order());
346  const Point & p (data.p);
347  const Real v (p(Dim-1));
348  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
349 
350  /*
351  * compute \p interpolated_dist containing the mapping-interpolated
352  * distance of the base point to the origin. This is the same
353  * for all shape functions. Set \p interpolated_dist to 0, it
354  * is added to.
355  */
356  Real interpolated_dist = 0.;
357  switch (Dim)
358  {
359  case 1:
360  {
361  libmesh_assert_equal_to (inf_elem->type(), INFEDGE2);
362  interpolated_dist = Point(inf_elem->point(0) - inf_elem->point(1)).norm();
363  break;
364  }
365 
366  case 2:
367  {
368  const unsigned int n_base_nodes = base_el->n_nodes();
369 
370  const Point origin = inf_elem->origin();
371  const Order base_mapping_order (base_el->default_order());
372  const ElemType base_mapping_elem_type (base_el->type());
373 
374  // interpolate the base nodes' distances
375  for (unsigned int n=0; n<n_base_nodes; n++)
376  interpolated_dist += Point(base_el->point(n) - origin).norm()
377  * FE<1,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
378  break;
379  }
380 
381  case 3:
382  {
383  const unsigned int n_base_nodes = base_el->n_nodes();
384 
385  const Point origin = inf_elem->origin();
386  const Order base_mapping_order (base_el->default_order());
387  const ElemType base_mapping_elem_type (base_el->type());
388 
389  // interpolate the base nodes' distances
390  for (unsigned int n=0; n<n_base_nodes; n++)
391  interpolated_dist += Point(base_el->point(n) - origin).norm()
392  * FE<2,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
393  break;
394  }
395 
396  default:
397  libmesh_error_msg("Unknown Dim = " << Dim);
398  }
399 
400 
401  const Real speed = data.speed;
402 
403  //TODO: I find it inconvenient to have a quantity phase which is phase/speed.
404  // But it might be better than redefining a quantities meaning.
405  data.phase = interpolated_dist /* together with next line: */
406  * InfFE<Dim,INFINITE_MAP,T_map>::eval(v, radial_mapping_order, 1)/speed; /* phase(s,t,v)/c */
407 
408  // We assume time-harmonic behavior in this function!
409 
410 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
411  // the wave number
412  const Number wavenumber = 2. * libMesh::pi * data.frequency / speed;
413 
414  // the exponent for time-harmonic behavior
415  // \note: this form is much less general than the implementation of dphase, which can be easily extended to
416  // other forms than e^{i kr}.
417  const Number exponent = imaginary /* imaginary unit */
418  * wavenumber /* k (can be complex) */
419  * data.phase*speed;
420 
421  const Number time_harmonic = exp(exponent); /* e^(i*k*phase(s,t,v)) */
422 #else
423  const Number time_harmonic = 1;
424 #endif //LIBMESH_USE_COMPLEX_NUMBERS
425 
426  /*
427  * compute \p shape for all dof in the element
428  */
429  if (Dim > 1)
430  {
431  const unsigned int n_dof = n_dofs (fet, inf_elem->type());
432  data.shape.resize(n_dof);
433  if (data.need_derivative())
434  {
435  data.dshape.resize(n_dof);
436  data.local_transform.resize(Dim);
437 
438  for (unsigned int d=0; d<Dim; d++)
439  data.local_transform[d].resize(Dim);
440 
441  // compute the reference->physical map at the point \p p.
442  // Use another fe_map to avoid interference with \p this->_fe_map
443  // which is initialized at the quadrature points...
444  UniquePtr<FEBase> fe (FEBase::build_InfFE(Dim, fet));
445  std::vector<Point> pt(1);
446  pt[0]=p;
447  fe->get_dphideta(); // to compute the map
448  fe->reinit(inf_elem, &pt);
449 
450  // compute the reference->physical map.
451  data.local_transform[0][0] = fe->get_dxidx()[0];
452  data.local_transform[1][0] = fe->get_detadx()[0];
453  data.local_transform[1][1] = fe->get_detady()[0];
454  data.local_transform[0][1] = fe->get_dxidy()[0];
455  if (Dim > 2)
456  {
457  data.local_transform[2][0] = fe->get_dzetadx()[0];
458  data.local_transform[2][1] = fe->get_dzetady()[0];
459  data.local_transform[2][2] = fe->get_dzetadz()[0];
460  data.local_transform[1][2] = fe->get_detadz()[0];
461  data.local_transform[0][2] = fe->get_dxidz()[0];
462  }
463  } // endif data.need_derivative()
464 
465  for (unsigned int i=0; i<n_dof; i++)
466  {
467  // compute base and radial shape indices
468  unsigned int i_base, i_radial;
469  compute_shape_indices(fet, inf_elem->type(), i, i_base, i_radial);
470 
471  data.shape[i] = (InfFERadial::decay(Dim,v) /* (1.-v)/2. in 3D */
472  * FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p) /* S_n(s,t) */
473  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)) /* L_n(v) */
474  * time_harmonic; /* e^(i*k*phase(s,t,v) */
475 
476  // use differentiation of the above equation
477  if (data.need_derivative())
478  {
479  data.dshape[i](0) = (InfFERadial::decay(Dim,v)
480  * FEInterface::shape_deriv(Dim-1, fet, base_el.get(), i_base, 0, p)
481  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial))
482  * time_harmonic;
483 
484  if (Dim > 2)
485  {
486  data.dshape[i](1) = (InfFERadial::decay(Dim,v)
487  * FEInterface::shape_deriv(Dim-1, fet, base_el.get(), i_base, 1, p)
488  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial))
489  * time_harmonic;
490 
491  }
492  data.dshape[i](Dim-1) = (InfFERadial::decay_deriv(v) * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
493  +InfFERadial::decay(Dim,v) * InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial))
494  * FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p) * time_harmonic;
495 
496 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
497  // derivative of time_harmonic (works for harmonic behavior only):
498  data.dshape[i](Dim-1)+= data.shape[i]*imaginary*wavenumber
499  *interpolated_dist*InfFE<Dim,INFINITE_MAP,T_map>::eval_deriv(v, radial_mapping_order, 1);
500 
501 #else
502  /*
503  * The gradient in infinite elements is dominated by the contribution due to the oscillating phase.
504  * Since this term is imaginary, I think there is no means to look at it without having complex numbers.
505  */
506  libmesh_not_implemented();
507  // Maybe we can solve it with a warning as well, but I think one really should not do this...
508 #endif
509  }
510  }
511  }
512 
513  else
514  libmesh_error_msg("compute_data() for 1-dimensional InfFE not implemented.");
515 }

References libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::Elem::build_side_ptr(), data, libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::imaginary, libMesh::INFEDGE2, libMesh::libmesh_assert(), libMesh::InfFERadial::mapping_order(), std::norm(), libMesh::Elem::origin(), libMesh::pi, libMesh::Elem::point(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::FEInterface::shape(), libMesh::FEInterface::shape_deriv(), and libMesh::Elem::type().

Referenced by libMesh::FEInterface::ifem_compute_data().

◆ compute_node_constraints()

void libMesh::FEAbstract::compute_node_constraints ( NodeConstraints constraints,
const Elem elem 
)
staticinherited

Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry.

Definition at line 845 of file fe_abstract.C.

847 {
848  libmesh_assert(elem);
849 
850  const unsigned int Dim = elem->dim();
851 
852  // Only constrain elements in 2,3D.
853  if (Dim == 1)
854  return;
855 
856  // Only constrain active and ancestor elements
857  if (elem->subactive())
858  return;
859 
860  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
861  const FEType fe_type(elem->default_order(), mapping_family);
862 
863  // Pull objects out of the loop to reduce heap operations
864  std::vector<const Node *> my_nodes, parent_nodes;
865  std::unique_ptr<const Elem> my_side, parent_side;
866 
867  // Look at the element faces. Check to see if we need to
868  // build constraints.
869  for (auto s : elem->side_index_range())
870  if (elem->neighbor_ptr(s) != nullptr &&
871  elem->neighbor_ptr(s) != remote_elem)
872  if (elem->neighbor_ptr(s)->level() < elem->level()) // constrain dofs shared between
873  { // this element and ones coarser
874  // than this element.
875  // Get pointers to the elements of interest and its parent.
876  const Elem * parent = elem->parent();
877 
878  // This can't happen... Only level-0 elements have nullptr
879  // parents, and no level-0 elements can be at a higher
880  // level than their neighbors!
881  libmesh_assert(parent);
882 
883  elem->build_side_ptr(my_side, s);
884  parent->build_side_ptr(parent_side, s);
885 
886  const unsigned int n_side_nodes = my_side->n_nodes();
887 
888  my_nodes.clear();
889  my_nodes.reserve (n_side_nodes);
890  parent_nodes.clear();
891  parent_nodes.reserve (n_side_nodes);
892 
893  for (unsigned int n=0; n != n_side_nodes; ++n)
894  my_nodes.push_back(my_side->node_ptr(n));
895 
896  for (unsigned int n=0; n != n_side_nodes; ++n)
897  parent_nodes.push_back(parent_side->node_ptr(n));
898 
899  for (unsigned int my_side_n=0;
900  my_side_n < n_side_nodes;
901  my_side_n++)
902  {
903  libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
904 
905  const Node * my_node = my_nodes[my_side_n];
906 
907  // The support point of the DOF
908  const Point & support_point = *my_node;
909 
910  // Figure out where my node lies on their reference element.
911  const Point mapped_point = FEMap::inverse_map(Dim-1,
912  parent_side.get(),
913  support_point);
914 
915  // Compute the parent's side shape function values.
916  for (unsigned int their_side_n=0;
917  their_side_n < n_side_nodes;
918  their_side_n++)
919  {
920  libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, parent_side->type()));
921 
922  const Node * their_node = parent_nodes[their_side_n];
923  libmesh_assert(their_node);
924 
925  const Real their_value = FEInterface::shape(Dim-1,
926  fe_type,
927  parent_side->type(),
928  their_side_n,
929  mapped_point);
930 
931  const Real their_mag = std::abs(their_value);
932 #ifdef DEBUG
933  // Protect for the case u_i ~= u_j,
934  // in which case i better equal j.
935  if (their_mag > 0.999)
936  {
937  libmesh_assert_equal_to (my_node, their_node);
938  libmesh_assert_less (std::abs(their_value - 1.), 0.001);
939  }
940  else
941 #endif
942  // To make nodal constraints useful for constructing
943  // sparsity patterns faster, we need to get EVERY
944  // POSSIBLE constraint coupling identified, even if
945  // there is no coupling in the isoparametric
946  // Lagrange case.
947  if (their_mag < 1.e-5)
948  {
949  // since we may be running this method concurrently
950  // on multiple threads we need to acquire a lock
951  // before modifying the shared constraint_row object.
952  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
953 
954  // A reference to the constraint row.
955  NodeConstraintRow & constraint_row = constraints[my_node].first;
956 
957  constraint_row.insert(std::make_pair (their_node,
958  0.));
959  }
960  // To get nodal coordinate constraints right, only
961  // add non-zero and non-identity values for Lagrange
962  // basis functions.
963  else // (1.e-5 <= their_mag <= .999)
964  {
965  // since we may be running this method concurrently
966  // on multiple threads we need to acquire a lock
967  // before modifying the shared constraint_row object.
968  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
969 
970  // A reference to the constraint row.
971  NodeConstraintRow & constraint_row = constraints[my_node].first;
972 
973  constraint_row.insert(std::make_pair (their_node,
974  their_value));
975  }
976  }
977  }
978  }
979 }

References std::abs(), libMesh::Elem::build_side_ptr(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::FEMap::inverse_map(), libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEMap::map_fe_type(), libMesh::FEInterface::n_dofs(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::parent(), libMesh::Real, libMesh::remote_elem, libMesh::FEInterface::shape(), libMesh::Elem::side_index_range(), libMesh::Threads::spin_mtx, and libMesh::Elem::subactive().

◆ compute_node_indices()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::compute_node_indices ( const ElemType  inf_elem_type,
const unsigned int  outer_node_index,
unsigned int base_node,
unsigned int radial_node 
)
staticprotected

Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associated to the node outer_node_index of an infinite element of type inf_elem_type.

Definition at line 523 of file inf_fe_static.C.

527 {
528  switch (inf_elem_type)
529  {
530  case INFEDGE2:
531  {
532  libmesh_assert_less (outer_node_index, 2);
533  base_node = 0;
534  radial_node = outer_node_index;
535  return;
536  }
537 
538 
539  // linear base approximation, easy to determine
540  case INFQUAD4:
541  {
542  libmesh_assert_less (outer_node_index, 4);
543  base_node = outer_node_index % 2;
544  radial_node = outer_node_index / 2;
545  return;
546  }
547 
548  case INFPRISM6:
549  {
550  libmesh_assert_less (outer_node_index, 6);
551  base_node = outer_node_index % 3;
552  radial_node = outer_node_index / 3;
553  return;
554  }
555 
556  case INFHEX8:
557  {
558  libmesh_assert_less (outer_node_index, 8);
559  base_node = outer_node_index % 4;
560  radial_node = outer_node_index / 4;
561  return;
562  }
563 
564 
565  // higher order base approximation, more work necessary
566  case INFQUAD6:
567  {
568  switch (outer_node_index)
569  {
570  case 0:
571  case 1:
572  {
573  radial_node = 0;
574  base_node = outer_node_index;
575  return;
576  }
577 
578  case 2:
579  case 3:
580  {
581  radial_node = 1;
582  base_node = outer_node_index-2;
583  return;
584  }
585 
586  case 4:
587  {
588  radial_node = 0;
589  base_node = 2;
590  return;
591  }
592 
593  case 5:
594  {
595  radial_node = 1;
596  base_node = 2;
597  return;
598  }
599 
600  default:
601  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
602  }
603  }
604 
605 
606  case INFHEX16:
607  case INFHEX18:
608  {
609  switch (outer_node_index)
610  {
611  case 0:
612  case 1:
613  case 2:
614  case 3:
615  {
616  radial_node = 0;
617  base_node = outer_node_index;
618  return;
619  }
620 
621  case 4:
622  case 5:
623  case 6:
624  case 7:
625  {
626  radial_node = 1;
627  base_node = outer_node_index-4;
628  return;
629  }
630 
631  case 8:
632  case 9:
633  case 10:
634  case 11:
635  {
636  radial_node = 0;
637  base_node = outer_node_index-4;
638  return;
639  }
640 
641  case 12:
642  case 13:
643  case 14:
644  case 15:
645  {
646  radial_node = 1;
647  base_node = outer_node_index-8;
648  return;
649  }
650 
651  case 16:
652  {
653  libmesh_assert_equal_to (inf_elem_type, INFHEX18);
654  radial_node = 0;
655  base_node = 8;
656  return;
657  }
658 
659  case 17:
660  {
661  libmesh_assert_equal_to (inf_elem_type, INFHEX18);
662  radial_node = 1;
663  base_node = 8;
664  return;
665  }
666 
667  default:
668  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
669  }
670  }
671 
672 
673  case INFPRISM12:
674  {
675  switch (outer_node_index)
676  {
677  case 0:
678  case 1:
679  case 2:
680  {
681  radial_node = 0;
682  base_node = outer_node_index;
683  return;
684  }
685 
686  case 3:
687  case 4:
688  case 5:
689  {
690  radial_node = 1;
691  base_node = outer_node_index-3;
692  return;
693  }
694 
695  case 6:
696  case 7:
697  case 8:
698  {
699  radial_node = 0;
700  base_node = outer_node_index-3;
701  return;
702  }
703 
704  case 9:
705  case 10:
706  case 11:
707  {
708  radial_node = 1;
709  base_node = outer_node_index-6;
710  return;
711  }
712 
713  default:
714  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
715  }
716  }
717 
718 
719  default:
720  libmesh_error_msg("ERROR: Bad infinite element type=" << inf_elem_type << ", node=" << outer_node_index);
721  }
722 }

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

◆ compute_node_indices_fast()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::compute_node_indices_fast ( const ElemType  inf_elem_type,
const unsigned int  outer_node_index,
unsigned int base_node,
unsigned int radial_node 
)
staticprotected

Does the same as compute_node_indices(), but stores the maps for the current element type.

Provided the infinite element type changes seldom, this is probably faster than using compute_node_indices () alone. This is possible since the number of nodes is not likely to change.

Definition at line 730 of file inf_fe_static.C.

734 {
735  libmesh_assert_not_equal_to (inf_elem_type, INVALID_ELEM);
736 
737  static std::vector<unsigned int> _static_base_node_index;
738  static std::vector<unsigned int> _static_radial_node_index;
739 
740  /*
741  * fast counterpart to compute_node_indices(), uses local static buffers
742  * to store the index maps. The class member
743  * \p _compute_node_indices_fast_current_elem_type remembers
744  * the current element type.
745  *
746  * Note that there exist non-static members storing the
747  * same data. However, you never know what element type
748  * is currently used by the \p InfFE object, and what
749  * request is currently directed to the static \p InfFE
750  * members (which use \p compute_node_indices_fast()).
751  * So separate these.
752  *
753  * check whether the work for this elemtype has already
754  * been done. If so, use this index. Otherwise, refresh
755  * the buffer to this element type.
756  */
758  {
759  base_node = _static_base_node_index [outer_node_index];
760  radial_node = _static_radial_node_index[outer_node_index];
761  return;
762  }
763  else
764  {
765  // store the map for _all_ nodes for this element type
767 
768  unsigned int n_nodes = libMesh::invalid_uint;
769 
770  switch (inf_elem_type)
771  {
772  case INFEDGE2:
773  {
774  n_nodes = 2;
775  break;
776  }
777  case INFQUAD4:
778  {
779  n_nodes = 4;
780  break;
781  }
782  case INFQUAD6:
783  {
784  n_nodes = 6;
785  break;
786  }
787  case INFHEX8:
788  {
789  n_nodes = 8;
790  break;
791  }
792  case INFHEX16:
793  {
794  n_nodes = 16;
795  break;
796  }
797  case INFHEX18:
798  {
799  n_nodes = 18;
800  break;
801  }
802  case INFPRISM6:
803  {
804  n_nodes = 6;
805  break;
806  }
807  case INFPRISM12:
808  {
809  n_nodes = 12;
810  break;
811  }
812  default:
813  libmesh_error_msg("ERROR: Bad infinite element type=" << inf_elem_type << ", node=" << outer_node_index);
814  }
815 
816 
817  _static_base_node_index.resize (n_nodes);
818  _static_radial_node_index.resize(n_nodes);
819 
820  for (unsigned int n=0; n<n_nodes; n++)
821  compute_node_indices (inf_elem_type,
822  n,
823  _static_base_node_index [outer_node_index],
824  _static_radial_node_index[outer_node_index]);
825 
826  // and return for the specified node
827  base_node = _static_base_node_index [outer_node_index];
828  radial_node = _static_radial_node_index[outer_node_index];
829  return;
830  }
831 }

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

◆ compute_periodic_constraints()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::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 
)
staticinherited

Computes the constraint matrix contributions (for meshes with periodic boundary conditions) corresponding to variable number var_number, using generic projections.

Definition at line 1692 of file fe_base.C.

1699 {
1700  // Only bother if we truly have periodic boundaries
1701  if (boundaries.empty())
1702  return;
1703 
1704  libmesh_assert(elem);
1705 
1706  // Only constrain active elements with this method
1707  if (!elem->active())
1708  return;
1709 
1710  const unsigned int Dim = elem->dim();
1711 
1712  // We need sys_number and variable_number for DofObject methods
1713  // later
1714  const unsigned int sys_number = dof_map.sys_number();
1715 
1716  const FEType & base_fe_type = dof_map.variable_type(variable_number);
1717 
1718  // Construct FE objects for this element and its pseudo-neighbors.
1719  std::unique_ptr<FEGenericBase<OutputShape>> my_fe
1720  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1721  const FEContinuity cont = my_fe->get_continuity();
1722 
1723  // We don't need to constrain discontinuous elements
1724  if (cont == DISCONTINUOUS)
1725  return;
1726  libmesh_assert (cont == C_ZERO || cont == C_ONE);
1727 
1728  // We'll use element size to generate relative tolerances later
1729  const Real primary_hmin = elem->hmin();
1730 
1731  std::unique_ptr<FEGenericBase<OutputShape>> neigh_fe
1732  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1733 
1734  QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
1735  my_fe->attach_quadrature_rule (&my_qface);
1736  std::vector<Point> neigh_qface;
1737 
1738  const std::vector<Real> & JxW = my_fe->get_JxW();
1739  const std::vector<Point> & q_point = my_fe->get_xyz();
1740  const std::vector<std::vector<OutputShape>> & phi = my_fe->get_phi();
1741  const std::vector<std::vector<OutputShape>> & neigh_phi =
1742  neigh_fe->get_phi();
1743  const std::vector<Point> * face_normals = nullptr;
1744  const std::vector<std::vector<OutputGradient>> * dphi = nullptr;
1745  const std::vector<std::vector<OutputGradient>> * neigh_dphi = nullptr;
1746  std::vector<dof_id_type> my_dof_indices, neigh_dof_indices;
1747  std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
1748 
1749  if (cont != C_ZERO)
1750  {
1751  const std::vector<Point> & ref_face_normals =
1752  my_fe->get_normals();
1753  face_normals = &ref_face_normals;
1754  const std::vector<std::vector<OutputGradient>> & ref_dphi =
1755  my_fe->get_dphi();
1756  dphi = &ref_dphi;
1757  const std::vector<std::vector<OutputGradient>> & ref_neigh_dphi =
1758  neigh_fe->get_dphi();
1759  neigh_dphi = &ref_neigh_dphi;
1760  }
1761 
1762  DenseMatrix<Real> Ke;
1763  DenseVector<Real> Fe;
1764  std::vector<DenseVector<Real>> Ue;
1765 
1766  // Container to catch the boundary ids that BoundaryInfo hands us.
1767  std::vector<boundary_id_type> bc_ids;
1768 
1769  // Look at the element faces. Check to see if we need to
1770  // build constraints.
1771  const unsigned short int max_ns = elem->n_sides();
1772  for (unsigned short int s = 0; s != max_ns; ++s)
1773  {
1774  if (elem->neighbor_ptr(s))
1775  continue;
1776 
1777  mesh.get_boundary_info().boundary_ids (elem, s, bc_ids);
1778 
1779  for (const auto & boundary_id : bc_ids)
1780  {
1781  const PeriodicBoundaryBase * periodic = boundaries.boundary(boundary_id);
1782  if (periodic && periodic->is_my_variable(variable_number))
1783  {
1784  libmesh_assert(point_locator);
1785 
1786  // Get pointers to the element's neighbor.
1787  const Elem * neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s);
1788 
1789  if (neigh == nullptr)
1790  libmesh_error_msg("PeriodicBoundaries point locator object returned nullptr!");
1791 
1792  // periodic (and possibly h refinement) constraints:
1793  // constrain dofs shared between
1794  // this element and ones as coarse
1795  // as or coarser than this element.
1796  if (neigh->level() <= elem->level())
1797  {
1798  unsigned int s_neigh =
1800  libmesh_assert_not_equal_to (s_neigh, libMesh::invalid_uint);
1801 
1802 #ifdef LIBMESH_ENABLE_AMR
1803  // Find the minimum p level; we build the h constraint
1804  // matrix with this and then constrain away all higher p
1805  // DoFs.
1806  libmesh_assert(neigh->active());
1807  const unsigned int min_p_level =
1808  std::min(elem->p_level(), neigh->p_level());
1809 
1810  // we may need to make the FE objects reinit with the
1811  // minimum shared p_level
1812  // FIXME - I hate using const_cast<> and avoiding
1813  // accessor functions; there's got to be a
1814  // better way to do this!
1815  const unsigned int old_elem_level = elem->p_level();
1816  if (old_elem_level != min_p_level)
1817  (const_cast<Elem *>(elem))->hack_p_level(min_p_level);
1818  const unsigned int old_neigh_level = neigh->p_level();
1819  if (old_neigh_level != min_p_level)
1820  (const_cast<Elem *>(neigh))->hack_p_level(min_p_level);
1821 #endif // #ifdef LIBMESH_ENABLE_AMR
1822 
1823  // We can do a projection with a single integration,
1824  // due to the assumption of nested finite element
1825  // subspaces.
1826  // FIXME: it might be more efficient to do nodes,
1827  // then edges, then side, to reduce the size of the
1828  // Cholesky factorization(s)
1829  my_fe->reinit(elem, s);
1830 
1831  dof_map.dof_indices (elem, my_dof_indices,
1832  variable_number);
1833  dof_map.dof_indices (neigh, neigh_dof_indices,
1834  variable_number);
1835 
1836  // We use neigh_dof_indices_all_variables in the case that the
1837  // periodic boundary condition involves mappings between multiple
1838  // variables.
1839  std::vector<std::vector<dof_id_type>> neigh_dof_indices_all_variables;
1840  if(periodic->has_transformation_matrix())
1841  {
1842  const std::set<unsigned int> & variables = periodic->get_variables();
1843  neigh_dof_indices_all_variables.resize(variables.size());
1844  unsigned int index = 0;
1845  for(unsigned int var : variables)
1846  {
1847  dof_map.dof_indices (neigh, neigh_dof_indices_all_variables[index],
1848  var);
1849  index++;
1850  }
1851  }
1852 
1853  const unsigned int n_qp = my_qface.n_points();
1854 
1855  // Translate the quadrature points over to the
1856  // neighbor's boundary
1857  std::vector<Point> neigh_point(q_point.size());
1858  for (auto i : index_range(neigh_point))
1859  neigh_point[i] = periodic->get_corresponding_pos(q_point[i]);
1860 
1861  FEMap::inverse_map (Dim, neigh, neigh_point,
1862  neigh_qface);
1863 
1864  neigh_fe->reinit(neigh, &neigh_qface);
1865 
1866  // We're only concerned with DOFs whose values (and/or first
1867  // derivatives for C1 elements) are supported on side nodes
1868  FEInterface::dofs_on_side(elem, Dim, base_fe_type, s, my_side_dofs);
1869  FEInterface::dofs_on_side(neigh, Dim, base_fe_type, s_neigh, neigh_side_dofs);
1870 
1871  // We're done with functions that examine Elem::p_level(),
1872  // so let's unhack those levels
1873 #ifdef LIBMESH_ENABLE_AMR
1874  if (elem->p_level() != old_elem_level)
1875  (const_cast<Elem *>(elem))->hack_p_level(old_elem_level);
1876  if (neigh->p_level() != old_neigh_level)
1877  (const_cast<Elem *>(neigh))->hack_p_level(old_neigh_level);
1878 #endif // #ifdef LIBMESH_ENABLE_AMR
1879 
1880  const unsigned int n_side_dofs =
1881  cast_int<unsigned int>
1882  (my_side_dofs.size());
1883  libmesh_assert_equal_to (n_side_dofs, neigh_side_dofs.size());
1884 
1885  Ke.resize (n_side_dofs, n_side_dofs);
1886  Ue.resize(n_side_dofs);
1887 
1888  // Form the projection matrix, (inner product of fine basis
1889  // functions against fine test functions)
1890  for (unsigned int is = 0; is != n_side_dofs; ++is)
1891  {
1892  const unsigned int i = my_side_dofs[is];
1893  for (unsigned int js = 0; js != n_side_dofs; ++js)
1894  {
1895  const unsigned int j = my_side_dofs[js];
1896  for (unsigned int qp = 0; qp != n_qp; ++qp)
1897  {
1898  Ke(is,js) += JxW[qp] *
1900  phi[j][qp]);
1901  if (cont != C_ZERO)
1902  Ke(is,js) += JxW[qp] *
1903  TensorTools::inner_product((*dphi)[i][qp] *
1904  (*face_normals)[qp],
1905  (*dphi)[j][qp] *
1906  (*face_normals)[qp]);
1907  }
1908  }
1909  }
1910 
1911  // Form the right hand sides, (inner product of coarse basis
1912  // functions against fine test functions)
1913  for (unsigned int is = 0; is != n_side_dofs; ++is)
1914  {
1915  const unsigned int i = neigh_side_dofs[is];
1916  Fe.resize (n_side_dofs);
1917  for (unsigned int js = 0; js != n_side_dofs; ++js)
1918  {
1919  const unsigned int j = my_side_dofs[js];
1920  for (unsigned int qp = 0; qp != n_qp; ++qp)
1921  {
1922  Fe(js) += JxW[qp] *
1923  TensorTools::inner_product(neigh_phi[i][qp],
1924  phi[j][qp]);
1925  if (cont != C_ZERO)
1926  Fe(js) += JxW[qp] *
1927  TensorTools::inner_product((*neigh_dphi)[i][qp] *
1928  (*face_normals)[qp],
1929  (*dphi)[j][qp] *
1930  (*face_normals)[qp]);
1931  }
1932  }
1933  Ke.cholesky_solve(Fe, Ue[is]);
1934  }
1935 
1936  // Make sure we're not adding recursive constraints
1937  // due to the redundancy in the way we add periodic
1938  // boundary constraints
1939  //
1940  // In order for this to work while threaded or on
1941  // distributed meshes, we need a rigorous way to
1942  // avoid recursive constraints. Here it is:
1943  //
1944  // For vertex DoFs, if there is a "prior" element
1945  // (i.e. a coarser element or an equally refined
1946  // element with a lower id) on this boundary which
1947  // contains the vertex point, then we will avoid
1948  // generating constraints; the prior element (or
1949  // something prior to it) may do so. If we are the
1950  // most prior (or "primary") element on this
1951  // boundary sharing this point, then we look at the
1952  // boundary periodic to us, we find the primary
1953  // element there, and if that primary is coarser or
1954  // equal-but-lower-id, then our vertex dofs are
1955  // constrained in terms of that element.
1956  //
1957  // For edge DoFs, if there is a coarser element
1958  // on this boundary sharing this edge, then we will
1959  // avoid generating constraints (we will be
1960  // constrained indirectly via AMR constraints
1961  // connecting us to the coarser element's DoFs). If
1962  // we are the coarsest element sharing this edge,
1963  // then we generate constraints if and only if we
1964  // are finer than the coarsest element on the
1965  // boundary periodic to us sharing the corresponding
1966  // periodic edge, or if we are at equal level but
1967  // our edge nodes have higher ids than the periodic
1968  // edge nodes (sorted from highest to lowest, then
1969  // compared lexicographically)
1970  //
1971  // For face DoFs, we generate constraints if we are
1972  // finer than our periodic neighbor, or if we are at
1973  // equal level but our element id is higher than its
1974  // element id.
1975  //
1976  // If the primary neighbor is also the current elem
1977  // (a 1-element-thick mesh) then we choose which
1978  // vertex dofs to constrain via lexicographic
1979  // ordering on point locations
1980 
1981  // FIXME: This code doesn't yet properly handle
1982  // cases where multiple different periodic BCs
1983  // intersect.
1984  std::set<dof_id_type> my_constrained_dofs;
1985 
1986  // Container to catch boundary IDs handed back by BoundaryInfo.
1987  std::vector<boundary_id_type> new_bc_ids;
1988 
1989  for (auto n : elem->node_index_range())
1990  {
1991  if (!elem->is_node_on_side(n,s))
1992  continue;
1993 
1994  const Node & my_node = elem->node_ref(n);
1995 
1996  if (elem->is_vertex(n))
1997  {
1998  // Find all boundary ids that include this
1999  // point and have periodic boundary
2000  // conditions for this variable
2001  std::set<boundary_id_type> point_bcids;
2002 
2003  for (unsigned int new_s = 0;
2004  new_s != max_ns; ++new_s)
2005  {
2006  if (!elem->is_node_on_side(n,new_s))
2007  continue;
2008 
2009  mesh.get_boundary_info().boundary_ids (elem, s, new_bc_ids);
2010 
2011  for (const auto & new_boundary_id : new_bc_ids)
2012  {
2013  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2014  if (new_periodic && new_periodic->is_my_variable(variable_number))
2015  point_bcids.insert(new_boundary_id);
2016  }
2017  }
2018 
2019  // See if this vertex has point neighbors to
2020  // defer to
2021  if (primary_boundary_point_neighbor
2022  (elem, my_node, mesh.get_boundary_info(), point_bcids)
2023  != elem)
2024  continue;
2025 
2026  // Find the complementary boundary id set
2027  std::set<boundary_id_type> point_pairedids;
2028  for (const auto & new_boundary_id : point_bcids)
2029  {
2030  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2031  point_pairedids.insert(new_periodic->pairedboundary);
2032  }
2033 
2034  // What do we want to constrain against?
2035  const Elem * primary_elem = nullptr;
2036  const Elem * main_neigh = nullptr;
2037  Point main_pt = my_node,
2038  primary_pt = my_node;
2039 
2040  for (const auto & new_boundary_id : point_bcids)
2041  {
2042  // Find the corresponding periodic point and
2043  // its primary neighbor
2044  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2045 
2046  const Point neigh_pt =
2047  new_periodic->get_corresponding_pos(my_node);
2048 
2049  // If the point is getting constrained
2050  // to itself by this PBC then we don't
2051  // generate any constraints
2052  if (neigh_pt.absolute_fuzzy_equals
2053  (my_node, primary_hmin*TOLERANCE))
2054  continue;
2055 
2056  // Otherwise we'll have a constraint in
2057  // one direction or another
2058  if (!primary_elem)
2059  primary_elem = elem;
2060 
2061  const Elem * primary_neigh =
2062  primary_boundary_point_neighbor(neigh, neigh_pt,
2064  point_pairedids);
2065 
2066  libmesh_assert(primary_neigh);
2067 
2068  if (new_boundary_id == boundary_id)
2069  {
2070  main_neigh = primary_neigh;
2071  main_pt = neigh_pt;
2072  }
2073 
2074  // Finer elements will get constrained in
2075  // terms of coarser neighbors, not the
2076  // other way around
2077  if ((primary_neigh->level() > primary_elem->level()) ||
2078 
2079  // For equal-level elements, the one with
2080  // higher id gets constrained in terms of
2081  // the one with lower id
2082  (primary_neigh->level() == primary_elem->level() &&
2083  primary_neigh->id() > primary_elem->id()) ||
2084 
2085  // On a one-element-thick mesh, we compare
2086  // points to see what side gets constrained
2087  (primary_neigh == primary_elem &&
2088  (neigh_pt > primary_pt)))
2089  continue;
2090 
2091  primary_elem = primary_neigh;
2092  primary_pt = neigh_pt;
2093  }
2094 
2095  if (!primary_elem ||
2096  primary_elem != main_neigh ||
2097  primary_pt != main_pt)
2098  continue;
2099  }
2100  else if (elem->is_edge(n))
2101  {
2102  // Find which edge we're on
2103  unsigned int e=0, ne = elem->n_edges();
2104  for (; e != ne; ++e)
2105  {
2106  if (elem->is_node_on_edge(n,e))
2107  break;
2108  }
2109  libmesh_assert_less (e, elem->n_edges());
2110 
2111  // Find the edge end nodes
2112  const Node
2113  * e1 = nullptr,
2114  * e2 = nullptr;
2115  for (auto nn : elem->node_index_range())
2116  {
2117  if (nn == n)
2118  continue;
2119 
2120  if (elem->is_node_on_edge(nn, e))
2121  {
2122  if (e1 == nullptr)
2123  {
2124  e1 = elem->node_ptr(nn);
2125  }
2126  else
2127  {
2128  e2 = elem->node_ptr(nn);
2129  break;
2130  }
2131  }
2132  }
2133  libmesh_assert (e1 && e2);
2134 
2135  // Find all boundary ids that include this
2136  // edge and have periodic boundary
2137  // conditions for this variable
2138  std::set<boundary_id_type> edge_bcids;
2139 
2140  for (unsigned int new_s = 0;
2141  new_s != max_ns; ++new_s)
2142  {
2143  if (!elem->is_node_on_side(n,new_s))
2144  continue;
2145 
2146  // We're reusing the new_bc_ids vector created outside the loop over nodes.
2147  mesh.get_boundary_info().boundary_ids (elem, s, new_bc_ids);
2148 
2149  for (const auto & new_boundary_id : new_bc_ids)
2150  {
2151  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2152  if (new_periodic && new_periodic->is_my_variable(variable_number))
2153  edge_bcids.insert(new_boundary_id);
2154  }
2155  }
2156 
2157 
2158  // See if this edge has neighbors to defer to
2159  if (primary_boundary_edge_neighbor
2160  (elem, *e1, *e2, mesh.get_boundary_info(), edge_bcids)
2161  != elem)
2162  continue;
2163 
2164  // Find the complementary boundary id set
2165  std::set<boundary_id_type> edge_pairedids;
2166  for (const auto & new_boundary_id : edge_bcids)
2167  {
2168  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2169  edge_pairedids.insert(new_periodic->pairedboundary);
2170  }
2171 
2172  // What do we want to constrain against?
2173  const Elem * primary_elem = nullptr;
2174  const Elem * main_neigh = nullptr;
2175  Point main_pt1 = *e1,
2176  main_pt2 = *e2,
2177  primary_pt1 = *e1,
2178  primary_pt2 = *e2;
2179 
2180  for (const auto & new_boundary_id : edge_bcids)
2181  {
2182  // Find the corresponding periodic edge and
2183  // its primary neighbor
2184  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2185 
2186  Point neigh_pt1 = new_periodic->get_corresponding_pos(*e1),
2187  neigh_pt2 = new_periodic->get_corresponding_pos(*e2);
2188 
2189  // If the edge is getting constrained
2190  // to itself by this PBC then we don't
2191  // generate any constraints
2192  if (neigh_pt1.absolute_fuzzy_equals
2193  (*e1, primary_hmin*TOLERANCE) &&
2194  neigh_pt2.absolute_fuzzy_equals
2195  (*e2, primary_hmin*TOLERANCE))
2196  continue;
2197 
2198  // Otherwise we'll have a constraint in
2199  // one direction or another
2200  if (!primary_elem)
2201  primary_elem = elem;
2202 
2203  const Elem * primary_neigh = primary_boundary_edge_neighbor
2204  (neigh, neigh_pt1, neigh_pt2,
2205  mesh.get_boundary_info(), edge_pairedids);
2206 
2207  libmesh_assert(primary_neigh);
2208 
2209  if (new_boundary_id == boundary_id)
2210  {
2211  main_neigh = primary_neigh;
2212  main_pt1 = neigh_pt1;
2213  main_pt2 = neigh_pt2;
2214  }
2215 
2216  // If we have a one-element thick mesh,
2217  // we'll need to sort our points to get a
2218  // consistent ordering rule
2219  //
2220  // Use >= in this test to make sure that,
2221  // for angular constraints, no node gets
2222  // constrained to itself.
2223  if (primary_neigh == primary_elem)
2224  {
2225  if (primary_pt1 > primary_pt2)
2226  std::swap(primary_pt1, primary_pt2);
2227  if (neigh_pt1 > neigh_pt2)
2228  std::swap(neigh_pt1, neigh_pt2);
2229 
2230  if (neigh_pt2 >= primary_pt2)
2231  continue;
2232  }
2233 
2234  // Otherwise:
2235  // Finer elements will get constrained in
2236  // terms of coarser ones, not the other way
2237  // around
2238  if ((primary_neigh->level() > primary_elem->level()) ||
2239 
2240  // For equal-level elements, the one with
2241  // higher id gets constrained in terms of
2242  // the one with lower id
2243  (primary_neigh->level() == primary_elem->level() &&
2244  primary_neigh->id() > primary_elem->id()))
2245  continue;
2246 
2247  primary_elem = primary_neigh;
2248  primary_pt1 = neigh_pt1;
2249  primary_pt2 = neigh_pt2;
2250  }
2251 
2252  if (!primary_elem ||
2253  primary_elem != main_neigh ||
2254  primary_pt1 != main_pt1 ||
2255  primary_pt2 != main_pt2)
2256  continue;
2257  }
2258  else if (elem->is_face(n))
2259  {
2260  // If we have a one-element thick mesh,
2261  // use the ordering of the face node and its
2262  // periodic counterpart to determine what
2263  // gets constrained
2264  if (neigh == elem)
2265  {
2266  const Point neigh_pt =
2267  periodic->get_corresponding_pos(my_node);
2268  if (neigh_pt > my_node)
2269  continue;
2270  }
2271 
2272  // Otherwise:
2273  // Finer elements will get constrained in
2274  // terms of coarser ones, not the other way
2275  // around
2276  if ((neigh->level() > elem->level()) ||
2277 
2278  // For equal-level elements, the one with
2279  // higher id gets constrained in terms of
2280  // the one with lower id
2281  (neigh->level() == elem->level() &&
2282  neigh->id() > elem->id()))
2283  continue;
2284  }
2285 
2286  // If we made it here without hitting a continue
2287  // statement, then we're at a node whose dofs
2288  // should be constrained by this element's
2289  // calculations.
2290  const unsigned int n_comp =
2291  my_node.n_comp(sys_number, variable_number);
2292 
2293  for (unsigned int i=0; i != n_comp; ++i)
2294  my_constrained_dofs.insert
2295  (my_node.dof_number
2296  (sys_number, variable_number, i));
2297  }
2298 
2299  // FIXME: old code for disambiguating periodic BCs:
2300  // this is not threadsafe nor safe to run on a
2301  // non-serialized mesh.
2302  /*
2303  std::vector<bool> recursive_constraint(n_side_dofs, false);
2304 
2305  for (unsigned int is = 0; is != n_side_dofs; ++is)
2306  {
2307  const unsigned int i = neigh_side_dofs[is];
2308  const dof_id_type their_dof_g = neigh_dof_indices[i];
2309  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
2310 
2311  {
2312  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2313 
2314  if (!dof_map.is_constrained_dof(their_dof_g))
2315  continue;
2316  }
2317 
2318  DofConstraintRow & their_constraint_row =
2319  constraints[their_dof_g].first;
2320 
2321  for (unsigned int js = 0; js != n_side_dofs; ++js)
2322  {
2323  const unsigned int j = my_side_dofs[js];
2324  const dof_id_type my_dof_g = my_dof_indices[j];
2325  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
2326 
2327  if (their_constraint_row.count(my_dof_g))
2328  recursive_constraint[js] = true;
2329  }
2330  }
2331  */
2332 
2333  for (unsigned int js = 0; js != n_side_dofs; ++js)
2334  {
2335  // FIXME: old code path
2336  // if (recursive_constraint[js])
2337  // continue;
2338 
2339  const unsigned int j = my_side_dofs[js];
2340  const dof_id_type my_dof_g = my_dof_indices[j];
2341  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
2342 
2343  // FIXME: new code path
2344  if (!my_constrained_dofs.count(my_dof_g))
2345  continue;
2346 
2347  DofConstraintRow * constraint_row;
2348 
2349  // we may be running constraint methods concurrently
2350  // on multiple threads, so we need a lock to
2351  // ensure that this constraint is "ours"
2352  {
2353  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2354 
2355  if (dof_map.is_constrained_dof(my_dof_g))
2356  continue;
2357 
2358  constraint_row = &(constraints[my_dof_g]);
2359  libmesh_assert(constraint_row->empty());
2360  }
2361 
2362  for (unsigned int is = 0; is != n_side_dofs; ++is)
2363  {
2364  const unsigned int i = neigh_side_dofs[is];
2365  const dof_id_type their_dof_g = neigh_dof_indices[i];
2366  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
2367 
2368  // Periodic constraints should never be
2369  // self-constraints
2370  // libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
2371 
2372  const Real their_dof_value = Ue[is](js);
2373 
2374  if (their_dof_g == my_dof_g)
2375  {
2376  libmesh_assert_less (std::abs(their_dof_value-1.), 1.e-5);
2377  for (unsigned int k = 0; k != n_side_dofs; ++k)
2378  libmesh_assert(k == is || std::abs(Ue[k](js)) < 1.e-5);
2379  continue;
2380  }
2381 
2382  if (std::abs(their_dof_value) < 10*TOLERANCE)
2383  continue;
2384 
2385  if(!periodic->has_transformation_matrix())
2386  {
2387  constraint_row->insert(std::make_pair(their_dof_g,
2388  their_dof_value));
2389  }
2390  else
2391  {
2392  // In this case the current variable is constrained in terms of other variables.
2393  // We assume that all variables in this constraint have the same FE type (this
2394  // is asserted below), and hence we can create the constraint row contribution
2395  // by multiplying their_dof_value by the corresponding row of the transformation
2396  // matrix.
2397 
2398  const std::set<unsigned int> & variables = periodic->get_variables();
2399  neigh_dof_indices_all_variables.resize(variables.size());
2400  unsigned int index = 0;
2401  for(unsigned int other_var : variables)
2402  {
2403  libmesh_assert_msg(base_fe_type == dof_map.variable_type(other_var), "FE types must match for all variables involved in constraint");
2404 
2405  Real var_weighting = periodic->get_transformation_matrix()(variable_number, other_var);
2406  constraint_row->insert(std::make_pair(neigh_dof_indices_all_variables[index][i],
2407  var_weighting*their_dof_value));
2408  index++;
2409  }
2410  }
2411 
2412  }
2413  }
2414  }
2415  // p refinement constraints:
2416  // constrain dofs shared between
2417  // active elements and neighbors with
2418  // lower polynomial degrees
2419 #ifdef LIBMESH_ENABLE_AMR
2420  const unsigned int min_p_level =
2421  neigh->min_p_level_by_neighbor(elem, elem->p_level());
2422  if (min_p_level < elem->p_level())
2423  {
2424  // Adaptive p refinement of non-hierarchic bases will
2425  // require more coding
2426  libmesh_assert(my_fe->is_hierarchic());
2427  dof_map.constrain_p_dofs(variable_number, elem,
2428  s, min_p_level);
2429  }
2430 #endif // #ifdef LIBMESH_ENABLE_AMR
2431  }
2432  }
2433  }
2434 }

Referenced by libMesh::FEInterface::compute_periodic_constraints().

◆ compute_periodic_node_constraints()

void libMesh::FEAbstract::compute_periodic_node_constraints ( NodeConstraints constraints,
const PeriodicBoundaries boundaries,
const MeshBase mesh,
const PointLocatorBase point_locator,
const Elem elem 
)
staticinherited

Computes the node position constraint equation contributions (for meshes with periodic boundary conditions)

Definition at line 990 of file fe_abstract.C.

995 {
996  // Only bother if we truly have periodic boundaries
997  if (boundaries.empty())
998  return;
999 
1000  libmesh_assert(elem);
1001 
1002  // Only constrain active elements with this method
1003  if (!elem->active())
1004  return;
1005 
1006  const unsigned int Dim = elem->dim();
1007 
1008  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
1009  const FEType fe_type(elem->default_order(), mapping_family);
1010 
1011  // Pull objects out of the loop to reduce heap operations
1012  std::vector<const Node *> my_nodes, neigh_nodes;
1013  std::unique_ptr<const Elem> my_side, neigh_side;
1014 
1015  // Look at the element faces. Check to see if we need to
1016  // build constraints.
1017  std::vector<boundary_id_type> bc_ids;
1018  for (auto s : elem->side_index_range())
1019  {
1020  if (elem->neighbor_ptr(s))
1021  continue;
1022 
1023  mesh.get_boundary_info().boundary_ids (elem, s, bc_ids);
1024  for (const auto & boundary_id : bc_ids)
1025  {
1026  const PeriodicBoundaryBase * periodic = boundaries.boundary(boundary_id);
1027  if (periodic)
1028  {
1029  libmesh_assert(point_locator);
1030 
1031  // Get pointers to the element's neighbor.
1032  const Elem * neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s);
1033 
1034  // h refinement constraints:
1035  // constrain dofs shared between
1036  // this element and ones as coarse
1037  // as or coarser than this element.
1038  if (neigh->level() <= elem->level())
1039  {
1040  unsigned int s_neigh =
1041  mesh.get_boundary_info().side_with_boundary_id(neigh, periodic->pairedboundary);
1042  libmesh_assert_not_equal_to (s_neigh, libMesh::invalid_uint);
1043 
1044 #ifdef LIBMESH_ENABLE_AMR
1045  libmesh_assert(neigh->active());
1046 #endif // #ifdef LIBMESH_ENABLE_AMR
1047 
1048  elem->build_side_ptr(my_side, s);
1049  neigh->build_side_ptr(neigh_side, s_neigh);
1050 
1051  const unsigned int n_side_nodes = my_side->n_nodes();
1052 
1053  my_nodes.clear();
1054  my_nodes.reserve (n_side_nodes);
1055  neigh_nodes.clear();
1056  neigh_nodes.reserve (n_side_nodes);
1057 
1058  for (unsigned int n=0; n != n_side_nodes; ++n)
1059  my_nodes.push_back(my_side->node_ptr(n));
1060 
1061  for (unsigned int n=0; n != n_side_nodes; ++n)
1062  neigh_nodes.push_back(neigh_side->node_ptr(n));
1063 
1064  // Make sure we're not adding recursive constraints
1065  // due to the redundancy in the way we add periodic
1066  // boundary constraints, or adding constraints to
1067  // nodes that already have AMR constraints
1068  std::vector<bool> skip_constraint(n_side_nodes, false);
1069 
1070  for (unsigned int my_side_n=0;
1071  my_side_n < n_side_nodes;
1072  my_side_n++)
1073  {
1074  libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
1075 
1076  const Node * my_node = my_nodes[my_side_n];
1077 
1078  // Figure out where my node lies on their reference element.
1079  const Point neigh_point = periodic->get_corresponding_pos(*my_node);
1080 
1081  const Point mapped_point =
1082  FEMap::inverse_map(Dim-1, neigh_side.get(),
1083  neigh_point);
1084 
1085  // If we've already got a constraint on this
1086  // node, then the periodic constraint is
1087  // redundant
1088  {
1089  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1090 
1091  if (constraints.count(my_node))
1092  {
1093  skip_constraint[my_side_n] = true;
1094  continue;
1095  }
1096  }
1097 
1098  // Compute the neighbors's side shape function values.
1099  for (unsigned int their_side_n=0;
1100  their_side_n < n_side_nodes;
1101  their_side_n++)
1102  {
1103  libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
1104 
1105  const Node * their_node = neigh_nodes[their_side_n];
1106 
1107  // If there's a constraint on an opposing node,
1108  // we need to see if it's constrained by
1109  // *our side* making any periodic constraint
1110  // on us recursive
1111  {
1112  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1113 
1114  if (!constraints.count(their_node))
1115  continue;
1116 
1117  const NodeConstraintRow & their_constraint_row =
1118  constraints[their_node].first;
1119 
1120  for (unsigned int orig_side_n=0;
1121  orig_side_n < n_side_nodes;
1122  orig_side_n++)
1123  {
1124  libmesh_assert_less (orig_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
1125 
1126  const Node * orig_node = my_nodes[orig_side_n];
1127 
1128  if (their_constraint_row.count(orig_node))
1129  skip_constraint[orig_side_n] = true;
1130  }
1131  }
1132  }
1133  }
1134  for (unsigned int my_side_n=0;
1135  my_side_n < n_side_nodes;
1136  my_side_n++)
1137  {
1138  libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
1139 
1140  if (skip_constraint[my_side_n])
1141  continue;
1142 
1143  const Node * my_node = my_nodes[my_side_n];
1144 
1145  // Figure out where my node lies on their reference element.
1146  const Point neigh_point = periodic->get_corresponding_pos(*my_node);
1147 
1148  // Figure out where my node lies on their reference element.
1149  const Point mapped_point =
1150  FEMap::inverse_map(Dim-1, neigh_side.get(),
1151  neigh_point);
1152 
1153  for (unsigned int their_side_n=0;
1154  their_side_n < n_side_nodes;
1155  their_side_n++)
1156  {
1157  libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
1158 
1159  const Node * their_node = neigh_nodes[their_side_n];
1160  libmesh_assert(their_node);
1161 
1162  const Real their_value = FEInterface::shape(Dim-1,
1163  fe_type,
1164  neigh_side->type(),
1165  their_side_n,
1166  mapped_point);
1167 
1168  // since we may be running this method concurrently
1169  // on multiple threads we need to acquire a lock
1170  // before modifying the shared constraint_row object.
1171  {
1172  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1173 
1174  NodeConstraintRow & constraint_row =
1175  constraints[my_node].first;
1176 
1177  constraint_row.insert(std::make_pair(their_node,
1178  their_value));
1179  }
1180  }
1181  }
1182  }
1183  }
1184  }
1185  }
1186 }

References libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::Elem::build_side_ptr(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::invalid_uint, libMesh::FEMap::inverse_map(), libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEMap::map_fe_type(), mesh, libMesh::FEInterface::n_dofs(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor_ptr(), libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::Real, libMesh::FEInterface::shape(), libMesh::Elem::side_index_range(), and libMesh::Threads::spin_mtx.

◆ compute_proj_constraints()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::compute_proj_constraints ( DofConstraints constraints,
DofMap dof_map,
const unsigned int  variable_number,
const Elem elem 
)
staticinherited

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

Definition at line 1396 of file fe_base.C.

1400 {
1401  libmesh_assert(elem);
1402 
1403  const unsigned int Dim = elem->dim();
1404 
1405  // Only constrain elements in 2,3D.
1406  if (Dim == 1)
1407  return;
1408 
1409  // Only constrain active elements with this method
1410  if (!elem->active())
1411  return;
1412 
1413  const Variable & var = dof_map.variable(variable_number);
1414  const FEType & base_fe_type = var.type();
1415 
1416  // Construct FE objects for this element and its neighbors.
1417  std::unique_ptr<FEGenericBase<OutputShape>> my_fe
1418  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1419  const FEContinuity cont = my_fe->get_continuity();
1420 
1421  // We don't need to constrain discontinuous elements
1422  if (cont == DISCONTINUOUS)
1423  return;
1424  libmesh_assert (cont == C_ZERO || cont == C_ONE);
1425 
1426  std::unique_ptr<FEGenericBase<OutputShape>> neigh_fe
1427  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1428 
1429  QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
1430  my_fe->attach_quadrature_rule (&my_qface);
1431  std::vector<Point> neigh_qface;
1432 
1433  const std::vector<Real> & JxW = my_fe->get_JxW();
1434  const std::vector<Point> & q_point = my_fe->get_xyz();
1435  const std::vector<std::vector<OutputShape>> & phi = my_fe->get_phi();
1436  const std::vector<std::vector<OutputShape>> & neigh_phi =
1437  neigh_fe->get_phi();
1438  const std::vector<Point> * face_normals = nullptr;
1439  const std::vector<std::vector<OutputGradient>> * dphi = nullptr;
1440  const std::vector<std::vector<OutputGradient>> * neigh_dphi = nullptr;
1441 
1442  std::vector<dof_id_type> my_dof_indices, neigh_dof_indices;
1443  std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
1444 
1445  if (cont != C_ZERO)
1446  {
1447  const std::vector<Point> & ref_face_normals =
1448  my_fe->get_normals();
1449  face_normals = &ref_face_normals;
1450  const std::vector<std::vector<OutputGradient>> & ref_dphi =
1451  my_fe->get_dphi();
1452  dphi = &ref_dphi;
1453  const std::vector<std::vector<OutputGradient>> & ref_neigh_dphi =
1454  neigh_fe->get_dphi();
1455  neigh_dphi = &ref_neigh_dphi;
1456  }
1457 
1458  DenseMatrix<Real> Ke;
1459  DenseVector<Real> Fe;
1460  std::vector<DenseVector<Real>> Ue;
1461 
1462  // Look at the element faces. Check to see if we need to
1463  // build constraints.
1464  for (auto s : elem->side_index_range())
1465  {
1466  // Get pointers to the element's neighbor.
1467  const Elem * neigh = elem->neighbor_ptr(s);
1468 
1469  if (!neigh)
1470  continue;
1471 
1472  if (!var.active_on_subdomain(neigh->subdomain_id()))
1473  continue;
1474 
1475  // h refinement constraints:
1476  // constrain dofs shared between
1477  // this element and ones coarser
1478  // than this element.
1479  if (neigh->level() < elem->level())
1480  {
1481  unsigned int s_neigh = neigh->which_neighbor_am_i(elem);
1482  libmesh_assert_less (s_neigh, neigh->n_neighbors());
1483 
1484  // Find the minimum p level; we build the h constraint
1485  // matrix with this and then constrain away all higher p
1486  // DoFs.
1487  libmesh_assert(neigh->active());
1488  const unsigned int min_p_level =
1489  std::min(elem->p_level(), neigh->p_level());
1490 
1491  // we may need to make the FE objects reinit with the
1492  // minimum shared p_level
1493  const unsigned int old_elem_level = elem->p_level();
1494  if (elem->p_level() != min_p_level)
1495  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() - old_elem_level + min_p_level);
1496  const unsigned int old_neigh_level = neigh->p_level();
1497  if (old_neigh_level != min_p_level)
1498  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() - old_neigh_level + min_p_level);
1499 
1500  my_fe->reinit(elem, s);
1501 
1502  // This function gets called element-by-element, so there
1503  // will be a lot of memory allocation going on. We can
1504  // at least minimize this for the case of the dof indices
1505  // by efficiently preallocating the requisite storage.
1506  // n_nodes is not necessarily n_dofs, but it is better
1507  // than nothing!
1508  my_dof_indices.reserve (elem->n_nodes());
1509  neigh_dof_indices.reserve (neigh->n_nodes());
1510 
1511  dof_map.dof_indices (elem, my_dof_indices,
1512  variable_number,
1513  min_p_level);
1514  dof_map.dof_indices (neigh, neigh_dof_indices,
1515  variable_number,
1516  min_p_level);
1517 
1518  const unsigned int n_qp = my_qface.n_points();
1519 
1520  FEMap::inverse_map (Dim, neigh, q_point, neigh_qface);
1521 
1522  neigh_fe->reinit(neigh, &neigh_qface);
1523 
1524  // We're only concerned with DOFs whose values (and/or first
1525  // derivatives for C1 elements) are supported on side nodes
1526  FEType elem_fe_type = base_fe_type;
1527  if (old_elem_level != min_p_level)
1528  elem_fe_type.order = base_fe_type.order.get_order() - old_elem_level + min_p_level;
1529  FEType neigh_fe_type = base_fe_type;
1530  if (old_neigh_level != min_p_level)
1531  neigh_fe_type.order = base_fe_type.order.get_order() - old_neigh_level + min_p_level;
1532  FEInterface::dofs_on_side(elem, Dim, elem_fe_type, s, my_side_dofs);
1533  FEInterface::dofs_on_side(neigh, Dim, neigh_fe_type, s_neigh, neigh_side_dofs);
1534 
1535  const unsigned int n_side_dofs =
1536  cast_int<unsigned int>(my_side_dofs.size());
1537  libmesh_assert_equal_to (n_side_dofs, neigh_side_dofs.size());
1538 
1539 #ifndef NDEBUG
1540  for (auto i : my_side_dofs)
1541  libmesh_assert_less(i, my_dof_indices.size());
1542  for (auto i : neigh_side_dofs)
1543  libmesh_assert_less(i, neigh_dof_indices.size());
1544 #endif
1545 
1546  Ke.resize (n_side_dofs, n_side_dofs);
1547  Ue.resize(n_side_dofs);
1548 
1549  // Form the projection matrix, (inner product of fine basis
1550  // functions against fine test functions)
1551  for (unsigned int is = 0; is != n_side_dofs; ++is)
1552  {
1553  const unsigned int i = my_side_dofs[is];
1554  for (unsigned int js = 0; js != n_side_dofs; ++js)
1555  {
1556  const unsigned int j = my_side_dofs[js];
1557  for (unsigned int qp = 0; qp != n_qp; ++qp)
1558  {
1559  Ke(is,js) += JxW[qp] * TensorTools::inner_product(phi[i][qp], phi[j][qp]);
1560  if (cont != C_ZERO)
1561  Ke(is,js) += JxW[qp] *
1562  TensorTools::inner_product((*dphi)[i][qp] *
1563  (*face_normals)[qp],
1564  (*dphi)[j][qp] *
1565  (*face_normals)[qp]);
1566  }
1567  }
1568  }
1569 
1570  // Form the right hand sides, (inner product of coarse basis
1571  // functions against fine test functions)
1572  for (unsigned int is = 0; is != n_side_dofs; ++is)
1573  {
1574  const unsigned int i = neigh_side_dofs[is];
1575  Fe.resize (n_side_dofs);
1576  for (unsigned int js = 0; js != n_side_dofs; ++js)
1577  {
1578  const unsigned int j = my_side_dofs[js];
1579  for (unsigned int qp = 0; qp != n_qp; ++qp)
1580  {
1581  Fe(js) += JxW[qp] *
1582  TensorTools::inner_product(neigh_phi[i][qp],
1583  phi[j][qp]);
1584  if (cont != C_ZERO)
1585  Fe(js) += JxW[qp] *
1586  TensorTools::inner_product((*neigh_dphi)[i][qp] *
1587  (*face_normals)[qp],
1588  (*dphi)[j][qp] *
1589  (*face_normals)[qp]);
1590  }
1591  }
1592  Ke.cholesky_solve(Fe, Ue[is]);
1593  }
1594 
1595  for (unsigned int js = 0; js != n_side_dofs; ++js)
1596  {
1597  const unsigned int j = my_side_dofs[js];
1598  const dof_id_type my_dof_g = my_dof_indices[j];
1599  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
1600 
1601  // Hunt for "constraining against myself" cases before
1602  // we bother creating a constraint row
1603  bool self_constraint = false;
1604  for (unsigned int is = 0; is != n_side_dofs; ++is)
1605  {
1606  const unsigned int i = neigh_side_dofs[is];
1607  const dof_id_type their_dof_g = neigh_dof_indices[i];
1608  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1609 
1610  if (their_dof_g == my_dof_g)
1611  {
1612 #ifndef NDEBUG
1613  const Real their_dof_value = Ue[is](js);
1614  libmesh_assert_less (std::abs(their_dof_value-1.),
1615  10*TOLERANCE);
1616 
1617  for (unsigned int k = 0; k != n_side_dofs; ++k)
1618  libmesh_assert(k == is ||
1619  std::abs(Ue[k](js)) <
1620  10*TOLERANCE);
1621 #endif
1622 
1623  self_constraint = true;
1624  break;
1625  }
1626  }
1627 
1628  if (self_constraint)
1629  continue;
1630 
1631  DofConstraintRow * constraint_row;
1632 
1633  // we may be running constraint methods concurrently
1634  // on multiple threads, so we need a lock to
1635  // ensure that this constraint is "ours"
1636  {
1637  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1638 
1639  if (dof_map.is_constrained_dof(my_dof_g))
1640  continue;
1641 
1642  constraint_row = &(constraints[my_dof_g]);
1643  libmesh_assert(constraint_row->empty());
1644  }
1645 
1646  for (unsigned int is = 0; is != n_side_dofs; ++is)
1647  {
1648  const unsigned int i = neigh_side_dofs[is];
1649  const dof_id_type their_dof_g = neigh_dof_indices[i];
1650  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1651  libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
1652 
1653  const Real their_dof_value = Ue[is](js);
1654 
1655  if (std::abs(their_dof_value) < 10*TOLERANCE)
1656  continue;
1657 
1658  constraint_row->insert(std::make_pair(their_dof_g,
1659  their_dof_value));
1660  }
1661  }
1662 
1663  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() + old_elem_level - min_p_level);
1664  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() + old_neigh_level - min_p_level);
1665  }
1666 
1667  // p refinement constraints:
1668  // constrain dofs shared between
1669  // active elements and neighbors with
1670  // lower polynomial degrees
1671  const unsigned int min_p_level =
1672  neigh->min_p_level_by_neighbor(elem, elem->p_level());
1673  if (min_p_level < elem->p_level())
1674  {
1675  // Adaptive p refinement of non-hierarchic bases will
1676  // require more coding
1677  libmesh_assert(my_fe->is_hierarchic());
1678  dof_map.constrain_p_dofs(variable_number, elem,
1679  s, min_p_level);
1680  }
1681  }
1682 }

Referenced by libMesh::FE< Dim, LAGRANGE_VEC >::compute_constraints().

◆ compute_shape_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions ( const Elem ,
const std::vector< Point > &   
)
overrideprotectedvirtual

After having updated the jacobian and the transformation from local to global coordinates in FEAbstract::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx/y/z, dphasedx/y/z, dweight.

This method should barely be re-defined in derived classes, but still should be usable for children. Therefore, keep it protected.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 899 of file inf_fe.C.

901 {
902  // Start logging the overall computation of shape functions
903  LOG_SCOPE("compute_shape_functions()", "InfFE");
904 
905  const unsigned int n_total_qp = _n_total_qp;
906 
907  // Compute the shape function values (and derivatives)
908  // at the Quadrature points. Note that the actual values
909  // have already been computed via init_shape_functions
910 
911  // Compute the value of the derivative shape function i at quadrature point p
912  switch (dim)
913  {
914 
915  case 1:
916  {
917  libmesh_not_implemented();
918  break;
919  }
920 
921  case 2:
922  {
923  libmesh_not_implemented();
924  break;
925  }
926 
927  case 3:
928  {
929  const std::vector<Real> & dxidx_map = this->_fe_map->get_dxidx();
930  const std::vector<Real> & dxidy_map = this->_fe_map->get_dxidy();
931  const std::vector<Real> & dxidz_map = this->_fe_map->get_dxidz();
932 
933  const std::vector<Real> & detadx_map = this->_fe_map->get_detadx();
934  const std::vector<Real> & detady_map = this->_fe_map->get_detady();
935  const std::vector<Real> & detadz_map = this->_fe_map->get_detadz();
936 
937  const std::vector<Real> & dzetadx_map = this->_fe_map->get_dzetadx();
938  const std::vector<Real> & dzetady_map = this->_fe_map->get_dzetady();
939  const std::vector<Real> & dzetadz_map = this->_fe_map->get_dzetadz();
940 
941  // These are _all_ shape functions of this infinite element
942  for (auto i : index_range(phi))
943  for (unsigned int p=0; p<n_total_qp; p++)
944  {
945  // dphi/dx = (dphi/dxi)*(dxi/dx) + (dphi/deta)*(deta/dx) + (dphi/dzeta)*(dzeta/dx);
946  dphi[i][p](0) =
947  dphidx[i][p] = (dphidxi[i][p]*dxidx_map[p] +
948  dphideta[i][p]*detadx_map[p] +
949  dphidzeta[i][p]*dzetadx_map[p]);
950 
951  // dphi/dy = (dphi/dxi)*(dxi/dy) + (dphi/deta)*(deta/dy) + (dphi/dzeta)*(dzeta/dy);
952  dphi[i][p](1) =
953  dphidy[i][p] = (dphidxi[i][p]*dxidy_map[p] +
954  dphideta[i][p]*detady_map[p] +
955  dphidzeta[i][p]*dzetady_map[p]);
956 
957  // dphi/dz = (dphi/dxi)*(dxi/dz) + (dphi/deta)*(deta/dz) + (dphi/dzeta)*(dzeta/dz);
958  dphi[i][p](2) =
959  dphidz[i][p] = (dphidxi[i][p]*dxidz_map[p] +
960  dphideta[i][p]*detadz_map[p] +
961  dphidzeta[i][p]*dzetadz_map[p]);
962  }
963 
964 
965  // This is the derivative of the phase term of this infinite element
966  for (unsigned int p=0; p<n_total_qp; p++)
967  {
968  // the derivative of the phase term
969  dphase[p](0) = (dphasedxi[p] * dxidx_map[p] +
970  dphasedeta[p] * detadx_map[p] +
971  dphasedzeta[p] * dzetadx_map[p]);
972 
973  dphase[p](1) = (dphasedxi[p] * dxidy_map[p] +
974  dphasedeta[p] * detady_map[p] +
975  dphasedzeta[p] * dzetady_map[p]);
976 
977  dphase[p](2) = (dphasedxi[p] * dxidz_map[p] +
978  dphasedeta[p] * detadz_map[p] +
979  dphasedzeta[p] * dzetadz_map[p]);
980 
981  // the derivative of the radial weight - varies only in radial direction,
982  // therefore dweightdxi = dweightdeta = 0.
983  dweight[p](0) = dweightdv[p] * dzetadx_map[p];
984 
985  dweight[p](1) = dweightdv[p] * dzetady_map[p];
986 
987  dweight[p](2) = dweightdv[p] * dzetadz_map[p];
988  }
989 
990  break;
991  }
992 
993  default:
994  libmesh_error_msg("Unsupported dim = " << dim);
995  }
996 }

References dim, and libMesh::index_range().

◆ compute_shape_indices()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices ( const FEType fet,
const ElemType  inf_elem_type,
const unsigned int  i,
unsigned int base_shape,
unsigned int radial_shape 
)
staticprotected

Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (0 in the base, \( \ge 1 \) further out) associated to the shape with global index i of an infinite element of type inf_elem_type.

Definition at line 839 of file inf_fe_static.C.

844 {
845 
846  /*
847  * An example is provided: the numbers in comments refer to
848  * a fictitious InfHex18. The numbers are chosen as exemplary
849  * values. There is currently no base approximation that
850  * requires this many dof's at nodes, sides, faces and in the element.
851  *
852  * the order of the shape functions is heavily related with the
853  * order the dofs are assigned in \p DofMap::distributed_dofs().
854  * Due to the infinite elements with higher-order base approximation,
855  * some more effort is necessary.
856  *
857  * numbering scheme:
858  * 1. all vertices in the base, assign node->n_comp() dofs to each vertex
859  * 2. all vertices further out: innermost loop: radial shapes,
860  * then the base approximation shapes
861  * 3. all side nodes in the base, assign node->n_comp() dofs to each side node
862  * 4. all side nodes further out: innermost loop: radial shapes,
863  * then the base approximation shapes
864  * 5. (all) face nodes in the base, assign node->n_comp() dofs to each face node
865  * 6. (all) face nodes further out: innermost loop: radial shapes,
866  * then the base approximation shapes
867  * 7. element-associated dof in the base
868  * 8. element-associated dof further out
869  */
870 
871  const unsigned int radial_order = static_cast<unsigned int>(fet.radial_order.get_order()); // 4
872  const unsigned int radial_order_p_one = radial_order+1; // 5
873 
874  const ElemType base_elem_type (InfFEBase::get_elem_type(inf_elem_type)); // QUAD9
875 
876  // assume that the number of dof is the same for all vertices
877  unsigned int n_base_vertices = libMesh::invalid_uint; // 4
878  const unsigned int n_base_vertex_dof = FEInterface::n_dofs_at_node (Dim-1, fet, base_elem_type, 0);// 2
879 
880  unsigned int n_base_side_nodes = libMesh::invalid_uint; // 4
881  unsigned int n_base_side_dof = libMesh::invalid_uint; // 3
882 
883  unsigned int n_base_face_nodes = libMesh::invalid_uint; // 1
884  unsigned int n_base_face_dof = libMesh::invalid_uint; // 5
885 
886  const unsigned int n_base_elem_dof = FEInterface::n_dofs_per_elem (Dim-1, fet, base_elem_type);// 9
887 
888 
889  switch (inf_elem_type)
890  {
891  case INFEDGE2:
892  {
893  n_base_vertices = 1;
894  n_base_side_nodes = 0;
895  n_base_face_nodes = 0;
896  n_base_side_dof = 0;
897  n_base_face_dof = 0;
898  break;
899  }
900 
901  case INFQUAD4:
902  {
903  n_base_vertices = 2;
904  n_base_side_nodes = 0;
905  n_base_face_nodes = 0;
906  n_base_side_dof = 0;
907  n_base_face_dof = 0;
908  break;
909  }
910 
911  case INFQUAD6:
912  {
913  n_base_vertices = 2;
914  n_base_side_nodes = 1;
915  n_base_face_nodes = 0;
916  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
917  n_base_face_dof = 0;
918  break;
919  }
920 
921  case INFHEX8:
922  {
923  n_base_vertices = 4;
924  n_base_side_nodes = 0;
925  n_base_face_nodes = 0;
926  n_base_side_dof = 0;
927  n_base_face_dof = 0;
928  break;
929  }
930 
931  case INFHEX16:
932  {
933  n_base_vertices = 4;
934  n_base_side_nodes = 4;
935  n_base_face_nodes = 0;
936  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
937  n_base_face_dof = 0;
938  break;
939  }
940 
941  case INFHEX18:
942  {
943  n_base_vertices = 4;
944  n_base_side_nodes = 4;
945  n_base_face_nodes = 1;
946  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
947  n_base_face_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, 8);
948  break;
949  }
950 
951 
952  case INFPRISM6:
953  {
954  n_base_vertices = 3;
955  n_base_side_nodes = 0;
956  n_base_face_nodes = 0;
957  n_base_side_dof = 0;
958  n_base_face_dof = 0;
959  break;
960  }
961 
962  case INFPRISM12:
963  {
964  n_base_vertices = 3;
965  n_base_side_nodes = 3;
966  n_base_face_nodes = 0;
967  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
968  n_base_face_dof = 0;
969  break;
970  }
971 
972  default:
973  libmesh_error_msg("Unrecognized inf_elem_type = " << inf_elem_type);
974  }
975 
976 
977  {
978  // these are the limits describing the intervals where the shape function lies
979  const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof; // 8
980  const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one; // 40
981 
982  const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof; // 12
983  const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one; // 60
984 
985  const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof; // 5
986  const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one; // 25
987 
988 
989  // start locating the shape function
990  if (i < n_dof_at_base_vertices) // range of i: 0..7
991  {
992  // belongs to vertex in the base
993  radial_shape = 0;
994  base_shape = i;
995  }
996 
997  else if (i < n_dof_at_all_vertices) // range of i: 8..39
998  {
999  /* belongs to vertex in the outer shell
1000  *
1001  * subtract the number of dof already counted,
1002  * so that i_offset contains only the offset for the base
1003  */
1004  const unsigned int i_offset = i - n_dof_at_base_vertices; // 0..31
1005 
1006  // first the radial dof are counted, then the base dof
1007  radial_shape = (i_offset % radial_order) + 1;
1008  base_shape = i_offset / radial_order;
1009  }
1010 
1011  else if (i < n_dof_at_all_vertices+n_dof_at_base_sides) // range of i: 40..51
1012  {
1013  // belongs to base, is a side node
1014  radial_shape = 0;
1015  base_shape = i - radial_order * n_dof_at_base_vertices; // 8..19
1016  }
1017 
1018  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides) // range of i: 52..99
1019  {
1020  // belongs to side node in the outer shell
1021  const unsigned int i_offset = i - (n_dof_at_all_vertices
1022  + n_dof_at_base_sides); // 0..47
1023  radial_shape = (i_offset % radial_order) + 1;
1024  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1025  }
1026 
1027  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face) // range of i: 100..104
1028  {
1029  // belongs to the node in the base face
1030  radial_shape = 0;
1031  base_shape = i - radial_order*(n_dof_at_base_vertices
1032  + n_dof_at_base_sides); // 20..24
1033  }
1034 
1035  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces) // range of i: 105..124
1036  {
1037  // belongs to the node in the outer face
1038  const unsigned int i_offset = i - (n_dof_at_all_vertices
1039  + n_dof_at_all_sides
1040  + n_dof_at_base_face); // 0..19
1041  radial_shape = (i_offset % radial_order) + 1;
1042  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1043  }
1044 
1045  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces+n_base_elem_dof) // range of i: 125..133
1046  {
1047  // belongs to the base and is an element associated shape
1048  radial_shape = 0;
1049  base_shape = i - (n_dof_at_all_vertices
1050  + n_dof_at_all_sides
1051  + n_dof_at_all_faces); // 0..8
1052  }
1053 
1054  else // range of i: 134..169
1055  {
1056  libmesh_assert_less (i, n_dofs(fet, inf_elem_type));
1057  // belongs to the outer shell and is an element associated shape
1058  const unsigned int i_offset = i - (n_dof_at_all_vertices
1059  + n_dof_at_all_sides
1060  + n_dof_at_all_faces
1061  + n_base_elem_dof); // 0..19
1062  radial_shape = (i_offset % radial_order) + 1;
1063  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1064  }
1065  }
1066 
1067  return;
1068 }

References libMesh::InfFEBase::get_elem_type(), libMesh::OrderWrapper::get_order(), libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, libMesh::INFQUAD6, libMesh::invalid_uint, libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_per_elem(), and libMesh::FEType::radial_order.

◆ determine_calculations()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::determine_calculations ( )
protectedinherited

Determine which values are to be calculated, for both the FE itself and for the FEMap.

Definition at line 756 of file fe_base.C.

757 {
758  this->calculations_started = true;
759 
760  // If the user forgot to request anything, we'll be safe and
761  // calculate everything:
762 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
763  if (!this->calculate_phi && !this->calculate_dphi &&
764  !this->calculate_d2phi && !this->calculate_curl_phi &&
765  !this->calculate_div_phi && !this->calculate_map)
766  {
767  this->calculate_phi = this->calculate_dphi = this->calculate_d2phi = this->calculate_dphiref = true;
769  {
770  this->calculate_curl_phi = true;
771  this->calculate_div_phi = true;
772  }
773  }
774 #else
775  if (!this->calculate_phi && !this->calculate_dphi &&
776  !this->calculate_curl_phi && !this->calculate_div_phi &&
777  !this->calculate_map)
778  {
779  this->calculate_phi = this->calculate_dphi = this->calculate_dphiref = true;
781  {
782  this->calculate_curl_phi = true;
783  this->calculate_div_phi = true;
784  }
785  }
786 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
787 
788  // Request whichever terms are necessary from the FEMap
789  if (this->calculate_phi)
790  this->_fe_trans->init_map_phi(*this);
791 
792  if (this->calculate_dphiref)
793  this->_fe_trans->init_map_dphi(*this);
794 
795 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
796  if (this->calculate_d2phi)
797  this->_fe_trans->init_map_d2phi(*this);
798 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
799 }

◆ disable_print_counter_info()

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 106 of file reference_counter.C.

107 {
108  _enable_print_counter = false;
109  return;
110 }

References libMesh::ReferenceCounter::_enable_print_counter.

Referenced by libMesh::LibMeshInit::LibMeshInit().

◆ edge_reinit()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_base>
void libMesh::InfFE< Dim, T_radial, T_base >::edge_reinit ( const Elem elem,
const unsigned int  edge,
const Real  tolerance = TOLERANCE,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

Not implemented yet.

Reinitializes all the physical element-dependent data based on the edge of an infinite element.

Implements libMesh::FEAbstract.

Definition at line 140 of file inf_fe_boundary.C.

145 {
146  // We don't do this for 1D elements!
147  //libmesh_assert_not_equal_to (Dim, 1);
148  libmesh_not_implemented_msg("ERROR: Edge conditions for infinite elements not implemented!");
149 
150  if (pts != nullptr)
151  libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements not implemented!");
152 }

◆ enable_print_counter_info()

void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

Definition at line 100 of file reference_counter.C.

101 {
102  _enable_print_counter = true;
103  return;
104 }

References libMesh::ReferenceCounter::_enable_print_counter.

◆ eval() [1/16]

template<>
Real libMesh::InfFE< 1, INFINITE_MAP, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 63 of file inf_fe_map_eval.C.

63 { return InfFEMap::eval(v, o, i); }

References libMesh::InfFEMap::eval().

◆ eval() [2/16]

template<>
Real libMesh::InfFE< 2, INFINITE_MAP, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 64 of file inf_fe_map_eval.C.

64 { return InfFEMap::eval(v, o, i); }

References libMesh::InfFEMap::eval().

◆ eval() [3/16]

template<>
Real libMesh::InfFE< 3, INFINITE_MAP, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 65 of file inf_fe_map_eval.C.

65 { return InfFEMap::eval(v, o, i); }

References libMesh::InfFEMap::eval().

◆ eval() [4/16]

template<>
Real libMesh::InfFE< 1, LAGRANGE, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2607 of file inf_fe_lagrange_eval.C.

2607 { return lagrange_eval(v, o, i); }

◆ eval() [5/16]

template<>
Real libMesh::InfFE< 2, LAGRANGE, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2608 of file inf_fe_lagrange_eval.C.

2608 { return lagrange_eval(v, o, i); }

◆ eval() [6/16]

template<>
Real libMesh::InfFE< 3, LAGRANGE, CARTESIAN >::eval ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2609 of file inf_fe_lagrange_eval.C.

2609 { return lagrange_eval(v, o, i); }

◆ eval() [7/16]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static Real libMesh::InfFE< Dim, T_radial, T_map >::eval ( Real  v,
Order  o_radial,
unsigned int  i 
)
staticprotected
Returns
The value of the \( i^{th} \) polynomial evaluated at v. This method provides the approximation in radial direction for the overall shape functions, which is defined in InfFE::shape(). This method is allowed to be static, since it is independent of dimension and base_family. It is templated, though, w.r.t. to radial FEFamily.
The value of the \( i^{th} \) mapping shape function in radial direction evaluated at v when T_radial == INFINITE_MAP. Currently, only one specific mapping shape is used. Namely the one by Marques JMMC, Owen DRJ: Infinite elements in quasi-static materially nonlinear problems, Computers and Structures, 1984.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::shape(), and libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv().

◆ eval() [8/16]

template<>
Real libMesh::InfFE< 1, JACOBI_20_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 57 of file inf_fe_jacobi_20_00_eval.C.

57 { return jacobi_20_00_eval(n, x); }

◆ eval() [9/16]

template<>
Real libMesh::InfFE< 1, JACOBI_30_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 57 of file inf_fe_jacobi_30_00_eval.C.

57 { return jacobi_30_00_eval(n, x); }

◆ eval() [10/16]

template<>
Real libMesh::InfFE< 2, JACOBI_20_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 58 of file inf_fe_jacobi_20_00_eval.C.

58 { return jacobi_20_00_eval(n, x); }

◆ eval() [11/16]

template<>
Real libMesh::InfFE< 2, JACOBI_30_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 58 of file inf_fe_jacobi_30_00_eval.C.

58 { return jacobi_30_00_eval(n, x); }

◆ eval() [12/16]

template<>
Real libMesh::InfFE< 3, JACOBI_20_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 59 of file inf_fe_jacobi_20_00_eval.C.

59 { return jacobi_20_00_eval(n, x); }

◆ eval() [13/16]

template<>
Real libMesh::InfFE< 3, JACOBI_30_00, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 59 of file inf_fe_jacobi_30_00_eval.C.

59 { return jacobi_30_00_eval(n, x); }

◆ eval() [14/16]

template<>
Real libMesh::InfFE< 1, LEGENDRE, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 59 of file inf_fe_legendre_eval.C.

59 { return legendre_eval(n, x); }

◆ eval() [15/16]

template<>
Real libMesh::InfFE< 2, LEGENDRE, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 60 of file inf_fe_legendre_eval.C.

60 { return legendre_eval(n, x); }

◆ eval() [16/16]

template<>
Real libMesh::InfFE< 3, LEGENDRE, CARTESIAN >::eval ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 61 of file inf_fe_legendre_eval.C.

61 { return legendre_eval(n, x); }

◆ eval_deriv() [1/16]

template<>
Real libMesh::InfFE< 1, INFINITE_MAP, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 69 of file inf_fe_map_eval.C.

69 { return InfFEMap::eval_deriv(v, o, i); }

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [2/16]

template<>
Real libMesh::InfFE< 2, INFINITE_MAP, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 70 of file inf_fe_map_eval.C.

70 { return InfFEMap::eval_deriv(v, o, i); }

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [3/16]

template<>
Real libMesh::InfFE< 3, INFINITE_MAP, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 71 of file inf_fe_map_eval.C.

71 { return InfFEMap::eval_deriv(v, o, i); }

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [4/16]

template<>
Real libMesh::InfFE< 1, LAGRANGE, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2613 of file inf_fe_lagrange_eval.C.

2613 { return lagrange_eval_deriv(v, o, i); }

◆ eval_deriv() [5/16]

template<>
Real libMesh::InfFE< 2, LAGRANGE, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2614 of file inf_fe_lagrange_eval.C.

2614 { return lagrange_eval_deriv(v, o, i); }

◆ eval_deriv() [6/16]

template<>
Real libMesh::InfFE< 3, LAGRANGE, CARTESIAN >::eval_deriv ( Real  v,
Order  o,
unsigned  i 
)
protected

Definition at line 2615 of file inf_fe_lagrange_eval.C.

2615 { return lagrange_eval_deriv(v, o, i); }

◆ eval_deriv() [7/16]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static Real libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv ( Real  v,
Order  o_radial,
unsigned int  i 
)
staticprotected
Returns
The value of the first derivative of the \( i^{th} \) polynomial at coordinate v. See eval for details.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), and libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv().

◆ eval_deriv() [8/16]

template<>
Real libMesh::InfFE< 1, JACOBI_20_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 63 of file inf_fe_jacobi_20_00_eval.C.

63 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [9/16]

template<>
Real libMesh::InfFE< 1, JACOBI_30_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 63 of file inf_fe_jacobi_30_00_eval.C.

63 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [10/16]

template<>
Real libMesh::InfFE< 2, JACOBI_20_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 64 of file inf_fe_jacobi_20_00_eval.C.

64 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [11/16]

template<>
Real libMesh::InfFE< 2, JACOBI_30_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 64 of file inf_fe_jacobi_30_00_eval.C.

64 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [12/16]

template<>
Real libMesh::InfFE< 3, JACOBI_20_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 65 of file inf_fe_jacobi_20_00_eval.C.

65 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [13/16]

template<>
Real libMesh::InfFE< 3, JACOBI_30_00, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 65 of file inf_fe_jacobi_30_00_eval.C.

65 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [14/16]

template<>
Real libMesh::InfFE< 1, LEGENDRE, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 65 of file inf_fe_legendre_eval.C.

65 { return legendre_eval_deriv(n, x); }

◆ eval_deriv() [15/16]

template<>
Real libMesh::InfFE< 2, LEGENDRE, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 66 of file inf_fe_legendre_eval.C.

66 { return legendre_eval_deriv(n, x); }

◆ eval_deriv() [16/16]

template<>
Real libMesh::InfFE< 3, LEGENDRE, CARTESIAN >::eval_deriv ( Real  x,
Order  ,
unsigned  n 
)
protected

Definition at line 67 of file inf_fe_legendre_eval.C.

67 { return legendre_eval_deriv(n, x); }

◆ get_continuity()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual FEContinuity libMesh::InfFE< Dim, T_radial, T_map >::get_continuity ( ) const
inlineoverridevirtual
Returns
The continuity of the element.

Implements libMesh::FEAbstract.

Definition at line 367 of file inf_fe.h.

368  { return C_ZERO; } // FIXME - is this true??

References libMesh::C_ZERO.

◆ get_curl_phi()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_curl_phi ( ) const
inlineinherited

◆ get_curvatures()

const std::vector<Real>& libMesh::FEAbstract::get_curvatures ( ) const
inlineinherited
Returns
The curvatures for use in face integration.

Definition at line 387 of file fe_abstract.h.

388  { calculate_map = true; return this->_fe_map->get_curvatures();}

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2phi()

template<typename OutputType>
const std::vector<std::vector<OutputTensor> >& libMesh::FEGenericBase< OutputType >::get_d2phi ( ) const
inlineinherited

◆ get_d2phideta2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phideta2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 368 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2phidetadzeta()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidetadzeta ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 376 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2phidx2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidx2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 296 of file fe_base.h.

◆ get_d2phidxdy()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxdy ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 304 of file fe_base.h.

◆ get_d2phidxdz()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxdz ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 312 of file fe_base.h.

◆ get_d2phidxi2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxi2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 344 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2phidxideta()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxideta ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 352 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2phidxidzeta()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxidzeta ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 360 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2phidy2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidy2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 320 of file fe_base.h.

◆ get_d2phidydz()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidydz ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 328 of file fe_base.h.

◆ get_d2phidz2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidz2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points.

Definition at line 336 of file fe_base.h.

◆ get_d2phidzeta2()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidzeta2 ( ) const
inlineinherited
Returns
The shape function second derivatives at the quadrature points, in reference coordinates

Definition at line 384 of file fe_base.h.

Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().

◆ get_d2xyzdeta2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdeta2 ( ) const
inlineinherited
Returns
The second partial derivatives in eta.

Definition at line 279 of file fe_abstract.h.

280  { calculate_map = true; return this->_fe_map->get_d2xyzdeta2(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdetadzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdetadzeta ( ) const
inlineinherited
Returns
The second partial derivatives in eta-zeta.

Definition at line 303 of file fe_abstract.h.

304  { calculate_map = true; return this->_fe_map->get_d2xyzdetadzeta(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxi2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxi2 ( ) const
inlineinherited
Returns
The second partial derivatives in xi.

Definition at line 273 of file fe_abstract.h.

274  { calculate_map = true; return this->_fe_map->get_d2xyzdxi2(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxideta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxideta ( ) const
inlineinherited
Returns
The second partial derivatives in xi-eta.

Definition at line 291 of file fe_abstract.h.

292  { calculate_map = true; return this->_fe_map->get_d2xyzdxideta(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxidzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxidzeta ( ) const
inlineinherited
Returns
The second partial derivatives in xi-zeta.

Definition at line 297 of file fe_abstract.h.

298  { calculate_map = true; return this->_fe_map->get_d2xyzdxidzeta(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdzeta2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdzeta2 ( ) const
inlineinherited
Returns
The second partial derivatives in zeta.

Definition at line 285 of file fe_abstract.h.

286  { calculate_map = true; return this->_fe_map->get_d2xyzdzeta2(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_detadx()

const std::vector<Real>& libMesh::FEAbstract::get_detadx ( ) const
inlineinherited
Returns
The deta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 333 of file fe_abstract.h.

334  { calculate_map = true; return this->_fe_map->get_detadx(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_detady()

const std::vector<Real>& libMesh::FEAbstract::get_detady ( ) const
inlineinherited
Returns
The deta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 340 of file fe_abstract.h.

341  { calculate_map = true; return this->_fe_map->get_detady(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_detadz()

const std::vector<Real>& libMesh::FEAbstract::get_detadz ( ) const
inlineinherited
Returns
The deta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 347 of file fe_abstract.h.

348  { calculate_map = true; return this->_fe_map->get_detadz(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dim()

unsigned int libMesh::FEAbstract::get_dim ( ) const
inlineinherited
Returns
the dimension of this FE

Definition at line 230 of file fe_abstract.h.

231  { return dim; }

References libMesh::FEAbstract::dim.

◆ get_div_phi()

template<typename OutputType>
const std::vector<std::vector<OutputDivergence> >& libMesh::FEGenericBase< OutputType >::get_div_phi ( ) const
inlineinherited
Returns
The divergence of the shape function at the quadrature points.

Definition at line 230 of file fe_base.h.

Referenced by libMesh::ExactSolution::_compute_error(), and libMesh::FEMContext::interior_div().

◆ get_dphase()

template<typename OutputType>
const std::vector<OutputGradient>& libMesh::FEGenericBase< OutputType >::get_dphase ( ) const
inlineinherited
Returns
The global first derivative of the phase term which is used in infinite elements, evaluated at the quadrature points.

In case of the general finite element class FE this field is initialized to all zero, so that the variational formulation for an infinite element produces correct element matrices for a mesh using both finite and infinite elements.

Definition at line 402 of file fe_base.h.

403  { return dphase; }

Referenced by assemble_SchroedingerEquation().

◆ get_dphi()

template<typename OutputType>
const std::vector<std::vector<OutputGradient> >& libMesh::FEGenericBase< OutputType >::get_dphi ( ) const
inlineinherited
Returns
The shape function derivatives at the quadrature points.

Definition at line 214 of file fe_base.h.

Referenced by libMesh::ExactSolution::_compute_error(), assemble_SchroedingerEquation(), assembly_with_dg_fem_context(), libMesh::KellyErrorEstimator::boundary_side_integration(), libMesh::System::calculate_norm(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), NavierSystem::element_constraint(), CoupledSystem::element_constraint(), NavierSystem::element_time_derivative(), SolidSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), LaplaceSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), CoupledSystem::element_time_derivative(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_point_gradient(), libMesh::OldSolutionBase< Output, point_output >::get_shape_outputs(), NavierSystem::init_context(), SolidSystem::init_context(), LaplaceSystem::init_context(), PoissonSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), libMesh::KellyErrorEstimator::init_context(), ElasticityRBConstruction::init_context(), libMesh::FEMContext::interior_gradients(), libMesh::KellyErrorEstimator::internal_side_integration(), libMesh::FEMContext::point_gradient(), RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), LaplaceSystem::side_qoi_derivative(), libMesh::FEMContext::some_gradient(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::SubFunctor(), and FETest< order, family, elem_type >::testGradU().

◆ get_dphideta()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphideta ( ) const
inlineinherited

◆ get_dphidx()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidx ( ) const
inlineinherited
Returns
The shape function x-derivative at the quadrature points.

Definition at line 238 of file fe_base.h.

Referenced by RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), and FETest< order, family, elem_type >::testGradUComp().

◆ get_dphidxi()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidxi ( ) const
inlineinherited

◆ get_dphidy()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidy ( ) const
inlineinherited
Returns
The shape function y-derivative at the quadrature points.

Definition at line 246 of file fe_base.h.

Referenced by RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), and FETest< order, family, elem_type >::testGradUComp().

◆ get_dphidz()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidz ( ) const
inlineinherited
Returns
The shape function z-derivative at the quadrature points.

Definition at line 254 of file fe_base.h.

Referenced by RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), and FETest< order, family, elem_type >::testGradUComp().

◆ get_dphidzeta()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidzeta ( ) const
inlineinherited

◆ get_dxidx()

const std::vector<Real>& libMesh::FEAbstract::get_dxidx ( ) const
inlineinherited
Returns
The dxi/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 312 of file fe_abstract.h.

313  { calculate_map = true; return this->_fe_map->get_dxidx(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dxidy()

const std::vector<Real>& libMesh::FEAbstract::get_dxidy ( ) const
inlineinherited
Returns
The dxi/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 319 of file fe_abstract.h.

320  { calculate_map = true; return this->_fe_map->get_dxidy(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dxidz()

const std::vector<Real>& libMesh::FEAbstract::get_dxidz ( ) const
inlineinherited
Returns
The dxi/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 326 of file fe_abstract.h.

327  { calculate_map = true; return this->_fe_map->get_dxidz(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dxyzdeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdeta ( ) const
inlineinherited
Returns
The element tangents in eta-direction at the quadrature points.

Definition at line 258 of file fe_abstract.h.

259  { calculate_map = true; return this->_fe_map->get_dxyzdeta(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dxyzdxi()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdxi ( ) const
inlineinherited
Returns
The element tangents in xi-direction at the quadrature points.

Definition at line 251 of file fe_abstract.h.

252  { calculate_map = true; return this->_fe_map->get_dxyzdxi(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dxyzdzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdzeta ( ) const
inlineinherited
Returns
The element tangents in zeta-direction at the quadrature points.

Definition at line 265 of file fe_abstract.h.

266  { return _fe_map->get_dxyzdzeta(); }

References libMesh::FEAbstract::_fe_map.

◆ get_dzetadx()

const std::vector<Real>& libMesh::FEAbstract::get_dzetadx ( ) const
inlineinherited
Returns
The dzeta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 354 of file fe_abstract.h.

355  { calculate_map = true; return this->_fe_map->get_dzetadx(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dzetady()

const std::vector<Real>& libMesh::FEAbstract::get_dzetady ( ) const
inlineinherited
Returns
The dzeta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 361 of file fe_abstract.h.

362  { calculate_map = true; return this->_fe_map->get_dzetady(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_dzetadz()

const std::vector<Real>& libMesh::FEAbstract::get_dzetadz ( ) const
inlineinherited
Returns
The dzeta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 368 of file fe_abstract.h.

369  { calculate_map = true; return this->_fe_map->get_dzetadz(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_family()

FEFamily libMesh::FEAbstract::get_family ( ) const
inlineinherited
Returns
The finite element family of this element.

Definition at line 453 of file fe_abstract.h.

453 { return fe_type.family; }

References libMesh::FEType::family, and libMesh::FEAbstract::fe_type.

◆ get_fe_map() [1/2]

FEMap& libMesh::FEAbstract::get_fe_map ( )
inlineinherited

Definition at line 459 of file fe_abstract.h.

459 { return *_fe_map.get(); }

References libMesh::FEAbstract::_fe_map.

◆ get_fe_map() [2/2]

const FEMap& libMesh::FEAbstract::get_fe_map ( ) const
inlineinherited

◆ get_fe_type()

FEType libMesh::FEAbstract::get_fe_type ( ) const
inlineinherited

◆ get_info()

std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

Definition at line 47 of file reference_counter.C.

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (const auto & pr : _counts)
59  {
60  const std::string name(pr.first);
61  const unsigned int creations = pr.second.first;
62  const unsigned int destructions = pr.second.second;
63 
64  oss << "| " << name << " reference count information:\n"
65  << "| Creations: " << creations << '\n'
66  << "| Destructions: " << destructions << '\n';
67  }
68 
69  oss << " ---------------------------------------------------------------------------- \n";
70 
71  return oss.str();
72 
73 #else
74 
75  return "";
76 
77 #endif
78 }

References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().

Referenced by libMesh::ReferenceCounter::print_info().

◆ get_JxW()

const std::vector<Real>& libMesh::FEAbstract::get_JxW ( ) const
inlineinherited
Returns
The element Jacobian times the quadrature weight for each quadrature point.

Definition at line 244 of file fe_abstract.h.

245  { calculate_map = true; return this->_fe_map->get_JxW(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

Referenced by libMesh::ExactSolution::_compute_error(), assemble_SchroedingerEquation(), assembly_with_dg_fem_context(), libMesh::DiscontinuityMeasure::boundary_side_integration(), libMesh::KellyErrorEstimator::boundary_side_integration(), libMesh::System::calculate_norm(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), NavierSystem::element_constraint(), CoupledSystem::element_constraint(), PoissonSystem::element_postprocess(), LaplaceSystem::element_postprocess(), LaplaceQoI::element_qoi(), LaplaceQoI::element_qoi_derivative(), LaplaceSystem::element_qoi_derivative(), HeatSystem::element_qoi_derivative(), NavierSystem::element_time_derivative(), SolidSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), LaplaceSystem::element_time_derivative(), CurlCurlSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), CoupledSystem::element_time_derivative(), libMesh::ExactErrorEstimator::find_squared_element_error(), LaplaceQoI::init_context(), NavierSystem::init_context(), SolidSystem::init_context(), PoissonSystem::init_context(), LaplaceSystem::init_context(), CurlCurlSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), ElasticityRBConstruction::init_context(), libMesh::FEMSystem::init_context(), libMesh::RBEIMConstruction::init_context_with_sys(), libMesh::LaplacianErrorEstimator::internal_side_integration(), libMesh::DiscontinuityMeasure::internal_side_integration(), libMesh::KellyErrorEstimator::internal_side_integration(), NavierSystem::mass_residual(), ElasticitySystem::mass_residual(), libMesh::FEMPhysics::mass_residual(), LaplaceSystem::side_constraint(), LaplaceSystem::side_postprocess(), CoupledSystemQoI::side_qoi(), CoupledSystemQoI::side_qoi_derivative(), LaplaceSystem::side_qoi_derivative(), SolidSystem::side_time_derivative(), CurlCurlSystem::side_time_derivative(), ElasticitySystem::side_time_derivative(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::SubFunctor(), and libMesh::RBEIMConstruction::truth_solve().

◆ get_normals()

const std::vector<Point>& libMesh::FEAbstract::get_normals ( ) const
inlineinherited

◆ get_order()

Order libMesh::FEAbstract::get_order ( ) const
inlineinherited
Returns
The approximation order of the finite element.

Definition at line 432 of file fe_abstract.h.

432 { return static_cast<Order>(fe_type.order + _p_level); }

References libMesh::FEAbstract::_p_level, libMesh::FEAbstract::fe_type, and libMesh::FEType::order.

◆ get_p_level()

unsigned int libMesh::FEAbstract::get_p_level ( ) const
inlineinherited
Returns
The p refinement level that the current shape functions have been calculated for.

Definition at line 422 of file fe_abstract.h.

422 { return _p_level; }

References libMesh::FEAbstract::_p_level.

◆ get_phi()

template<typename OutputType>
const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_phi ( ) const
inlineinherited
Returns
The shape function values at the quadrature points on the element.

Definition at line 206 of file fe_base.h.

208  calculate_phi = true; return phi; }

Referenced by libMesh::ExactSolution::_compute_error(), assemble_SchroedingerEquation(), assembly_with_dg_fem_context(), libMesh::DiscontinuityMeasure::boundary_side_integration(), libMesh::System::calculate_norm(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), NavierSystem::element_constraint(), CoupledSystem::element_constraint(), LaplaceQoI::element_qoi_derivative(), LaplaceSystem::element_qoi_derivative(), HeatSystem::element_qoi_derivative(), NavierSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), CurlCurlSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), CoupledSystem::element_time_derivative(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_point(), libMesh::RBEIMAssembly::evaluate_basis_function(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_point_value(), libMesh::OldSolutionBase< Output, point_output >::get_shape_outputs(), LaplaceQoI::init_context(), NavierSystem::init_context(), SolidSystem::init_context(), PoissonSystem::init_context(), LaplaceSystem::init_context(), CurlCurlSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), libMesh::DiscontinuityMeasure::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), ElasticityRBConstruction::init_context(), libMesh::FEMSystem::init_context(), libMesh::RBEIMConstruction::init_context_with_sys(), libMesh::FEMContext::interior_values(), libMesh::DiscontinuityMeasure::internal_side_integration(), NavierSystem::mass_residual(), ElasticitySystem::mass_residual(), libMesh::FEMPhysics::mass_residual(), libMesh::FEMContext::point_value(), RationalMapTest< elem_type >::setUp(), FETest< order, family, elem_type >::setUp(), LaplaceSystem::side_constraint(), CoupledSystemQoI::side_qoi_derivative(), SolidSystem::side_time_derivative(), CurlCurlSystem::side_time_derivative(), ElasticitySystem::side_time_derivative(), libMesh::FEMContext::side_values(), libMesh::FEMContext::some_value(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::SubFunctor(), SlitMeshRefinedSystemTest::testRestart(), SlitMeshRefinedSystemTest::testSystem(), FETest< order, family, elem_type >::testU(), and libMesh::RBEIMConstruction::truth_solve().

◆ get_refspace_nodes()

void libMesh::FEAbstract::get_refspace_nodes ( const ElemType  t,
std::vector< Point > &  nodes 
)
staticinherited
Returns
The reference space coordinates of nodes based on the element type.

Definition at line 308 of file fe_abstract.C.

309 {
310  switch(itemType)
311  {
312  case EDGE2:
313  {
314  nodes.resize(2);
315  nodes[0] = Point (-1.,0.,0.);
316  nodes[1] = Point (1.,0.,0.);
317  return;
318  }
319  case EDGE3:
320  {
321  nodes.resize(3);
322  nodes[0] = Point (-1.,0.,0.);
323  nodes[1] = Point (1.,0.,0.);
324  nodes[2] = Point (0.,0.,0.);
325  return;
326  }
327  case TRI3:
328  case TRISHELL3:
329  {
330  nodes.resize(3);
331  nodes[0] = Point (0.,0.,0.);
332  nodes[1] = Point (1.,0.,0.);
333  nodes[2] = Point (0.,1.,0.);
334  return;
335  }
336  case TRI6:
337  {
338  nodes.resize(6);
339  nodes[0] = Point (0.,0.,0.);
340  nodes[1] = Point (1.,0.,0.);
341  nodes[2] = Point (0.,1.,0.);
342  nodes[3] = Point (.5,0.,0.);
343  nodes[4] = Point (.5,.5,0.);
344  nodes[5] = Point (0.,.5,0.);
345  return;
346  }
347  case QUAD4:
348  case QUADSHELL4:
349  {
350  nodes.resize(4);
351  nodes[0] = Point (-1.,-1.,0.);
352  nodes[1] = Point (1.,-1.,0.);
353  nodes[2] = Point (1.,1.,0.);
354  nodes[3] = Point (-1.,1.,0.);
355  return;
356  }
357  case QUAD8:
358  case QUADSHELL8:
359  {
360  nodes.resize(8);
361  nodes[0] = Point (-1.,-1.,0.);
362  nodes[1] = Point (1.,-1.,0.);
363  nodes[2] = Point (1.,1.,0.);
364  nodes[3] = Point (-1.,1.,0.);
365  nodes[4] = Point (0.,-1.,0.);
366  nodes[5] = Point (1.,0.,0.);
367  nodes[6] = Point (0.,1.,0.);
368  nodes[7] = Point (-1.,0.,0.);
369  return;
370  }
371  case QUAD9:
372  {
373  nodes.resize(9);
374  nodes[0] = Point (-1.,-1.,0.);
375  nodes[1] = Point (1.,-1.,0.);
376  nodes[2] = Point (1.,1.,0.);
377  nodes[3] = Point (-1.,1.,0.);
378  nodes[4] = Point (0.,-1.,0.);
379  nodes[5] = Point (1.,0.,0.);
380  nodes[6] = Point (0.,1.,0.);
381  nodes[7] = Point (-1.,0.,0.);
382  nodes[8] = Point (0.,0.,0.);
383  return;
384  }
385  case TET4:
386  {
387  nodes.resize(4);
388  nodes[0] = Point (0.,0.,0.);
389  nodes[1] = Point (1.,0.,0.);
390  nodes[2] = Point (0.,1.,0.);
391  nodes[3] = Point (0.,0.,1.);
392  return;
393  }
394  case TET10:
395  {
396  nodes.resize(10);
397  nodes[0] = Point (0.,0.,0.);
398  nodes[1] = Point (1.,0.,0.);
399  nodes[2] = Point (0.,1.,0.);
400  nodes[3] = Point (0.,0.,1.);
401  nodes[4] = Point (.5,0.,0.);
402  nodes[5] = Point (.5,.5,0.);
403  nodes[6] = Point (0.,.5,0.);
404  nodes[7] = Point (0.,0.,.5);
405  nodes[8] = Point (.5,0.,.5);
406  nodes[9] = Point (0.,.5,.5);
407  return;
408  }
409  case HEX8:
410  {
411  nodes.resize(8);
412  nodes[0] = Point (-1.,-1.,-1.);
413  nodes[1] = Point (1.,-1.,-1.);
414  nodes[2] = Point (1.,1.,-1.);
415  nodes[3] = Point (-1.,1.,-1.);
416  nodes[4] = Point (-1.,-1.,1.);
417  nodes[5] = Point (1.,-1.,1.);
418  nodes[6] = Point (1.,1.,1.);
419  nodes[7] = Point (-1.,1.,1.);
420  return;
421  }
422  case HEX20:
423  {
424  nodes.resize(20);
425  nodes[0] = Point (-1.,-1.,-1.);
426  nodes[1] = Point (1.,-1.,-1.);
427  nodes[2] = Point (1.,1.,-1.);
428  nodes[3] = Point (-1.,1.,-1.);
429  nodes[4] = Point (-1.,-1.,1.);
430  nodes[5] = Point (1.,-1.,1.);
431  nodes[6] = Point (1.,1.,1.);
432  nodes[7] = Point (-1.,1.,1.);
433  nodes[8] = Point (0.,-1.,-1.);
434  nodes[9] = Point (1.,0.,-1.);
435  nodes[10] = Point (0.,1.,-1.);
436  nodes[11] = Point (-1.,0.,-1.);
437  nodes[12] = Point (-1.,-1.,0.);
438  nodes[13] = Point (1.,-1.,0.);
439  nodes[14] = Point (1.,1.,0.);
440  nodes[15] = Point (-1.,1.,0.);
441  nodes[16] = Point (0.,-1.,1.);
442  nodes[17] = Point (1.,0.,1.);
443  nodes[18] = Point (0.,1.,1.);
444  nodes[19] = Point (-1.,0.,1.);
445  return;
446  }
447  case HEX27:
448  {
449  nodes.resize(27);
450  nodes[0] = Point (-1.,-1.,-1.);
451  nodes[1] = Point (1.,-1.,-1.);
452  nodes[2] = Point (1.,1.,-1.);
453  nodes[3] = Point (-1.,1.,-1.);
454  nodes[4] = Point (-1.,-1.,1.);
455  nodes[5] = Point (1.,-1.,1.);
456  nodes[6] = Point (1.,1.,1.);
457  nodes[7] = Point (-1.,1.,1.);
458  nodes[8] = Point (0.,-1.,-1.);
459  nodes[9] = Point (1.,0.,-1.);
460  nodes[10] = Point (0.,1.,-1.);
461  nodes[11] = Point (-1.,0.,-1.);
462  nodes[12] = Point (-1.,-1.,0.);
463  nodes[13] = Point (1.,-1.,0.);
464  nodes[14] = Point (1.,1.,0.);
465  nodes[15] = Point (-1.,1.,0.);
466  nodes[16] = Point (0.,-1.,1.);
467  nodes[17] = Point (1.,0.,1.);
468  nodes[18] = Point (0.,1.,1.);
469  nodes[19] = Point (-1.,0.,1.);
470  nodes[20] = Point (0.,0.,-1.);
471  nodes[21] = Point (0.,-1.,0.);
472  nodes[22] = Point (1.,0.,0.);
473  nodes[23] = Point (0.,1.,0.);
474  nodes[24] = Point (-1.,0.,0.);
475  nodes[25] = Point (0.,0.,1.);
476  nodes[26] = Point (0.,0.,0.);
477  return;
478  }
479  case PRISM6:
480  {
481  nodes.resize(6);
482  nodes[0] = Point (0.,0.,-1.);
483  nodes[1] = Point (1.,0.,-1.);
484  nodes[2] = Point (0.,1.,-1.);
485  nodes[3] = Point (0.,0.,1.);
486  nodes[4] = Point (1.,0.,1.);
487  nodes[5] = Point (0.,1.,1.);
488  return;
489  }
490  case PRISM15:
491  {
492  nodes.resize(15);
493  nodes[0] = Point (0.,0.,-1.);
494  nodes[1] = Point (1.,0.,-1.);
495  nodes[2] = Point (0.,1.,-1.);
496  nodes[3] = Point (0.,0.,1.);
497  nodes[4] = Point (1.,0.,1.);
498  nodes[5] = Point (0.,1.,1.);
499  nodes[6] = Point (.5,0.,-1.);
500  nodes[7] = Point (.5,.5,-1.);
501  nodes[8] = Point (0.,.5,-1.);
502  nodes[9] = Point (0.,0.,0.);
503  nodes[10] = Point (1.,0.,0.);
504  nodes[11] = Point (0.,1.,0.);
505  nodes[12] = Point (.5,0.,1.);
506  nodes[13] = Point (.5,.5,1.);
507  nodes[14] = Point (0.,.5,1.);
508  return;
509  }
510  case PRISM18:
511  {
512  nodes.resize(18);
513  nodes[0] = Point (0.,0.,-1.);
514  nodes[1] = Point (1.,0.,-1.);
515  nodes[2] = Point (0.,1.,-1.);
516  nodes[3] = Point (0.,0.,1.);
517  nodes[4] = Point (1.,0.,1.);
518  nodes[5] = Point (0.,1.,1.);
519  nodes[6] = Point (.5,0.,-1.);
520  nodes[7] = Point (.5,.5,-1.);
521  nodes[8] = Point (0.,.5,-1.);
522  nodes[9] = Point (0.,0.,0.);
523  nodes[10] = Point (1.,0.,0.);
524  nodes[11] = Point (0.,1.,0.);
525  nodes[12] = Point (.5,0.,1.);
526  nodes[13] = Point (.5,.5,1.);
527  nodes[14] = Point (0.,.5,1.);
528  nodes[15] = Point (.5,0.,0.);
529  nodes[16] = Point (.5,.5,0.);
530  nodes[17] = Point (0.,.5,0.);
531  return;
532  }
533  case PYRAMID5:
534  {
535  nodes.resize(5);
536  nodes[0] = Point (-1.,-1.,0.);
537  nodes[1] = Point (1.,-1.,0.);
538  nodes[2] = Point (1.,1.,0.);
539  nodes[3] = Point (-1.,1.,0.);
540  nodes[4] = Point (0.,0.,1.);
541  return;
542  }
543  case PYRAMID13:
544  {
545  nodes.resize(13);
546 
547  // base corners
548  nodes[0] = Point (-1.,-1.,0.);
549  nodes[1] = Point (1.,-1.,0.);
550  nodes[2] = Point (1.,1.,0.);
551  nodes[3] = Point (-1.,1.,0.);
552 
553  // apex
554  nodes[4] = Point (0.,0.,1.);
555 
556  // base midedge
557  nodes[5] = Point (0.,-1.,0.);
558  nodes[6] = Point (1.,0.,0.);
559  nodes[7] = Point (0.,1.,0.);
560  nodes[8] = Point (-1,0.,0.);
561 
562  // lateral midedge
563  nodes[9] = Point (-.5,-.5,.5);
564  nodes[10] = Point (.5,-.5,.5);
565  nodes[11] = Point (.5,.5,.5);
566  nodes[12] = Point (-.5,.5,.5);
567 
568  return;
569  }
570  case PYRAMID14:
571  {
572  nodes.resize(14);
573 
574  // base corners
575  nodes[0] = Point (-1.,-1.,0.);
576  nodes[1] = Point (1.,-1.,0.);
577  nodes[2] = Point (1.,1.,0.);
578  nodes[3] = Point (-1.,1.,0.);
579 
580  // apex
581  nodes[4] = Point (0.,0.,1.);
582 
583  // base midedge
584  nodes[5] = Point (0.,-1.,0.);
585  nodes[6] = Point (1.,0.,0.);
586  nodes[7] = Point (0.,1.,0.);
587  nodes[8] = Point (-1,0.,0.);
588 
589  // lateral midedge
590  nodes[9] = Point (-.5,-.5,.5);
591  nodes[10] = Point (.5,-.5,.5);
592  nodes[11] = Point (.5,.5,.5);
593  nodes[12] = Point (-.5,.5,.5);
594 
595  // base center
596  nodes[13] = Point (0.,0.,0.);
597 
598  return;
599  }
600 
601  default:
602  libmesh_error_msg("ERROR: Unknown element type " << itemType);
603  }
604 }

References libMesh::EDGE2, libMesh::EDGE3, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::TRISHELL3.

◆ get_Sobolev_dweight()

template<typename OutputType>
const std::vector<RealGradient>& libMesh::FEGenericBase< OutputType >::get_Sobolev_dweight ( ) const
inlineinherited
Returns
The first global derivative of the multiplicative weight at each quadrature point. See get_Sobolev_weight() for details. In case of FE initialized to all zero.

Definition at line 426 of file fe_base.h.

427  { return dweight; }

Referenced by assemble_SchroedingerEquation().

◆ get_Sobolev_weight()

template<typename OutputType>
const std::vector<Real>& libMesh::FEGenericBase< OutputType >::get_Sobolev_weight ( ) const
inlineinherited
Returns
The multiplicative weight at each quadrature point. This weight is used for certain infinite element weak formulations, so that weighted Sobolev spaces are used for the trial function space. This renders the variational form easily computable.

In case of the general finite element class FE this field is initialized to all ones, so that the variational formulation for an infinite element produces correct element matrices for a mesh using both finite and infinite elements.

Definition at line 418 of file fe_base.h.

419  { return weight; }

Referenced by assemble_SchroedingerEquation().

◆ get_tangents()

const std::vector<std::vector<Point> >& libMesh::FEAbstract::get_tangents ( ) const
inlineinherited
Returns
The tangent vectors for face integration.

Definition at line 374 of file fe_abstract.h.

375  { calculate_map = true; return this->_fe_map->get_tangents(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

◆ get_type()

ElemType libMesh::FEAbstract::get_type ( ) const
inlineinherited
Returns
The element type that the current shape functions have been calculated for. Useful in determining when shape functions must be recomputed.

Definition at line 416 of file fe_abstract.h.

416 { return elem_type; }

References libMesh::FEAbstract::elem_type.

◆ get_xyz()

const std::vector<Point>& libMesh::FEAbstract::get_xyz ( ) const
inlineinherited
Returns
The xyz spatial locations of the quadrature points on the element.

Definition at line 237 of file fe_abstract.h.

238  { calculate_map = true; return this->_fe_map->get_xyz(); }

References libMesh::FEAbstract::_fe_map, and libMesh::FEAbstract::calculate_map.

Referenced by libMesh::ExactSolution::_compute_error(), assemble_SchroedingerEquation(), libMesh::DiscontinuityMeasure::boundary_side_integration(), libMesh::KellyErrorEstimator::boundary_side_integration(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), PoissonSystem::element_postprocess(), LaplaceSystem::element_postprocess(), LaplaceQoI::element_qoi(), LaplaceQoI::element_qoi_derivative(), LaplaceSystem::element_qoi_derivative(), NavierSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), CurlCurlSystem::element_time_derivative(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ParsedFEMFunction< T >::eval_args(), libMesh::ExactErrorEstimator::find_squared_element_error(), LaplaceQoI::init_context(), NavierSystem::init_context(), SolidSystem::init_context(), LaplaceSystem::init_context(), PoissonSystem::init_context(), CurlCurlSystem::init_context(), CoupledSystem::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), libMesh::RBEIMConstruction::init_context_with_sys(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), RationalMapTest< elem_type >::setUp(), LaplaceSystem::side_constraint(), LaplaceSystem::side_postprocess(), CoupledSystemQoI::side_qoi(), CoupledSystemQoI::side_qoi_derivative(), LaplaceSystem::side_qoi_derivative(), SolidSystem::side_time_derivative(), CurlCurlSystem::side_time_derivative(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubFunctor::SubFunctor(), SlitMeshRefinedSystemTest::testRestart(), SlitMeshRefinedSystemTest::testSystem(), and libMesh::RBEIMConstruction::truth_solve().

◆ increment_constructor_count()

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

◆ increment_destructor_count()

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

◆ init_base_shape_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual void libMesh::InfFE< Dim, T_radial, T_map >::init_base_shape_functions ( const std::vector< Point > &  ,
const Elem  
)
inlineoverrideprotectedvirtual

Do not use this derived member in InfFE<Dim,T_radial,T_map>.

Implements libMesh::FEGenericBase< OutputType >.

Definition at line 540 of file inf_fe.h.

542  { libmesh_not_implemented(); }

◆ init_face_shape_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_base>
void libMesh::InfFE< Dim, T_radial, T_base >::init_face_shape_functions ( const std::vector< Point > &  ,
const Elem inf_side 
)
protected

Initialize all the data fields like weight, phi, etc for the side s.

Definition at line 158 of file inf_fe_boundary.C.

160 {
161  libmesh_assert(inf_side);
162 
163  // Currently, this makes only sense in 3-D!
164  libmesh_assert_equal_to (Dim, 3);
165 
166  // Initialize the radial shape functions
167  this->init_radial_shape_functions(inf_side);
168 
169  // Initialize the base shape functions
170  if (inf_side->infinite())
171  this->update_base_elem(inf_side);
172  else
173  // in this case, I need the 2D base
174  this->update_base_elem(inf_side->parent());
175 
176  // Initialize the base quadrature rule
177  base_qrule->init(base_elem->type(), inf_side->p_level());
178 
179  // base_fe still corresponds to the (dim-1)-dimensional base of the InfFE object,
180  // so update the fe_base.
181  if (inf_side->infinite())
182  {
183  libmesh_assert_equal_to (Dim, 3);
184  base_fe = FEBase::build(Dim-2, this->fe_type);
185  base_fe->attach_quadrature_rule(base_qrule.get());
186  }
187  else
188  {
189  base_fe = FEBase::build(Dim-1, this->fe_type);
190  base_fe->attach_quadrature_rule(base_qrule.get());
191  }
192 
193  //before initializing, we should say what to compute:
194  base_fe->_fe_map->get_xyz();
195  base_fe->_fe_map->get_JxW();
196 
197  // initialize the shape functions on the base
198  base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
199  base_elem.get());
200 
201  // the number of quadrature points
202  const unsigned int n_radial_qp =
203  cast_int<unsigned int>(som.size());
204  const unsigned int n_base_qp = base_qrule->n_points();
205  const unsigned int n_total_qp = n_radial_qp * n_base_qp;
206 
207  // the quadrature weights
208  _total_qrule_weights.resize(n_total_qp);
209 
210  // now init the shapes for boundary work
211  {
212 
213  // The element type and order to use in the base map
214  const Order base_mapping_order ( base_elem->default_order() );
215 
216  // the number of mapping shape functions. For base side it is 1.
217  // (Lagrange shape functions are used for mapping in the base)
218  const unsigned int n_radial_mapping_sf =
219  inf_side->infinite() ? cast_int<unsigned int>(radial_map.size()) : 1;
220 
221  const unsigned int n_base_mapping_shape_functions =
222  InfFEBase::n_base_mapping_sf(*base_elem, base_mapping_order);
223 
224  const unsigned int n_total_mapping_shape_functions =
225  n_radial_mapping_sf * n_base_mapping_shape_functions;
226 
227 
228  // initialize the node and shape numbering maps
229  _radial_node_index.resize (n_total_mapping_shape_functions);
230  _base_node_index.resize (n_total_mapping_shape_functions);
231 
232  if (inf_side->infinite())
233  {
234  const ElemType inf_face_elem_type (inf_side->type());
235 
236  // fill the node index map
237  for (unsigned int n=0; n<n_total_mapping_shape_functions; n++)
238  {
239  compute_node_indices (inf_face_elem_type,
240  n,
241  _base_node_index[n],
242  _radial_node_index[n]);
243 
244  libmesh_assert_less (_base_node_index[n], n_base_mapping_shape_functions);
245  libmesh_assert_less (_radial_node_index[n], n_radial_mapping_sf);
246  }
247  }
248  else
249  {
250  for (unsigned int n=0; n<n_total_mapping_shape_functions; n++)
251  {
252  _base_node_index[n] = n;
253  _radial_node_index[n] = 0;
254  }
255  }
256 
257  // resize map data fields
258  std::vector<std::vector<Real>> & psi_map = this->_fe_map->get_psi();
259  std::vector<std::vector<Real>> & dpsidxi_map = this->_fe_map->get_dpsidxi();
260  std::vector<std::vector<Real>> & dpsideta_map = this->_fe_map->get_dpsideta();
261  psi_map.resize (n_total_mapping_shape_functions);
262  dpsidxi_map.resize (n_total_mapping_shape_functions);
263  dpsideta_map.resize (n_total_mapping_shape_functions);
264 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
265  std::vector<std::vector<Real>> & d2psidxi2_map = this->_fe_map->get_d2psidxi2();
266  std::vector<std::vector<Real>> & d2psidxideta_map = this->_fe_map->get_d2psidxideta();
267  std::vector<std::vector<Real>> & d2psideta2_map = this->_fe_map->get_d2psideta2();
268  d2psidxi2_map.resize (n_total_mapping_shape_functions);
269  d2psidxideta_map.resize (n_total_mapping_shape_functions);
270  d2psideta2_map.resize (n_total_mapping_shape_functions);
271 #endif
272 
273  for (unsigned int i=0; i<n_total_mapping_shape_functions; i++)
274  {
275  psi_map[i].resize (n_total_qp);
276  dpsidxi_map[i].resize (n_total_qp);
277  dpsideta_map[i].resize (n_total_qp);
278 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
279  d2psidxi2_map[i].resize (n_total_qp);
280  d2psidxideta_map[i].resize(n_total_qp);
281  d2psideta2_map[i].resize (n_total_qp);
282 #endif
283  }
284 
285  // compute shape maps
286  if (inf_side->infinite())
287  {
288  const std::vector<std::vector<Real>> & S_map = (base_fe->get_fe_map()).get_phi_map();
289  const std::vector<std::vector<Real>> & Ss_map = (base_fe->get_fe_map()).get_dphidxi_map();
290 
291  for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qps
292  for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qps
293  for (unsigned int ti=0; ti<n_total_mapping_shape_functions; ti++) // over all mapping shapes
294  {
295  // let the index vectors take care of selecting the appropriate base/radial mapping shape
296  const unsigned int bi = _base_node_index [ti];
297  const unsigned int ri = _radial_node_index[ti];
298  psi_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * radial_map [ri][rp];
299  dpsidxi_map [ti][bp+rp*n_base_qp] = Ss_map[bi][bp] * radial_map [ri][rp];
300  dpsideta_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * dradialdv_map[ri][rp];
301 
302  // second derivatives are not implemented for infinite elements
303 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
304  d2psidxi2_map [ti][bp+rp*n_base_qp] = 0.;
305  d2psidxideta_map [ti][bp+rp*n_base_qp] = 0.;
306  d2psideta2_map [ti][bp+rp*n_base_qp] = 0.;
307 #endif
308  }
309 
310  }
311  else
312  {
313  const std::vector<std::vector<Real>> & S_map = (base_fe->get_fe_map()).get_phi_map();
314  const std::vector<std::vector<Real>> & Ss_map = (base_fe->get_fe_map()).get_dphidxi_map();
315  const std::vector<std::vector<Real>> & St_map = (base_fe->get_fe_map()).get_dphideta_map();
316  for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qps
317  for (unsigned int ti=0; ti<n_total_mapping_shape_functions; ti++) // over all mapping shapes
318  {
319  psi_map [ti][bp] = S_map[ti][bp] ;
320  dpsidxi_map [ti][bp] = Ss_map[ti][bp] ;
321  dpsideta_map [ti][bp] = St_map[ti][bp] ;
322 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
323  d2psidxi2_map [ti][bp] = 0.;
324  d2psidxideta_map [ti][bp] = 0.;
325  d2psideta2_map [ti][bp] = 0.;
326 #endif
327  }
328  }
329  }
330 
331  // quadrature rule weights
332  {
333  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
334  const std::vector<Real> & base_qw = base_qrule->get_weights();
335 
336  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
337  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
338 
339  for (unsigned int rp=0; rp<n_radial_qp; rp++)
340  for (unsigned int bp=0; bp<n_base_qp; bp++)
341  {
342  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
343  }
344  }
345 
346 }

References libMesh::FEGenericBase< OutputType >::build(), libMesh::Elem::infinite(), libMesh::libmesh_assert(), libMesh::InfFEBase::n_base_mapping_sf(), libMesh::Elem::p_level(), libMesh::Elem::parent(), and libMesh::Elem::type().

◆ init_radial_shape_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions ( const Elem inf_elem,
const std::vector< Point > *  radial_pts = nullptr 
)
protected

Some of the member data only depend on the radial part of the infinite element.

The parts that only change when the radial order changes, are initialized here.

Definition at line 336 of file inf_fe.C.

338 {
339  libmesh_assert(radial_qrule.get() || radial_pts);
340  libmesh_assert(inf_elem);
341 
342  // Start logging the radial shape function initialization
343  LOG_SCOPE("init_radial_shape_functions()", "InfFE");
344 
345  // initialize most of the things related to mapping
346 
347  // The order to use in the radial map (currently independent of the element type)
348  const Order radial_mapping_order = InfFERadial::mapping_order();
349  const unsigned int n_radial_mapping_shape_functions =
350  InfFERadial::n_dofs(radial_mapping_order);
351 
352  // initialize most of the things related to physical approximation
353  const Order radial_approx_order = fe_type.radial_order;
354  const unsigned int n_radial_approx_shape_functions =
355  InfFERadial::n_dofs(radial_approx_order);
356 
357  const std::size_t n_radial_qp =
358  radial_pts ? radial_pts->size() : radial_qrule->n_points();
359  const std::vector<Point> & radial_qp =
360  radial_pts ? *radial_pts : radial_qrule->get_points();
361 
362  // resize the radial data fields
363 
364  // the radial polynomials (eval)
365  mode.resize (n_radial_approx_shape_functions);
366  dmodedv.resize (n_radial_approx_shape_functions);
367 
368  // the (1-v)/2 weight
369  som.resize (n_radial_qp);
370  dsomdv.resize (n_radial_qp);
371 
372  // the radial map
373  radial_map.resize (n_radial_mapping_shape_functions);
374  dradialdv_map.resize (n_radial_mapping_shape_functions);
375 
376 
377  for (unsigned int i=0; i<n_radial_mapping_shape_functions; i++)
378  {
379  radial_map[i].resize (n_radial_qp);
380  dradialdv_map[i].resize (n_radial_qp);
381  }
382 
383 
384  for (unsigned int i=0; i<n_radial_approx_shape_functions; i++)
385  {
386  mode[i].resize (n_radial_qp);
387  dmodedv[i].resize (n_radial_qp);
388  }
389 
390 
391  // compute scalar values at radial quadrature points
392  for (std::size_t p=0; p<n_radial_qp; p++)
393  {
394  som[p] = InfFERadial::decay (Dim, radial_qp[p](0));
395  dsomdv[p] = InfFERadial::decay_deriv (radial_qp[p](0));
396  }
397 
398 
399  // evaluate the mode shapes in radial direction at radial quadrature points
400  for (unsigned int i=0; i<n_radial_approx_shape_functions; i++)
401  for (std::size_t p=0; p<n_radial_qp; p++)
402  {
403  mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
404  dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
405  }
406 
407 
408  // evaluate the mapping functions in radial direction at radial quadrature points
409  for (unsigned int i=0; i<n_radial_mapping_shape_functions; i++)
410  for (std::size_t p=0; p<n_radial_qp; p++)
411  {
412  radial_map[i][p] = InfFEMap::eval (radial_qp[p](0), radial_mapping_order, i);
413  dradialdv_map[i][p] = InfFEMap::eval_deriv (radial_qp[p](0), radial_mapping_order, i);
414  }
415 }

References libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::InfFEMap::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFEMap::eval_deriv(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::libmesh_assert(), libMesh::InfFERadial::mapping_order(), and libMesh::InfFERadial::n_dofs().

◆ init_shape_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::init_shape_functions ( const std::vector< Point > &  radial_qp,
const std::vector< Point > &  base_qp,
const Elem inf_elem 
)
protected

Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta, etc.

for the current element. This method prepares the data related to the base part, and some of the combined fields.

Definition at line 422 of file inf_fe.C.

425 {
426  libmesh_assert(inf_elem);
427 
428  // Start logging the radial shape function initialization
429  LOG_SCOPE("init_shape_functions()", "InfFE");
430 
431  // fast access to some const ints for the radial data
432  const unsigned int n_radial_mapping_sf = cast_int<unsigned int>(radial_map.size());
433  const unsigned int n_radial_approx_sf = cast_int<unsigned int>(mode.size());
434  const unsigned int n_radial_qp = cast_int<unsigned int>(som.size());
435 
436 
437  // initialize most of the things related to mapping
438 
439  // The element type and order to use in the base map
440  const Order base_mapping_order = base_elem->default_order();
441 
442  // the number of base shape functions used to construct the map
443  // (Lagrange shape functions are used for mapping in the base)
444  unsigned int n_base_mapping_shape_functions =
446  base_mapping_order);
447 
448  const unsigned int n_total_mapping_shape_functions =
449  n_radial_mapping_sf * n_base_mapping_shape_functions;
450 
451  // initialize most of the things related to physical approximation
452  unsigned int n_base_approx_shape_functions;
453  if (Dim > 1)
454  n_base_approx_shape_functions = base_fe->n_shape_functions();
455  else
456  n_base_approx_shape_functions = 1;
457 
458 
459  const unsigned int n_total_approx_shape_functions =
460  n_radial_approx_sf * n_base_approx_shape_functions;
461 
462  // update class member field
463  _n_total_approx_sf = n_total_approx_shape_functions;
464 
465 
466  // The number of the base quadrature points.
467  const unsigned int n_base_qp = cast_int<unsigned int>(base_qp.size());
468 
469  // The total number of quadrature points.
470  const unsigned int n_total_qp = n_radial_qp * n_base_qp;
471 
472 
473  // update class member field
474  _n_total_qp = n_total_qp;
475 
476 
477 
478  // initialize the node and shape numbering maps
479  {
480  // these vectors work as follows: the i-th entry stores
481  // the associated base/radial node number
482  _radial_node_index.resize(n_total_mapping_shape_functions);
483  _base_node_index.resize(n_total_mapping_shape_functions);
484 
485  // similar for the shapes: the i-th entry stores
486  // the associated base/radial shape number
487  _radial_shape_index.resize(n_total_approx_shape_functions);
488  _base_shape_index.resize(n_total_approx_shape_functions);
489 
490  const ElemType inf_elem_type = inf_elem->type();
491 
492  // fill the node index map
493  for (unsigned int n=0; n<n_total_mapping_shape_functions; n++)
494  {
495  compute_node_indices (inf_elem_type,
496  n,
497  _base_node_index[n],
498  _radial_node_index[n]);
499  libmesh_assert_less (_base_node_index[n], n_base_mapping_shape_functions);
500  libmesh_assert_less (_radial_node_index[n], n_radial_mapping_sf);
501  }
502 
503  // fill the shape index map
504  for (unsigned int n=0; n<n_total_approx_shape_functions; n++)
505  {
507  inf_elem_type,
508  n,
511  libmesh_assert_less (_base_shape_index[n], n_base_approx_shape_functions);
512  libmesh_assert_less (_radial_shape_index[n], n_radial_approx_sf);
513  }
514  }
515 
516  // resize the base data fields
517  dist.resize(n_base_mapping_shape_functions);
518 
519  // resize the total data fields
520 
521  // the phase term varies with xi, eta and zeta(v): store it for _all_ qp
522  //
523  // when computing the phase, we need the base approximations
524  // therefore, initialize the phase here, but evaluate it
525  // in combine_base_radial().
526  //
527  // the weight, though, is only needed at the radial quadrature points, n_radial_qp.
528  // but for a uniform interface to the protected data fields
529  // the weight data field (which are accessible from the outside) are expanded to n_total_qp.
530  weight.resize (n_total_qp);
531  dweightdv.resize (n_total_qp);
532  dweight.resize (n_total_qp);
533 
534  dphase.resize (n_total_qp);
535  dphasedxi.resize (n_total_qp);
536  dphasedeta.resize (n_total_qp);
537  dphasedzeta.resize (n_total_qp);
538 
539  // this vector contains the integration weights for the combined quadrature rule
540  _total_qrule_weights.resize(n_total_qp);
541 
542  // InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
543  // shape and mapping functions, respectively
544  {
545  phi.resize (n_total_approx_shape_functions);
546  dphi.resize (n_total_approx_shape_functions);
547  dphidx.resize (n_total_approx_shape_functions);
548  dphidy.resize (n_total_approx_shape_functions);
549  dphidz.resize (n_total_approx_shape_functions);
550  dphidxi.resize (n_total_approx_shape_functions);
551 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
552  libmesh_warning("Warning: Second derivatives for Infinite elements"
553  << " are not yet implemented!"
554  << std::endl);
555 
556  d2phi.resize (n_total_approx_shape_functions);
557  d2phidx2.resize (n_total_approx_shape_functions);
558  d2phidxdy.resize (n_total_approx_shape_functions);
559  d2phidxdz.resize (n_total_approx_shape_functions);
560  d2phidy2.resize (n_total_approx_shape_functions);
561  d2phidydz.resize (n_total_approx_shape_functions);
562  d2phidz2.resize (n_total_approx_shape_functions);
563  d2phidxi2.resize (n_total_approx_shape_functions);
564 
565  if (Dim > 1)
566  {
567  d2phidxideta.resize(n_total_approx_shape_functions);
568  d2phideta2.resize(n_total_approx_shape_functions);
569  }
570 
571  if (Dim > 2)
572  {
573  d2phidetadzeta.resize(n_total_approx_shape_functions);
574  d2phidxidzeta.resize(n_total_approx_shape_functions);
575  d2phidzeta2.resize(n_total_approx_shape_functions);
576  }
577 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
578 
579  if (Dim > 1)
580  dphideta.resize(n_total_approx_shape_functions);
581 
582  if (Dim == 3)
583  dphidzeta.resize(n_total_approx_shape_functions);
584 
585  std::vector<std::vector<Real>> & phi_map = this->_fe_map->get_phi_map();
586  std::vector<std::vector<Real>> & dphidxi_map = this->_fe_map->get_dphidxi_map();
587 
588  phi_map.resize(n_total_mapping_shape_functions);
589  dphidxi_map.resize(n_total_mapping_shape_functions);
590 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
591  std::vector<std::vector<Real>> & d2phidxi2_map = this->_fe_map->get_d2phidxi2_map();
592  d2phidxi2_map.resize(n_total_mapping_shape_functions);
593 
594  if (Dim > 1)
595  {
596  std::vector<std::vector<Real>> & d2phidxideta_map = this->_fe_map->get_d2phidxideta_map();
597  std::vector<std::vector<Real>> & d2phideta2_map = this->_fe_map->get_d2phideta2_map();
598  d2phidxideta_map.resize(n_total_mapping_shape_functions);
599  d2phideta2_map.resize(n_total_mapping_shape_functions);
600  }
601 
602  if (Dim == 3)
603  {
604  std::vector<std::vector<Real>> & d2phidxidzeta_map = this->_fe_map->get_d2phidxidzeta_map();
605  std::vector<std::vector<Real>> & d2phidetadzeta_map = this->_fe_map->get_d2phidetadzeta_map();
606  std::vector<std::vector<Real>> & d2phidzeta2_map = this->_fe_map->get_d2phidzeta2_map();
607  d2phidxidzeta_map.resize(n_total_mapping_shape_functions);
608  d2phidetadzeta_map.resize(n_total_mapping_shape_functions);
609  d2phidzeta2_map.resize(n_total_mapping_shape_functions);
610  }
611 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
612 
613  if (Dim > 1)
614  {
615  std::vector<std::vector<Real>> & dphideta_map = this->_fe_map->get_dphideta_map();
616  dphideta_map.resize(n_total_mapping_shape_functions);
617  }
618 
619  if (Dim == 3)
620  {
621  std::vector<std::vector<Real>> & dphidzeta_map = this->_fe_map->get_dphidzeta_map();
622  dphidzeta_map.resize(n_total_mapping_shape_functions);
623  }
624  }
625 
626  // collect all the for loops, where inner vectors are
627  // resized to the appropriate number of quadrature points
628  {
629  for (unsigned int i=0; i<n_total_approx_shape_functions; i++)
630  {
631  phi[i].resize (n_total_qp);
632  dphi[i].resize (n_total_qp);
633  dphidx[i].resize (n_total_qp);
634  dphidy[i].resize (n_total_qp);
635  dphidz[i].resize (n_total_qp);
636  dphidxi[i].resize (n_total_qp);
637 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
638  d2phi[i].resize (n_total_qp);
639  d2phidx2[i].resize (n_total_qp);
640  d2phidxdy[i].resize (n_total_qp);
641  d2phidxdz[i].resize (n_total_qp);
642  d2phidy2[i].resize (n_total_qp);
643  d2phidydz[i].resize (n_total_qp);
644  d2phidy2[i].resize (n_total_qp);
645  d2phidxi2[i].resize (n_total_qp);
646 
647  if (Dim > 1)
648  {
649  d2phidxideta[i].resize (n_total_qp);
650  d2phideta2[i].resize (n_total_qp);
651  }
652  if (Dim > 2)
653  {
654  d2phidxidzeta[i].resize (n_total_qp);
655  d2phidetadzeta[i].resize (n_total_qp);
656  d2phidzeta2[i].resize (n_total_qp);
657  }
658 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
659 
660  if (Dim > 1)
661  dphideta[i].resize (n_total_qp);
662 
663  if (Dim == 3)
664  dphidzeta[i].resize (n_total_qp);
665 
666  }
667 
668  for (unsigned int i=0; i<n_total_mapping_shape_functions; i++)
669  {
670  std::vector<std::vector<Real>> & phi_map = this->_fe_map->get_phi_map();
671  std::vector<std::vector<Real>> & dphidxi_map = this->_fe_map->get_dphidxi_map();
672  phi_map[i].resize (n_total_qp);
673  dphidxi_map[i].resize (n_total_qp);
674 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
675  std::vector<std::vector<Real>> & d2phidxi2_map = this->_fe_map->get_d2phidxi2_map();
676  d2phidxi2_map[i].resize (n_total_qp);
677  if (Dim > 1)
678  {
679  std::vector<std::vector<Real>> & d2phidxideta_map = this->_fe_map->get_d2phidxideta_map();
680  std::vector<std::vector<Real>> & d2phideta2_map = this->_fe_map->get_d2phideta2_map();
681  d2phidxideta_map[i].resize (n_total_qp);
682  d2phideta2_map[i].resize (n_total_qp);
683  }
684 
685  if (Dim > 2)
686  {
687  std::vector<std::vector<Real>> & d2phidxidzeta_map = this->_fe_map->get_d2phidxidzeta_map();
688  std::vector<std::vector<Real>> & d2phidetadzeta_map = this->_fe_map->get_d2phidetadzeta_map();
689  std::vector<std::vector<Real>> & d2phidzeta2_map = this->_fe_map->get_d2phidzeta2_map();
690  d2phidxidzeta_map[i].resize (n_total_qp);
691  d2phidetadzeta_map[i].resize (n_total_qp);
692  d2phidzeta2_map[i].resize (n_total_qp);
693  }
694 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
695 
696  if (Dim > 1)
697  {
698  std::vector<std::vector<Real>> & dphideta_map = this->_fe_map->get_dphideta_map();
699  dphideta_map[i].resize (n_total_qp);
700  }
701 
702  if (Dim == 3)
703  {
704  std::vector<std::vector<Real>> & dphidzeta_map = this->_fe_map->get_dphidzeta_map();
705  dphidzeta_map[i].resize (n_total_qp);
706  }
707  }
708  }
709 
710 
711 
712  {
713  // (a) compute scalar values at _all_ quadrature points -- for uniform
714  // access from the outside to these fields
715  // (b) form a std::vector<Real> which contains the appropriate weights
716  // of the combined quadrature rule!
717  libmesh_assert_equal_to (radial_qp.size(), n_radial_qp);
718 
719  if (radial_qrule && base_qrule)
720  {
721  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
722  const std::vector<Real> & base_qw = base_qrule->get_weights();
723  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
724  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
725 
726  for (unsigned int rp=0; rp<n_radial_qp; rp++)
727  for (unsigned int bp=0; bp<n_base_qp; bp++)
728  {
729  weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
730  dweightdv[bp + rp*n_base_qp] = InfFERadial::D_deriv(radial_qp[rp](0));
731  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
732  }
733  }
734  else
735  {
736  for (unsigned int rp=0; rp<n_radial_qp; rp++)
737  for (unsigned int bp=0; bp<n_base_qp; bp++)
738  {
739  weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
740  dweightdv[bp + rp*n_base_qp] = InfFERadial::D_deriv(radial_qp[rp](0));
741  }
742  }
743  }
744 }

References libMesh::InfFERadial::D(), libMesh::InfFERadial::D_deriv(), libMesh::libmesh_assert(), libMesh::InfFEBase::n_base_mapping_sf(), libMesh::Elem::type(), and libMesh::MeshTools::weight().

◆ inverse_map() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static Point libMesh::InfFE< Dim, T_radial, T_map >::inverse_map ( const Elem elem,
const Point p,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
inlinestatic

Definition at line 397 of file inf_fe.h.

400  {
401  // libmesh_deprecated(); // soon
402  return InfFEMap::inverse_map(Dim, elem, p, tolerance, secure);
403  }

References libMesh::InfFEMap::inverse_map().

Referenced by libMesh::FEInterface::ifem_inverse_map().

◆ inverse_map() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static void libMesh::InfFE< Dim, T_radial, T_map >::inverse_map ( const Elem elem,
const std::vector< Point > &  physical_points,
std::vector< Point > &  reference_points,
const Real  tolerance = TOLERANCE,
const bool  secure = true 
)
inlinestatic

Definition at line 406 of file inf_fe.h.

410  {
411  // libmesh_deprecated(); // soon
412  return InfFEMap::inverse_map(Dim, elem, physical_points,
413  reference_points, tolerance, secure);
414  }

References libMesh::InfFEMap::inverse_map().

◆ is_hierarchic()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual bool libMesh::InfFE< Dim, T_radial, T_map >::is_hierarchic ( ) const
inlineoverridevirtual
Returns
true if the element's higher order shape functions are hierarchic

Implements libMesh::FEAbstract.

Definition at line 374 of file inf_fe.h.

375  { return false; } // FIXME - Inf FEs don't handle p elevation yet

◆ map()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static Point libMesh::InfFE< Dim, T_radial, T_map >::map ( const Elem inf_elem,
const Point reference_point 
)
inlinestatic

Definition at line 390 of file inf_fe.h.

391  {
392  // libmesh_deprecated(); // soon
393  return InfFEMap::map(Dim, inf_elem, reference_point);
394  }

References libMesh::InfFEMap::map().

Referenced by libMesh::FEInterface::ifem_map().

◆ n_dofs()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs ( const FEType fet,
const ElemType  inf_elem_type 
)
static
Returns
The number of shape functions associated with this infinite element. Currently, we have o_radial+1 modes in radial direction, and in the base.

Definition at line 58 of file inf_fe_static.C.

60 {
61  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
62 
63  if (Dim > 1)
64  return FEInterface::n_dofs(Dim-1, fet, base_et) *
65  InfFERadial::n_dofs(fet.radial_order);
66  else
67  return InfFERadial::n_dofs(fet.radial_order);
68 }

References libMesh::InfFEBase::get_elem_type(), libMesh::FEInterface::n_dofs(), libMesh::InfFERadial::n_dofs(), and libMesh::FEType::radial_order.

Referenced by libMesh::FEInterface::ifem_n_dofs(), and libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions().

◆ n_dofs_at_node()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node ( const FEType fet,
const ElemType  inf_elem_type,
const unsigned int  n 
)
static
Returns
The number of dofs at infinite element node n (not dof!) for an element of type t and order o.

Definition at line 76 of file inf_fe_static.C.

79 {
80  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
81 
82  unsigned int n_base, n_radial;
83  compute_node_indices(inf_elem_type, n, n_base, n_radial);
84 
85  // libMesh::out << "elem_type=" << inf_elem_type
86  // << ", fet.radial_order=" << fet.radial_order
87  // << ", n=" << n
88  // << ", n_radial=" << n_radial
89  // << ", n_base=" << n_base
90  // << std::endl;
91 
92  if (Dim > 1)
93  return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
94  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
95  else
96  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
97 }

References libMesh::InfFEBase::get_elem_type(), libMesh::FEInterface::n_dofs_at_node(), libMesh::InfFERadial::n_dofs_at_node(), and libMesh::FEType::radial_order.

Referenced by libMesh::FEInterface::ifem_n_dofs_at_node().

◆ n_dofs_per_elem()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem ( const FEType fet,
const ElemType  inf_elem_type 
)
static
Returns
The number of dofs interior to the element, not associated with any interior nodes.

Definition at line 105 of file inf_fe_static.C.

107 {
108  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
109 
110  if (Dim > 1)
111  return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
112  * InfFERadial::n_dofs_per_elem(fet.radial_order);
113  else
114  return InfFERadial::n_dofs_per_elem(fet.radial_order);
115 }

References libMesh::InfFEBase::get_elem_type(), libMesh::InfFERadial::n_dofs_per_elem(), libMesh::FEInterface::n_dofs_per_elem(), and libMesh::FEType::radial_order.

Referenced by libMesh::FEInterface::ifem_n_dofs_per_elem().

◆ n_objects()

static unsigned int libMesh::ReferenceCounter::n_objects ( )
inlinestaticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

84  { return _n_objects; }

References libMesh::ReferenceCounter::_n_objects.

◆ n_quadrature_points()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points ( ) const
inlineoverridevirtual
Returns
The total number of quadrature points. Call this to get an upper bound for the for loop in your simulation for matrix assembly of the current element.

Implements libMesh::FEAbstract.

Definition at line 490 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::_n_total_qp, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::radial_qrule.

◆ n_shape_functions() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions ( ) const
inlineoverridevirtual
Returns
The number of shape functions associated with this infinite element.

Implements libMesh::FEAbstract.

Definition at line 482 of file inf_fe.h.

483  { return _n_total_approx_sf; }

References libMesh::InfFE< Dim, T_radial, T_map >::_n_total_approx_sf.

Referenced by libMesh::FEInterface::ifem_n_shape_functions().

◆ n_shape_functions() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions ( const FEType fet,
const ElemType  t 
)
inlinestatic
Returns
The number of shape functions associated with a finite element of type t and approximation order o.

Definition at line 336 of file inf_fe.h.

338  { return n_dofs(fet, t); }

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

◆ nodal_soln()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::nodal_soln ( const FEType fet,
const Elem elem,
const std::vector< Number > &  elem_soln,
std::vector< Number > &  nodal_soln 
)
static

Usually, this method would build the nodal soln from the element soln.

But infinite elements require additional simulation-specific data to compute physically correct results. Use compute_data() to compute results. For compatibility an empty vector is returned.

Definition at line 123 of file inf_fe_static.C.

127 {
128 #ifdef DEBUG
130  {
131  libMesh::err << "WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
132  << " Will return an empty nodal solution. Use " << std::endl
133  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
134  _warned_for_nodal_soln = true;
135  }
136 #endif
137 
138  /*
139  * In the base the infinite element couples to
140  * conventional finite elements. To not destroy
141  * the values there, clear \p nodal_soln. This
142  * indicates to the user of \p nodal_soln to
143  * not use this result.
144  */
145  nodal_soln.clear();
146  libmesh_assert (nodal_soln.empty());
147  return;
148 }

References libMesh::err, and libMesh::libmesh_assert().

Referenced by libMesh::FEInterface::ifem_nodal_soln().

◆ on_reference_element()

bool libMesh::FEAbstract::on_reference_element ( const Point p,
const ElemType  t,
const Real  eps = TOLERANCE 
)
staticinherited
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 here the parameter eps can be specified to indicate a tolerance. For example, \( x \le 1 \) becomes \( x \le 1 + \epsilon \).

Definition at line 606 of file fe_abstract.C.

607 {
608  libmesh_assert_greater_equal (eps, 0.);
609 
610  const Real xi = p(0);
611 #if LIBMESH_DIM > 1
612  const Real eta = p(1);
613 #else
614  const Real eta = 0.;
615 #endif
616 #if LIBMESH_DIM > 2
617  const Real zeta = p(2);
618 #else
619  const Real zeta = 0.;
620 #endif
621 
622  switch (t)
623  {
624  case NODEELEM:
625  {
626  return (!xi && !eta && !zeta);
627  }
628  case EDGE2:
629  case EDGE3:
630  case EDGE4:
631  {
632  // The reference 1D element is [-1,1].
633  if ((xi >= -1.-eps) &&
634  (xi <= 1.+eps))
635  return true;
636 
637  return false;
638  }
639 
640 
641  case TRI3:
642  case TRISHELL3:
643  case TRI6:
644  {
645  // The reference triangle is isosceles
646  // and is bound by xi=0, eta=0, and xi+eta=1.
647  if ((xi >= 0.-eps) &&
648  (eta >= 0.-eps) &&
649  ((xi + eta) <= 1.+eps))
650  return true;
651 
652  return false;
653  }
654 
655 
656  case QUAD4:
657  case QUADSHELL4:
658  case QUAD8:
659  case QUADSHELL8:
660  case QUAD9:
661  {
662  // The reference quadrilateral element is [-1,1]^2.
663  if ((xi >= -1.-eps) &&
664  (xi <= 1.+eps) &&
665  (eta >= -1.-eps) &&
666  (eta <= 1.+eps))
667  return true;
668 
669  return false;
670  }
671 
672 
673  case TET4:
674  case TET10:
675  {
676  // The reference tetrahedral is isosceles
677  // and is bound by xi=0, eta=0, zeta=0,
678  // and xi+eta+zeta=1.
679  if ((xi >= 0.-eps) &&
680  (eta >= 0.-eps) &&
681  (zeta >= 0.-eps) &&
682  ((xi + eta + zeta) <= 1.+eps))
683  return true;
684 
685  return false;
686  }
687 
688 
689  case HEX8:
690  case HEX20:
691  case HEX27:
692  {
693  /*
694  if ((xi >= -1.) &&
695  (xi <= 1.) &&
696  (eta >= -1.) &&
697  (eta <= 1.) &&
698  (zeta >= -1.) &&
699  (zeta <= 1.))
700  return true;
701  */
702 
703  // The reference hexahedral element is [-1,1]^3.
704  if ((xi >= -1.-eps) &&
705  (xi <= 1.+eps) &&
706  (eta >= -1.-eps) &&
707  (eta <= 1.+eps) &&
708  (zeta >= -1.-eps) &&
709  (zeta <= 1.+eps))
710  {
711  // libMesh::out << "Strange Point:\n";
712  // p.print();
713  return true;
714  }
715 
716  return false;
717  }
718 
719  case PRISM6:
720  case PRISM15:
721  case PRISM18:
722  {
723  // Figure this one out...
724  // inside the reference triangle with zeta in [-1,1]
725  if ((xi >= 0.-eps) &&
726  (eta >= 0.-eps) &&
727  (zeta >= -1.-eps) &&
728  (zeta <= 1.+eps) &&
729  ((xi + eta) <= 1.+eps))
730  return true;
731 
732  return false;
733  }
734 
735 
736  case PYRAMID5:
737  case PYRAMID13:
738  case PYRAMID14:
739  {
740  // Check that the point is on the same side of all the faces
741  // by testing whether:
742  //
743  // n_i.(x - x_i) <= 0
744  //
745  // for each i, where:
746  // n_i is the outward normal of face i,
747  // x_i is a point on face i.
748  if ((-eta - 1. + zeta <= 0.+eps) &&
749  ( xi - 1. + zeta <= 0.+eps) &&
750  ( eta - 1. + zeta <= 0.+eps) &&
751  ( -xi - 1. + zeta <= 0.+eps) &&
752  ( zeta >= 0.-eps))
753  return true;
754 
755  return false;
756  }
757 
758 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
759  case INFHEX8:
760  case INFHEX16:
761  case INFHEX18:
762  {
763  // The reference infhex8 is a [-1,1]^3.
764  if ((xi >= -1.-eps) &&
765  (xi <= 1.+eps) &&
766  (eta >= -1.-eps) &&
767  (eta <= 1.+eps) &&
768  (zeta >= -1.-eps) &&
769  (zeta <= 1.+eps))
770  {
771  return true;
772  }
773  return false;
774  }
775 
776  case INFPRISM6:
777  case INFPRISM12:
778  {
779  // inside the reference triangle with zeta in [-1,1]
780  if ((xi >= 0.-eps) &&
781  (eta >= 0.-eps) &&
782  (zeta >= -1.-eps) &&
783  (zeta <= 1.+eps) &&
784  ((xi + eta) <= 1.+eps))
785  {
786  return true;
787  }
788 
789  return false;
790  }
791 #endif
792 
793  default:
794  libmesh_error_msg("ERROR: Unknown element type " << t);
795  }
796 
797  // If we get here then the point is _not_ in the
798  // reference element. Better return false.
799 
800  return false;
801 }

References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::NODEELEM, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::Real, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::TRISHELL3.

Referenced by libMesh::FEInterface::ifem_on_reference_element(), libMesh::FEMap::inverse_map(), and libMesh::FEInterface::on_reference_element().

◆ print_d2phi()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::print_d2phi ( std::ostream &  os) const
virtualinherited

Prints the value of each shape function's second derivatives at each quadrature point.

Implements libMesh::FEAbstract.

Definition at line 807 of file fe_base.C.

808 {
809  for (auto i : index_range(dphi))
810  for (auto j : index_range(dphi[i]))
811  os << " d2phi[" << i << "][" << j << "]=" << d2phi[i][j];
812 }

◆ print_dphi()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::print_dphi ( std::ostream &  os) const
virtualinherited

Prints the value of each shape function's derivative at each quadrature point.

Implements libMesh::FEAbstract.

Definition at line 746 of file fe_base.C.

747 {
748  for (auto i : index_range(dphi))
749  for (auto j : index_range(dphi[i]))
750  os << " dphi[" << i << "][" << j << "]=" << dphi[i][j];
751 }

◆ print_info() [1/2]

void libMesh::FEAbstract::print_info ( std::ostream &  os) const
inherited

Prints all the relevant information about the current element.

Definition at line 818 of file fe_abstract.C.

819 {
820  os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
821  this->print_phi(os);
822 
823  os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
824  this->print_dphi(os);
825 
826  os << "XYZ locations of the quadrature pts." << std::endl;
827  this->print_xyz(os);
828 
829  os << "Values of JxW at the quadrature pts." << std::endl;
830  this->print_JxW(os);
831 }

References libMesh::FEAbstract::print_dphi(), libMesh::FEAbstract::print_JxW(), libMesh::FEAbstract::print_phi(), and libMesh::FEAbstract::print_xyz().

Referenced by libMesh::operator<<().

◆ print_info() [2/2]

void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

Definition at line 87 of file reference_counter.C.

88 {
90  out_stream << ReferenceCounter::get_info();
91 }

References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().

◆ print_JxW()

void libMesh::FEAbstract::print_JxW ( std::ostream &  os) const
inherited

Prints the Jacobian times the weight for each quadrature point.

Definition at line 805 of file fe_abstract.C.

806 {
807  this->_fe_map->print_JxW(os);
808 }

References libMesh::FEAbstract::_fe_map.

Referenced by libMesh::FEAbstract::print_info().

◆ print_phi()

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::print_phi ( std::ostream &  os) const
virtualinherited

Prints the value of each shape function at each quadrature point.

Implements libMesh::FEAbstract.

Definition at line 735 of file fe_base.C.

736 {
737  for (auto i : index_range(phi))
738  for (auto j : index_range(phi[i]))
739  os << " phi[" << i << "][" << j << "]=" << phi[i][j] << std::endl;
740 }

◆ print_xyz()

void libMesh::FEAbstract::print_xyz ( std::ostream &  os) const
inherited

Prints the spatial location of each quadrature point (on the physical element).

Definition at line 812 of file fe_abstract.C.

813 {
814  this->_fe_map->print_xyz(os);
815 }

References libMesh::FEAbstract::_fe_map.

Referenced by libMesh::FEAbstract::print_info().

◆ reinit() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::reinit ( const Elem elem,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

This is at the core of this class.

Use this for each new element in the mesh. Reinitializes all the physical element-dependent data based on the current element elem.

Note
: pts need to be in reference space coordinates, not physical ones.

Implements libMesh::FEAbstract.

Definition at line 112 of file inf_fe.C.

115 {
116  libmesh_assert(base_fe.get());
117  libmesh_assert(inf_elem);
118 
119  // I don't understand infinite elements well enough to risk
120  // calculating too little. :-( RHS
121  this->calculate_phi = this->calculate_dphi = this->calculate_dphiref = true;
122  this->get_xyz();
123  this->determine_calculations();
124  base_fe->calculate_phi = base_fe->calculate_dphi = base_fe->calculate_dphiref = true;
125  base_fe->get_xyz();
126  base_fe->determine_calculations();
127 
128  if (pts == nullptr)
129  {
130  libmesh_assert(base_fe->qrule);
131  libmesh_assert_equal_to (base_fe->qrule, base_qrule.get());
133 
134  bool init_shape_functions_required = false;
135 
136  // init the radial data fields only when the radial order changes
138  {
140 
141  // Watch out: this call to QBase->init() only works for
142  // current_fe_type = const! To allow variable Order,
143  // the init() of QBase has to be modified...
144  radial_qrule->init(EDGE2);
145 
146  // initialize the radial shape functions
147  this->init_radial_shape_functions(inf_elem);
148 
149  init_shape_functions_required=true;
150  }
151 
152 
153  bool update_base_elem_required=true;
154 
155  // update the type in accordance to the current cell
156  // and reinit if the cell type has changed or (as in
157  // the case of the hierarchics) the shape functions
158  // depend on the particular element and need a reinit
159  if ((Dim != 1) &&
160  ((this->get_type() != inf_elem->type()) ||
161  (base_fe->shapes_need_reinit())))
162  {
163  // store the new element type, update base_elem
164  // here. Through \p update_base_elem_required,
165  // remember whether it has to be updated (see below).
166  elem_type = inf_elem->type();
167  this->update_base_elem(inf_elem);
168  update_base_elem_required=false;
169 
170  // initialize the base quadrature rule for the new element
171  base_qrule->init(base_elem->type());
172 
173  // initialize the shape functions in the base
174  base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
175  base_elem.get());
176 
177  // compute the shape functions and map functions of base_fe
178  // before using them later in combine_base_radial.
179  base_fe->_fe_map->compute_map (base_fe->dim, base_fe->qrule->get_weights(),
180  base_elem.get(), base_fe->calculate_d2phi);
181  base_fe->compute_shape_functions(base_elem.get(), base_fe->qrule->get_points());
182 
183  init_shape_functions_required=true;
184  }
185 
186 
187  // when either the radial or base part change,
188  // we have to init the whole fields
189  if (init_shape_functions_required)
190  this->init_shape_functions (radial_qrule->get_points(),
191  base_fe->qrule->get_points(),
192  inf_elem);
193 
194  // computing the distance only works when we have the current
195  // base_elem stored. This happens when fe_type is const,
196  // the inf_elem->type remains the same. Then we have to
197  // update the base elem _here_.
198  if (update_base_elem_required)
199  this->update_base_elem(inf_elem);
200 
201  // compute dist (depends on geometry, therefore has to be updated for
202  // each and every new element), throw radial and base part together
203  this->combine_base_radial (inf_elem);
204 
205  this->_fe_map->compute_map (this->dim, _total_qrule_weights, inf_elem, this->calculate_d2phi);
206 
207  // Compute the shape functions and the derivatives
208  // at all quadrature points.
209  this->compute_shape_functions (inf_elem,base_fe->qrule->get_points());
210  }
211 
212  else // if pts != nullptr
213  {
214  // update the elem_type
215  elem_type = inf_elem->type();
216 
217  // We'll assume that pts is a tensor product mesh of points.
218  // That will handle the pts.size()==1 case that we care about
219  // right now, and it will generalize a bit, and it won't break
220  // the assumptions elsewhere in InfFE.
221  std::vector<Point> radial_pts;
222  if (pts->size() > 0)
223  {
224  Real radius = (*pts)[0](Dim-1);
225  radial_pts.push_back(Point(radius));
226  unsigned int n_radial_pts=1;
227  unsigned int n_angular_pts=1;
228  for (auto p : IntRange<std::size_t>(1, pts->size()))
229  {
230  radius = (*pts)[p](Dim-1);
231  // check for repetition of radius: The max. allowed distance is somewhat arbitrary
232  // but the given value should not produce false positives...
233  if (abs(radial_pts[p-n_radial_pts*n_angular_pts](0) - radius)< 1e-4)
234  {
235  // should the next one be in the next segment?
236  if (p+1 == n_radial_pts*(n_angular_pts+1))
237  n_angular_pts++;
238  }
239  // if none yet repeated:
240  else if (n_angular_pts == 1)
241  radial_pts.push_back(Point(radius));
242  // if there was repetition but this does not, the assumed
243  // format does not work:
244  else
245  {
246  libmesh_error_msg("We assumed that the "<<pts->size()
247  <<" points are of tensor-product type with "
248  <<n_radial_pts<<" radial points and "
249  <<n_angular_pts<< " angular points."<<std::endl
250  <<"But apparently point "<<p
251  <<" does not fit that scheme: Its radius is "
252  <<radius <<"but should have "
253  <<radial_pts[p-n_radial_pts*n_angular_pts]<<".");
254  }
255  }
256  }
257  const std::size_t radial_pts_size = radial_pts.size();
258  const std::size_t base_pts_size = pts->size() / radial_pts_size;
259  // If we're a tensor product we should have no remainder
260  libmesh_assert_equal_to
261  (base_pts_size * radial_pts_size, pts->size());
262 
263 
264  std::vector<Point> base_pts;
265  base_pts.reserve(base_pts_size);
266  for (std::size_t p=0, ps=pts->size(); p != ps; p += radial_pts_size)
267  {
268  Point pt = (*pts)[p];
269  pt(Dim-1) = 0;
270  base_pts.push_back(pt);
271  }
272 
273  // init radial shapes
274  this->init_radial_shape_functions(inf_elem, &radial_pts);
275 
276  // update the base
277  this->update_base_elem(inf_elem);
278 
279  // the finite element on the ifem base
280  base_fe = FEBase::build(Dim-1, this->fe_type);
281 
282  base_fe->calculate_phi = base_fe->calculate_dphi = base_fe->calculate_dphiref = true;
283  base_fe->get_xyz();
284  base_fe->determine_calculations();
285 
286  // init base shapes
287  base_fe->init_base_shape_functions(base_pts,
288  base_elem.get());
289 
290  // compute the shape functions and map functions of base_fe
291  // before using them later in combine_base_radial.
292 
293  if (weights)
294  {
295  base_fe->_fe_map->compute_map (base_fe->dim, *weights,
296  base_elem.get(), base_fe->calculate_d2phi);
297  }
298  else
299  {
300  std::vector<Real> dummy_weights (pts->size(), 1.);
301  base_fe->_fe_map->compute_map (base_fe->dim, dummy_weights,
302  base_elem.get(), base_fe->calculate_d2phi);
303  }
304 
305  base_fe->compute_shape_functions(base_elem.get(), *pts);
306 
307  this->init_shape_functions (radial_pts, base_pts, inf_elem);
308 
309  // combine the base and radial shapes
310  this->combine_base_radial (inf_elem);
311 
312  // weights
313  if (weights != nullptr)
314  {
315  this->_fe_map->compute_map (this->dim, *weights, inf_elem, this->calculate_d2phi);
316  }
317  else
318  {
319  std::vector<Real> dummy_weights (pts->size(), 1.);
320  this->_fe_map->compute_map (this->dim, dummy_weights, inf_elem, this->calculate_d2phi);
321  }
322 
323  // finally compute the ifem shapes
324  this->compute_shape_functions (inf_elem,*pts);
325  }
326 
327 }

References std::abs(), libMesh::FEGenericBase< OutputType >::build(), dim, libMesh::EDGE2, libMesh::libmesh_assert(), radius, libMesh::Real, and libMesh::Elem::type().

◆ reinit() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_base>
void libMesh::InfFE< Dim, T_radial, T_base >::reinit ( const Elem inf_elem,
const unsigned int  s,
const Real  tolerance = TOLERANCE,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
overridevirtual

Reinitializes all the physical element-dependent data based on the side of an infinite element.

Implements libMesh::FEAbstract.

Definition at line 37 of file inf_fe_boundary.C.

42 {
43  if (weights != nullptr)
44  libmesh_not_implemented_msg("ERROR: User-specified weights for infinite elements are not implemented!");
45 
46  if (pts != nullptr)
47  libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements are not implemented!");
48 
49  // We don't do this for 1D elements!
50  libmesh_assert_not_equal_to (Dim, 1);
51 
52  libmesh_assert(inf_elem);
54 
55  // We need to allow this as well...
56  // libmesh_assert_not_equal_to (s, 0);
57 
58 
59  // Build the side of interest
60  const std::unique_ptr<const Elem> side(inf_elem->build_side_ptr(s));
61 
62  // set the element type
63  elem_type = inf_elem->type();
64 
65  // eventually initialize radial quadrature rule
66  bool radial_qrule_initialized = false;
67 
68  // if we are working on the base-side, the radial function is constant.
69  // With this, we ensure that at least for base elements we reinitialize all quantities
70  // when we enter for the first time.
71  if (s == 0)
73 
75  {
76  if (s > 0)
77  {
79  radial_qrule->init(EDGE2, inf_elem->p_level());
80  }
81  else
82  {
83  // build a new 0-dimensional quadrature-rule:
85  radial_qrule->init(NODEELEM, 0);
86 
87  //the base_qrule is set up with dim-1, but apparently we need dim, so we replace it:
88  base_qrule=QBase::build(qrule->type(), side->dim(), qrule->get_order());
89 
90  //FIXME: Do I have to care about the order of my neighbours element?
91  //unsigned int side_p_level = elem->p_level();
92  //if (elem->neighbor_ptr(s) != nullptr)
93  // side_p_level = std::max(side_p_level, elem->neighbor_ptr(s)->p_level());
94  base_qrule->init(side->type(), side->p_level());
95  }
96  radial_qrule_initialized = true;
97  }
98 
99  // Initialize the face shape functions
100  if (this->get_type() != inf_elem->type() ||
101  base_fe->shapes_need_reinit() ||
102  radial_qrule_initialized)
103  this->init_face_shape_functions (qrule->get_points(), side.get());
104 
105 
106  // compute the face map
107  this->_fe_map->compute_face_map(this->dim, _total_qrule_weights, side.get());
108 
109  // make a copy of the Jacobian for integration
110  const std::vector<Real> JxW_int(this->_fe_map->get_JxW());
111 
112  // Find where the integration points are located on the
113  // full element.
114  std::vector<Point> qp;
115  this->inverse_map (inf_elem, this->_fe_map->get_xyz(), qp, tolerance);
116 
117  // just to ensure that we are working on the base and not, for numeric reasons,
118  // somewhere else...
119  if (s==0)
120  {
121  for (auto & p : qp)
122  {
123  p(Dim-1)=-1.;
124  }
125  }
126 
127  // compute the shape function and derivative values
128  // at the points qp
129  this->reinit (inf_elem, &qp);
130 
131  // copy back old data
132  this->_fe_map->get_JxW() = JxW_int;
133 
134 }

References libMesh::QBase::build(), libMesh::Elem::build_side_ptr(), dim, libMesh::EDGE2, libMesh::libmesh_assert(), libMesh::NODEELEM, libMesh::Elem::p_level(), libMesh::QGAUSS, and libMesh::Elem::type().

◆ set_fe_order()

void libMesh::FEAbstract::set_fe_order ( int  new_order)
inlineinherited

Sets the base FE order of the finite element.

Definition at line 437 of file fe_abstract.h.

437 { fe_type.order = new_order; }

References libMesh::FEAbstract::fe_type, and libMesh::FEType::order.

◆ shape() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
Real libMesh::InfFE< Dim, T_radial, T_map >::shape ( const FEType fet,
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 lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping.

Definition at line 202 of file inf_fe_static.C.

206 {
207  libmesh_assert(inf_elem);
208  libmesh_assert_not_equal_to (Dim, 0);
209 
210 #ifdef DEBUG
211  // this makes only sense when used for mapping
212  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
213  {
214  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
215  << " return the correct trial function! Use " << std::endl
216  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
217  << std::endl;
218  _warned_for_shape = true;
219  }
220 #endif
221 
222  const Order o_radial (fet.radial_order);
223  const Real v (p(Dim-1));
224  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
225 
226  unsigned int i_base, i_radial;
227  compute_shape_indices(fet, inf_elem->type(), i, i_base, i_radial);
228 
229  if (Dim > 1)
230  return FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p)
231  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
232  * InfFERadial::decay(Dim,v);
233  else
234  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
235  * InfFERadial::decay(Dim,v);
236 }

References libMesh::Elem::build_side_ptr(), libMesh::InfFERadial::decay(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::INFINITE_MAP, libMesh::libmesh_assert(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FEInterface::shape(), and libMesh::Elem::type().

◆ shape() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
Real libMesh::InfFE< Dim, T_radial, T_map >::shape ( const FEType fet,
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 lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping.

Definition at line 158 of file inf_fe_static.C.

162 {
163  libmesh_assert_not_equal_to (Dim, 0);
164 
165 #ifdef DEBUG
166  // this makes only sense when used for mapping
167  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
168  {
169  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
170  << " return the correct trial function! Use " << std::endl
171  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
172  << std::endl;
173  _warned_for_shape = true;
174  }
175 #endif
176 
177  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
178  const Order o_radial (fet.radial_order);
179  const Real v (p(Dim-1));
180 
181  unsigned int i_base, i_radial;
182  compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
183 
184  //TODO:[SP/DD] exp(ikr) is still missing here!
185  // but is it intended? It would be probably somehow nice, but than it would be Number, not Real !
186  // --> thus it would destroy the interface...
187  if (Dim > 1)
188  return FEInterface::shape(Dim-1, fet, base_et, i_base, p)
189  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
190  * InfFERadial::decay(Dim,v);
191  else
192  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
193  * InfFERadial::decay(Dim,v);
194 }

References libMesh::InfFERadial::decay(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFEBase::get_elem_type(), libMesh::INFINITE_MAP, libMesh::FEType::radial_order, libMesh::Real, and libMesh::FEInterface::shape().

Referenced by libMesh::FEInterface::ifem_shape().

◆ shape_deriv() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
Real libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv ( const FEType fet,
const Elem inf_elem,
const unsigned int  i,
const unsigned int  j,
const Point p 
)
static
Returns
The \( j^{th} \) derivative of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shape gradients, instead use compute_data(). The shape_deriv() methods should only be used for mapping.

Definition at line 284 of file inf_fe_static.C.

289 {
290  libmesh_assert_not_equal_to (Dim, 0);
291  libmesh_assert_greater (Dim,j);
292 #ifdef DEBUG
293  // this makes only sense when used for mapping
294  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
295  {
296  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
297  << " return the correct trial function gradients! Use " << std::endl
298  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
299  << std::endl;
300  _warned_for_dshape = true;
301  }
302 #endif
303  const Order o_radial (fe_t.radial_order);
304  const Real v (p(Dim-1));
305 
306  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
307 
308  unsigned int i_base, i_radial;
309 
310  if ((-1. > v ) || (v > 1.))
311  {
312  //TODO: This is for debugging. We should never come here.
313  // Therefore we can do very useless things then:
314  i_base=0;
315  }
316  compute_shape_indices(fe_t, inf_elem->type(), i, i_base, i_radial);
317 
318  if (j== Dim -1)
319  {
320  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
321  * InfFERadial::decay(Dim,v)
322  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
324 
325  return FEInterface::shape(Dim-1, fe_t, base_el.get(), i_base, p)*RadialDeriv;
326  }
327  return FEInterface::shape_deriv(Dim-1, fe_t, base_el.get(), i_base, j, p)
328  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
329  * InfFERadial::decay(Dim,v);
330 }

References libMesh::Elem::build_side_ptr(), libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::INFINITE_MAP, libMesh::FEType::radial_order, libMesh::Real, libMesh::FEInterface::shape(), libMesh::FEInterface::shape_deriv(), and libMesh::Elem::type().

◆ shape_deriv() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
Real libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv ( const FEType fet,
const ElemType  inf_elem_type,
const unsigned int  i,
const unsigned int  j,
const Point p 
)
static
Returns
The \( j^{th} \) derivative of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shape gradients, instead use compute_data(). The shape_deriv() methods should only be used for mapping.

Definition at line 240 of file inf_fe_static.C.

245 {
246  libmesh_assert_not_equal_to (Dim, 0);
247  libmesh_assert_greater (Dim,j);
248 #ifdef DEBUG
249  // this makes only sense when used for mapping
250  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
251  {
252  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
253  << " return the correct trial function gradients! Use " << std::endl
254  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
255  << std::endl;
256  _warned_for_dshape = true;
257  }
258 #endif
259 
260  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
261  const Order o_radial (fe_t.radial_order);
262  const Real v (p(Dim-1));
263 
264  unsigned int i_base, i_radial;
265  compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
266 
267  if (j== Dim -1)
268  {
269  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
270  * InfFERadial::decay(Dim,v)
271  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
273 
274  return FEInterface::shape(Dim-1, fe_t, base_et, i_base, p)*RadialDeriv;
275  }
276 
277  return FEInterface::shape_deriv(Dim-1, fe_t, base_et, i_base, j, p)
278  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
279  * InfFERadial::decay(Dim,v);
280 }

References libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::InfFEBase::get_elem_type(), libMesh::INFINITE_MAP, libMesh::FEType::radial_order, libMesh::Real, libMesh::FEInterface::shape(), and libMesh::FEInterface::shape_deriv().

◆ shapes_need_reinit()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::shapes_need_reinit ( ) const
overrideprivatevirtual
Returns
false, currently not required.

Implements libMesh::FEAbstract.

Definition at line 1001 of file inf_fe.C.

1002 {
1003  return false;
1004 }

◆ side_map()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual void libMesh::InfFE< Dim, T_radial, T_map >::side_map ( const Elem ,
const Elem ,
const unsigned int  ,
const std::vector< Point > &  ,
std::vector< Point > &   
)
inlineoverridevirtual

Computes the reference space quadrature points on the side of an element based on the side quadrature points.

Implements libMesh::FEAbstract.

Definition at line 456 of file inf_fe.h.

461  {
462  libmesh_not_implemented();
463  }

◆ update_base_elem()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_base>
void libMesh::InfFE< Dim, T_radial, T_base >::update_base_elem ( const Elem inf_elem)
protected

Updates the protected member base_elem to the appropriate base element for the given inf_elem.

Definition at line 101 of file inf_fe.C.

102 {
103  base_elem.reset(InfFEBase::build_elem(inf_elem));
104 }

References libMesh::InfFEBase::build_elem().

Friends And Related Function Documentation

◆ InfFE

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
template<unsigned int friend_Dim, FEFamily friend_T_radial, InfMapType friend_T_map>
friend class InfFE
friend

Make all InfFE<Dim,T_radial,T_map> classes friends of each other, so that the protected eval() may be accessed.

Definition at line 841 of file inf_fe.h.

◆ InfFEMap

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
friend class InfFEMap
friend

Definition at line 843 of file inf_fe.h.

Member Data Documentation

◆ _base_node_index

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_base_node_index
protected

The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current element.

This vector maps the infinite Elem node number to the associated node in the base element.

Definition at line 725 of file inf_fe.h.

◆ _base_shape_index

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_base_shape_index
protected

The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element.

This vector maps the infinite Elem dof index to the associated dof in the base FE.

Definition at line 745 of file inf_fe.h.

◆ _compute_node_indices_fast_current_elem_type

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
ElemType libMesh::InfFE< Dim, T_radial, T_map >::_compute_node_indices_fast_current_elem_type = INVALID_ELEM
staticprivate

When compute_node_indices_fast() is used, this static variable remembers the element type for which the static variables in compute_node_indices_fast() are currently set.

Using a class member for the element type helps initializing it to a default value.

Definition at line 821 of file inf_fe.h.

◆ _counts

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter = true
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().

◆ _fe_map

std::unique_ptr<FEMap> libMesh::FEAbstract::_fe_map
protectedinherited

◆ _fe_trans

template<typename OutputType>
std::unique_ptr<FETransformationBase<OutputType> > libMesh::FEGenericBase< OutputType >::_fe_trans
protectedinherited

Object that handles computing shape function values, gradients, etc in the physical domain.

Definition at line 492 of file fe_base.h.

◆ _mutex

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects

Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _n_total_approx_sf

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::_n_total_approx_sf
protected

The number of total approximation shape functions for the current configuration.

Definition at line 756 of file inf_fe.h.

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

◆ _n_total_qp

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::_n_total_qp
protected

The total number of quadrature points for the current configuration.

Definition at line 762 of file inf_fe.h.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points().

◆ _p_level

unsigned int libMesh::FEAbstract::_p_level
protectedinherited

The p refinement level the current data structures are set up for.

Definition at line 597 of file fe_abstract.h.

Referenced by libMesh::FEAbstract::get_order(), and libMesh::FEAbstract::get_p_level().

◆ _radial_node_index

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_radial_node_index
protected

The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current infinite element.

This vector maps the infinite Elem node number to the radial node (either 0 or 1).

Definition at line 715 of file inf_fe.h.

◆ _radial_shape_index

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_radial_shape_index
protected

The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element.

This vector maps the infinite Elem dof index to the radial InfFE shape index (0..radial_order+1 ).

Definition at line 735 of file inf_fe.h.

◆ _total_qrule_weights

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::_total_qrule_weights
protected

this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be used

Definition at line 768 of file inf_fe.h.

◆ _warned_for_dshape

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::_warned_for_dshape = false
staticprivate

Definition at line 831 of file inf_fe.h.

◆ _warned_for_nodal_soln

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::_warned_for_nodal_soln = false
staticprivate

static members that are used to issue warning messages only once.

Definition at line 829 of file inf_fe.h.

◆ _warned_for_shape

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::_warned_for_shape = false
staticprivate

Definition at line 830 of file inf_fe.h.

◆ base_elem

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::unique_ptr<Elem> libMesh::InfFE< Dim, T_radial, T_map >::base_elem
protected

The base element associated with the current infinite element.

Definition at line 786 of file inf_fe.h.

◆ base_fe

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::unique_ptr<FEBase> libMesh::InfFE< Dim, T_radial, T_map >::base_fe
protected

Have a FE<Dim-1,T_base> handy for base approximation.

Since this one is created using the FEBase::build() method, the InfFE class is not required to be templated w.r.t. to the base approximation shape.

Definition at line 794 of file inf_fe.h.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::InfFE().

◆ base_qrule

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::unique_ptr<QBase> libMesh::InfFE< Dim, T_radial, T_map >::base_qrule
protected

The quadrature rule for the base element associated with the current infinite element.

Definition at line 774 of file inf_fe.h.

◆ calculate_curl_phi

bool libMesh::FEAbstract::calculate_curl_phi
mutableprotectedinherited

Should we calculate shape function curls?

Definition at line 567 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().

◆ calculate_d2phi [1/2]

bool libMesh::FEAbstract::calculate_d2phi
mutableprotectedinherited

◆ calculate_d2phi [2/2]

const bool libMesh::FEAbstract::calculate_d2phi =false
protectedinherited

Definition at line 560 of file fe_abstract.h.

◆ calculate_div_phi

bool libMesh::FEAbstract::calculate_div_phi
mutableprotectedinherited

Should we calculate shape function divergences?

Definition at line 572 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().

◆ calculate_dphi

bool libMesh::FEAbstract::calculate_dphi
mutableprotectedinherited

◆ calculate_dphiref

bool libMesh::FEAbstract::calculate_dphiref
mutableprotectedinherited

Should we calculate reference shape function gradients?

Definition at line 577 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().

◆ calculate_map

bool libMesh::FEAbstract::calculate_map
mutableprotectedinherited

◆ calculate_phi

bool libMesh::FEAbstract::calculate_phi
mutableprotectedinherited

Should we calculate shape functions?

Definition at line 546 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi().

◆ calculations_started

bool libMesh::FEAbstract::calculations_started
mutableprotectedinherited

Have calculations with this object already been started? Then all get_* functions should already have been called.

Definition at line 536 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), and libMesh::FESubdivision::init_shape_functions().

◆ curl_phi

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::curl_phi
protectedinherited

Shape function curl values.

Only defined for vector types.

Definition at line 507 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().

◆ current_fe_type

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
FEType libMesh::InfFE< Dim, T_radial, T_map >::current_fe_type
protected

This FEType stores the characteristics for which the data structures phi, phi_map etc are currently initialized.

This avoids re-initializing the radial part.

Note
Currently only order may change, both the FE families and base_order must remain constant.

Definition at line 804 of file inf_fe.h.

◆ d2phi

template<typename OutputType>
std::vector<std::vector<OutputTensor> > libMesh::FEGenericBase< OutputType >::d2phi
protectedinherited

Shape function second derivative values.

Definition at line 550 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi().

◆ d2phideta2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phideta2
protectedinherited

Shape function second derivatives in the eta direction.

Definition at line 570 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2().

◆ d2phidetadzeta

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidetadzeta
protectedinherited

Shape function second derivatives in the eta-zeta direction.

Definition at line 575 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta().

◆ d2phidx2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidx2
protectedinherited

Shape function second derivatives in the x direction.

Definition at line 585 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2().

◆ d2phidxdy

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxdy
protectedinherited

Shape function second derivatives in the x-y direction.

Definition at line 590 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy().

◆ d2phidxdz

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxdz
protectedinherited

Shape function second derivatives in the x-z direction.

Definition at line 595 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz().

◆ d2phidxi2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxi2
protectedinherited

Shape function second derivatives in the xi direction.

Definition at line 555 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2().

◆ d2phidxideta

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxideta
protectedinherited

Shape function second derivatives in the xi-eta direction.

Definition at line 560 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta().

◆ d2phidxidzeta

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxidzeta
protectedinherited

Shape function second derivatives in the xi-zeta direction.

Definition at line 565 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta().

◆ d2phidy2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidy2
protectedinherited

Shape function second derivatives in the y direction.

Definition at line 600 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2().

◆ d2phidydz

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidydz
protectedinherited

Shape function second derivatives in the y-z direction.

Definition at line 605 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz().

◆ d2phidz2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidz2
protectedinherited

Shape function second derivatives in the z direction.

Definition at line 610 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2().

◆ d2phidzeta2

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidzeta2
protectedinherited

Shape function second derivatives in the zeta direction.

Definition at line 580 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2().

◆ dim

const unsigned int libMesh::FEAbstract::dim
protectedinherited

The dimensionality of the object.

Definition at line 530 of file fe_abstract.h.

Referenced by libMesh::FEAbstract::build(), and libMesh::FEAbstract::get_dim().

◆ dist

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dist
protected

the radial distance of the base nodes from the origin

Definition at line 634 of file inf_fe.h.

◆ div_phi

template<typename OutputType>
std::vector<std::vector<OutputDivergence> > libMesh::FEGenericBase< OutputType >::div_phi
protectedinherited

Shape function divergence values.

Only defined for vector types.

Definition at line 512 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().

◆ dmodedv

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::dmodedv
protected

the first local derivative of the radial approximation shapes.

Needed when setting up the overall shape functions.

Definition at line 668 of file inf_fe.h.

◆ dphase

template<typename OutputType>
std::vector<OutputGradient> libMesh::FEGenericBase< OutputType >::dphase
protectedinherited

Used for certain infinite element families: the first derivatives of the phase term in global coordinates, over all quadrature points.

Definition at line 628 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphase().

◆ dphasedeta

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedeta
protected

the second local derivative (for 3D, the second in the base) of the phase term in local coordinates.

Needed in the overall weak form of infinite element formulations.

Definition at line 693 of file inf_fe.h.

◆ dphasedxi

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedxi
protected

the first local derivative (for 3D, the first in the base) of the phase term in local coordinates.

Needed in the overall weak form of infinite element formulations.

Definition at line 686 of file inf_fe.h.

◆ dphasedzeta

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedzeta
protected

the third local derivative (for 3D, the derivative in radial direction) of the phase term in local coordinates.

Needed in the overall weak form of infinite element formulations.

Definition at line 700 of file inf_fe.h.

◆ dphi

template<typename OutputType>
std::vector<std::vector<OutputGradient> > libMesh::FEGenericBase< OutputType >::dphi
protectedinherited

Shape function derivative values.

Definition at line 502 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi().

◆ dphideta

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphideta
protectedinherited

Shape function derivatives in the eta direction.

Definition at line 522 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta().

◆ dphidx

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidx
protectedinherited

Shape function derivatives in the x direction.

Definition at line 532 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx().

◆ dphidxi

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidxi
protectedinherited

Shape function derivatives in the xi direction.

Definition at line 517 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi().

◆ dphidy

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidy
protectedinherited

Shape function derivatives in the y direction.

Definition at line 537 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy().

◆ dphidz

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidz
protectedinherited

Shape function derivatives in the z direction.

Definition at line 542 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz().

◆ dphidzeta

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidzeta
protectedinherited

Shape function derivatives in the zeta direction.

Definition at line 527 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().

◆ dradialdv_map

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::dradialdv_map
protected

the first local derivative of the radial mapping shapes

Definition at line 679 of file inf_fe.h.

◆ dsomdv

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dsomdv
protected

the first local derivative of the radial decay \( 1/r \) in local coordinates.

Needed when setting up the overall shape functions.

Definition at line 656 of file inf_fe.h.

◆ dweight

template<typename OutputType>
std::vector<RealGradient> libMesh::FEGenericBase< OutputType >::dweight
protectedinherited

Used for certain infinite element families: the global derivative of the additional radial weight \( 1/{r^2} \), over all quadrature points.

Definition at line 635 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_dweight().

◆ dweightdv

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dweightdv
protected

the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points.

The weight does not vary in base direction. However, for uniform access to the data fields from the outside, this data field is expanded to all quadrature points.

Definition at line 642 of file inf_fe.h.

◆ elem_type

ElemType libMesh::FEAbstract::elem_type
protectedinherited

The element type the current data structures are set up for.

Definition at line 591 of file fe_abstract.h.

Referenced by libMesh::FESubdivision::attach_quadrature_rule(), and libMesh::FEAbstract::get_type().

◆ fe_type

FEType libMesh::FEAbstract::fe_type
protectedinherited

◆ mode

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::mode
protected

the radial approximation shapes in local coordinates Needed when setting up the overall shape functions.

Definition at line 662 of file inf_fe.h.

◆ phi

template<typename OutputType>
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::phi
protectedinherited

Shape function values.

Definition at line 497 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi().

◆ qrule

QBase* libMesh::FEAbstract::qrule
protectedinherited

A pointer to the quadrature rule employed.

Definition at line 602 of file fe_abstract.h.

Referenced by libMesh::FESubdivision::attach_quadrature_rule().

◆ radial_map

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::radial_map
protected

the radial mapping shapes in local coordinates

Definition at line 673 of file inf_fe.h.

◆ radial_qrule

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::unique_ptr<QBase> libMesh::InfFE< Dim, T_radial, T_map >::radial_qrule
protected

The quadrature rule for the base element associated with the current infinite element.

Definition at line 780 of file inf_fe.h.

Referenced by libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points().

◆ shapes_on_quadrature

bool libMesh::FEAbstract::shapes_on_quadrature
protectedinherited

A flag indicating if current data structures correspond to quadrature rule points.

Definition at line 608 of file fe_abstract.h.

◆ som

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::som
protected

the radial decay \( 1/r \) in local coordinates.

Needed when setting up the overall shape functions.

Note
It is this decay which ensures that the Sommerfeld radiation condition is satisfied in advance.

Definition at line 651 of file inf_fe.h.

◆ weight

template<typename OutputType>
std::vector<Real> libMesh::FEGenericBase< OutputType >::weight
protectedinherited

Used for certain infinite element families: the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points.

Definition at line 642 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_weight().


The documentation for this class was generated from the following files:
libMesh::C_ONE
Definition: enum_fe_family.h:80
libMesh::FEType::inf_map
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:257
libMesh::FEGenericBase::d2phidxdz
std::vector< std::vector< OutputShape > > d2phidxdz
Shape function second derivatives in the x-z direction.
Definition: fe_base.h:595
libMesh::InfFERadial::decay
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:850
libMesh::HEX20
Definition: enum_elem_type.h:48
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::Number
Real Number
Definition: libmesh_common.h:195
libMesh::PRISM6
Definition: enum_elem_type.h:50
libMesh::BoundaryInfo::boundary_ids
std::vector< boundary_id_type > boundary_ids(const Node *node) const
Definition: boundary_info.C:985
libMesh::Elem::child_ptr
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:2567
libMesh::InfFE::base_elem
std::unique_ptr< Elem > base_elem
The base element associated with the current infinite element.
Definition: inf_fe.h:786
libMesh::pi
const Real pi
.
Definition: libmesh.h:237
libMesh::FEType::radial_family
FEFamily radial_family
The type of approximation in radial direction.
Definition: fe_type.h:249
libMesh::PeriodicBoundaryBase::has_transformation_matrix
bool has_transformation_matrix() const
Definition: periodic_boundary_base.C:76
libMesh::Elem::is_node_on_side
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const =0
libMesh::Elem::n_edges
virtual unsigned int n_edges() const =0
libMesh::OrderWrapper::get_order
int get_order() const
Explicitly request the order as an int.
Definition: fe_type.h:77
libMesh::invalid_uint
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:249
libMesh::PeriodicBoundaryBase::get_corresponding_pos
virtual Point get_corresponding_pos(const Point &pt) const =0
This function should be overridden by derived classes to define how one finds corresponding nodes on ...
libMesh::InfFERadial::mapping_order
static Order mapping_order()
Definition: inf_fe.h:93
libMesh::FEGenericBase::_fe_trans
std::unique_ptr< FETransformationBase< OutputType > > _fe_trans
Object that handles computing shape function values, gradients, etc in the physical domain.
Definition: fe_base.h:492
libMesh::FEAbstract::get_xyz
const std::vector< Point > & get_xyz() const
Definition: fe_abstract.h:237
libMesh::FEAbstract::calculate_dphi
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:551
libMesh::CLOUGH
Definition: enum_fe_family.h:53
libMesh::FEGenericBase::d2phideta2
std::vector< std::vector< OutputShape > > d2phideta2
Shape function second derivatives in the eta direction.
Definition: fe_base.h:570
libMesh::InfFE::update_base_elem
void update_base_elem(const Elem *inf_elem)
Updates the protected member base_elem to the appropriate base element for the given inf_elem.
Definition: inf_fe.C:101
libMesh::MeshBase::get_boundary_info
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:132
libMesh::FEType::family
FEFamily family
The type of finite element.
Definition: fe_type.h:203
libMesh::QGauss
This class implements specific orders of Gauss quadrature.
Definition: quadrature_gauss.h:39
libMesh::DofMap::dof_indices
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1967
libMesh::FEGenericBase::curl_phi
std::vector< std::vector< OutputShape > > curl_phi
Shape function curl values.
Definition: fe_base.h:507
libMesh::Elem::level
unsigned int level() const
Definition: elem.h:2478
libMesh::L2_HIERARCHIC
Definition: enum_fe_family.h:40
libMesh::FEGenericBase::dphidzeta
std::vector< std::vector< OutputShape > > dphidzeta
Shape function derivatives in the zeta direction.
Definition: fe_base.h:527
libMesh::FEGenericBase::dphideta
std::vector< std::vector< OutputShape > > dphideta
Shape function derivatives in the eta direction.
Definition: fe_base.h:522
libMesh::Elem::n_nodes
virtual unsigned int n_nodes() const =0
libMesh::HEX8
Definition: enum_elem_type.h:47
libMesh::FEAbstract::print_xyz
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).
Definition: fe_abstract.C:812
libMesh::InfFE::dphasedzeta
std::vector< Real > dphasedzeta
the third local derivative (for 3D, the derivative in radial direction) of the phase term in local co...
Definition: inf_fe.h:700
libMesh::INFINITE_MAP
Definition: enum_fe_family.h:48
libMesh::InfFE::current_fe_type
FEType current_fe_type
This FEType stores the characteristics for which the data structures phi, phi_map etc are currently i...
Definition: inf_fe.h:804
libMesh::EDGE4
Definition: enum_elem_type.h:37
libMesh::FEGenericBase::dphidz
std::vector< std::vector< OutputShape > > dphidz
Shape function derivatives in the z direction.
Definition: fe_base.h:542
libMesh::INFHEX8
Definition: enum_elem_type.h:60
libMesh::INFQUAD4
Definition: enum_elem_type.h:58
libMesh::InfFE::eval_deriv
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
libMesh::FEAbstract::fe_type
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:585
libMesh::Elem::n_neighbors
unsigned int n_neighbors() const
Definition: elem.h:631
libMesh::HERMITE
Definition: enum_fe_family.h:54
libMesh::FEInterface::n_dofs_at_node
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:503
libMesh::InfFE::init_face_shape_functions
void init_face_shape_functions(const std::vector< Point > &, const Elem *inf_side)
Initialize all the data fields like weight, phi, etc for the side s.
Definition: inf_fe_boundary.C:158
libMesh::FEGenericBase::div_phi
std::vector< std::vector< OutputDivergence > > div_phi
Shape function divergence values.
Definition: fe_base.h:512
libMesh::QBase::n_points
unsigned int n_points() const
Definition: quadrature.h:126
libMesh::InfFE::dphasedxi
std::vector< Real > dphasedxi
the first local derivative (for 3D, the first in the base) of the phase term in local coordinates.
Definition: inf_fe.h:686
libMesh::FEGenericBase::dphidy
std::vector< std::vector< OutputShape > > dphidy
Shape function derivatives in the y direction.
Definition: fe_base.h:537
libMesh::PeriodicBoundaryBase
The base class for defining periodic boundaries.
Definition: periodic_boundary_base.h:48
libMesh::index_range
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:106
libMesh::Elem::dim
virtual unsigned short dim() const =0
libMesh::InfFE::n_dofs
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:58
libMesh::DenseVector::zero
virtual void zero() override
Set every element in the vector to 0.
Definition: dense_vector.h:379
libMesh::JACOBI_20_00
Definition: enum_fe_family.h:49
libMesh::InfFE::nodal_soln
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.
Definition: inf_fe_static.C:123
libMesh::TET10
Definition: enum_elem_type.h:46
libMesh::XYZ
Definition: enum_fe_family.h:46
libMesh::FEGenericBase
This class forms the foundation from which generic finite elements may be derived.
Definition: exact_error_estimator.h:39
libMesh::FEAbstract::print_dphi
virtual void print_dphi(std::ostream &os) const =0
Prints the value of each shape function's derivative at each quadrature point.
libMesh::Order
Order
Definition: enum_order.h:40
libMesh::InfFE::combine_base_radial
void combine_base_radial(const Elem *inf_elem)
Combines the shape functions, which were formed in init_shape_functions(Elem *), with geometric data.
Definition: inf_fe.C:751
libMesh::FEAbstract::calculate_dphiref
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:577
libMesh::InfFE::_base_node_index
std::vector< unsigned int > _base_node_index
The internal structure of the InfFE – tensor product of base element times radial nodes – has to be d...
Definition: inf_fe.h:725
libMesh::FEAbstract::calculations_started
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:536
libMesh::ReferenceCounter::_counts
static Counts _counts
Actually holds the data.
Definition: reference_counter.h:122
libMesh::InfFE::radial_qrule
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:780
libMesh::TOLERANCE
static const Real TOLERANCE
Definition: libmesh_common.h:128
libMesh::InfFE::mode
std::vector< std::vector< Real > > mode
the radial approximation shapes in local coordinates Needed when setting up the overall shape functio...
Definition: inf_fe.h:662
libMesh::FEAbstract::calculate_phi
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:546
libMesh::DenseMatrix< Real >
libMesh::DofMap::n_variables
unsigned int n_variables() const
Definition: dof_map.h:592
libMesh::FEAbstract::calculate_map
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:541
libMesh::MONOMIAL_VEC
Definition: enum_fe_family.h:62
libMesh::Elem::p_level
unsigned int p_level() const
Definition: elem.h:2512
libMesh::ReferenceCounter::_n_objects
static Threads::atomic< unsigned int > _n_objects
The number of objects.
Definition: reference_counter.h:130
libMesh::Elem::node_index_range
IntRange< unsigned short > node_index_range() const
Definition: elem.h:2170
libMesh::Variable::type
const FEType & type() const
Definition: variable.h:119
mesh
MeshBase & mesh
Definition: mesh_communication.C:1257
libMesh::FEGenericBase::d2phidxidzeta
std::vector< std::vector< OutputShape > > d2phidxidzeta
Shape function second derivatives in the xi-zeta direction.
Definition: fe_base.h:565
libMesh::FEAbstract::calculate_curl_phi
bool calculate_curl_phi
Should we calculate shape function curls?
Definition: fe_abstract.h:567
libMesh::InfFERadial::D_deriv
static Real D_deriv(const Real v)
Definition: inf_fe.h:87
libMesh::DofMap::is_constrained_dof
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:1962
libMesh::InfFE::dsomdv
std::vector< Real > dsomdv
the first local derivative of the radial decay in local coordinates.
Definition: inf_fe.h:656
libMesh::QGAUSS
Definition: enum_quadrature_type.h:34
libMesh::ReferenceCounter::get_info
static std::string get_info()
Gets a string containing the reference information.
Definition: reference_counter.C:47
libMesh::INFEDGE2
Definition: enum_elem_type.h:57
libMesh::InfFE::_n_total_qp
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: inf_fe.h:762
libMesh::Elem::active
bool active() const
Definition: elem.h:2345
libMesh::FEGenericBase::phi
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:497
libMesh::FEGenericBase::build_InfFE
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
Builds a specific infinite element type.
libMesh::FEGenericBase::d2phidetadzeta
std::vector< std::vector< OutputShape > > d2phidetadzeta
Shape function second derivatives in the eta-zeta direction.
Definition: fe_base.h:575
libMesh::DenseMatrix::resize
void resize(const unsigned int new_m, const unsigned int new_n)
Resize the matrix.
Definition: dense_matrix.h:822
libMesh::FEGenericBase::d2phidz2
std::vector< std::vector< OutputShape > > d2phidz2
Shape function second derivatives in the z direction.
Definition: fe_base.h:610
libMesh::QBase::build
static std::unique_ptr< QBase > build(const std::string &name, const unsigned int dim, const Order order=INVALID_ORDER)
Builds a specific quadrature rule based on the name string.
Definition: quadrature_build.C:41
libMesh::TET4
Definition: enum_elem_type.h:45
libMesh::DofMap::old_dof_indices
void old_dof_indices(const Elem &elem, unsigned int n, std::vector< dof_id_type > &di, const unsigned int vn) const
Appends to the vector di the old global degree of freedom indices for elem.node_ref(n),...
Definition: dof_map.C:2258
libMesh::PeriodicBoundaries::boundary
PeriodicBoundaryBase * boundary(boundary_id_type id)
Definition: periodic_boundaries.C:40
libMesh::CARTESIAN
Definition: enum_inf_map_type.h:35
libMesh::zero
const Number zero
.
Definition: libmesh.h:243
libMesh::FEGenericBase::dphidxi
std::vector< std::vector< OutputShape > > dphidxi
Shape function derivatives in the xi direction.
Definition: fe_base.h:517
libMesh::FEGenericBase::d2phidzeta2
std::vector< std::vector< OutputShape > > d2phidzeta2
Shape function second derivatives in the zeta direction.
Definition: fe_base.h:580
libMesh::FEGenericBase::dweight
std::vector< RealGradient > dweight
Used for certain infinite element families: the global derivative of the additional radial weight ,...
Definition: fe_base.h:635
libMesh::PRISM15
Definition: enum_elem_type.h:51
libMesh::SZABAB
Definition: enum_fe_family.h:44
libMesh::InfFE::init_shape_functions
void init_shape_functions(const std::vector< Point > &radial_qp, const std::vector< Point > &base_qp, const Elem *inf_elem)
Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta,...
Definition: inf_fe.C:422
libMesh::DofObject::dof_number
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:956
libMesh::InfFERadial::decay_deriv
static Real decay_deriv(const Real)
Definition: inf_fe.h:76
libMesh::INFPRISM6
Definition: enum_elem_type.h:63
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::FEGenericBase::d2phidxideta
std::vector< std::vector< OutputShape > > d2phidxideta
Shape function second derivatives in the xi-eta direction.
Definition: fe_base.h:560
libMesh::imaginary
const Number imaginary
The imaginary unit, .
std::abs
MetaPhysicL::DualNumber< T, D > abs(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::FE::shape
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
libMesh::JACOBI_30_00
Definition: enum_fe_family.h:50
libMesh::InfFEMap::inverse_map
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe_map.C:88
libMesh::HEX27
Definition: enum_elem_type.h:49
libMesh::InfFEMap::eval
static Real eval(Real v, Order o, unsigned int i)
Definition: inf_fe_map_eval.C:27
libMesh::FEMap::inverse_map
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: fe_map.C:1622
libMesh::FEInterface::n_dofs_per_elem
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:534
libMesh::DofMap::sys_number
unsigned int sys_number() const
Definition: dof_map.h:1876
libMesh::InfFEMap::eval_deriv
static Real eval_deriv(Real v, Order o, unsigned int i)
Definition: inf_fe_map_eval.C:45
libMesh::InfFE::compute_shape_functions
virtual void compute_shape_functions(const Elem *, const std::vector< Point > &) override
After having updated the jacobian and the transformation from local to global coordinates in FEAbstra...
Definition: inf_fe.C:899
libMesh::FEBase
FEGenericBase< Real > FEBase
Definition: exact_error_estimator.h:39
libMesh::FEGenericBase::d2phi
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:550
libMesh::DofObject::n_comp
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:926
libMesh::FEAbstract::print_phi
virtual void print_phi(std::ostream &os) const =0
Prints the value of each shape function at each quadrature point.
libMesh::FEGenericBase::d2phidydz
std::vector< std::vector< OutputShape > > d2phidydz
Shape function second derivatives in the y-z direction.
Definition: fe_base.h:605
libMesh::FEAbstract::calculate_div_phi
bool calculate_div_phi
Should we calculate shape function divergences?
Definition: fe_abstract.h:572
libMesh::InfFE::compute_node_indices
static void compute_node_indices(const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associ...
Definition: inf_fe_static.C:523
libMesh::DofMap::variable
const Variable & variable(const unsigned int c) const
Definition: dof_map.h:1894
libMesh::InfFE::_warned_for_dshape
static bool _warned_for_dshape
Definition: inf_fe.h:831
libMesh::Threads::spin_mtx
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:29
radius
const Real radius
Definition: subdomains_ex3.C:48
libMesh::QBase::get_points
const std::vector< Point > & get_points() const
Definition: quadrature.h:141
libMesh::FEGenericBase::build
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libMesh::DofObject::invalid_id
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:421
libMesh::InfFE::dweightdv
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:642
libMesh::FEAbstract::qrule
QBase * qrule
A pointer to the quadrature rule employed.
Definition: fe_abstract.h:602
libMesh::INFHEX18
Definition: enum_elem_type.h:62
libMesh::InfFERadial::n_dofs_per_elem
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition: inf_fe.h:132
libMesh::BoundaryInfo::side_with_boundary_id
unsigned int side_with_boundary_id(const Elem *const elem, const boundary_id_type boundary_id) const
Definition: boundary_info.C:1527
libMesh::InfFE::base_qrule
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:774
libMesh::QUAD4
Definition: enum_elem_type.h:41
libMesh::FEAbstract::get_type
ElemType get_type() const
Definition: fe_abstract.h:416
libMesh::Point
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
libMesh::InfFE::dphasedeta
std::vector< Real > dphasedeta
the second local derivative (for 3D, the second in the base) of the phase term in local coordinates.
Definition: inf_fe.h:693
libMesh::FEInterface::dofs_on_edge
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:566
libMesh::Variable
This class defines the notion of a variable in the system.
Definition: variable.h:49
libMesh::DISCONTINUOUS
Definition: enum_fe_family.h:78
libMesh::InfFE::reinit
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
This is at the core of this class.
Definition: inf_fe.C:112
libMesh::TRI3
Definition: enum_elem_type.h:39
libMesh::FEAbstract::_fe_map
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:524
libMesh::C_ZERO
Definition: enum_fe_family.h:79
libMesh::FEGenericBase::dphi
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:502
libMesh::InfFE::som
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:651
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::FEGenericBase::d2phidxi2
std::vector< std::vector< OutputShape > > d2phidxi2
Shape function second derivatives in the xi direction.
Definition: fe_base.h:555
libMesh::LEGENDRE
Definition: enum_fe_family.h:51
libMesh::TensorTools::inner_product
boostcopy::enable_if_c< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:62
libMesh::DofMap::constrain_p_dofs
void constrain_p_dofs(unsigned int var, const Elem *elem, unsigned int s, unsigned int p)
Constrains degrees of freedom on side s of element elem which correspond to variable number var and t...
Definition: dof_map_constraints.C:4325
libMesh::FEInterface::n_dofs
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:472
libMesh::DofMap::variable_type
const FEType & variable_type(const unsigned int c) const
Definition: dof_map.h:1924
libMesh::FEMap::map_fe_type
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:47
libMesh::FEType::default_quadrature_rule
std::unique_ptr< QBase > default_quadrature_rule(const unsigned int dim, const int extraorder=0) const
Definition: fe_type.C:31
libMesh::RATIONAL_BERNSTEIN
Definition: enum_fe_family.h:64
libMesh::BERNSTEIN
Definition: enum_fe_family.h:43
libMesh::PeriodicBoundaryBase::is_my_variable
bool is_my_variable(unsigned int var_num) const
Definition: periodic_boundary_base.C:68
n_nodes
const dof_id_type n_nodes
Definition: tecplot_io.C:68
libMesh::INFHEX16
Definition: enum_elem_type.h:61
libMesh::Elem::is_node_on_edge
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const =0
libMesh::FEAbstract::dim
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:530
libMesh::FEGenericBase::coarsened_dof_values
static void coarsened_dof_values(const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const unsigned int var, const bool use_old_dof_indices=false)
Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children...
Definition: fe_base.C:822
libMesh::InfFE::_warned_for_nodal_soln
static bool _warned_for_nodal_soln
static members that are used to issue warning messages only once.
Definition: inf_fe.h:829
libMesh::FEGenericBase::OutputNumber
TensorTools::MakeNumber< OutputShape >::type OutputNumber
Definition: fe_base.h:122
libMesh::InfFERadial::n_dofs
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:109
libMesh::is
PetscErrorCode PetscInt const PetscInt IS * is
Definition: petsc_dm_wrapper.C:60
libMesh::INVALID_ORDER
Definition: enum_order.h:86
libMesh::DenseMatrix::zero
virtual void zero() override
Set every element in the matrix to 0.
Definition: dense_matrix.h:838
libMesh::HIERARCHIC
Definition: enum_fe_family.h:37
libMesh::InfFE::base_fe
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:794
libMesh::MONOMIAL
Definition: enum_fe_family.h:39
libMesh::INFPRISM12
Definition: enum_elem_type.h:64
libMesh::InfFE::_base_shape_index
std::vector< unsigned int > _base_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has...
Definition: inf_fe.h:745
libMesh::PeriodicBoundaryBase::get_transformation_matrix
const DenseMatrix< Real > & get_transformation_matrix() const
Get the transformation matrix, if it is defined.
Definition: periodic_boundary_base.C:83
libMesh::FEInterface::dofs_on_side
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:553
libMesh::DenseMatrix::cholesky_solve
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
For symmetric positive definite (SPD) matrices.
Definition: dense_matrix_impl.h:947
libMesh::TRI6
Definition: enum_elem_type.h:40
libMesh::DenseVector::resize
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:355
libMesh::INVALID_ELEM
Definition: enum_elem_type.h:75
libMesh::InfFE::inverse_map
static Point inverse_map(const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe.h:397
libMesh::FEInterface::shape_deriv
static Real shape_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
Definition: fe_interface.C:845
swap
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
Definition: variant_filter_iterator.h:478
libMesh::Elem::is_edge
virtual bool is_edge(const unsigned int i) const =0
libMesh::InfFEMap::map
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40
libMesh::FEType
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:178
libMesh::FEType::order
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:197
libMesh::InfFEBase::build_elem
static Elem * build_elem(const Elem *inf_elem)
Build the base element of an infinite element.
Definition: inf_fe_base_radial.C:35
libMesh::PeriodicBoundaries::neighbor
const Elem * neighbor(boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side) const
Definition: periodic_boundaries.C:61
libMesh::FEFamily
FEFamily
Definition: enum_fe_family.h:34
libMesh::InfFE::_n_total_approx_sf
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:756
libMesh::INFQUAD6
Definition: enum_elem_type.h:59
libMesh::QBase::type
virtual QuadratureType type() const =0
libMesh::QUADSHELL8
Definition: enum_elem_type.h:73
libMesh::InfFE::radial_map
std::vector< std::vector< Real > > radial_map
the radial mapping shapes in local coordinates
Definition: inf_fe.h:673
libMesh::PYRAMID5
Definition: enum_elem_type.h:53
libMesh::Elem::hmin
virtual Real hmin() const
Definition: elem.C:359
libMesh::FEInterface::field_type
static FEFieldType field_type(const FEType &fe_type)
Definition: fe_interface.C:1683
libMesh::NEDELEC_ONE
Definition: enum_fe_family.h:61
libMesh::Elem::subdomain_id
subdomain_id_type subdomain_id() const
Definition: elem.h:2069
libMesh::InfFERadial::n_dofs_at_node
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
Definition: inf_fe_base_radial.C:119
libMesh::DofObject::id
dof_id_type id() const
Definition: dof_object.h:767
libMesh::InfFE::_total_qrule_weights
std::vector< Real > _total_qrule_weights
this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be...
Definition: inf_fe.h:768
libMesh::TYPE_VECTOR
Definition: enum_fe_family.h:94
libMesh::EDGE3
Definition: enum_elem_type.h:36
libMesh::QUADSHELL4
Definition: enum_elem_type.h:72
libMesh::Elem::side_index_range
IntRange< unsigned short > side_index_range() const
Definition: elem.h:2188
libMesh::InfFE::_compute_node_indices_fast_current_elem_type
static ElemType _compute_node_indices_fast_current_elem_type
When compute_node_indices_fast() is used, this static variable remembers the element type for which t...
Definition: inf_fe.h:821
libMesh::InfFE::compute_shape_indices
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...
Definition: inf_fe_static.C:839
libMesh::Elem::is_vertex
virtual bool is_vertex(const unsigned int i) const =0
libMesh::Elem::min_p_level_by_neighbor
unsigned int min_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
Definition: elem.C:1663
libMesh::FEGenericBase::dphase
std::vector< OutputGradient > dphase
Used for certain infinite element families: the first derivatives of the phase term in global coordin...
Definition: fe_base.h:628
libMesh::FEAbstract::_p_level
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:597
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::InfFE::dmodedv
std::vector< std::vector< Real > > dmodedv
the first local derivative of the radial approximation shapes.
Definition: inf_fe.h:668
libMesh::FEGenericBase::dphidx
std::vector< std::vector< OutputShape > > dphidx
Shape function derivatives in the x direction.
Definition: fe_base.h:532
std::norm
MetaPhysicL::DualNumber< T, D > norm(const MetaPhysicL::DualNumber< T, D > &in)
libMesh::Elem::is_face
virtual bool is_face(const unsigned int i) const =0
libMesh::InfFE::_radial_node_index
std::vector< unsigned int > _radial_node_index
The internal structure of the InfFE – tensor product of base element times radial nodes – has to be d...
Definition: inf_fe.h:715
libMesh::FEGenericBase::d2phidxdy
std::vector< std::vector< OutputShape > > d2phidxdy
Shape function second derivatives in the x-y direction.
Definition: fe_base.h:590
libMesh::NODEELEM
Definition: enum_elem_type.h:66
libMesh::PeriodicBoundaryBase::get_variables
const std::set< unsigned int > & get_variables() const
Get the set of variables for this periodic boundary condition.
Definition: periodic_boundary_base.C:108
data
IterBase * data
Ideally this private member data should have protected access.
Definition: variant_filter_iterator.h:337
libMesh::FEAbstract::elem_type
ElemType elem_type
The element type the current data structures are set up for.
Definition: fe_abstract.h:591
libMesh::L2_LAGRANGE
Definition: enum_fe_family.h:41
libMesh::FEGenericBase::determine_calculations
void determine_calculations()
Determine which values are to be calculated, for both the FE itself and for the FEMap.
Definition: fe_base.C:756
libMesh::FE::n_dofs
static unsigned int n_dofs(const ElemType t, const Order o)
libMesh::QUAD9
Definition: enum_elem_type.h:43
libMesh::FEGenericBase::OutputNumberGradient
TensorTools::IncrementRank< OutputNumber >::type OutputNumberGradient
Definition: fe_base.h:123
libMesh::LAGRANGE_VEC
Definition: enum_fe_family.h:60
libMesh::err
OStreamProxy err
libMesh::InfFE::eval
static Real eval(Real v, Order o_radial, unsigned int i)
libMesh::FEGenericBase::d2phidy2
std::vector< std::vector< OutputShape > > d2phidy2
Shape function second derivatives in the y direction.
Definition: fe_base.h:600
libMesh::LAGRANGE
Definition: enum_fe_family.h:36
libMesh::SCALAR
Definition: enum_fe_family.h:58
libMesh::InfFE::init_radial_shape_functions
void init_radial_shape_functions(const Elem *inf_elem, const std::vector< Point > *radial_pts=nullptr)
Some of the member data only depend on the radial part of the infinite element.
Definition: inf_fe.C:336
libMesh::SUBDIVISION
Definition: enum_fe_family.h:55
libMesh::Elem::neighbor_ptr
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2085
libMesh::Elem::node_ref
const Node & node_ref(const unsigned int i) const
Definition: elem.h:2031
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::PeriodicBoundaryBase::pairedboundary
boundary_id_type pairedboundary
Definition: periodic_boundary_base.h:58
libMesh::Variable::active_on_subdomain
bool active_on_subdomain(subdomain_id_type sid) const
Definition: variable.h:136
libMesh::QBase::get_order
Order get_order() const
Definition: quadrature.h:211
libMesh::FEType::default_quadrature_order
Order default_quadrature_order() const
Definition: fe_type.h:353
libMesh::InfFE::dradialdv_map
std::vector< std::vector< Real > > dradialdv_map
the first local derivative of the radial mapping shapes
Definition: inf_fe.h:679
libMesh::ReferenceCounter::_enable_print_counter
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called.
Definition: reference_counter.h:141
libMesh::InfFE::_warned_for_shape
static bool _warned_for_shape
Definition: inf_fe.h:830
libMesh::FEContinuity
FEContinuity
Definition: enum_fe_family.h:77
libMesh::Elem::n_sides
virtual unsigned int n_sides() const =0
libMesh::PRISM18
Definition: enum_elem_type.h:52
libMesh::TRISHELL3
Definition: enum_elem_type.h:71
libMesh::Elem::node_ptr
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2009
libMesh::FEGenericBase::d2phidx2
std::vector< std::vector< OutputShape > > d2phidx2
Shape function second derivatives in the x direction.
Definition: fe_base.h:585
libMesh::DofConstraintRow
std::map< dof_id_type, Real, std::less< dof_id_type >, Threads::scalable_allocator< std::pair< const dof_id_type, Real > > > DofConstraintRow
A row of the Dof constraint matrix.
Definition: dof_map.h:97
libMesh::Elem::which_neighbor_am_i
unsigned int which_neighbor_am_i(const Elem *e) const
This function tells you which neighbor e is.
Definition: elem.h:2323
libMesh::InfFE::dist
std::vector< Real > dist
the radial distance of the base nodes from the origin
Definition: inf_fe.h:634
libMesh::remote_elem
const RemoteElem * remote_elem
Definition: remote_elem.C:57
libMesh::FEAbstract::print_JxW
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
Definition: fe_abstract.C:805
libMesh::FEType::radial_order
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:236
libMesh::FEAbstract::calculate_d2phi
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:557
libMesh::FEGenericBase::weight
std::vector< Real > weight
Used for certain infinite element families: the additional radial weight in local coordinates,...
Definition: fe_base.h:642
libMesh::PYRAMID13
Definition: enum_elem_type.h:54
libMesh::InfFE::_radial_shape_index
std::vector< unsigned int > _radial_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has...
Definition: inf_fe.h:735
libMesh::Quality::name
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
libMesh::InfFERadial::D
static Real D(const Real v)
Definition: inf_fe.h:82
libMesh::DenseVector< Number >
libMesh::InfFEBase::get_elem_type
static ElemType get_elem_type(const ElemType type)
Definition: inf_fe_base_radial.C:49
libMesh::PYRAMID14
Definition: enum_elem_type.h:55
libMesh::EDGE2
Definition: enum_elem_type.h:35
libMesh::QUAD8
Definition: enum_elem_type.h:42
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33
libMesh::TypeVector::absolute_fuzzy_equals
bool absolute_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:1017
libMesh::NodeConstraintRow
std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
A row of the Node constraint mapping.
Definition: dof_map.h:145
libMesh::InfFEBase::n_base_mapping_sf
static unsigned int n_base_mapping_sf(const Elem &base_elem, const Order base_mapping_order)
Definition: inf_fe_base_radial.C:95
libMesh::FEInterface::shape
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:687