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 ()=default
 
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
 
virtual const std::vector< Point > & get_xyz () const override
 
virtual const std::vector< Real > & get_JxW () const override
 
virtual const std::vector< Real > & get_JxWxdecay_sq () const override
 
virtual const std::vector< std::vector< OutputShape > > & get_phi_over_decayxR () const override
 
virtual const std::vector< std::vector< OutputGradient > > & get_dphi_over_decayxR () const override
 
virtual const std::vector< std::vector< OutputGradient > > & get_dphi_over_decay () const override
 
virtual const std::vector< RealGradient > & get_dxyzdxi () const override
 
virtual const std::vector< RealGradient > & get_dxyzdeta () const override
 
virtual const std::vector< RealGradient > & get_dxyzdzeta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxi2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdeta2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdzeta2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxideta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxidzeta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdetadzeta () const override
 
virtual const std::vector< Real > & get_dxidx () const override
 
virtual const std::vector< Real > & get_dxidy () const override
 
virtual const std::vector< Real > & get_dxidz () const override
 
virtual const std::vector< Real > & get_detadx () const override
 
virtual const std::vector< Real > & get_detady () const override
 
virtual const std::vector< Real > & get_detadz () const override
 
virtual const std::vector< Real > & get_dzetadx () const override
 
virtual const std::vector< Real > & get_dzetady () const override
 
virtual const std::vector< Real > & get_dzetadz () const override
 
virtual const std::vector< Real > & get_Sobolev_weight () const override
 
virtual const std::vector< RealGradient > & get_Sobolev_dweight () const override
 
virtual const std::vector< std::vector< Point > > & get_tangents () const override
 
virtual const std::vector< Point > & get_normals () const override
 
virtual const std::vector< Real > & get_curvatures () const override
 
virtual const std::vector< Real > & get_Sobolev_weightxR_sq () const override
 
virtual const std::vector< RealGradient > & get_Sobolev_dweightxR_sq () 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< OutputShape > > & get_dual_phi () const
 
virtual void request_phi () const override
 request phi calculations More...
 
virtual void request_dual_phi () const override
 
const std::vector< std::vector< OutputGradient > > & get_dphi () const
 
const std::vector< std::vector< OutputGradient > > & get_dual_dphi () const
 
virtual void request_dphi () const override
 request dphi calculations More...
 
virtual void request_dual_dphi () const override
 
const DenseMatrix< Real > & get_dual_coeff () const
 
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi () const
 
virtual_for_inffe 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< OutputTensor > > & get_dual_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
 
virtual void print_phi (std::ostream &os) const override
 Prints the value of each shape function at each quadrature point. More...
 
virtual void print_dual_phi (std::ostream &os) const override
 
virtual void print_dphi (std::ostream &os) const override
 Prints the value of each shape function's derivative at each quadrature point. More...
 
virtual void print_dual_dphi (std::ostream &os) const override
 
virtual void print_d2phi (std::ostream &os) const override
 Prints the value of each shape function's second derivatives at each quadrature point. More...
 
virtual void print_dual_d2phi (std::ostream &os) const override
 
virtual void reinit_dual_shape_coeffs (const Elem *, const std::vector< Point > &, const std::vector< Real > &)
 This re-computes the dual shape function coefficients using CUSTOMIZED qrule. More...
 
virtual void reinit_default_dual_shape_coeffs (const Elem *)
 This re-computes the dual shape function coefficients using DEFAULT qrule. More...
 
unsigned int get_dim () const
 
void get_nothing () const
 
const Elemget_elem () 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...
 
void set_calculate_dual (const bool val)
 set calculate_dual as needed More...
 
void set_calculate_default_dual_coeff (const bool val)
 set calculate_default_dual_coeff as needed More...
 
void add_p_level_in_reinit (bool value)
 Indicate whether to add p-refinement levels in init/reinit methods. More...
 
bool add_p_level_in_reinit () const
 Whether to add p-refinement levels in init/reinit methods. 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 (const FEType fet, const Elem *elem, const unsigned int i, const Point &p, const bool add_p_level)
 
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 Elem *inf_elem, const unsigned int i, const unsigned int j, const Point &p, const bool add_p_level)
 
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 Elem *inf_elem)
 
static unsigned int n_dofs (const FEType &fet, const Elem *inf_elem)
 
static unsigned int n_dofs_at_node (const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
 
static unsigned int n_dofs_at_node (const FEType &fet, const Elem *inf_elem, const unsigned int n)
 
static unsigned int n_dofs_per_elem (const FEType &fet, const ElemType inf_elem_type)
 
static unsigned int n_dofs_per_elem (const FEType &fet, const Elem *inf_elem)
 
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 void inf_compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *child_elem)
 Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number, adapted to infinite elements. More...
 
static void inf_compute_node_constraints (NodeConstraints &constraints, const Elem *elem)
 
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_stream=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...
 
virtual void determine_calculations () override
 Determine which values are to be calculated, for both the FE itself and for the FEMap. 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 compute_shape_functions (const Elem *inf_elem, const std::vector< Point > &base_qp, const std::vector< Point > &radial_qp)
 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...
 
void compute_face_functions ()
 
virtual void compute_shape_functions (const Elem *, const std::vector< Point > &) override
 Use compute_shape_functions(const Elem*, const std::vector<Point> &, const std::vector<Point> &) instead. 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)
 
bool calculating_nothing () const
 
void compute_dual_shape_coeffs (const std::vector< Real > &JxW, const std::vector< std::vector< OutputShape >> &phi)
 Compute the dual basis coefficients dual_coeff we rely on the JxW (or weights) and the phi values, which can come from default or customized qrule. More...
 
template<>
void compute_dual_shape_coeffs (const std::vector< Real > &, const std::vector< std::vector< OutputShape >> &)
 
template<>
void compute_dual_shape_coeffs (const std::vector< Real > &JxW, const std::vector< std::vector< OutputShape >> &phi_vals)
 
void compute_dual_shape_functions ()
 Compute dual_phi, dual_dphi, dual_d2phi It is only valid for this to be called after reinit has occurred with a quadrature rule. More...
 
template<>
void compute_dual_shape_functions ()
 
template<>
void compute_dual_shape_functions ()
 
void increment_constructor_count (const std::string &name) noexcept
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name) noexcept
 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)
 
static void compute_shape_indices (const FEType &fet, const Elem *inf_elem, 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 inf_elem. More...
 

Protected Attributes

bool calculate_map_scaled
 Are we calculating scaled mapping functions? More...
 
bool calculate_phi_scaled
 Are we calculating scaled shape functions? More...
 
bool calculate_dphi_scaled
 Are we calculating scaled shape function gradients? More...
 
bool calculate_xyz
 Are we calculating the positions of quadrature points? More...
 
bool calculate_jxw
 Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst stability. More...
 
std::vector< Pointxyz
 Physical quadrature points. More...
 
std::vector< Realweightxr_sq
 
std::vector< Realdweightdv
 the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points. More...
 
std::vector< RealGradientdweightxr_sq
 
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< Realdxidx_map
 
std::vector< Realdxidy_map
 
std::vector< Realdxidz_map
 
std::vector< Realdetadx_map
 
std::vector< Realdetady_map
 
std::vector< Realdetadz_map
 
std::vector< Realdzetadx_map
 
std::vector< Realdzetady_map
 
std::vector< Realdzetadz_map
 
std::vector< Realdxidx_map_scaled
 
std::vector< Realdxidy_map_scaled
 
std::vector< Realdxidz_map_scaled
 
std::vector< Realdetadx_map_scaled
 
std::vector< Realdetady_map_scaled
 
std::vector< Realdetadz_map_scaled
 
std::vector< Realdzetadx_map_scaled
 
std::vector< Realdzetady_map_scaled
 
std::vector< Realdzetadz_map_scaled
 
std::vector< std::vector< Real > > phixr
 
std::vector< std::vector< RealGradient > > dphixr
 
std::vector< std::vector< RealGradient > > dphixr_sq
 
std::vector< RealJxWxdecay
 
std::vector< RealJxW
 
std::vector< Pointnormals
 
std::vector< std::vector< Point > > tangents
 
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...
 
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< const Elembase_elem
 The "base" (aka non-infinite) 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< OutputShape > > dual_phi
 
std::vector< std::vector< OutputGradient > > dphi
 Shape function derivative values. More...
 
std::vector< std::vector< OutputGradient > > dual_dphi
 
DenseMatrix< Realdual_coeff
 Coefficient matrix for the dual basis. 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< OutputTensor > > dual_d2phi
 
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_dual
 Are we calculating dual basis? More...
 
bool calculate_default_dual_coeff
 Are we calculating the coefficient for the dual basis using the default qrule? More...
 
bool calculate_nothing
 Are we potentially deliberately calculating nothing? 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 were set up for. More...
 
const Elem_elem
 The element the current data structures were set up for. More...
 
unsigned int _elem_p_level
 The element p-refinement level 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...
 
unsigned int _n_total_qp
 The total number of quadrature points for the current configuration. More...
 
bool _add_p_level_in_reinit
 Whether to add p-refinement levels in init/reinit methods. 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.

For the derivation and some background of the implemented algorithm see https://arxiv.org/abs/2501.05568.

Author
Daniel Dreyer
Date
2003 Base class for all the infinite geometric element types.

Definition at line 42 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 119 of file reference_counter.h.

◆ OutputDivergence

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

Definition at line 122 of file fe_base.h.

◆ OutputGradient

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

Definition at line 120 of file fe_base.h.

◆ OutputNumber

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

Definition at line 123 of file fe_base.h.

◆ OutputNumberDivergence

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

Definition at line 126 of file fe_base.h.

◆ OutputNumberGradient

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

Definition at line 124 of file fe_base.h.

◆ OutputNumberTensor

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

Definition at line 125 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 119 of file fe_base.h.

◆ OutputTensor

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

Definition at line 121 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 43 of file inf_fe.C.

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.

43  :
44  FEBase (Dim, fet),
45 
46  calculate_map_scaled(false),
47  calculate_phi_scaled(false),
48  calculate_dphi_scaled(false),
49  calculate_xyz(false),
50  calculate_jxw(false),
52 
53  // initialize the current_fe_type to all the same
54  // values as \p fet (since the FE families and coordinate
55  // map type should not change), but use an invalid order
56  // for the radial part (since this is the only order
57  // that may change!).
58  // the data structures like \p phi etc are not initialized
59  // through the constructor, but through reinit()
60  current_fe_type (FEType(fet.order,
61  fet.family,
63  fet.radial_family,
64  fet.inf_map))
65 
66 {
67  // Sanity checks
68  libmesh_assert_equal_to (T_radial, fe_type.radial_family);
69  libmesh_assert_equal_to (T_map, fe_type.inf_map);
70 
71  // build the base_fe object
72  if (Dim != 1)
73  base_fe = FEBase::build(Dim-1, fet);
74 }
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition: inf_fe.h:983
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:284
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:1216
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
FEGenericBase< Real > FEBase
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1173
FEFamily radial_family
The type of approximation in radial direction.
Definition: fe_type.h:276
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730

◆ ~InfFE()

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

Member Function Documentation

◆ add_p_level_in_reinit() [1/2]

void libMesh::FEAbstract::add_p_level_in_reinit ( bool  value)
inlineinherited

Indicate whether to add p-refinement levels in init/reinit methods.

Definition at line 631 of file fe_abstract.h.

References libMesh::FEAbstract::_add_p_level_in_reinit, and value.

Referenced by libMesh::FEMContext::build_new_fe().

bool _add_p_level_in_reinit
Whether to add p-refinement levels in init/reinit methods.
Definition: fe_abstract.h:787
static const bool value
Definition: xdr_io.C:55

◆ add_p_level_in_reinit() [2/2]

bool libMesh::FEAbstract::add_p_level_in_reinit ( ) const
inlineinherited

Whether to add p-refinement levels in init/reinit methods.

Definition at line 636 of file fe_abstract.h.

References libMesh::FEAbstract::_add_p_level_in_reinit.

636 { return _add_p_level_in_reinit; }
bool _add_p_level_in_reinit
Whether to add p-refinement levels in init/reinit methods.
Definition: fe_abstract.h:787

◆ 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 79 of file inf_fe.C.

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

80 {
81  libmesh_assert(q);
83 
84  const Order base_int_order = q->get_order();
85  const Order radial_int_order = static_cast<Order>(2 * (static_cast<unsigned int>(fe_type.radial_order.get_order()) + 1) +2);
86  const unsigned int qrule_dim = q->get_dim();
87 
88  if (Dim != 1)
89  {
90  // build a Dim-1 quadrature rule of the type that we received
91  base_qrule = QBase::build(q->type(), qrule_dim-1, base_int_order);
92  base_fe->attach_quadrature_rule(base_qrule.get());
93  }
94 
95  // in radial direction, always use Gauss quadrature
96  radial_qrule = std::make_unique<QGauss>(1, radial_int_order);
97 
98  // Maybe helpful to store the QBase *
99  // with which we initialized our own quadrature rules.
100  // Used e.g. in \p InfFE::reinit(elem,side)
101  qrule = q;
102 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
libmesh_assert(ctx)
QBase * qrule
A pointer to the quadrature rule employed.
Definition: fe_abstract.h:762
int get_order() const
Explicitly request the order as an int.
Definition: fe_type.h:80
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
static std::unique_ptr< QBase > build(std::string_view name, const unsigned int dim, const Order order=INVALID_ORDER)
Builds a specific quadrature rule based on the name string.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730

◆ build() [1/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(), libMesh::MeshFunction::_gradient_on_elem(), alternative_fe_assembly(), assemble(), LinearElasticity::assemble(), assemble_1D(), libMesh::ClawSystem::assemble_advection_matrices(), libMesh::ClawSystem::assemble_avg_coupling_matrices(), assemble_biharmonic(), libMesh::ClawSystem::assemble_boundary_condition_matrices(), assemble_cd(), assemble_divgrad(), assemble_elasticity(), assemble_ellipticdg(), assemble_func(), assemble_graddiv(), assemble_helmholtz(), libMesh::ClawSystem::assemble_jump_coupling_matrix(), assemble_laplace(), assemble_mass(), libMesh::ClawSystem::assemble_mass_matrix(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_temperature_jump(), assemble_wave(), libMesh::FEMContext::cached_fe(), libMesh::System::calculate_norm(), libMesh::FEInterface::compute_data(), compute_enriched_soln(), compute_jacobian(), compute_residual(), compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::ExactErrorEstimator::estimate_error(), fe_assembly(), form_functionA(), form_functionB(), form_matrixA(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), integrate_function(), LaplaceYoung::jacobian(), LargeDeformationElasticity::jacobian(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), OverlappingCouplingFunctor::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::SmoothnessEstimator::EstimateSmoothness::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::MeshFunction::operator()(), periodic_bc_test_poisson(), libMesh::System::point_hessian(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), LaplaceYoung::residual(), LargeDeformationElasticity::residual(), libMesh::HPCoarsenTest::select_refinement(), RationalMapTest< elem_type >::setUp(), DualShapeTest::setUp(), FETestBase< order, family, elem_type, N_x >::setUp(), libMesh::Elem::side_vertex_average_normal(), SideVertexAverageNormalTest::testC0Polygon(), FETest< order, family, elem_type, CaseName >::testCustomReinit(), SideVertexAverageNormalTest::testEdge3(), SideVertexAverageNormalTest::testHexes(), InfFERadialTest::testRefinement(), InfFERadialTest::testSides(), libMesh::Elem::true_centroid(), and libMesh::Elem::volume().

◆ build() [2/3]

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

Definition at line 191 of file fe_base.C.

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

◆ build() [3/3]

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

Definition at line 413 of file fe_base.C.

415 {
416  switch (dim)
417  {
418  // 0D
419  case 0:
420  {
421  switch (fet.family)
422  {
423  case HIERARCHIC_VEC:
424  return std::make_unique<FEHierarchicVec<0>>(fet);
425 
426  case L2_HIERARCHIC_VEC:
427  return std::make_unique<FEL2HierarchicVec<0>>(fet);
428 
429  case LAGRANGE_VEC:
430  return std::make_unique<FELagrangeVec<0>>(fet);
431 
432  case L2_LAGRANGE_VEC:
433  return std::make_unique<FEL2LagrangeVec<0>>(fet);
434 
435  case MONOMIAL_VEC:
436  return std::make_unique<FEMonomialVec<0>>(fet);
437 
438  default:
439  libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
440  }
441  }
442  case 1:
443  {
444  switch (fet.family)
445  {
446  case HIERARCHIC_VEC:
447  return std::make_unique<FEHierarchicVec<1>>(fet);
448 
449  case L2_HIERARCHIC_VEC:
450  return std::make_unique<FEL2HierarchicVec<1>>(fet);
451 
452  case LAGRANGE_VEC:
453  return std::make_unique<FELagrangeVec<1>>(fet);
454 
455  case L2_LAGRANGE_VEC:
456  return std::make_unique<FEL2LagrangeVec<1>>(fet);
457 
458  case MONOMIAL_VEC:
459  return std::make_unique<FEMonomialVec<1>>(fet);
460 
461  default:
462  libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
463  }
464  }
465  case 2:
466  {
467  switch (fet.family)
468  {
469  case HIERARCHIC_VEC:
470  return std::make_unique<FEHierarchicVec<2>>(fet);
471 
472  case L2_HIERARCHIC_VEC:
473  return std::make_unique<FEL2HierarchicVec<2>>(fet);
474 
475  case LAGRANGE_VEC:
476  return std::make_unique<FELagrangeVec<2>>(fet);
477 
478  case L2_LAGRANGE_VEC:
479  return std::make_unique<FEL2LagrangeVec<2>>(fet);
480 
481  case MONOMIAL_VEC:
482  return std::make_unique<FEMonomialVec<2>>(fet);
483 
484  case NEDELEC_ONE:
485  return std::make_unique<FENedelecOne<2>>(fet);
486 
487  case RAVIART_THOMAS:
488  return std::make_unique<FERaviartThomas<2>>(fet);
489 
490  case L2_RAVIART_THOMAS:
491  return std::make_unique<FEL2RaviartThomas<2>>(fet);
492 
493  default:
494  libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
495  }
496  }
497  case 3:
498  {
499  switch (fet.family)
500  {
501  case HIERARCHIC_VEC:
502  return std::make_unique<FEHierarchicVec<3>>(fet);
503 
504  case L2_HIERARCHIC_VEC:
505  return std::make_unique<FEL2HierarchicVec<3>>(fet);
506 
507  case LAGRANGE_VEC:
508  return std::make_unique<FELagrangeVec<3>>(fet);
509 
510  case L2_LAGRANGE_VEC:
511  return std::make_unique<FEL2LagrangeVec<3>>(fet);
512 
513  case MONOMIAL_VEC:
514  return std::make_unique<FEMonomialVec<3>>(fet);
515 
516  case NEDELEC_ONE:
517  return std::make_unique<FENedelecOne<3>>(fet);
518 
519  case RAVIART_THOMAS:
520  return std::make_unique<FERaviartThomas<3>>(fet);
521 
522  case L2_RAVIART_THOMAS:
523  return std::make_unique<FEL2RaviartThomas<3>>(fet);
524 
525  default:
526  libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
527  }
528  }
529 
530  default:
531  libmesh_error_msg("Invalid dimension dim = " << dim);
532  } // switch(dim)
533 }
FEFamily family
The type of finite element.
Definition: fe_type.h:228
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660
std::string enum_to_string(const T e)

◆ build_InfFE() [1/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_func(), assemble_SchroedingerEquation(), assemble_wave(), libMesh::FEMContext::cached_fe(), libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), InfFERadialTest::testInfQuants(), InfFERadialTest::testInfQuants_numericDeriv(), InfFERadialTest::testRefinement(), InfFERadialTest::testSides(), and InfFERadialTest::testSingleOrder().

◆ build_InfFE() [2/3]

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

Definition at line 546 of file fe_base.C.

548 {
549  switch (dim)
550  {
551 
552  // 1D
553  case 1:
554  {
555  switch (fet.radial_family)
556  {
557  case INFINITE_MAP:
558  libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
559 
560  case JACOBI_20_00:
561  {
562  switch (fet.inf_map)
563  {
564  case CARTESIAN:
565  return std::make_unique<InfFE<1,JACOBI_20_00,CARTESIAN>>(fet);
566 
567  default:
568  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
569  }
570  }
571 
572  case JACOBI_30_00:
573  {
574  switch (fet.inf_map)
575  {
576  case CARTESIAN:
577  return std::make_unique<InfFE<1,JACOBI_30_00,CARTESIAN>>(fet);
578 
579  default:
580  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
581  }
582  }
583 
584  case LEGENDRE:
585  {
586  switch (fet.inf_map)
587  {
588  case CARTESIAN:
589  return std::make_unique<InfFE<1,LEGENDRE,CARTESIAN>>(fet);
590 
591  default:
592  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
593  }
594  }
595 
596  case LAGRANGE:
597  {
598  switch (fet.inf_map)
599  {
600  case CARTESIAN:
601  return std::make_unique<InfFE<1,LAGRANGE,CARTESIAN>>(fet);
602 
603  default:
604  libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
605  }
606  }
607 
608  default:
609  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
610  }
611  }
612 
613 
614 
615 
616  // 2D
617  case 2:
618  {
619  switch (fet.radial_family)
620  {
621  case INFINITE_MAP:
622  libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
623 
624  case JACOBI_20_00:
625  {
626  switch (fet.inf_map)
627  {
628  case CARTESIAN:
629  return std::make_unique<InfFE<2,JACOBI_20_00,CARTESIAN>>(fet);
630 
631  default:
632  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
633  }
634  }
635 
636  case JACOBI_30_00:
637  {
638  switch (fet.inf_map)
639  {
640  case CARTESIAN:
641  return std::make_unique<InfFE<2,JACOBI_30_00,CARTESIAN>>(fet);
642 
643  default:
644  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
645  }
646  }
647 
648  case LEGENDRE:
649  {
650  switch (fet.inf_map)
651  {
652  case CARTESIAN:
653  return std::make_unique<InfFE<2,LEGENDRE,CARTESIAN>>(fet);
654 
655  default:
656  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
657  }
658  }
659 
660  case LAGRANGE:
661  {
662  switch (fet.inf_map)
663  {
664  case CARTESIAN:
665  return std::make_unique<InfFE<2,LAGRANGE,CARTESIAN>>(fet);
666 
667  default:
668  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
669  }
670  }
671 
672  default:
673  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
674  }
675  }
676 
677 
678 
679 
680  // 3D
681  case 3:
682  {
683  switch (fet.radial_family)
684  {
685  case INFINITE_MAP:
686  libmesh_error_msg("ERROR: Don't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
687 
688  case JACOBI_20_00:
689  {
690  switch (fet.inf_map)
691  {
692  case CARTESIAN:
693  return std::make_unique<InfFE<3,JACOBI_20_00,CARTESIAN>>(fet);
694 
695  default:
696  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
697  }
698  }
699 
700  case JACOBI_30_00:
701  {
702  switch (fet.inf_map)
703  {
704  case CARTESIAN:
705  return std::make_unique<InfFE<3,JACOBI_30_00,CARTESIAN>>(fet);
706 
707  default:
708  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
709  }
710  }
711 
712  case LEGENDRE:
713  {
714  switch (fet.inf_map)
715  {
716  case CARTESIAN:
717  return std::make_unique<InfFE<3,LEGENDRE,CARTESIAN>>(fet);
718 
719  default:
720  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
721  }
722  }
723 
724  case LAGRANGE:
725  {
726  switch (fet.inf_map)
727  {
728  case CARTESIAN:
729  return std::make_unique<InfFE<3,LAGRANGE,CARTESIAN>>(fet);
730 
731  default:
732  libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
733  }
734  }
735 
736  default:
737  libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
738  }
739  }
740 
741  default:
742  libmesh_error_msg("Invalid dimension dim = " << dim);
743  }
744 }
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:284
FEFamily radial_family
The type of approximation in radial direction.
Definition: fe_type.h:276
std::string enum_to_string(const T e)

◆ build_InfFE() [3/3]

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

Definition at line 750 of file fe_base.C.

752 {
753  // No vector types defined... YET.
754  libmesh_not_implemented();
755  return std::unique_ptr<FEVectorBase>();
756 }

◆ calculating_nothing()

template<typename OutputType>
bool libMesh::FEGenericBase< OutputType >::calculating_nothing ( ) const
inlineprotectedinherited
Returns
true iff no calculations have been requested of this FE object or of its associated FEMap

Definition at line 568 of file fe_base.h.

569  {
570  return calculate_nothing &&
571  !this->calculate_phi && !this->calculate_dphi &&
572 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
573  !this->calculate_d2phi &&
574 #endif
575  !this->calculate_curl_phi && !this->calculate_div_phi &&
576  !this->calculate_map;
577  }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculate_curl_phi
Should we calculate shape function curls?
Definition: fe_abstract.h:712
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
bool calculate_div_phi
Should we calculate shape function divergences?
Definition: fe_abstract.h:717
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
bool calculate_nothing
Are we potentially deliberately calculating nothing?
Definition: fe_abstract.h:681

◆ 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 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 976 of file fe_base.C.

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

982 {
983  // Side/edge local DOF indices
984  std::vector<unsigned int> new_side_dofs, old_side_dofs;
985 
986  // FIXME: what about 2D shells in 3D space?
987  unsigned int dim = elem->dim();
988 
989  // Cache n_children(); it's a virtual call but it's const.
990  const unsigned int n_children = elem->n_children();
991 
992  // We use local FE objects for now
993  // FIXME: we should use more, external objects instead for efficiency
994  const FEType & base_fe_type = dof_map.variable_type(var);
995  std::unique_ptr<FEGenericBase<OutputShape>> fe
996  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
997  std::unique_ptr<FEGenericBase<OutputShape>> fe_coarse
998  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
999 
1000  std::unique_ptr<QBase> qrule (base_fe_type.default_quadrature_rule(dim));
1001  std::unique_ptr<QBase> qedgerule (base_fe_type.default_quadrature_rule(1));
1002  std::unique_ptr<QBase> qsiderule (base_fe_type.default_quadrature_rule(dim-1));
1003  std::vector<Point> coarse_qpoints;
1004 
1005  // The values of the shape functions at the quadrature
1006  // points
1007  const std::vector<std::vector<OutputShape>> & phi_values =
1008  fe->get_phi();
1009  const std::vector<std::vector<OutputShape>> & phi_coarse =
1010  fe_coarse->get_phi();
1011 
1012  // The gradients of the shape functions at the quadrature
1013  // points on the child element.
1014  const std::vector<std::vector<OutputGradient>> * dphi_values =
1015  nullptr;
1016  const std::vector<std::vector<OutputGradient>> * dphi_coarse =
1017  nullptr;
1018 
1019  const FEContinuity cont = fe->get_continuity();
1020 
1021  if (cont == C_ONE)
1022  {
1023  const std::vector<std::vector<OutputGradient>> &
1024  ref_dphi_values = fe->get_dphi();
1025  dphi_values = &ref_dphi_values;
1026  const std::vector<std::vector<OutputGradient>> &
1027  ref_dphi_coarse = fe_coarse->get_dphi();
1028  dphi_coarse = &ref_dphi_coarse;
1029  }
1030 
1031  // The Jacobian * quadrature weight at the quadrature points
1032  const std::vector<Real> & JxW =
1033  fe->get_JxW();
1034 
1035  // The XYZ locations of the quadrature points on the
1036  // child element
1037  const std::vector<Point> & xyz_values =
1038  fe->get_xyz();
1039 
1040  // Number of nodes on parent element
1041  const unsigned int n_nodes = elem->n_nodes();
1042 
1043  // Number of dofs on parent element
1044  const unsigned int new_n_dofs =
1045  FEInterface::n_dofs(base_fe_type, elem->max_descendant_p_level(), elem);
1046 
1047  // Fixed vs. free DoFs on edge/face projections
1048  std::vector<char> dof_is_fixed(new_n_dofs, false); // bools
1049  std::vector<int> free_dof(new_n_dofs, 0);
1050 
1051  DenseMatrix<Real> Ke;
1053  Ue.resize(new_n_dofs); Ue.zero();
1054 
1055 
1056  // When coarsening, in general, we need a series of
1057  // projections to ensure a unique and continuous
1058  // solution. We start by interpolating nodes, then
1059  // hold those fixed and project edges, then
1060  // hold those fixed and project faces, then
1061  // hold those fixed and project interiors
1062 
1063  // Copy node values first
1064  {
1065  std::vector<dof_id_type> node_dof_indices;
1066  if (use_old_dof_indices)
1067  dof_map.old_dof_indices (elem, node_dof_indices, var);
1068  else
1069  dof_map.dof_indices (elem, node_dof_indices, var);
1070 
1071  unsigned int current_dof = 0;
1072  for (unsigned int n=0; n!= n_nodes; ++n)
1073  {
1074  // FIXME: this should go through the DofMap,
1075  // not duplicate dof_indices code badly!
1076  const unsigned int my_nc =
1077  FEInterface::n_dofs_at_node (base_fe_type, elem->max_descendant_p_level(), elem, n);
1078  if (!elem->is_vertex(n))
1079  {
1080  current_dof += my_nc;
1081  continue;
1082  }
1083 
1084  // We're assuming here that child n shares vertex n,
1085  // which is wrong on non-simplices right now
1086  // ... but this code isn't necessary except on elements
1087  // where p refinement creates more vertex dofs; we have
1088  // no such elements yet.
1089  int extra_order = 0;
1090  // if (elem->child_ptr(n)->p_level() < elem->p_level())
1091  // extra_order = elem->child_ptr(n)->p_level();
1092  const unsigned int nc =
1093  FEInterface::n_dofs_at_node (base_fe_type, extra_order, elem, n);
1094  for (unsigned int i=0; i!= nc; ++i)
1095  {
1096  Ue(current_dof) =
1097  old_vector(node_dof_indices[current_dof]);
1098  dof_is_fixed[current_dof] = true;
1099  current_dof++;
1100  }
1101  }
1102  }
1103 
1104  FEType fe_type = base_fe_type, temp_fe_type;
1105  fe_type.order = fe_type.order + elem->max_descendant_p_level();
1106 
1107  // In 3D, project any edge values next
1108  if (dim > 2 && cont != DISCONTINUOUS)
1109  for (auto e : elem->edge_index_range())
1110  {
1112  e, new_side_dofs);
1113 
1114  const unsigned int n_new_side_dofs =
1115  cast_int<unsigned int>(new_side_dofs.size());
1116 
1117  // Some edge dofs are on nodes and already
1118  // fixed, others are free to calculate
1119  unsigned int free_dofs = 0;
1120  for (unsigned int i=0; i != n_new_side_dofs; ++i)
1121  if (!dof_is_fixed[new_side_dofs[i]])
1122  free_dof[free_dofs++] = i;
1123  Ke.resize (free_dofs, free_dofs); Ke.zero();
1124  Fe.resize (free_dofs); Fe.zero();
1125  // The new edge coefficients
1126  DenseVector<Number> Uedge(free_dofs);
1127 
1128  // Add projection terms from each child sharing
1129  // this edge
1130  for (unsigned int c=0; c != n_children; ++c)
1131  {
1132  if (!elem->is_child_on_edge(c,e))
1133  continue;
1134  const Elem * child = elem->child_ptr(c);
1135 
1136  std::vector<dof_id_type> child_dof_indices;
1137  if (use_old_dof_indices)
1138  dof_map.old_dof_indices (child,
1139  child_dof_indices, var);
1140  else
1141  dof_map.dof_indices (child,
1142  child_dof_indices, var);
1143  const unsigned int child_n_dofs =
1144  cast_int<unsigned int>
1145  (child_dof_indices.size());
1146 
1147  temp_fe_type = base_fe_type;
1148  temp_fe_type.order = temp_fe_type.order + child->p_level();
1149 
1151  temp_fe_type, e, old_side_dofs);
1152 
1153  // Initialize both child and parent FE data
1154  // on the child's edge
1155  fe->attach_quadrature_rule (qedgerule.get());
1156  fe->edge_reinit (child, e);
1157  const unsigned int n_qp = qedgerule->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 edge 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(phi_coarse[i][qp],
1224  fineval) * JxW[qp];
1225  if (cont == C_ONE)
1226  Fe(freei) +=
1227  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1228  freei++;
1229  }
1230  }
1231  }
1232  Ke.cholesky_solve(Fe, Uedge);
1233 
1234  // Transfer new edge solutions to element
1235  for (unsigned int i=0; i != free_dofs; ++i)
1236  {
1237  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1238  libmesh_assert(std::abs(ui) < TOLERANCE ||
1239  std::abs(ui - Uedge(i)) < TOLERANCE);
1240  ui = Uedge(i);
1241  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1242  }
1243  }
1244 
1245  // Project any side values (edges in 2D, faces in 3D)
1246  if (dim > 1 && cont != DISCONTINUOUS)
1247  for (auto s : elem->side_index_range())
1248  {
1250  s, new_side_dofs);
1251 
1252  const unsigned int n_new_side_dofs =
1253  cast_int<unsigned int>(new_side_dofs.size());
1254 
1255  // Some side dofs are on nodes/edges and already
1256  // fixed, others are free to calculate
1257  unsigned int free_dofs = 0;
1258  for (unsigned int i=0; i != n_new_side_dofs; ++i)
1259  if (!dof_is_fixed[new_side_dofs[i]])
1260  free_dof[free_dofs++] = i;
1261  Ke.resize (free_dofs, free_dofs); Ke.zero();
1262  Fe.resize (free_dofs); Fe.zero();
1263  // The new side coefficients
1264  DenseVector<Number> Uside(free_dofs);
1265 
1266  // Add projection terms from each child sharing
1267  // this side
1268  for (unsigned int c=0; c != n_children; ++c)
1269  {
1270  if (!elem->is_child_on_side(c,s))
1271  continue;
1272  const Elem * child = elem->child_ptr(c);
1273 
1274  std::vector<dof_id_type> child_dof_indices;
1275  if (use_old_dof_indices)
1276  dof_map.old_dof_indices (child,
1277  child_dof_indices, var);
1278  else
1279  dof_map.dof_indices (child,
1280  child_dof_indices, var);
1281  const unsigned int child_n_dofs =
1282  cast_int<unsigned int>
1283  (child_dof_indices.size());
1284 
1285  temp_fe_type = base_fe_type;
1286  temp_fe_type.order = temp_fe_type.order + child->p_level();
1287 
1289  temp_fe_type, s, old_side_dofs);
1290 
1291  // Initialize both child and parent FE data
1292  // on the child's side
1293  fe->attach_quadrature_rule (qsiderule.get());
1294  fe->reinit (child, s);
1295  const unsigned int n_qp = qsiderule->n_points();
1296 
1297  FEMap::inverse_map (dim, elem, xyz_values,
1298  coarse_qpoints);
1299 
1300  fe_coarse->reinit(elem, &coarse_qpoints);
1301 
1302  // Loop over the quadrature points
1303  for (unsigned int qp=0; qp<n_qp; qp++)
1304  {
1305  // solution value at the quadrature point
1306  OutputNumber fineval = libMesh::zero;
1307  // solution grad at the quadrature point
1308  OutputNumberGradient finegrad;
1309 
1310  // Sum the solution values * the DOF
1311  // values at the quadrature point to
1312  // get the solution value and gradient.
1313  for (unsigned int i=0; i<child_n_dofs;
1314  i++)
1315  {
1316  fineval +=
1317  old_vector(child_dof_indices[i]) *
1318  phi_values[i][qp];
1319  if (cont == C_ONE)
1320  finegrad += (*dphi_values)[i][qp] *
1321  old_vector(child_dof_indices[i]);
1322  }
1323 
1324  // Form side projection matrix
1325  for (unsigned int sidei=0, freei=0; sidei != n_new_side_dofs; ++sidei)
1326  {
1327  unsigned int i = new_side_dofs[sidei];
1328  // fixed DoFs aren't test functions
1329  if (dof_is_fixed[i])
1330  continue;
1331  for (unsigned int sidej=0, freej=0; sidej != n_new_side_dofs; ++sidej)
1332  {
1333  unsigned int j =
1334  new_side_dofs[sidej];
1335  if (dof_is_fixed[j])
1336  Fe(freei) -=
1337  TensorTools::inner_product(phi_coarse[i][qp],
1338  phi_coarse[j][qp]) *
1339  JxW[qp] * Ue(j);
1340  else
1341  Ke(freei,freej) +=
1342  TensorTools::inner_product(phi_coarse[i][qp],
1343  phi_coarse[j][qp]) *
1344  JxW[qp];
1345  if (cont == C_ONE)
1346  {
1347  if (dof_is_fixed[j])
1348  Fe(freei) -=
1349  TensorTools::inner_product((*dphi_coarse)[i][qp],
1350  (*dphi_coarse)[j][qp]) *
1351  JxW[qp] * Ue(j);
1352  else
1353  Ke(freei,freej) +=
1354  TensorTools::inner_product((*dphi_coarse)[i][qp],
1355  (*dphi_coarse)[j][qp]) *
1356  JxW[qp];
1357  }
1358  if (!dof_is_fixed[j])
1359  freej++;
1360  }
1361  Fe(freei) += TensorTools::inner_product(fineval, phi_coarse[i][qp]) * JxW[qp];
1362  if (cont == C_ONE)
1363  Fe(freei) +=
1364  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1365  freei++;
1366  }
1367  }
1368  }
1369  Ke.cholesky_solve(Fe, Uside);
1370 
1371  // Transfer new side solutions to element
1372  for (unsigned int i=0; i != free_dofs; ++i)
1373  {
1374  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1375  libmesh_assert(std::abs(ui) < TOLERANCE ||
1376  std::abs(ui - Uside(i)) < TOLERANCE);
1377  ui = Uside(i);
1378  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1379  }
1380  }
1381 
1382  // Project the interior values, finally
1383 
1384  // Some interior dofs are on nodes/edges/sides and
1385  // already fixed, others are free to calculate
1386  unsigned int free_dofs = 0;
1387  for (unsigned int i=0; i != new_n_dofs; ++i)
1388  if (!dof_is_fixed[i])
1389  free_dof[free_dofs++] = i;
1390  Ke.resize (free_dofs, free_dofs); Ke.zero();
1391  Fe.resize (free_dofs); Fe.zero();
1392  // The new interior coefficients
1393  DenseVector<Number> Uint(free_dofs);
1394 
1395  // Add projection terms from each child
1396  for (auto & child : elem->child_ref_range())
1397  {
1398  std::vector<dof_id_type> child_dof_indices;
1399  if (use_old_dof_indices)
1400  dof_map.old_dof_indices (&child,
1401  child_dof_indices, var);
1402  else
1403  dof_map.dof_indices (&child,
1404  child_dof_indices, var);
1405  const unsigned int child_n_dofs =
1406  cast_int<unsigned int>
1407  (child_dof_indices.size());
1408 
1409  // Initialize both child and parent FE data
1410  // on the child's quadrature points
1411  fe->attach_quadrature_rule (qrule.get());
1412  fe->reinit (&child);
1413  const unsigned int n_qp = qrule->n_points();
1414 
1415  FEMap::inverse_map (dim, elem, xyz_values, coarse_qpoints);
1416 
1417  fe_coarse->reinit(elem, &coarse_qpoints);
1418 
1419  // Loop over the quadrature points
1420  for (unsigned int qp=0; qp<n_qp; qp++)
1421  {
1422  // solution value at the quadrature point
1423  OutputNumber fineval = libMesh::zero;
1424  // solution grad at the quadrature point
1425  OutputNumberGradient finegrad;
1426 
1427  // Sum the solution values * the DOF
1428  // values at the quadrature point to
1429  // get the solution value and gradient.
1430  for (unsigned int i=0; i<child_n_dofs; i++)
1431  {
1432  fineval +=
1433  (old_vector(child_dof_indices[i]) *
1434  phi_values[i][qp]);
1435  if (cont == C_ONE)
1436  finegrad += (*dphi_values)[i][qp] *
1437  old_vector(child_dof_indices[i]);
1438  }
1439 
1440  // Form interior projection matrix
1441  for (unsigned int i=0, freei=0;
1442  i != new_n_dofs; ++i)
1443  {
1444  // fixed DoFs aren't test functions
1445  if (dof_is_fixed[i])
1446  continue;
1447  for (unsigned int j=0, freej=0; j !=
1448  new_n_dofs; ++j)
1449  {
1450  if (dof_is_fixed[j])
1451  Fe(freei) -=
1452  TensorTools::inner_product(phi_coarse[i][qp],
1453  phi_coarse[j][qp]) *
1454  JxW[qp] * Ue(j);
1455  else
1456  Ke(freei,freej) +=
1457  TensorTools::inner_product(phi_coarse[i][qp],
1458  phi_coarse[j][qp]) *
1459  JxW[qp];
1460  if (cont == C_ONE)
1461  {
1462  if (dof_is_fixed[j])
1463  Fe(freei) -=
1464  TensorTools::inner_product((*dphi_coarse)[i][qp],
1465  (*dphi_coarse)[j][qp]) *
1466  JxW[qp] * Ue(j);
1467  else
1468  Ke(freei,freej) +=
1469  TensorTools::inner_product((*dphi_coarse)[i][qp],
1470  (*dphi_coarse)[j][qp]) *
1471  JxW[qp];
1472  }
1473  if (!dof_is_fixed[j])
1474  freej++;
1475  }
1476  Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp], fineval) *
1477  JxW[qp];
1478  if (cont == C_ONE)
1479  Fe(freei) += TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1480  freei++;
1481  }
1482  }
1483  }
1484  Ke.cholesky_solve(Fe, Uint);
1485 
1486  // Transfer new interior solutions to element
1487  for (unsigned int i=0; i != free_dofs; ++i)
1488  {
1489  Number & ui = Ue(free_dof[i]);
1490  libmesh_assert(std::abs(ui) < TOLERANCE ||
1491  std::abs(ui - Uint(i)) < TOLERANCE);
1492  ui = Uint(i);
1493  // We should be fixing all dofs by now; no need to keep track of
1494  // that unless we're debugging
1495 #ifndef NDEBUG
1496  dof_is_fixed[free_dof[i]] = true;
1497 #endif
1498  }
1499 
1500 #ifndef NDEBUG
1501  // Make sure every DoF got reached!
1502  for (unsigned int i=0; i != new_n_dofs; ++i)
1503  libmesh_assert(dof_is_fixed[i]);
1504 #endif
1505 }
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:196
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
virtual void zero() override final
Set every element in the vector to 0.
Definition: dense_vector.h:420
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2201
virtual void zero() override final
Sets all elements of the matrix to 0 and resets any decomposition flag which may have been previously...
Definition: dense_matrix.h:911
static constexpr Real TOLERANCE
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:396
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, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with edge e of element elem A...
Definition: fe_interface.C:612
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
TensorTools::IncrementRank< OutputNumber >::type OutputNumberGradient
Definition: fe_base.h:124
unsigned int p_level() const
Definition: elem.h:3122
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition: fe_type.h:203
const Number zero
.
Definition: libmesh.h:297
std::unique_ptr< QBase > default_quadrature_rule(const unsigned int dim, const int extraorder=0) const
Definition: fe_type.C:34
const dof_id_type n_nodes
Definition: tecplot_io.C:67
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660
libmesh_assert(ctx)
const FEType & variable_type(const unsigned int i) const
Definition: dof_map.h:2388
unsigned int n_points() const
Definition: quadrature.h:131
QBase * qrule
A pointer to the quadrature rule employed.
Definition: fe_abstract.h:762
TensorTools::MakeNumber< OutputShape >::type OutputNumber
Definition: fe_base.h:123
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:437
FEContinuity
defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity.
void resize(const unsigned int new_m, const unsigned int new_n)
Resizes the matrix to the specified size and calls zero().
Definition: dense_matrix.h:895
std::enable_if< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:51
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
For symmetric positive definite (SPD) matrices.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
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, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
Definition: fe_interface.C:598
This class forms the foundation from which generic finite elements may be derived.
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:3177
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), for one variable vn.
Definition: dof_map.C:2478

◆ 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 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 1511 of file fe_base.C.

1516 {
1517  Ue.resize(0);
1518 
1519  for (auto v : make_range(dof_map.n_variables()))
1520  {
1521  DenseVector<Number> Usub;
1522 
1523  coarsened_dof_values(old_vector, dof_map, elem, Usub,
1524  v, use_old_dof_indices);
1525 
1526  Ue.append (Usub);
1527  }
1528 }
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&#39;s children...
Definition: fe_base.C:976
unsigned int n_variables() const override
Definition: dof_map.h:736
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition: int_range.h:176

◆ 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 407 of file inf_fe_static.C.

References libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::Elem::build_side_ptr(), libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::FEComputeData::dshape, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::FEComputeData::frequency, libMesh::imaginary, libMesh::INFEDGE2, libMesh::libmesh_assert(), libMesh::FEComputeData::local_transform, libMesh::InfFERadial::mapping_order(), libMesh::FEComputeData::need_derivative(), libMesh::TensorTools::norm(), libMesh::Elem::origin(), libMesh::FEComputeData::p, libMesh::FEComputeData::phase, libMesh::pi, libMesh::Elem::point(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FEComputeData::shape, libMesh::FE< Dim, T >::shape(), libMesh::FEInterface::shape(), libMesh::FEInterface::shape_deriv(), libMesh::FEComputeData::speed, and libMesh::Elem::type().

410 {
411  libmesh_assert(inf_elem);
412  libmesh_assert_not_equal_to (Dim, 0);
413 
414  const Order o_radial (fet.radial_order);
415  const Order radial_mapping_order (InfFERadial::mapping_order());
416  const Point & p (data.p);
417  const Real v (p(Dim-1));
418  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
419 
420  /*
421  * compute \p interpolated_dist containing the mapping-interpolated
422  * distance of the base point to the origin. This is the same
423  * for all shape functions. Set \p interpolated_dist to 0, it
424  * is added to.
425  */
426  Real interpolated_dist = 0.;
427  switch (Dim)
428  {
429  case 1:
430  {
431  libmesh_assert_equal_to (inf_elem->type(), INFEDGE2);
432  interpolated_dist = Point(inf_elem->point(0) - inf_elem->point(1)).norm();
433  break;
434  }
435 
436  case 2:
437  {
438  const unsigned int n_base_nodes = base_el->n_nodes();
439 
440  const Point origin = inf_elem->origin();
441  const Order base_mapping_order (base_el->default_order());
442  const ElemType base_mapping_elem_type (base_el->type());
443 
444  // interpolate the base nodes' distances
445  for (unsigned int n=0; n<n_base_nodes; n++)
446  interpolated_dist += Point(base_el->point(n) - origin).norm()
447  * FE<1,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
448  break;
449  }
450 
451  case 3:
452  {
453  const unsigned int n_base_nodes = base_el->n_nodes();
454 
455  const Point origin = inf_elem->origin();
456  const Order base_mapping_order (base_el->default_order());
457  const ElemType base_mapping_elem_type (base_el->type());
458 
459  // interpolate the base nodes' distances
460  for (unsigned int n=0; n<n_base_nodes; n++)
461  interpolated_dist += Point(base_el->point(n) - origin).norm()
462  * FE<2,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
463  break;
464  }
465 
466  default:
467  libmesh_error_msg("Unknown Dim = " << Dim);
468  }
469 
470 
471  const Real speed = data.speed;
472 
473  //TODO: I find it inconvenient to have a quantity phase which is phase/speed.
474  // But it might be better than redefining a quantities meaning.
475  data.phase = interpolated_dist /* together with next line: */
476  * InfFE<Dim,INFINITE_MAP,T_map>::eval(v, radial_mapping_order, 1)/speed; /* phase(s,t,v)/c */
477 
478  // We assume time-harmonic behavior in this function!
479 
480 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
481  // the wave number
482  const Number wavenumber = 2. * libMesh::pi * data.frequency / speed;
483 
484  // the exponent for time-harmonic behavior
485  // \note: this form is much less general than the implementation of dphase, which can be easily extended to
486  // other forms than e^{i kr}.
487  const Number exponent = imaginary /* imaginary unit */
488  * wavenumber /* k (can be complex) */
489  * data.phase*speed;
490 
491  const Number time_harmonic = exp(exponent); /* e^(i*k*phase(s,t,v)) */
492 #else
493  const Number time_harmonic = 1;
494 #endif //LIBMESH_USE_COMPLEX_NUMBERS
495 
496  /*
497  * compute \p shape for all dof in the element
498  */
499  if (Dim > 1)
500  {
501  const unsigned int n_dof = n_dofs (fet, inf_elem);
502  data.shape.resize(n_dof);
503  if (data.need_derivative())
504  {
505  data.dshape.resize(n_dof);
506  data.local_transform.resize(Dim);
507 
508  for (unsigned int d=0; d<Dim; d++)
509  data.local_transform[d].resize(Dim);
510 
511  // compute the reference->physical map at the point \p p.
512  // Use another fe_map to avoid interference with \p this->_fe_map
513  // which is initialized at the quadrature points...
514  auto fe = FEBase::build_InfFE(Dim, fet);
515  std::vector<Point> pt = {p};
516  fe->get_dxidx(); // to compute the map
517  fe->reinit(inf_elem, &pt);
518 
519  // compute the reference->physical map.
520  data.local_transform[0][0] = fe->get_dxidx()[0];
521  data.local_transform[1][0] = fe->get_detadx()[0];
522  data.local_transform[1][1] = fe->get_detady()[0];
523  data.local_transform[0][1] = fe->get_dxidy()[0];
524  if (Dim > 2)
525  {
526  data.local_transform[2][0] = fe->get_dzetadx()[0];
527  data.local_transform[2][1] = fe->get_dzetady()[0];
528  data.local_transform[2][2] = fe->get_dzetadz()[0];
529  data.local_transform[1][2] = fe->get_detadz()[0];
530  data.local_transform[0][2] = fe->get_dxidz()[0];
531  }
532  } // endif data.need_derivative()
533 
534  for (unsigned int i=0; i<n_dof; i++)
535  {
536  // compute base and radial shape indices
537  unsigned int i_base, i_radial;
538  compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
539 
540  data.shape[i] = (InfFERadial::decay(Dim,v) /* (1.-v)/2. in 3D */
541  * FEInterface::shape(fet, base_el.get(), i_base, p) /* S_n(s,t) */
542  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)) /* L_n(v) */
543  * time_harmonic; /* e^(i*k*phase(s,t,v) */
544 
545  // use differentiation of the above equation
546  if (data.need_derivative())
547  {
548  data.dshape[i](0) = (InfFERadial::decay(Dim,v)
549  * FEInterface::shape_deriv(fet, base_el.get(), i_base, 0, p)
550  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial))
551  * time_harmonic;
552 
553  if (Dim > 2)
554  {
555  data.dshape[i](1) = (InfFERadial::decay(Dim,v)
556  * FEInterface::shape_deriv(fet, base_el.get(), i_base, 1, p)
557  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial))
558  * time_harmonic;
559 
560  }
561  data.dshape[i](Dim-1) = (InfFERadial::decay_deriv(Dim, v) * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
562  +InfFERadial::decay(Dim,v) * InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial))
563  * FEInterface::shape(fet, base_el.get(), i_base, p) * time_harmonic;
564 
565 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
566  // derivative of time_harmonic (works for harmonic behavior only):
567  data.dshape[i](Dim-1)+= data.shape[i]*imaginary*wavenumber
568  *interpolated_dist*InfFE<Dim,INFINITE_MAP,T_map>::eval_deriv(v, radial_mapping_order, 1);
569 
570 #else
571  /*
572  * The gradient in infinite elements is dominated by the contribution due to the oscillating phase.
573  * Since this term is imaginary, I think there is no means to look at it without having complex numbers.
574  */
575  libmesh_not_implemented();
576  // Maybe we can solve it with a warning as well, but I think one really should not do this...
577 #endif
578  }
579  }
580  }
581 
582  else
583  libmesh_error_msg("compute_data() for 1-dimensional InfFE not implemented.");
584 }
ElemType
Defines an enum for geometric element types.
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
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)
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1292
const Number imaginary
The imaginary unit, .
static Order mapping_order()
Definition: inf_fe.h:97
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:761
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
auto norm(const T &a)
Definition: tensor_tools.h:74
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)
static std::unique_ptr< FEGenericBase > build_InfFE(const unsigned int dim, const FEType &type)
Builds a specific infinite element type.
const Real pi
.
Definition: libmesh.h:292
static unsigned int n_dofs(const FEType &fet, const Elem *inf_elem)
Definition: inf_fe_static.C:66

◆ compute_dual_shape_coeffs() [1/3]

template<typename OutputType >
void libMesh::FEGenericBase< OutputType >::compute_dual_shape_coeffs ( const std::vector< Real > &  JxW,
const std::vector< std::vector< OutputShape >> &  phi 
)
protectedinherited

Compute the dual basis coefficients dual_coeff we rely on the JxW (or weights) and the phi values, which can come from default or customized qrule.

Definition at line 800 of file fe_base.h.

801 {
802  libmesh_error_msg(
803  "Computation of dual shape functions for vector finite element "
804  "families is not currently implemented");
805 }

◆ compute_dual_shape_coeffs() [2/3]

template<>
void libMesh::FEGenericBase< Real >::compute_dual_shape_coeffs ( const std::vector< Real > &  JxW,
const std::vector< std::vector< OutputShape >> &  phi_vals 
)
protectedinherited

Definition at line 804 of file fe_base.C.

805 {
806  // Start logging the dual coeff computation
807  LOG_SCOPE("compute_dual_shape_coeffs()", "FE");
808 
809  const unsigned int sz=phi_vals.size();
810  libmesh_error_msg_if(!sz, "ERROR: cannot compute dual shape coefficients with empty phi values");
811 
812  //compute dual basis coefficient (dual_coeff)
813  dual_coeff.resize(sz, sz);
814  DenseMatrix<Real> A(sz, sz), D(sz, sz);
815 
816  for (const auto i : index_range(phi_vals))
817  for (const auto qp : index_range(phi_vals[i]))
818  {
819  D(i,i) += JxW[qp]*phi_vals[i][qp];
820  for (const auto j : index_range(phi_vals))
821  A(i,j) += JxW[qp]*phi_vals[i][qp]*phi_vals[j][qp];
822  }
823 
824  // dual_coeff = A^-1*D
825  for (const auto j : index_range(phi_vals))
826  {
827  DenseVector<Real> Dcol(sz), coeffcol(sz);
828  for (const auto i : index_range(phi_vals))
829  Dcol(i) = D(i, j);
830  A.cholesky_solve(Dcol, coeffcol);
831 
832  for (const auto row : index_range(phi_vals))
833  dual_coeff(row, j)=coeffcol(row);
834  }
835 }
DenseMatrix< Real > dual_coeff
Coefficient matrix for the dual basis.
Definition: fe_base.h:626
void resize(const unsigned int new_m, const unsigned int new_n)
Resizes the matrix to the specified size and calls zero().
Definition: dense_matrix.h:895
Defines a dense vector for use in Finite Element-type computations.
Definition: dof_map.h:74
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ compute_dual_shape_coeffs() [3/3]

template<>
void libMesh::FEGenericBase< Real >::compute_dual_shape_coeffs ( const std::vector< Real > &  ,
const std::vector< std::vector< OutputShape >> &   
)
protectedinherited

◆ compute_dual_shape_functions() [1/3]

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

Compute dual_phi, dual_dphi, dual_d2phi It is only valid for this to be called after reinit has occurred with a quadrature rule.

Definition at line 792 of file fe_base.h.

793 {
794  libmesh_error_msg(
795  "Computation of dual shape functions for vector finite element "
796  "families is not currently implemented");
797 }

◆ compute_dual_shape_functions() [2/3]

template<>
void libMesh::FEGenericBase< Real >::compute_dual_shape_functions ( )
protectedinherited

◆ compute_dual_shape_functions() [3/3]

template<>
void libMesh::FEGenericBase< Real >::compute_dual_shape_functions ( )
protectedinherited

Definition at line 838 of file fe_base.C.

839 {
840  // Start logging the shape function computation
841  LOG_SCOPE("compute_dual_shape_functions()", "FE");
842 
843  // The dual coeffs matrix should have the same size as phi
844  libmesh_assert(dual_coeff.m() == phi.size());
845  libmesh_assert(dual_coeff.n() == phi.size());
846 
847  // initialize dual basis
848  for (const auto j : index_range(phi))
849  for (const auto qp : index_range(phi[j]))
850  {
851  dual_phi[j][qp] = 0;
852  if (calculate_dphi)
853  dual_dphi[j][qp] = 0;
854 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
855  if (calculate_d2phi)
856  dual_d2phi[j][qp] = 0;
857 #endif
858  }
859 
860  // compute dual basis
861  for (const auto j : index_range(phi))
862  for (const auto i : index_range(phi))
863  for (const auto qp : index_range(phi[j]))
864  {
865  dual_phi[j][qp] += dual_coeff(i, j) * phi[i][qp];
866  if (calculate_dphi)
867  dual_dphi[j][qp] += dual_coeff(i, j) * dphi[i][qp];
868 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
869  if (calculate_d2phi)
870  dual_d2phi[j][qp] += dual_coeff(i, j) * d2phi[i][qp];
871 #endif
872  }
873 }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:674
std::vector< std::vector< OutputTensor > > dual_d2phi
Definition: fe_base.h:675
std::vector< std::vector< OutputGradient > > dual_dphi
Definition: fe_base.h:621
unsigned int m() const
DenseMatrix< Real > dual_coeff
Coefficient matrix for the dual basis.
Definition: fe_base.h:626
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
std::vector< std::vector< OutputShape > > dual_phi
Definition: fe_base.h:615
libmesh_assert(ctx)
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
unsigned int n() const
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ compute_face_functions()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_base>
void libMesh::InfFE< Dim, T_radial, T_base >::compute_face_functions ( )
protected

Definition at line 236 of file inf_fe_boundary.C.

References libMesh::TypeVector< T >::cross(), dim, libMesh::err, libMesh::Real, and libMesh::TypeVector< T >::unit().

237 {
238 
240  return; // we didn't ask for any quantity computed here.
241 
242  const unsigned int n_qp = cast_int<unsigned int>(_total_qrule_weights.size());
243  this->normals.resize(n_qp);
244 
245  if (Dim > 1)
246  {
247  this->tangents.resize(n_qp);
248  for (unsigned int p=0; p<n_qp; ++p)
249  this->tangents[p].resize(LIBMESH_DIM-1);
250  }
251  else
252  {
253  libMesh::err << "tangents have no sense in 1-dimensional elements!"<<std::endl;
254  libmesh_error_msg("Exiting...");
255  }
256 
257  // the dimension of base indicates which side we have:
258  // if base_dim == Dim -1 : base
259  // base_dim == Dim -2 : one of the other sides.
260  unsigned int base_dim =base_fe->dim;
261  // If we have no quadrature points, there's nothing else to do
262  if (!n_qp)
263  return;
264 
265  switch(Dim)
266  {
267  case 1:
268  case 2:
269  {
270  libmesh_not_implemented();
271  break;
272  }
273  case 3:
274  {
275  // Below, we assume a 2D base, i.e. we compute the side s=0.
276  if (base_dim==Dim-1)
277  for (unsigned int p=0; p<n_qp; ++p)
278  {
279  //
280  // seeking dxyzdx, dxyzdeta means to compute
281  // / dx/dxi dy/dxi dz/dxi \.
282  // J^-1= | |
283  // \ dx/deta dy/deta dz/deta /.
284  // which is the psudo-inverse of J, i.e.
285  //
286  // J^-1 = (J^T J)^-1 J^T
287  //
288  // where J^T T is the 2x2 matrix 'g' used to compute the
289  // Jacobian determinant; thus
290  //
291  // J^-1 = ________1________ / g22 -g21 \ / dxi/dx dxi/dy dxi/dz \.
292  // g11*g22 - g21*g12 \-g12 g11 / \ deta/dx deta/dy deta/dz /.
293  const std::vector<Real> & base_dxidx = base_fe->get_dxidx();
294  const std::vector<Real> & base_dxidy = base_fe->get_dxidy();
295  const std::vector<Real> & base_dxidz = base_fe->get_dxidz();
296  const std::vector<Real> & base_detadx = base_fe->get_detadx();
297  const std::vector<Real> & base_detady = base_fe->get_detady();
298  const std::vector<Real> & base_detadz = base_fe->get_detadz();
299 
300  const Real g11 = (base_dxidx[p]*base_dxidx[p] +
301  base_dxidy[p]*base_dxidy[p] +
302  base_dxidz[p]*base_dxidz[p]);
303  const Real g12 = (base_dxidx[p]*base_detadx[p] +
304  base_dxidy[p]*base_detady[p] +
305  base_dxidz[p]*base_detadz[p]);
306  const Real g21 = g12;
307  const Real g22 = (base_detadx[p]*base_detadx[p] +
308  base_detady[p]*base_detady[p] +
309  base_detadz[p]*base_detadz[p]);
310 
311  const Real det = (g11*g22 - g12*g21);
312 
313  Point dxyzdxi_map((g22*base_dxidx[p]-g21*base_detadx[p])/det,
314  (g22*base_dxidy[p]-g21*base_detady[p])/det,
315  (g22*base_dxidz[p]-g21*base_detadz[p])/det);
316 
317  Point dxyzdeta_map((g11*base_detadx[p] - g12*base_dxidx[p])/det,
318  (g11*base_detady[p] - g12*base_dxidy[p])/det,
319  (g11*base_detadz[p] - g12*base_dxidz[p])/det);
320 
321  this->tangents[p][0] = dxyzdxi_map.unit();
322 
323  this->tangents[p][1] = (dxyzdeta_map - (dxyzdeta_map*tangents[p][0])*tangents[p][0] ).unit();
324 
325  this->normals[p] = tangents[p][0].cross(tangents[p][1]).unit();
326  // recompute JxW using the 2D Jacobian:
327  // Since we are at the base, there is no difference between scaled and unscaled jacobian
328  if (calculate_jxw)
329  this->JxW[p] = _total_qrule_weights[p]/std::sqrt(det);
330 
332  this->JxWxdecay[p] = _total_qrule_weights[p]/std::sqrt(det);
333 
334  }
335  else if (base_dim == Dim -2)
336  {
337  libmesh_not_implemented();
338  }
339  else
340  {
341  // in this case something went completely wrong.
342  libmesh_not_implemented();
343  }
344  break;
345  }
346  default:
347  libmesh_error_msg("Unsupported dim = " << dim);
348  }
349 
350 }
OStreamProxy err
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1119
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
std::vector< Real > JxW
Definition: inf_fe.h:1120
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< Point > normals
Definition: inf_fe.h:1122
std::vector< std::vector< Point > > tangents
Definition: inf_fe.h:1123
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:1179

◆ 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 886 of file fe_abstract.C.

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

888 {
889  libmesh_assert(elem);
890 
891  const unsigned int Dim = elem->dim();
892 
893  // Only constrain elements in 2,3D.
894  if (Dim == 1)
895  return;
896 
897  // Only constrain active and ancestor elements
898  if (elem->subactive())
899  return;
900 
901 
902 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
903  if (elem->infinite())
904  {
905  const FEType fe_t(elem->default_order(), FEMap::map_fe_type(*elem));
906 
907  // expand the infinite_compute_constraint in its template-arguments.
908  switch(Dim)
909  {
910  case 2:
911  {
912  inf_fe_family_mapping_switch(2, inf_compute_node_constraints (constraints, elem) , ,; break;);
913  break;
914  }
915  case 3:
916  {
917  inf_fe_family_mapping_switch(3, inf_compute_node_constraints (constraints, elem) , ,; break;);
918  break;
919  }
920  default:
921  libmesh_error_msg("Invalid dim = " << Dim);
922  }
923  return;
924  }
925 
926 #endif
927  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
928  const FEType fe_type(elem->default_side_order(), mapping_family);
929 
930  // Pull objects out of the loop to reduce heap operations
931  std::vector<const Node *> my_nodes, parent_nodes;
932  std::unique_ptr<const Elem> my_side, parent_side;
933 
934  // Look at the element faces. Check to see if we need to
935  // build constraints.
936  for (auto s : elem->side_index_range())
937  if (elem->neighbor_ptr(s) != nullptr &&
938  elem->neighbor_ptr(s) != remote_elem)
939  if (elem->neighbor_ptr(s)->level() < elem->level()) // constrain dofs shared between
940  { // this element and ones coarser
941  // than this element.
942  // Get pointers to the elements of interest and its parent.
943  const Elem * parent = elem->parent();
944 
945  // This can't happen... Only level-0 elements have nullptr
946  // parents, and no level-0 elements can be at a higher
947  // level than their neighbors!
948  libmesh_assert(parent);
949 
950  elem->build_side_ptr(my_side, s);
951  parent->build_side_ptr(parent_side, s);
952 
953  const unsigned int n_side_nodes = my_side->n_nodes();
954 
955  my_nodes.clear();
956  my_nodes.reserve (n_side_nodes);
957  parent_nodes.clear();
958  parent_nodes.reserve (n_side_nodes);
959 
960  for (unsigned int n=0; n != n_side_nodes; ++n)
961  my_nodes.push_back(my_side->node_ptr(n));
962 
963  for (unsigned int n=0; n != n_side_nodes; ++n)
964  parent_nodes.push_back(parent_side->node_ptr(n));
965 
966  for (unsigned int my_side_n=0;
967  my_side_n < n_side_nodes;
968  my_side_n++)
969  {
970  // We can have an FE type that supports an order
971  // partially, such that sides do not support the same
972  // order. E.g. we say that a LAGRANGE PRISM21 supports
973  // "third" order to distinguish its shape functions from
974  // a PRISM18, but the QUAD9 sides will still only
975  // support second order.
976  FEType side_fe_type = fe_type;
977  const int side_max_order =
978  FEInterface::max_order(fe_type, my_side->type());
979 
980  if ((int)fe_type.order > side_max_order)
981  side_fe_type.order = side_max_order;
982 
983  // Do not use the p_level(), if any, that is inherited by the side.
984  libmesh_assert_less
985  (my_side_n,
986  FEInterface::n_dofs(side_fe_type, /*extra_order=*/0,
987  my_side.get()));
988 
989  const Node * my_node = my_nodes[my_side_n];
990 
991  // The support point of the DOF
992  const Point & support_point = *my_node;
993 
994  // Figure out where my node lies on their reference element.
995  const Point mapped_point = FEMap::inverse_map(Dim-1,
996  parent_side.get(),
997  support_point);
998 
999  // Compute the parent's side shape function values.
1000  for (unsigned int their_side_n=0;
1001  their_side_n < n_side_nodes;
1002  their_side_n++)
1003  {
1004  // Do not use the p_level(), if any, that is inherited by the side.
1005  libmesh_assert_less
1006  (their_side_n,
1007  FEInterface::n_dofs(side_fe_type,
1008  /*extra_order=*/0,
1009  parent_side.get()));
1010 
1011  const Node * their_node = parent_nodes[their_side_n];
1012  libmesh_assert(their_node);
1013 
1014  // Do not use the p_level(), if any, that is inherited by the side.
1015  const Real their_value = FEInterface::shape(side_fe_type,
1016  /*extra_order=*/0,
1017  parent_side.get(),
1018  their_side_n,
1019  mapped_point);
1020 
1021  const Real their_mag = std::abs(their_value);
1022 #ifdef DEBUG
1023  // Protect for the case u_i ~= u_j,
1024  // in which case i better equal j.
1025  if (their_mag > 0.999)
1026  {
1027  libmesh_assert_equal_to (my_node, their_node);
1028  libmesh_assert_less (std::abs(their_value - 1.), 0.001);
1029  }
1030  else
1031 #endif
1032  // To make nodal constraints useful for constructing
1033  // sparsity patterns faster, we need to get EVERY
1034  // POSSIBLE constraint coupling identified, even if
1035  // there is no coupling in the isoparametric
1036  // Lagrange case.
1037  if (their_mag < 1.e-5)
1038  {
1039  // since we may be running this method concurrently
1040  // on multiple threads we need to acquire a lock
1041  // before modifying the shared constraint_row object.
1042  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1043 
1044  // A reference to the constraint row.
1045  NodeConstraintRow & constraint_row = constraints[my_node].first;
1046 
1047  constraint_row.emplace(their_node, 0.);
1048  }
1049  // To get nodal coordinate constraints right, only
1050  // add non-zero and non-identity values for Lagrange
1051  // basis functions.
1052  else // (1.e-5 <= their_mag <= .999)
1053  {
1054  // since we may be running this method concurrently
1055  // on multiple threads we need to acquire a lock
1056  // before modifying the shared constraint_row object.
1057  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1058 
1059  // A reference to the constraint row.
1060  NodeConstraintRow & constraint_row = constraints[my_node].first;
1061 
1062  constraint_row.emplace(their_node, their_value);
1063  }
1064  }
1065  }
1066  }
1067 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition: fe_type.h:203
static unsigned int max_order(const FEType &fe_t, const ElemType &el_t)
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:761
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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:148
FEFamily
defines an enum for finite element families.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:46
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30
const RemoteElem * remote_elem
Definition: remote_elem.C:57

◆ 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 610 of file inf_fe_static.C.

References libMesh::Utility::enum_to_string(), libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, and libMesh::INFQUAD6.

614 {
615  switch (inf_elem_type)
616  {
617  case INFEDGE2:
618  {
619  libmesh_assert_less (outer_node_index, 2);
620  base_node = 0;
621  radial_node = outer_node_index;
622  return;
623  }
624 
625 
626  // linear base approximation, easy to determine
627  case INFQUAD4:
628  {
629  libmesh_assert_less (outer_node_index, 4);
630  base_node = outer_node_index % 2;
631  radial_node = outer_node_index / 2;
632  return;
633  }
634 
635  case INFPRISM6:
636  {
637  libmesh_assert_less (outer_node_index, 6);
638  base_node = outer_node_index % 3;
639  radial_node = outer_node_index / 3;
640  return;
641  }
642 
643  case INFHEX8:
644  {
645  libmesh_assert_less (outer_node_index, 8);
646  base_node = outer_node_index % 4;
647  radial_node = outer_node_index / 4;
648  return;
649  }
650 
651 
652  // higher order base approximation, more work necessary
653  case INFQUAD6:
654  {
655  switch (outer_node_index)
656  {
657  case 0:
658  case 1:
659  {
660  radial_node = 0;
661  base_node = outer_node_index;
662  return;
663  }
664 
665  case 2:
666  case 3:
667  {
668  radial_node = 1;
669  base_node = outer_node_index-2;
670  return;
671  }
672 
673  case 4:
674  {
675  radial_node = 0;
676  base_node = 2;
677  return;
678  }
679 
680  case 5:
681  {
682  radial_node = 1;
683  base_node = 2;
684  return;
685  }
686 
687  default:
688  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
689  }
690  }
691 
692 
693  case INFHEX16:
694  case INFHEX18:
695  {
696  switch (outer_node_index)
697  {
698  case 0:
699  case 1:
700  case 2:
701  case 3:
702  {
703  radial_node = 0;
704  base_node = outer_node_index;
705  return;
706  }
707 
708  case 4:
709  case 5:
710  case 6:
711  case 7:
712  {
713  radial_node = 1;
714  base_node = outer_node_index-4;
715  return;
716  }
717 
718  case 8:
719  case 9:
720  case 10:
721  case 11:
722  {
723  radial_node = 0;
724  base_node = outer_node_index-4;
725  return;
726  }
727 
728  case 12:
729  case 13:
730  case 14:
731  case 15:
732  {
733  radial_node = 1;
734  base_node = outer_node_index-8;
735  return;
736  }
737 
738  case 16:
739  {
740  libmesh_assert_equal_to (inf_elem_type, INFHEX18);
741  radial_node = 0;
742  base_node = 8;
743  return;
744  }
745 
746  case 17:
747  {
748  libmesh_assert_equal_to (inf_elem_type, INFHEX18);
749  radial_node = 1;
750  base_node = 8;
751  return;
752  }
753 
754  default:
755  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
756  }
757  }
758 
759 
760  case INFPRISM12:
761  {
762  switch (outer_node_index)
763  {
764  case 0:
765  case 1:
766  case 2:
767  {
768  radial_node = 0;
769  base_node = outer_node_index;
770  return;
771  }
772 
773  case 3:
774  case 4:
775  case 5:
776  {
777  radial_node = 1;
778  base_node = outer_node_index-3;
779  return;
780  }
781 
782  case 6:
783  case 7:
784  case 8:
785  {
786  radial_node = 0;
787  base_node = outer_node_index-3;
788  return;
789  }
790 
791  case 9:
792  case 10:
793  case 11:
794  {
795  radial_node = 1;
796  base_node = outer_node_index-6;
797  return;
798  }
799 
800  default:
801  libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
802  }
803  }
804 
805 
806  default:
807  libmesh_error_msg("ERROR: Bad infinite element type=" << Utility::enum_to_string(inf_elem_type) << ", node=" << outer_node_index);
808  }
809 }
std::string enum_to_string(const T e)

◆ 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 817 of file inf_fe_static.C.

References libMesh::Utility::enum_to_string(), 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.

821 {
822  libmesh_assert_not_equal_to (inf_elem_type, INVALID_ELEM);
823 
824  static std::vector<unsigned int> _static_base_node_index;
825  static std::vector<unsigned int> _static_radial_node_index;
826 
827  /*
828  * fast counterpart to compute_node_indices(), uses local static buffers
829  * to store the index maps. The class member
830  * \p _compute_node_indices_fast_current_elem_type remembers
831  * the current element type.
832  *
833  * Note that there exist non-static members storing the
834  * same data. However, you never know what element type
835  * is currently used by the \p InfFE object, and what
836  * request is currently directed to the static \p InfFE
837  * members (which use \p compute_node_indices_fast()).
838  * So separate these.
839  *
840  * check whether the work for this elemtype has already
841  * been done. If so, use this index. Otherwise, refresh
842  * the buffer to this element type.
843  */
845  {
846  base_node = _static_base_node_index [outer_node_index];
847  radial_node = _static_radial_node_index[outer_node_index];
848  return;
849  }
850  else
851  {
852  // store the map for _all_ nodes for this element type
854 
855  unsigned int n_nodes = libMesh::invalid_uint;
856 
857  switch (inf_elem_type)
858  {
859  case INFEDGE2:
860  {
861  n_nodes = 2;
862  break;
863  }
864  case INFQUAD4:
865  {
866  n_nodes = 4;
867  break;
868  }
869  case INFQUAD6:
870  {
871  n_nodes = 6;
872  break;
873  }
874  case INFHEX8:
875  {
876  n_nodes = 8;
877  break;
878  }
879  case INFHEX16:
880  {
881  n_nodes = 16;
882  break;
883  }
884  case INFHEX18:
885  {
886  n_nodes = 18;
887  break;
888  }
889  case INFPRISM6:
890  {
891  n_nodes = 6;
892  break;
893  }
894  case INFPRISM12:
895  {
896  n_nodes = 12;
897  break;
898  }
899  default:
900  libmesh_error_msg("ERROR: Bad infinite element type=" << Utility::enum_to_string(inf_elem_type) << ", node=" << outer_node_index);
901  }
902 
903 
904  _static_base_node_index.resize (n_nodes);
905  _static_radial_node_index.resize(n_nodes);
906 
907  for (unsigned int n=0; n<n_nodes; n++)
908  compute_node_indices (inf_elem_type,
909  n,
910  _static_base_node_index [outer_node_index],
911  _static_radial_node_index[outer_node_index]);
912 
913  // and return for the specified node
914  base_node = _static_base_node_index [outer_node_index];
915  radial_node = _static_radial_node_index[outer_node_index];
916  return;
917  }
918 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:303
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...
const dof_id_type n_nodes
Definition: tecplot_io.C:67
std::string enum_to_string(const T e)
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:1233

◆ 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 1842 of file fe_base.C.

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

1849 {
1850  // Only bother if we truly have periodic boundaries
1851  if (boundaries.empty())
1852  return;
1853 
1854  libmesh_assert(elem);
1855 
1856  // Only constrain active elements with this method
1857  if (!elem->active())
1858  return;
1859 
1860  if (elem->infinite())
1861  libmesh_not_implemented();
1862 
1863  const unsigned int Dim = elem->dim();
1864 
1865  // We need sys_number and variable_number for DofObject methods
1866  // later
1867  const unsigned int sys_number = dof_map.sys_number();
1868 
1869  const FEType & base_fe_type = dof_map.variable_type(variable_number);
1870 
1871  // Construct FE objects for this element and its pseudo-neighbors.
1872  std::unique_ptr<FEGenericBase<OutputShape>> my_fe
1873  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1874  const FEContinuity cont = my_fe->get_continuity();
1875 
1876  // We don't need to constrain discontinuous elements
1877  if (cont == DISCONTINUOUS)
1878  return;
1879  libmesh_assert (cont == C_ZERO || cont == C_ONE);
1880 
1881  // We'll use element size to generate relative tolerances later
1882  const Real primary_hmin = elem->hmin();
1883 
1884  std::unique_ptr<FEGenericBase<OutputShape>> neigh_fe
1885  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1886 
1887  QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
1888  my_fe->attach_quadrature_rule (&my_qface);
1889  std::vector<Point> neigh_qface;
1890 
1891  const std::vector<Real> & JxW = my_fe->get_JxW();
1892  const std::vector<Point> & q_point = my_fe->get_xyz();
1893  const std::vector<std::vector<OutputShape>> & phi = my_fe->get_phi();
1894  const std::vector<std::vector<OutputShape>> & neigh_phi =
1895  neigh_fe->get_phi();
1896  const std::vector<Point> * face_normals = nullptr;
1897  const std::vector<std::vector<OutputGradient>> * dphi = nullptr;
1898  const std::vector<std::vector<OutputGradient>> * neigh_dphi = nullptr;
1899  std::vector<dof_id_type> my_dof_indices, neigh_dof_indices;
1900  std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
1901 
1902  if (cont != C_ZERO)
1903  {
1904  const std::vector<Point> & ref_face_normals =
1905  my_fe->get_normals();
1906  face_normals = &ref_face_normals;
1907  const std::vector<std::vector<OutputGradient>> & ref_dphi =
1908  my_fe->get_dphi();
1909  dphi = &ref_dphi;
1910  const std::vector<std::vector<OutputGradient>> & ref_neigh_dphi =
1911  neigh_fe->get_dphi();
1912  neigh_dphi = &ref_neigh_dphi;
1913  }
1914 
1915  DenseMatrix<Real> Ke;
1916  DenseVector<Real> Fe;
1917  std::vector<DenseVector<Real>> Ue;
1918 
1919  // Container to catch the boundary ids that BoundaryInfo hands us.
1920  std::vector<boundary_id_type> bc_ids;
1921 
1922  // Look at the element faces. Check to see if we need to
1923  // build constraints.
1924  const unsigned short int max_ns = elem->n_sides();
1925  for (unsigned short int s = 0; s != max_ns; ++s)
1926  {
1927  if (elem->neighbor_ptr(s))
1928  continue;
1929 
1930  mesh.get_boundary_info().boundary_ids (elem, s, bc_ids);
1931 
1932  for (const auto & boundary_id : bc_ids)
1933  {
1934  const PeriodicBoundaryBase * periodic = boundaries.boundary(boundary_id);
1935  if (!periodic || !periodic->is_my_variable(variable_number))
1936  continue;
1937 
1938  libmesh_assert(point_locator);
1939 
1940  // Get pointers to the element's neighbor.
1941  unsigned int s_neigh;
1942  const Elem * neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s, &s_neigh);
1943 
1944  libmesh_error_msg_if(neigh == nullptr,
1945  "PeriodicBoundaries point locator object returned nullptr!");
1946 
1947  // periodic (and possibly h refinement) constraints:
1948  // constrain dofs shared between
1949  // this element and ones as coarse
1950  // as or coarser than this element.
1951  if (neigh->level() <= elem->level())
1952  {
1953 #ifdef LIBMESH_ENABLE_AMR
1954  // Find the minimum p level; we build the h constraint
1955  // matrix with this and then constrain away all higher p
1956  // DoFs.
1957  libmesh_assert(neigh->active());
1958  const unsigned int min_p_level =
1959  std::min(elem->p_level(), neigh->p_level());
1960 
1961  // we may need to make the FE objects reinit with the
1962  // minimum shared p_level
1963  // FIXME - I hate using const_cast<> and avoiding
1964  // accessor functions; there's got to be a
1965  // better way to do this!
1966  const unsigned int old_elem_level = elem->p_level();
1967  if (old_elem_level != min_p_level)
1968  (const_cast<Elem *>(elem))->hack_p_level(min_p_level);
1969  const unsigned int old_neigh_level = neigh->p_level();
1970  if (old_neigh_level != min_p_level)
1971  (const_cast<Elem *>(neigh))->hack_p_level(min_p_level);
1972 #endif // #ifdef LIBMESH_ENABLE_AMR
1973 
1974  // We can do a projection with a single integration,
1975  // due to the assumption of nested finite element
1976  // subspaces.
1977  // FIXME: it might be more efficient to do nodes,
1978  // then edges, then side, to reduce the size of the
1979  // Cholesky factorization(s)
1980  my_fe->reinit(elem, s);
1981 
1982  dof_map.dof_indices (elem, my_dof_indices,
1983  variable_number);
1984  dof_map.dof_indices (neigh, neigh_dof_indices,
1985  variable_number);
1986 
1987  // We use neigh_dof_indices_all_variables in the case that the
1988  // periodic boundary condition involves mappings between multiple
1989  // variables.
1990  std::vector<std::vector<dof_id_type>> neigh_dof_indices_all_variables;
1991  if(periodic->has_transformation_matrix())
1992  {
1993  const std::set<unsigned int> & variables = periodic->get_variables();
1994  neigh_dof_indices_all_variables.resize(variables.size());
1995  unsigned int index = 0;
1996  for(unsigned int var : variables)
1997  {
1998  dof_map.dof_indices (neigh, neigh_dof_indices_all_variables[index],
1999  var);
2000  index++;
2001  }
2002  }
2003 
2004  const unsigned int n_qp = my_qface.n_points();
2005 
2006  // Translate the quadrature points over to the
2007  // neighbor's boundary
2008  std::vector<Point> neigh_point(q_point.size());
2009  for (auto i : index_range(neigh_point))
2010  neigh_point[i] = periodic->get_corresponding_pos(q_point[i]);
2011 
2012  FEMap::inverse_map (Dim, neigh, neigh_point,
2013  neigh_qface);
2014 
2015  neigh_fe->reinit(neigh, &neigh_qface);
2016 
2017  // We're only concerned with DOFs whose values (and/or first
2018  // derivatives for C1 elements) are supported on side nodes
2019  FEInterface::dofs_on_side(elem, Dim, base_fe_type, s, my_side_dofs);
2020  FEInterface::dofs_on_side(neigh, Dim, base_fe_type, s_neigh, neigh_side_dofs);
2021 
2022  // We're done with functions that examine Elem::p_level(),
2023  // so let's unhack those levels
2024 #ifdef LIBMESH_ENABLE_AMR
2025  if (elem->p_level() != old_elem_level)
2026  (const_cast<Elem *>(elem))->hack_p_level(old_elem_level);
2027  if (neigh->p_level() != old_neigh_level)
2028  (const_cast<Elem *>(neigh))->hack_p_level(old_neigh_level);
2029 #endif // #ifdef LIBMESH_ENABLE_AMR
2030 
2031  const unsigned int n_side_dofs =
2032  cast_int<unsigned int>
2033  (my_side_dofs.size());
2034  libmesh_assert_equal_to (n_side_dofs, neigh_side_dofs.size());
2035 
2036  Ke.resize (n_side_dofs, n_side_dofs);
2037  Ue.resize(n_side_dofs);
2038 
2039  // Form the projection matrix, (inner product of fine basis
2040  // functions against fine test functions)
2041  for (unsigned int is = 0; is != n_side_dofs; ++is)
2042  {
2043  const unsigned int i = my_side_dofs[is];
2044  for (unsigned int js = 0; js != n_side_dofs; ++js)
2045  {
2046  const unsigned int j = my_side_dofs[js];
2047  for (unsigned int qp = 0; qp != n_qp; ++qp)
2048  {
2049  Ke(is,js) += JxW[qp] *
2051  phi[j][qp]);
2052  if (cont != C_ZERO)
2053  Ke(is,js) += JxW[qp] *
2054  TensorTools::inner_product((*dphi)[i][qp] *
2055  (*face_normals)[qp],
2056  (*dphi)[j][qp] *
2057  (*face_normals)[qp]);
2058  }
2059  }
2060  }
2061 
2062  // Form the right hand sides, (inner product of coarse basis
2063  // functions against fine test functions)
2064  for (unsigned int is = 0; is != n_side_dofs; ++is)
2065  {
2066  const unsigned int i = neigh_side_dofs[is];
2067  Fe.resize (n_side_dofs);
2068  for (unsigned int js = 0; js != n_side_dofs; ++js)
2069  {
2070  const unsigned int j = my_side_dofs[js];
2071  for (unsigned int qp = 0; qp != n_qp; ++qp)
2072  {
2073  Fe(js) += JxW[qp] *
2074  TensorTools::inner_product(neigh_phi[i][qp],
2075  phi[j][qp]);
2076  if (cont != C_ZERO)
2077  Fe(js) += JxW[qp] *
2078  TensorTools::inner_product((*neigh_dphi)[i][qp] *
2079  (*face_normals)[qp],
2080  (*dphi)[j][qp] *
2081  (*face_normals)[qp]);
2082  }
2083  }
2084  Ke.cholesky_solve(Fe, Ue[is]);
2085  }
2086 
2087  // Make sure we're not adding recursive constraints
2088  // due to the redundancy in the way we add periodic
2089  // boundary constraints
2090  //
2091  // In order for this to work while threaded or on
2092  // distributed meshes, we need a rigorous way to
2093  // avoid recursive constraints. Here it is:
2094  //
2095  // For vertex DoFs, if there is a "prior" element
2096  // (i.e. a coarser element or an equally refined
2097  // element with a lower id) on this boundary which
2098  // contains the vertex point, then we will avoid
2099  // generating constraints; the prior element (or
2100  // something prior to it) may do so. If we are the
2101  // most prior (or "primary") element on this
2102  // boundary sharing this point, then we look at the
2103  // boundary periodic to us, we find the primary
2104  // element there, and if that primary is coarser or
2105  // equal-but-lower-id, then our vertex dofs are
2106  // constrained in terms of that element.
2107  //
2108  // For edge DoFs, if there is a coarser element
2109  // on this boundary sharing this edge, then we will
2110  // avoid generating constraints (we will be
2111  // constrained indirectly via AMR constraints
2112  // connecting us to the coarser element's DoFs). If
2113  // we are the coarsest element sharing this edge,
2114  // then we generate constraints if and only if we
2115  // are finer than the coarsest element on the
2116  // boundary periodic to us sharing the corresponding
2117  // periodic edge, or if we are at equal level but
2118  // our edge nodes have higher ids than the periodic
2119  // edge nodes (sorted from highest to lowest, then
2120  // compared lexicographically)
2121  //
2122  // For face DoFs, we generate constraints if we are
2123  // finer than our periodic neighbor, or if we are at
2124  // equal level but our element id is higher than its
2125  // element id.
2126  //
2127  // If the primary neighbor is also the current elem
2128  // (a 1-element-thick mesh) then we choose which
2129  // vertex dofs to constrain via lexicographic
2130  // ordering on point locations
2131 
2132  // FIXME: This code doesn't yet properly handle
2133  // cases where multiple different periodic BCs
2134  // intersect.
2135  std::set<dof_id_type> my_constrained_dofs;
2136 
2137  // Container to catch boundary IDs handed back by BoundaryInfo.
2138  std::vector<boundary_id_type> new_bc_ids;
2139 
2140  for (auto n : elem->node_index_range())
2141  {
2142  if (!elem->is_node_on_side(n,s))
2143  continue;
2144 
2145  const Node & my_node = elem->node_ref(n);
2146 
2147  if (elem->is_vertex(n))
2148  {
2149  // Find all boundary ids that include this
2150  // point and have periodic boundary
2151  // conditions for this variable
2152  std::set<boundary_id_type> point_bcids;
2153 
2154  for (unsigned int new_s = 0;
2155  new_s != max_ns; ++new_s)
2156  {
2157  if (!elem->is_node_on_side(n,new_s))
2158  continue;
2159 
2160  mesh.get_boundary_info().boundary_ids (elem, s, new_bc_ids);
2161 
2162  for (const auto & new_boundary_id : new_bc_ids)
2163  {
2164  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2165  if (new_periodic && new_periodic->is_my_variable(variable_number))
2166  point_bcids.insert(new_boundary_id);
2167  }
2168  }
2169 
2170  // See if this vertex has point neighbors to
2171  // defer to
2172  if (primary_boundary_point_neighbor
2173  (elem, my_node, mesh.get_boundary_info(), point_bcids)
2174  != elem)
2175  continue;
2176 
2177  // Find the complementary boundary id set
2178  std::set<boundary_id_type> point_pairedids;
2179  for (const auto & new_boundary_id : point_bcids)
2180  {
2181  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2182  point_pairedids.insert(new_periodic->pairedboundary);
2183  }
2184 
2185  // What do we want to constrain against?
2186  const Elem * primary_elem = nullptr;
2187  const Elem * main_neigh = nullptr;
2188  Point main_pt = my_node,
2189  primary_pt = my_node;
2190 
2191  for (const auto & new_boundary_id : point_bcids)
2192  {
2193  // Find the corresponding periodic point and
2194  // its primary neighbor
2195  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2196 
2197  const Point neigh_pt =
2198  new_periodic->get_corresponding_pos(my_node);
2199 
2200  // If the point is getting constrained
2201  // to itself by this PBC then we don't
2202  // generate any constraints
2203  if (neigh_pt.absolute_fuzzy_equals
2204  (my_node, primary_hmin*TOLERANCE))
2205  continue;
2206 
2207  // Otherwise we'll have a constraint in
2208  // one direction or another
2209  if (!primary_elem)
2210  primary_elem = elem;
2211 
2212  const Elem * primary_neigh =
2213  primary_boundary_point_neighbor(neigh, neigh_pt,
2215  point_pairedids);
2216 
2217  libmesh_assert(primary_neigh);
2218 
2219  if (new_boundary_id == boundary_id)
2220  {
2221  main_neigh = primary_neigh;
2222  main_pt = neigh_pt;
2223  }
2224 
2225  // Finer elements will get constrained in
2226  // terms of coarser neighbors, not the
2227  // other way around
2228  if ((primary_neigh->level() > primary_elem->level()) ||
2229 
2230  // For equal-level elements, the one with
2231  // higher id gets constrained in terms of
2232  // the one with lower id
2233  (primary_neigh->level() == primary_elem->level() &&
2234  primary_neigh->id() > primary_elem->id()) ||
2235 
2236  // On a one-element-thick mesh, we compare
2237  // points to see what side gets constrained
2238  (primary_neigh == primary_elem &&
2239  (neigh_pt > primary_pt)))
2240  continue;
2241 
2242  primary_elem = primary_neigh;
2243  primary_pt = neigh_pt;
2244  }
2245 
2246  if (!primary_elem ||
2247  primary_elem != main_neigh ||
2248  primary_pt != main_pt)
2249  continue;
2250  }
2251  else if (elem->is_edge(n))
2252  {
2253  // Find which edge we're on
2254  unsigned int e=0, ne = elem->n_edges();
2255  for (; e != ne; ++e)
2256  {
2257  if (elem->is_node_on_edge(n,e))
2258  break;
2259  }
2260  libmesh_assert_less (e, elem->n_edges());
2261 
2262  // Find the edge end nodes
2263  const Node
2264  * e1 = nullptr,
2265  * e2 = nullptr;
2266  for (auto nn : elem->node_index_range())
2267  {
2268  if (nn == n)
2269  continue;
2270 
2271  if (elem->is_node_on_edge(nn, e))
2272  {
2273  if (e1 == nullptr)
2274  {
2275  e1 = elem->node_ptr(nn);
2276  }
2277  else
2278  {
2279  e2 = elem->node_ptr(nn);
2280  break;
2281  }
2282  }
2283  }
2284  libmesh_assert (e1 && e2);
2285 
2286  // Find all boundary ids that include this
2287  // edge and have periodic boundary
2288  // conditions for this variable
2289  std::set<boundary_id_type> edge_bcids;
2290 
2291  for (unsigned int new_s = 0;
2292  new_s != max_ns; ++new_s)
2293  {
2294  if (!elem->is_node_on_side(n,new_s))
2295  continue;
2296 
2297  // We're reusing the new_bc_ids vector created outside the loop over nodes.
2298  mesh.get_boundary_info().boundary_ids (elem, s, new_bc_ids);
2299 
2300  for (const auto & new_boundary_id : new_bc_ids)
2301  {
2302  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2303  if (new_periodic && new_periodic->is_my_variable(variable_number))
2304  edge_bcids.insert(new_boundary_id);
2305  }
2306  }
2307 
2308 
2309  // See if this edge has neighbors to defer to
2310  if (primary_boundary_edge_neighbor
2311  (elem, *e1, *e2, mesh.get_boundary_info(), edge_bcids)
2312  != elem)
2313  continue;
2314 
2315  // Find the complementary boundary id set
2316  std::set<boundary_id_type> edge_pairedids;
2317  for (const auto & new_boundary_id : edge_bcids)
2318  {
2319  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2320  edge_pairedids.insert(new_periodic->pairedboundary);
2321  }
2322 
2323  // What do we want to constrain against?
2324  const Elem * primary_elem = nullptr;
2325  const Elem * main_neigh = nullptr;
2326  Point main_pt1 = *e1,
2327  main_pt2 = *e2,
2328  primary_pt1 = *e1,
2329  primary_pt2 = *e2;
2330 
2331  for (const auto & new_boundary_id : edge_bcids)
2332  {
2333  // Find the corresponding periodic edge and
2334  // its primary neighbor
2335  const PeriodicBoundaryBase * new_periodic = boundaries.boundary(new_boundary_id);
2336 
2337  Point neigh_pt1 = new_periodic->get_corresponding_pos(*e1),
2338  neigh_pt2 = new_periodic->get_corresponding_pos(*e2);
2339 
2340  // If the edge is getting constrained
2341  // to itself by this PBC then we don't
2342  // generate any constraints
2343  if (neigh_pt1.absolute_fuzzy_equals
2344  (*e1, primary_hmin*TOLERANCE) &&
2345  neigh_pt2.absolute_fuzzy_equals
2346  (*e2, primary_hmin*TOLERANCE))
2347  continue;
2348 
2349  // Otherwise we'll have a constraint in
2350  // one direction or another
2351  if (!primary_elem)
2352  primary_elem = elem;
2353 
2354  const Elem * primary_neigh = primary_boundary_edge_neighbor
2355  (neigh, neigh_pt1, neigh_pt2,
2356  mesh.get_boundary_info(), edge_pairedids);
2357 
2358  libmesh_assert(primary_neigh);
2359 
2360  if (new_boundary_id == boundary_id)
2361  {
2362  main_neigh = primary_neigh;
2363  main_pt1 = neigh_pt1;
2364  main_pt2 = neigh_pt2;
2365  }
2366 
2367  // If we have a one-element thick mesh,
2368  // we'll need to sort our points to get a
2369  // consistent ordering rule
2370  //
2371  // Use >= in this test to make sure that,
2372  // for angular constraints, no node gets
2373  // constrained to itself.
2374  if (primary_neigh == primary_elem)
2375  {
2376  if (primary_pt1 > primary_pt2)
2377  std::swap(primary_pt1, primary_pt2);
2378  if (neigh_pt1 > neigh_pt2)
2379  std::swap(neigh_pt1, neigh_pt2);
2380 
2381  if (neigh_pt2 >= primary_pt2)
2382  continue;
2383  }
2384 
2385  // Otherwise:
2386  // Finer elements will get constrained in
2387  // terms of coarser ones, not the other way
2388  // around
2389  if ((primary_neigh->level() > primary_elem->level()) ||
2390 
2391  // For equal-level elements, the one with
2392  // higher id gets constrained in terms of
2393  // the one with lower id
2394  (primary_neigh->level() == primary_elem->level() &&
2395  primary_neigh->id() > primary_elem->id()))
2396  continue;
2397 
2398  primary_elem = primary_neigh;
2399  primary_pt1 = neigh_pt1;
2400  primary_pt2 = neigh_pt2;
2401  }
2402 
2403  if (!primary_elem ||
2404  primary_elem != main_neigh ||
2405  primary_pt1 != main_pt1 ||
2406  primary_pt2 != main_pt2)
2407  continue;
2408  }
2409  else if (elem->is_face(n))
2410  {
2411  // If we have a one-element thick mesh,
2412  // use the ordering of the face node and its
2413  // periodic counterpart to determine what
2414  // gets constrained
2415  if (neigh == elem)
2416  {
2417  const Point neigh_pt =
2418  periodic->get_corresponding_pos(my_node);
2419  if (neigh_pt > my_node)
2420  continue;
2421  }
2422 
2423  // Otherwise:
2424  // Finer elements will get constrained in
2425  // terms of coarser ones, not the other way
2426  // around
2427  if ((neigh->level() > elem->level()) ||
2428 
2429  // For equal-level elements, the one with
2430  // higher id gets constrained in terms of
2431  // the one with lower id
2432  (neigh->level() == elem->level() &&
2433  neigh->id() > elem->id()))
2434  continue;
2435  }
2436 
2437  // If we made it here without hitting a continue
2438  // statement, then we're at a node whose dofs
2439  // should be constrained by this element's
2440  // calculations.
2441  const unsigned int n_comp =
2442  my_node.n_comp(sys_number, variable_number);
2443 
2444  for (unsigned int i=0; i != n_comp; ++i)
2445  my_constrained_dofs.insert
2446  (my_node.dof_number
2447  (sys_number, variable_number, i));
2448  }
2449 
2450  // FIXME: old code for disambiguating periodic BCs:
2451  // this is not threadsafe nor safe to run on a
2452  // non-serialized mesh.
2453  /*
2454  std::vector<bool> recursive_constraint(n_side_dofs, false);
2455 
2456  for (unsigned int is = 0; is != n_side_dofs; ++is)
2457  {
2458  const unsigned int i = neigh_side_dofs[is];
2459  const dof_id_type their_dof_g = neigh_dof_indices[i];
2460  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
2461 
2462  {
2463  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2464 
2465  if (!dof_map.is_constrained_dof(their_dof_g))
2466  continue;
2467  }
2468 
2469  DofConstraintRow & their_constraint_row =
2470  constraints[their_dof_g].first;
2471 
2472  for (unsigned int js = 0; js != n_side_dofs; ++js)
2473  {
2474  const unsigned int j = my_side_dofs[js];
2475  const dof_id_type my_dof_g = my_dof_indices[j];
2476  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
2477 
2478  if (their_constraint_row.count(my_dof_g))
2479  recursive_constraint[js] = true;
2480  }
2481  }
2482  */
2483 
2484  for (unsigned int js = 0; js != n_side_dofs; ++js)
2485  {
2486  // FIXME: old code path
2487  // if (recursive_constraint[js])
2488  // continue;
2489 
2490  const unsigned int j = my_side_dofs[js];
2491  const dof_id_type my_dof_g = my_dof_indices[j];
2492  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
2493 
2494  // FIXME: new code path
2495  if (!my_constrained_dofs.count(my_dof_g))
2496  continue;
2497 
2498  DofConstraintRow * constraint_row;
2499 
2500  // we may be running constraint methods concurrently
2501  // on multiple threads, so we need a lock to
2502  // ensure that this constraint is "ours"
2503  {
2504  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
2505 
2506  if (dof_map.is_constrained_dof(my_dof_g))
2507  continue;
2508 
2509  constraint_row = &(constraints[my_dof_g]);
2510  libmesh_assert(constraint_row->empty());
2511  }
2512 
2513  for (unsigned int is = 0; is != n_side_dofs; ++is)
2514  {
2515  const unsigned int i = neigh_side_dofs[is];
2516  const dof_id_type their_dof_g = neigh_dof_indices[i];
2517  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
2518 
2519  // Periodic constraints should never be
2520  // self-constraints
2521  // libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
2522 
2523  const Real their_dof_value = Ue[is](js);
2524 
2525  if (their_dof_g == my_dof_g)
2526  {
2527  libmesh_assert_less (std::abs(their_dof_value-1.), 1.e-5);
2528  for (unsigned int k = 0; k != n_side_dofs; ++k)
2529  libmesh_assert(k == is || std::abs(Ue[k](js)) < 1.e-5);
2530  continue;
2531  }
2532 
2533  if (std::abs(their_dof_value) < 10*TOLERANCE)
2534  continue;
2535 
2536  if(!periodic->has_transformation_matrix())
2537  {
2538  constraint_row->emplace(their_dof_g, their_dof_value);
2539  }
2540  else
2541  {
2542  // In this case the current variable is constrained in terms of other variables.
2543  // We assume that all variables in this constraint have the same FE type (this
2544  // is asserted below), and hence we can create the constraint row contribution
2545  // by multiplying their_dof_value by the corresponding row of the transformation
2546  // matrix.
2547 
2548  const std::set<unsigned int> & variables = periodic->get_variables();
2549  neigh_dof_indices_all_variables.resize(variables.size());
2550  unsigned int index = 0;
2551  for(unsigned int other_var : variables)
2552  {
2553  libmesh_assert_msg(base_fe_type == dof_map.variable_type(other_var), "FE types must match for all variables involved in constraint");
2554 
2555  Real var_weighting = periodic->get_transformation_matrix()(variable_number, other_var);
2556  constraint_row->emplace(neigh_dof_indices_all_variables[index][i],
2557  var_weighting*their_dof_value);
2558  index++;
2559  }
2560  }
2561 
2562  }
2563  }
2564  }
2565  // p refinement constraints:
2566  // constrain dofs shared between
2567  // active elements and neighbors with
2568  // lower polynomial degrees
2569 #ifdef LIBMESH_ENABLE_AMR
2570  const unsigned int min_p_level =
2571  neigh->min_p_level_by_neighbor(elem, elem->p_level());
2572  if (min_p_level < elem->p_level())
2573  {
2574  // Adaptive p refinement of non-hierarchic bases will
2575  // require more coding
2576  libmesh_assert(my_fe->is_hierarchic());
2577  dof_map.constrain_p_dofs(variable_number, elem,
2578  s, min_p_level);
2579  }
2580 #endif // #ifdef LIBMESH_ENABLE_AMR
2581  }
2582  }
2583 }
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:196
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:1008
A Node is like a Point, but with more information.
Definition: node.h:52
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:978
virtual bool is_face(const unsigned int i) const =0
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2201
static constexpr Real TOLERANCE
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
const std::set< unsigned int > & get_variables() const
Get the set of variables for this periodic boundary condition.
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:396
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
MeshBase & mesh
PeriodicBoundaryBase * boundary(boundary_id_type id)
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const =0
Order default_quadrature_order() const
Definition: fe_type.h:415
unsigned int p_level() const
Definition: elem.h:3122
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
Fills a user-provided std::vector with the boundary ids associated with Node node.
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Definition: mesh_base.h:170
unsigned int min_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
Definition: elem.C:2350
unsigned int sys_number() const
Definition: dof_map.h:2340
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const =0
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 ...
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
const Node & node_ref(const unsigned int i) const
Definition: elem.h:2535
dof_id_type id() const
Definition: dof_object.h:819
virtual Real hmin() const
Definition: elem.C:683
static constexpr dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:473
libmesh_assert(ctx)
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:2426
const FEType & variable_type(const unsigned int i) const
Definition: dof_map.h:2388
PetscErrorCode PetscInt const PetscInt IS * is
virtual unsigned int n_edges() const =0
bool absolute_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:975
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
const DenseMatrix< Real > & get_transformation_matrix() const
Get the transformation matrix, if it is defined.
virtual unsigned int n_sides() const =0
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2612
unsigned int level() const
Definition: elem.h:3088
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned short dim() const =0
FEContinuity
defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity.
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2513
virtual bool is_vertex(const unsigned int i) const =0
bool is_my_variable(unsigned int var_num) const
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:100
void resize(const unsigned int new_m, const unsigned int new_n)
Resizes the matrix to the specified size and calls zero().
Definition: dense_matrix.h:895
const Elem * neighbor(boundary_id_type boundary_id, const PointLocatorBase &point_locator, const Elem *e, unsigned int side, unsigned int *neigh_side=nullptr) const
This class implements specific orders of Gauss quadrature.
std::enable_if< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:51
IntRange< unsigned short > node_index_range() const
Definition: elem.h:2697
The base class for defining periodic boundaries.
Defines a dense vector for use in Finite Element-type computations.
Definition: dof_map.h:74
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
For symmetric positive definite (SPD) matrices.
virtual bool infinite() const =0
bool active() const
Definition: elem.h:2955
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, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
Definition: fe_interface.C:598
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153
virtual bool is_edge(const unsigned int i) const =0
This class forms the foundation from which generic finite elements may be derived.
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...
uint8_t dof_id_type
Definition: id_types.h:67
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ 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 1078 of file fe_abstract.C.

References libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::Elem::build_side_ptr(), libMesh::Elem::default_side_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::DofObject::id(), 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::Real, libMesh::FEInterface::shape(), libMesh::Elem::side_index_range(), and libMesh::Threads::spin_mtx.

1083 {
1084  // Only bother if we truly have periodic boundaries
1085  if (boundaries.empty())
1086  return;
1087 
1088  libmesh_assert(elem);
1089 
1090  // Only constrain active elements with this method
1091  if (!elem->active())
1092  return;
1093 
1094  const unsigned int Dim = elem->dim();
1095 
1096  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
1097  const FEType fe_type(elem->default_side_order(), mapping_family);
1098 
1099  // Pull objects out of the loop to reduce heap operations
1100  std::vector<const Node *> my_nodes, neigh_nodes;
1101  std::unique_ptr<const Elem> my_side, neigh_side;
1102 
1103  // Look at the element faces. Check to see if we need to
1104  // build constraints.
1105  std::vector<boundary_id_type> bc_ids;
1106  for (auto s : elem->side_index_range())
1107  {
1108  if (elem->neighbor_ptr(s))
1109  continue;
1110 
1111  mesh.get_boundary_info().boundary_ids (elem, s, bc_ids);
1112  for (const auto & boundary_id : bc_ids)
1113  {
1114  const PeriodicBoundaryBase * periodic = boundaries.boundary(boundary_id);
1115  if (periodic)
1116  {
1117  libmesh_assert(point_locator);
1118 
1119  // Get pointers to the element's neighbor.
1120  unsigned int s_neigh;
1121  const Elem * neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s, &s_neigh);
1122 
1123  libmesh_error_msg_if
1124  (!neigh, "PeriodicBoundaries can't find a periodic neighbor for element " <<
1125  elem->id() << " side " << s);
1126 
1127  // h refinement constraints:
1128  // constrain dofs shared between
1129  // this element and ones as coarse
1130  // as or coarser than this element.
1131  if (neigh->level() <= elem->level())
1132  {
1133 #ifdef LIBMESH_ENABLE_AMR
1134  libmesh_assert(neigh->active());
1135 #endif // #ifdef LIBMESH_ENABLE_AMR
1136 
1137  elem->build_side_ptr(my_side, s);
1138  neigh->build_side_ptr(neigh_side, s_neigh);
1139 
1140  const unsigned int n_side_nodes = my_side->n_nodes();
1141 
1142  my_nodes.clear();
1143  my_nodes.reserve (n_side_nodes);
1144  neigh_nodes.clear();
1145  neigh_nodes.reserve (n_side_nodes);
1146 
1147  for (unsigned int n=0; n != n_side_nodes; ++n)
1148  my_nodes.push_back(my_side->node_ptr(n));
1149 
1150  for (unsigned int n=0; n != n_side_nodes; ++n)
1151  neigh_nodes.push_back(neigh_side->node_ptr(n));
1152 
1153  // Make sure we're not adding recursive constraints
1154  // due to the redundancy in the way we add periodic
1155  // boundary constraints, or adding constraints to
1156  // nodes that already have AMR constraints
1157  std::vector<bool> skip_constraint(n_side_nodes, false);
1158 
1159  for (unsigned int my_side_n=0;
1160  my_side_n < n_side_nodes;
1161  my_side_n++)
1162  {
1163  // Do not use the p_level(), if any, that is inherited by the side.
1164  libmesh_assert_less (my_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1165 
1166  const Node * my_node = my_nodes[my_side_n];
1167 
1168  // If we've already got a constraint on this
1169  // node, then the periodic constraint is
1170  // redundant
1171  {
1172  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1173 
1174  if (constraints.count(my_node))
1175  {
1176  skip_constraint[my_side_n] = true;
1177  continue;
1178  }
1179  }
1180 
1181  // Compute the neighbors's side shape function values.
1182  for (unsigned int their_side_n=0;
1183  their_side_n < n_side_nodes;
1184  their_side_n++)
1185  {
1186  // Do not use the p_level(), if any, that is inherited by the side.
1187  libmesh_assert_less (their_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, neigh_side.get()));
1188 
1189  const Node * their_node = neigh_nodes[their_side_n];
1190 
1191  // If there's a constraint on an opposing node,
1192  // we need to see if it's constrained by
1193  // *our side* making any periodic constraint
1194  // on us recursive
1195  {
1196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1197 
1198  if (!constraints.count(their_node))
1199  continue;
1200 
1201  const NodeConstraintRow & their_constraint_row =
1202  constraints[their_node].first;
1203 
1204  for (unsigned int orig_side_n=0;
1205  orig_side_n < n_side_nodes;
1206  orig_side_n++)
1207  {
1208  // Do not use the p_level(), if any, that is inherited by the side.
1209  libmesh_assert_less (orig_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1210 
1211  const Node * orig_node = my_nodes[orig_side_n];
1212 
1213  if (their_constraint_row.count(orig_node))
1214  skip_constraint[orig_side_n] = true;
1215  }
1216  }
1217  }
1218  }
1219  for (unsigned int my_side_n=0;
1220  my_side_n < n_side_nodes;
1221  my_side_n++)
1222  {
1223  // Do not use the p_level(), if any, that is inherited by the side.
1224  libmesh_assert_less (my_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1225 
1226  if (skip_constraint[my_side_n])
1227  continue;
1228 
1229  const Node * my_node = my_nodes[my_side_n];
1230 
1231  // Figure out where my node lies on their reference element.
1232  const Point neigh_point = periodic->get_corresponding_pos(*my_node);
1233 
1234  // Figure out where my node lies on their reference element.
1235  const Point mapped_point =
1236  FEMap::inverse_map(Dim-1, neigh_side.get(),
1237  neigh_point);
1238 
1239  for (unsigned int their_side_n=0;
1240  their_side_n < n_side_nodes;
1241  their_side_n++)
1242  {
1243  // Do not use the p_level(), if any, that is inherited by the side.
1244  libmesh_assert_less (their_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, neigh_side.get()));
1245 
1246  const Node * their_node = neigh_nodes[their_side_n];
1247  libmesh_assert(their_node);
1248 
1249  // Do not use the p_level(), if any, that is inherited by the side.
1250  const Real their_value = FEInterface::shape(fe_type,
1251  /*extra_order=*/0,
1252  neigh_side.get(),
1253  their_side_n,
1254  mapped_point);
1255 
1256  // since we may be running this method concurrently
1257  // on multiple threads we need to acquire a lock
1258  // before modifying the shared constraint_row object.
1259  {
1260  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1261 
1262  NodeConstraintRow & constraint_row =
1263  constraints[my_node].first;
1264 
1265  constraint_row.emplace(their_node, their_value);
1266  }
1267  }
1268  }
1269  }
1270  }
1271  }
1272  }
1273 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
MeshBase & mesh
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:761
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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:148
FEFamily
defines an enum for finite element families.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:46
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ 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 1534 of file fe_base.C.

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

1538 {
1539  libmesh_assert(elem);
1540 
1541  const unsigned int Dim = elem->dim();
1542 
1543  // Only constrain elements in 2,3D.
1544  if (Dim == 1)
1545  return;
1546 
1547  // Only constrain active elements with this method
1548  if (!elem->active())
1549  return;
1550 
1551  const Variable & var = dof_map.variable(variable_number);
1552  const FEType & base_fe_type = var.type();
1553  const bool add_p_level = base_fe_type.p_refinement;
1554 
1555  // Construct FE objects for this element and its neighbors.
1556  std::unique_ptr<FEGenericBase<OutputShape>> my_fe
1557  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1558  my_fe->add_p_level_in_reinit(add_p_level);
1559  const FEContinuity cont = my_fe->get_continuity();
1560 
1561  // We don't need to constrain discontinuous elements
1562  if (cont == DISCONTINUOUS)
1563  return;
1564  libmesh_assert (cont == C_ZERO || cont == C_ONE ||
1565  cont == SIDE_DISCONTINUOUS);
1566 
1567  // this would require some generalisation:
1568  // - e.g. the 'my_fe'-object needs generalisation
1569  // - due to lack of one-to-one correspondence of DOFs and nodes,
1570  // this doesn't work easily.
1571  if (elem->infinite())
1572  libmesh_not_implemented();
1573 
1574  std::unique_ptr<FEGenericBase<OutputShape>> neigh_fe
1575  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1576  neigh_fe->add_p_level_in_reinit(add_p_level);
1577 
1578  QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
1579  my_fe->attach_quadrature_rule (&my_qface);
1580  std::vector<Point> neigh_qface;
1581 
1582  const std::vector<Real> & JxW = my_fe->get_JxW();
1583  const std::vector<Point> & q_point = my_fe->get_xyz();
1584  const std::vector<std::vector<OutputShape>> & phi = my_fe->get_phi();
1585  const std::vector<std::vector<OutputShape>> & neigh_phi =
1586  neigh_fe->get_phi();
1587  const std::vector<Point> * face_normals = nullptr;
1588  const std::vector<std::vector<OutputGradient>> * dphi = nullptr;
1589  const std::vector<std::vector<OutputGradient>> * neigh_dphi = nullptr;
1590 
1591  std::vector<dof_id_type> my_dof_indices, neigh_dof_indices;
1592  std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
1593 
1594  if (cont == C_ONE)
1595  {
1596  const std::vector<Point> & ref_face_normals =
1597  my_fe->get_normals();
1598  face_normals = &ref_face_normals;
1599  const std::vector<std::vector<OutputGradient>> & ref_dphi =
1600  my_fe->get_dphi();
1601  dphi = &ref_dphi;
1602  const std::vector<std::vector<OutputGradient>> & ref_neigh_dphi =
1603  neigh_fe->get_dphi();
1604  neigh_dphi = &ref_neigh_dphi;
1605  }
1606 
1607  DenseMatrix<Real> Ke;
1608  DenseVector<Real> Fe;
1609  std::vector<DenseVector<Real>> Ue;
1610 
1611  // Look at the element faces. Check to see if we need to
1612  // build constraints.
1613  for (auto s : elem->side_index_range())
1614  {
1615  // Get pointers to the element's neighbor.
1616  const Elem * neigh = elem->neighbor_ptr(s);
1617 
1618  if (!neigh)
1619  continue;
1620 
1621  if (!var.active_on_subdomain(neigh->subdomain_id()))
1622  continue;
1623 
1624  // h refinement constraints:
1625  // constrain dofs shared between
1626  // this element and ones coarser
1627  // than this element.
1628  if (neigh->level() < elem->level())
1629  {
1630  unsigned int s_neigh = neigh->which_neighbor_am_i(elem);
1631  libmesh_assert_less (s_neigh, neigh->n_neighbors());
1632 
1633  // Find the minimum p level; we build the h constraint
1634  // matrix with this and then constrain away all higher p
1635  // DoFs.
1636  libmesh_assert(neigh->active());
1637  const unsigned int min_p_level = add_p_level *
1638  std::min(elem->p_level(), neigh->p_level());
1639  // we may need to make the FE objects reinit with the
1640  // minimum shared p_level
1641  const unsigned int old_elem_level = add_p_level * elem->p_level();
1642  if (old_elem_level != min_p_level)
1643  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() + min_p_level - old_elem_level);
1644  const unsigned int old_neigh_level = add_p_level * neigh->p_level();
1645  if (old_neigh_level != min_p_level)
1646  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() + min_p_level - old_neigh_level);
1647 
1648  my_fe->reinit(elem, s);
1649 
1650  // This function gets called element-by-element, so there
1651  // will be a lot of memory allocation going on. We can
1652  // at least minimize this for the case of the dof indices
1653  // by efficiently preallocating the requisite storage.
1654  // n_nodes is not necessarily n_dofs, but it is better
1655  // than nothing!
1656  my_dof_indices.reserve (elem->n_nodes());
1657  neigh_dof_indices.reserve (neigh->n_nodes());
1658 
1659  dof_map.dof_indices (elem, my_dof_indices,
1660  variable_number,
1661  min_p_level);
1662  dof_map.dof_indices (neigh, neigh_dof_indices,
1663  variable_number,
1664  min_p_level);
1665 
1666  const unsigned int n_qp = my_qface.n_points();
1667 
1668  FEMap::inverse_map (Dim, neigh, q_point, neigh_qface);
1669 
1670  neigh_fe->reinit(neigh, &neigh_qface);
1671 
1672  // We're only concerned with DOFs whose values (and/or first
1673  // derivatives for C1 elements) are supported on side nodes
1674  FEType elem_fe_type = base_fe_type;
1675  if (old_elem_level != min_p_level)
1676  elem_fe_type.order = base_fe_type.order.get_order() + min_p_level - old_elem_level;
1677  FEType neigh_fe_type = base_fe_type;
1678  if (old_neigh_level != min_p_level)
1679  neigh_fe_type.order = base_fe_type.order.get_order() + min_p_level - old_neigh_level;
1680  FEInterface::dofs_on_side(elem, Dim, elem_fe_type, s, my_side_dofs);
1681  FEInterface::dofs_on_side(neigh, Dim, neigh_fe_type, s_neigh, neigh_side_dofs);
1682 
1683  const unsigned int n_side_dofs =
1684  cast_int<unsigned int>(my_side_dofs.size());
1685  libmesh_assert_equal_to (n_side_dofs, neigh_side_dofs.size());
1686 
1687 #ifndef NDEBUG
1688  for (auto i : my_side_dofs)
1689  libmesh_assert_less(i, my_dof_indices.size());
1690  for (auto i : neigh_side_dofs)
1691  libmesh_assert_less(i, neigh_dof_indices.size());
1692 #endif
1693 
1694  Ke.resize (n_side_dofs, n_side_dofs);
1695  Ue.resize(n_side_dofs);
1696 
1697  // Form the projection matrix, (inner product of fine basis
1698  // functions against fine test functions)
1699  for (unsigned int is = 0; is != n_side_dofs; ++is)
1700  {
1701  const unsigned int i = my_side_dofs[is];
1702  for (unsigned int js = 0; js != n_side_dofs; ++js)
1703  {
1704  const unsigned int j = my_side_dofs[js];
1705  for (unsigned int qp = 0; qp != n_qp; ++qp)
1706  {
1707  Ke(is,js) += JxW[qp] * TensorTools::inner_product(phi[i][qp], phi[j][qp]);
1708  if (cont == C_ONE)
1709  Ke(is,js) += JxW[qp] *
1710  TensorTools::inner_product((*dphi)[i][qp] *
1711  (*face_normals)[qp],
1712  (*dphi)[j][qp] *
1713  (*face_normals)[qp]);
1714  }
1715  }
1716  }
1717 
1718  // Form the right hand sides, (inner product of coarse basis
1719  // functions against fine test functions)
1720  for (unsigned int is = 0; is != n_side_dofs; ++is)
1721  {
1722  const unsigned int i = neigh_side_dofs[is];
1723  Fe.resize (n_side_dofs);
1724  for (unsigned int js = 0; js != n_side_dofs; ++js)
1725  {
1726  const unsigned int j = my_side_dofs[js];
1727  for (unsigned int qp = 0; qp != n_qp; ++qp)
1728  {
1729  Fe(js) += JxW[qp] *
1730  TensorTools::inner_product(neigh_phi[i][qp],
1731  phi[j][qp]);
1732  if (cont == C_ONE)
1733  Fe(js) += JxW[qp] *
1734  TensorTools::inner_product((*neigh_dphi)[i][qp] *
1735  (*face_normals)[qp],
1736  (*dphi)[j][qp] *
1737  (*face_normals)[qp]);
1738  }
1739  }
1740  Ke.cholesky_solve(Fe, Ue[is]);
1741  }
1742 
1743  for (unsigned int js = 0; js != n_side_dofs; ++js)
1744  {
1745  const unsigned int j = my_side_dofs[js];
1746  const dof_id_type my_dof_g = my_dof_indices[j];
1747  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
1748 
1749  // Hunt for "constraining against myself" cases before
1750  // we bother creating a constraint row
1751  bool self_constraint = false;
1752  for (unsigned int is = 0; is != n_side_dofs; ++is)
1753  {
1754  const unsigned int i = neigh_side_dofs[is];
1755  const dof_id_type their_dof_g = neigh_dof_indices[i];
1756  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1757 
1758  if (their_dof_g == my_dof_g)
1759  {
1760 #ifndef NDEBUG
1761  const Real their_dof_value = Ue[is](js);
1762  libmesh_assert_less (std::abs(their_dof_value-1.),
1763  10*TOLERANCE);
1764 
1765  for (unsigned int k = 0; k != n_side_dofs; ++k)
1766  libmesh_assert(k == is ||
1767  std::abs(Ue[k](js)) <
1768  10*TOLERANCE);
1769 #endif
1770 
1771  self_constraint = true;
1772  break;
1773  }
1774  }
1775 
1776  if (self_constraint)
1777  continue;
1778 
1779  DofConstraintRow * constraint_row;
1780 
1781  // we may be running constraint methods concurrently
1782  // on multiple threads, so we need a lock to
1783  // ensure that this constraint is "ours"
1784  {
1785  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1786 
1787  if (dof_map.is_constrained_dof(my_dof_g))
1788  continue;
1789 
1790  constraint_row = &(constraints[my_dof_g]);
1791  libmesh_assert(constraint_row->empty());
1792  }
1793 
1794  for (unsigned int is = 0; is != n_side_dofs; ++is)
1795  {
1796  const unsigned int i = neigh_side_dofs[is];
1797  const dof_id_type their_dof_g = neigh_dof_indices[i];
1798  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1799  libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
1800 
1801  const Real their_dof_value = Ue[is](js);
1802 
1803  if (std::abs(their_dof_value) < 10*TOLERANCE)
1804  continue;
1805 
1806  constraint_row->emplace(their_dof_g, their_dof_value);
1807  }
1808  }
1809 
1810  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() + old_elem_level - min_p_level);
1811  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() + old_neigh_level - min_p_level);
1812  }
1813 
1814  if (add_p_level)
1815  {
1816  // p refinement constraints:
1817  // constrain dofs shared between
1818  // active elements and neighbors with
1819  // lower polynomial degrees
1820  const unsigned int min_p_level =
1821  neigh->min_p_level_by_neighbor(elem, elem->p_level());
1822  if (min_p_level < elem->p_level())
1823  {
1824  // Adaptive p refinement of non-hierarchic bases will
1825  // require more coding
1826  libmesh_assert(my_fe->is_hierarchic());
1827  dof_map.constrain_p_dofs(variable_number, elem,
1828  s, min_p_level);
1829  }
1830  }
1831  }
1832 }
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:196
bool p_refinement
Whether or not the finite elements for this type increase their p refinement level on geometric eleme...
Definition: fe_type.h:292
IntRange< unsigned short > side_index_range() const
Definition: elem.h:2724
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2201
static constexpr Real TOLERANCE
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
void resize(const unsigned int n)
Resize the vector.
Definition: dense_vector.h:396
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
Order default_quadrature_order() const
Definition: fe_type.h:415
unsigned int p_level() const
Definition: elem.h:3122
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition: fe_type.h:203
unsigned int min_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
Definition: elem.C:2350
const Variable & variable(const unsigned int c) const override
Definition: dof_map.h:2358
This class defines the notion of a variable in the system.
Definition: variable.h:50
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
static constexpr dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:473
virtual unsigned int n_nodes() const =0
unsigned int which_neighbor_am_i(const Elem *e) const
This function tells you which neighbor e is.
Definition: elem.h:2933
libmesh_assert(ctx)
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:2426
PetscErrorCode PetscInt const PetscInt IS * is
bool active_on_subdomain(subdomain_id_type sid) const
Definition: variable.h:167
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
int get_order() const
Explicitly request the order as an int.
Definition: fe_type.h:80
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2612
unsigned int level() const
Definition: elem.h:3088
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
Definition: elem.h:2588
virtual unsigned short dim() const =0
FEContinuity
defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity.
unsigned int n_neighbors() const
Definition: elem.h:713
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:100
void resize(const unsigned int new_m, const unsigned int new_n)
Resizes the matrix to the specified size and calls zero().
Definition: dense_matrix.h:895
This class implements specific orders of Gauss quadrature.
std::enable_if< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:51
Defines a dense vector for use in Finite Element-type computations.
Definition: dof_map.h:74
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
For symmetric positive definite (SPD) matrices.
virtual bool infinite() const =0
bool active() const
Definition: elem.h:2955
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, const bool add_p_level=true)
Fills the vector di with the local degree of freedom indices associated with side s of element elem A...
Definition: fe_interface.C:598
This class forms the foundation from which generic finite elements may be derived.
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...
uint8_t dof_id_type
Definition: id_types.h:67
const FEType & type() const
Definition: variable.h:144
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ compute_shape_functions() [1/2]

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

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.

The full form for 'a' is a = (r0*normal)/(normal*unit_r); where r0 is some point on the base plane(!) when the base element is not a plane, r0 and normal are functions of space. Here, some approximation is used:

Definition at line 753 of file inf_fe.C.

References libMesh::TypeVector< T >::cross(), dim, libMesh::Elem::dim(), libMesh::InfFEBase::get_elem_type(), libMesh::DofObject::id(), libMesh::libmesh_assert(), libMesh::InfFEMap::map(), libMesh::InfFERadial::n_dofs(), libMesh::FEInterface::n_dofs(), libMesh::TensorTools::norm(), libMesh::TypeVector< T >::norm(), libMesh::Elem::origin(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().

757 {
758  libmesh_assert(inf_elem);
759  // at least check whether the base element type is correct.
760  // otherwise this version of computing dist would give problems
761  libmesh_assert_equal_to (base_elem->type(),
762  InfFEBase::get_elem_type(inf_elem->type()));
763 
764  // Start logging the overall computation of shape functions
765  LOG_SCOPE("compute_shape_functions()", "InfFE");
766 
767  //const unsigned int n_radial_qp = cast_int<unsigned int>(som.size());
768  //const unsigned int n_base_qp = cast_int<unsigned int>(S_map[0].size());
769  const std::size_t n_radial_qp = radial_qp.size();
770  const unsigned int n_base_qp = base_qp.size();
771 
772  libmesh_assert_equal_to (_n_total_qp, n_radial_qp*n_base_qp);
773  libmesh_assert_equal_to (_n_total_qp, _total_qrule_weights.size());
774 #ifdef DEBUG
775  if (som.size() > 0)
776  libmesh_assert_equal_to(n_radial_qp, som.size());
777 
778  if (this->calculate_map || this->calculate_map_scaled)
779  {
780  // these vectors are needed later; initialize here already to have access to
781  // n_base_qp etc.
782  const std::vector<std::vector<Real>> & S_map = (base_fe->get_fe_map()).get_phi_map();
783  if (S_map[0].size() > 0)
784  libmesh_assert_equal_to(n_base_qp, S_map[0].size());
785  }
786  if (radial_qrule)
787  libmesh_assert_equal_to(n_radial_qp, radial_qrule->n_points());
788  if (base_qrule)
789  libmesh_assert_equal_to(n_base_qp, base_qrule->n_points());
790  libmesh_assert_equal_to(_n_total_qp % n_radial_qp, 0); // "Error in the structure of quadrature points!");
791 #endif
792 
793 
795  FEInterface::n_dofs(base_fe->get_fe_type(), base_elem.get());
796 
797 
798 
799  const Point origin = inf_elem->origin();
800 
801  // Compute the shape function values (and derivatives)
802  // at the Quadrature points. Note that the actual values
803  // have already been computed via init_shape_functions
804 
805  unsigned int elem_dim = inf_elem->dim();
806  // Compute the value of the derivative shape function i at quadrature point p
807  switch (elem_dim)
808  {
809  case 1:
810  case 2:
811  {
812  libmesh_not_implemented();
813  break;
814  }
815  case 3:
816  {
817  std::vector<std::vector<Real>> S (0);
818  std::vector<std::vector<Real>> Ss(0);
819  std::vector<std::vector<Real>> St(0);
820 
821  std::vector<Real> base_dxidx (0);
822  std::vector<Real> base_dxidy (0);
823  std::vector<Real> base_dxidz (0);
824  std::vector<Real> base_detadx(0);
825  std::vector<Real> base_detady(0);
826  std::vector<Real> base_detadz(0);
827 
828  std::vector<Point> base_xyz (0);
829 
832  S=base_fe->phi;
833 
834  // fast access to the approximation and mapping shapes of base_fe
836  {
837  Ss = base_fe->dphidxi;
838  St = base_fe->dphideta;
839 
840  base_dxidx = base_fe->get_dxidx();
841  base_dxidy = base_fe->get_dxidy();
842  base_dxidz = base_fe->get_dxidz();
843  base_detadx = base_fe->get_detadx();
844  base_detady = base_fe->get_detady();
845  base_detadz = base_fe->get_detadz();
846 
847  base_xyz = base_fe->get_xyz();
848  }
849 
850  ElemType base_type= base_elem->type();
851 
852 #ifdef DEBUG
853  if (calculate_phi)
854  libmesh_assert_equal_to (phi.size(), _n_total_approx_sf);
855  if (calculate_dphi)
856  {
857  libmesh_assert_equal_to (dphidxi.size(), _n_total_approx_sf);
858  libmesh_assert_equal_to (dphideta.size(), _n_total_approx_sf);
859  libmesh_assert_equal_to (dphidzeta.size(), _n_total_approx_sf);
860  }
861 #endif
862 
863  unsigned int tp=0; // total qp
864  for (unsigned int rp=0; rp<n_radial_qp; ++rp) // over radial qps
865  for (unsigned int bp=0; bp<n_base_qp; ++bp) // over base qps
866 
867  { // First compute the map from base element quantities to physical space:
868 
869  // initialize them with invalid value to not use them
870  // without setting them to the correct value before.
871  Point unit_r(NAN);
872  RealGradient grad_a_scaled(NAN);
873  Real a(NAN);
874  Real r_norm(NAN);
876  {
877  xyz[tp] = InfFEMap::map(elem_dim, inf_elem, Point(base_qp[bp](0),base_qp[bp](1),radial_qp[rp](0)));
878 
879  const Point r(xyz[tp]-origin);
880  a=(base_xyz[bp]-origin).norm();
881  r_norm = r.norm();
882 
883  // check that 'som' == a/r.
884 #ifndef NDEVEL
885  if (som.size())
886  libmesh_assert_less(std::abs(som[rp] -a/r_norm) , 1e-7);
887 #endif
888  unit_r=(r/r_norm);
889 
890  // They are used for computing the normal and do not correspond to the direction of eta and xi in this element:
891  // Due to the stretch of these axes in radial direction, they are deformed.
892  Point e_xi(base_dxidx[bp],
893  base_dxidy[bp],
894  base_dxidz[bp]);
895  Point e_eta(base_detadx[bp],
896  base_detady[bp],
897  base_detadz[bp]);
898 
899  const RealGradient normal=e_eta.cross(e_xi).unit();
900 
901  // grad a = a/r.norm() * grad_a_scaled
902  grad_a_scaled=unit_r - normal/(normal*unit_r);
903 
904  const Real dxi_er=base_dxidx[bp]* unit_r(0) + base_dxidy[bp] *unit_r(1) + base_dxidz[bp] *unit_r(2);
905  const Real deta_er=base_detadx[bp]*unit_r(0) + base_detady[bp]*unit_r(1) + base_detadz[bp]*unit_r(2);
906 
907  // in case of non-affine map, further terms need to be taken into account,
908  // involving \p e_eta and \p e_xi and thus recursive computation is needed
909  if (!base_elem->has_affine_map())
910  {
919  const unsigned int n_sf = base_elem->n_nodes();
920  RealGradient tmp(0.,0.,0.);
921  for (unsigned int i=0; i< n_sf; ++i)
922  {
923  RealGradient dL_da_i = (FE<2,LAGRANGE>::shape_deriv(base_type,
924  base_elem->default_order(),
925  i, 0, base_qp[bp]) * e_xi
926  +FE<2,LAGRANGE>::shape_deriv(base_type,
927  base_elem->default_order(),
928  i, 1, base_qp[bp]) * e_eta);
929 
930  tmp += (base_elem->node_ref(i) -origin).norm()* dL_da_i;
931 
932  }
933  libmesh_assert(tmp*unit_r < .95 ); // in a proper setup, tmp should have only a small radial component.
934  grad_a_scaled = ( tmp - (tmp*unit_r)*unit_r ) / ( 1. - tmp*unit_r);
935 
936  }
937 
938  // 'scale' = r/a
939  dxidx_map_scaled[tp] = (grad_a_scaled(0) - unit_r(0))*dxi_er +base_dxidx[bp];
940  dxidy_map_scaled[tp] = (grad_a_scaled(1) - unit_r(1))*dxi_er +base_dxidy[bp];
941  dxidz_map_scaled[tp] = (grad_a_scaled(2) - unit_r(2))*dxi_er +base_dxidz[bp];
942 
943  // 'scale' = r/a
944  detadx_map_scaled[tp] = (grad_a_scaled(0) - unit_r(0))*deta_er + base_detadx[bp];
945  detady_map_scaled[tp] = (grad_a_scaled(1) - unit_r(1))*deta_er + base_detady[bp];
946  detadz_map_scaled[tp] = (grad_a_scaled(2) - unit_r(2))*deta_er + base_detadz[bp];
947 
948  // 'scale' = (r/a)**2
949  dzetadx_map_scaled[tp] =-2./a*(grad_a_scaled(0) - unit_r(0));
950  dzetady_map_scaled[tp] =-2./a*(grad_a_scaled(1) - unit_r(1));
951  dzetadz_map_scaled[tp] =-2./a*(grad_a_scaled(2) - unit_r(2));
952 
953  }
954 
955  if (calculate_map)
956  {
957  dxidx_map[tp] = a/r_norm * dxidx_map_scaled[tp];
958  dxidy_map[tp] = a/r_norm * dxidy_map_scaled[tp];
959  dxidz_map[tp] = a/r_norm * dxidz_map_scaled[tp];
960 
961  detadx_map[tp] = a/r_norm * detadx_map_scaled[tp];
962  detady_map[tp] = a/r_norm * detady_map_scaled[tp];
963  detadz_map[tp] = a/r_norm * detadz_map_scaled[tp];
964 
965  // dzetadx = dzetadr*dr/dx - 2/r * grad_a
966  // = dzetadr*dr/dx - 2*a/r^2 * grad_a_scaled
967  dzetadx_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(0) - unit_r(0));
968  dzetady_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(1) - unit_r(1));
969  dzetadz_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(2) - unit_r(2));
970 
971  if (calculate_jxw)
972  {
973  Real inv_jac = (dxidx_map[tp]*( detady_map[tp]*dzetadz_map[tp]- dzetady_map[tp]*detadz_map[tp]) +
974  detadx_map[tp]*(dzetady_map[tp]* dxidz_map[tp]- dxidy_map[tp]*dzetadz_map[tp]) +
975  dzetadx_map[tp]*( dxidy_map[tp]*detadz_map[tp]- detady_map[tp]* dxidz_map[tp]));
976 
977  if (inv_jac <= 1e-10)
978  {
979  libmesh_error_msg("ERROR: negative inverse Jacobian " \
980  << inv_jac \
981  << " at point " \
982  << xyz[tp] \
983  << " in element " \
984  << inf_elem->id());
985  }
986 
987 
988  JxW[tp] = _total_qrule_weights[tp]/inv_jac;
989  }
990 
991  }
993  {
994  Real inv_jacxR_pow4 = (dxidx_map_scaled[tp] *( detady_map_scaled[tp]*dzetadz_map_scaled[tp]
1000  if (inv_jacxR_pow4 <= 1e-7)
1001  {
1002  libmesh_error_msg("ERROR: negative weighted inverse Jacobian " \
1003  << inv_jacxR_pow4 \
1004  << " at point " \
1005  << xyz[tp] \
1006  << " in element " \
1007  << inf_elem->id());
1008  }
1009 
1010  JxWxdecay[tp] = _total_qrule_weights[tp]/inv_jacxR_pow4;
1011  }
1012 
1013  // phase term mu(r)=i*k*(r-a).
1014  // skip i*k: it is added separately during matrix assembly.
1015 
1017  dphase[tp] = unit_r - grad_a_scaled*a/r_norm;
1018 
1019  if (calculate_dphi)
1020  {
1021  dweight[tp](0) = dweightdv[rp] * dzetadx_map[tp];
1022  dweight[tp](1) = dweightdv[rp] * dzetady_map[tp];
1023  dweight[tp](2) = dweightdv[rp] * dzetadz_map[tp];
1024  }
1026  {
1027  dweightxr_sq[tp](0) = dweightdv[rp] * dzetadx_map_scaled[tp];
1028  dweightxr_sq[tp](1) = dweightdv[rp] * dzetady_map_scaled[tp];
1029  dweightxr_sq[tp](2) = dweightdv[rp] * dzetadz_map_scaled[tp];
1030  }
1031 
1033  // compute the shape-functions and derivative quantities:
1034  for (unsigned int i=0; i <_n_total_approx_sf ; ++i)
1035  {
1036  // let the index vectors take care of selecting the appropriate base/radial shape
1037  unsigned int bi = _base_shape_index [i];
1038  unsigned int ri = _radial_shape_index[i];
1039  if (calculate_phi)
1040  phi [i][tp] = S [bi][bp] * mode[ri][rp] * som[rp];
1041 
1043  phixr [i][tp] = S [bi][bp] * mode[ri][rp];
1044 
1046  {
1047  dphidxi [i][tp] = Ss[bi][bp] * mode[ri][rp] * som[rp];
1048  dphideta [i][tp] = St[bi][bp] * mode[ri][rp] * som[rp];
1049  dphidzeta[i][tp] = S [bi][bp]
1050  * (dmodedv[ri][rp] * som[rp] + mode[ri][rp] * dsomdv[rp]);
1051  }
1052 
1053  if (calculate_dphi)
1054  {
1055 
1056  // dphi/dx = (dphi/dxi)*(dxi/dx) + (dphi/deta)*(deta/dx) + (dphi/dzeta)*(dzeta/dx);
1057  dphi[i][tp](0) =
1058  dphidx[i][tp] = (dphidxi[i][tp]*dxidx_map[tp] +
1059  dphideta[i][tp]*detadx_map[tp] +
1060  dphidzeta[i][tp]*dzetadx_map[tp]);
1061 
1062  // dphi/dy = (dphi/dxi)*(dxi/dy) + (dphi/deta)*(deta/dy) + (dphi/dzeta)*(dzeta/dy);
1063  dphi[i][tp](1) =
1064  dphidy[i][tp] = (dphidxi[i][tp]*dxidy_map[tp] +
1065  dphideta[i][tp]*detady_map[tp] +
1066  dphidzeta[i][tp]*dzetady_map[tp]);
1067 
1068  // dphi/dz = (dphi/dxi)*(dxi/dz) + (dphi/deta)*(deta/dz) + (dphi/dzeta)*(dzeta/dz);
1069  dphi[i][tp](2) =
1070  dphidz[i][tp] = (dphidxi[i][tp]*dxidz_map[tp] +
1071  dphideta[i][tp]*detadz_map[tp] +
1072  dphidzeta[i][tp]*dzetadz_map[tp]);
1073 
1074  }
1076  { // we don't distinguish between the different levels of scaling here...
1077 
1078  dphixr[i][tp](0)= (dphidxi[i][tp]*dxidx_map_scaled[tp] +
1079  dphideta[i][tp]*detadx_map_scaled[tp] +
1080  dphidzeta[i][tp]*dzetadx_map_scaled[tp]*som[rp]);
1081 
1082  dphixr[i][tp](1) = (dphidxi[i][tp]*dxidy_map_scaled[tp] +
1083  dphideta[i][tp]*detady_map_scaled[tp] +
1084  dphidzeta[i][tp]*dzetady_map_scaled[tp]*som[rp]);
1085 
1086  dphixr[i][tp](2) = (dphidxi[i][tp]*dxidz_map_scaled[tp] +
1087  dphideta[i][tp]*detadz_map_scaled[tp] +
1088  dphidzeta[i][tp]*dzetadz_map_scaled[tp]*som[rp]);
1089 
1090  const Real dphidxixr = Ss[bi][bp] * mode[ri][rp];
1091  const Real dphidetaxr= St[bi][bp] * mode[ri][rp];
1092 
1093  dphixr_sq[i][tp](0)= (dphidxixr*dxidx_map_scaled[tp] +
1094  dphidetaxr*detadx_map_scaled[tp] +
1095  dphidzeta[i][tp]*dzetadx_map_scaled[tp]);
1096 
1097  dphixr_sq[i][tp](1) = (dphidxixr*dxidy_map_scaled[tp] +
1098  dphidetaxr*detady_map_scaled[tp] +
1099  dphidzeta[i][tp]*dzetady_map_scaled[tp]);
1100 
1101  dphixr_sq[i][tp](2) = (dphidxixr*dxidz_map_scaled[tp] +
1102  dphidetaxr*detadz_map_scaled[tp] +
1103  dphidzeta[i][tp]*dzetadz_map_scaled[tp]);
1104  }
1105 
1106  }
1107  tp++;
1108  }
1109 
1110  break;
1111  }
1112 
1113  default:
1114  libmesh_error_msg("Unsupported dim = " << dim);
1115  }
1116 }
std::vector< Real > detadz_map
Definition: inf_fe.h:1094
std::vector< std::vector< OutputShape > > dphidxi
Shape function derivatives in the xi direction.
Definition: fe_base.h:641
std::vector< Real > dxidx_map
Definition: inf_fe.h:1089
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
ElemType
Defines an enum for geometric element types.
RealVectorValue RealGradient
static ElemType get_elem_type(const ElemType type)
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: fe_abstract.h:774
std::vector< std::vector< OutputShape > > dphidzeta
Shape function derivatives in the zeta direction.
Definition: fe_base.h:651
std::vector< Real > dsomdv
the first local derivative of the radial decay in local coordinates.
Definition: inf_fe.h:1071
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::vector< Real > detadx_map_scaled
Definition: inf_fe.h:1104
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40
std::vector< Real > dzetadz_map
Definition: inf_fe.h:1097
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:1055
std::vector< Real > dxidx_map_scaled
Definition: inf_fe.h:1101
std::vector< Real > dzetady_map
Definition: inf_fe.h:1096
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1115
std::vector< Real > dxidz_map
Definition: inf_fe.h:1091
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
std::vector< Real > dxidy_map_scaled
Definition: inf_fe.h:1102
std::vector< Real > dxidy_map
Definition: inf_fe.h:1090
std::vector< Real > detadx_map
Definition: inf_fe.h:1092
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
std::vector< Real > detady_map_scaled
Definition: inf_fe.h:1105
std::vector< std::vector< OutputShape > > dphidy
Shape function derivatives in the y direction.
Definition: fe_base.h:661
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:1077
std::vector< Real > dzetady_map_scaled
Definition: inf_fe.h:1108
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1057
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1116
std::vector< std::vector< OutputShape > > dphidx
Shape function derivatives in the x direction.
Definition: fe_base.h:656
std::vector< Real > detadz_map_scaled
Definition: inf_fe.h:1106
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1119
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
std::vector< Real > JxW
Definition: inf_fe.h:1120
std::vector< OutputGradient > dphase
Used for certain infinite element families: the first derivatives of the phase term in global coordin...
Definition: fe_base.h:753
libmesh_assert(ctx)
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
Definition: type_vector.h:885
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1173
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1066
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
auto norm(const T &a)
Definition: tensor_tools.h:74
std::vector< Real > dzetadx_map
Definition: inf_fe.h:1095
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
std::vector< Real > dxidz_map_scaled
Definition: inf_fe.h:1103
std::vector< unsigned int > _radial_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1155
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1046
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1117
std::vector< unsigned int > _base_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1165
std::vector< Real > dzetadz_map_scaled
Definition: inf_fe.h:1109
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
std::vector< std::vector< Real > > dmodedv
the first local derivative of the radial approximation shapes.
Definition: inf_fe.h:1083
std::vector< Real > detady_map
Definition: inf_fe.h:1093
std::vector< Real > dzetadx_map_scaled
Definition: inf_fe.h:1107
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:1179
std::vector< std::vector< OutputShape > > dphidz
Shape function derivatives in the z direction.
Definition: fe_base.h:666
std::vector< std::vector< OutputShape > > dphideta
Shape function derivatives in the eta direction.
Definition: fe_base.h:646
std::vector< RealGradient > dweight
Used for certain infinite element families: the global derivative of the additional radial weight ...
Definition: fe_base.h:760
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ compute_shape_functions() [2/2]

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

Use compute_shape_functions(const Elem*, const std::vector<Point> &, const std::vector<Point> &) instead.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 957 of file inf_fe.h.

958  {
959  //FIXME: it seems this function cannot be left out because
960  // it is pure virtual in \p FEBase
961  libmesh_not_implemented();
962  }

◆ compute_shape_indices() [1/2]

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

Definition at line 1159 of file inf_fe_static.C.

References libMesh::Utility::enum_to_string(), 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.

1164 {
1165  // This is basically cut-and-paste copy of the non-deprecated code
1166  // above, and should be removed eventually.
1167  libmesh_deprecated();
1168 
1169  const unsigned int radial_order = static_cast<unsigned int>(fet.radial_order.get_order()); // 4
1170  const unsigned int radial_order_p_one = radial_order+1; // 5
1171 
1172  const ElemType base_elem_type (InfFEBase::get_elem_type(inf_elem_type)); // QUAD9
1173 
1174  // assume that the number of dof is the same for all vertices
1175  unsigned int n_base_vertices = libMesh::invalid_uint; // 4
1176  const unsigned int n_base_vertex_dof = FEInterface::n_dofs_at_node (Dim-1, fet, base_elem_type, 0);// 2
1177 
1178  unsigned int n_base_side_nodes = libMesh::invalid_uint; // 4
1179  unsigned int n_base_side_dof = libMesh::invalid_uint; // 3
1180 
1181  unsigned int n_base_face_nodes = libMesh::invalid_uint; // 1
1182  unsigned int n_base_face_dof = libMesh::invalid_uint; // 5
1183 
1184  const unsigned int n_base_elem_dof = FEInterface::n_dofs_per_elem (Dim-1, fet, base_elem_type);// 9
1185 
1186 
1187  switch (inf_elem_type)
1188  {
1189  case INFEDGE2:
1190  {
1191  n_base_vertices = 1;
1192  n_base_side_nodes = 0;
1193  n_base_face_nodes = 0;
1194  n_base_side_dof = 0;
1195  n_base_face_dof = 0;
1196  break;
1197  }
1198 
1199  case INFQUAD4:
1200  {
1201  n_base_vertices = 2;
1202  n_base_side_nodes = 0;
1203  n_base_face_nodes = 0;
1204  n_base_side_dof = 0;
1205  n_base_face_dof = 0;
1206  break;
1207  }
1208 
1209  case INFQUAD6:
1210  {
1211  n_base_vertices = 2;
1212  n_base_side_nodes = 1;
1213  n_base_face_nodes = 0;
1214  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
1215  n_base_face_dof = 0;
1216  break;
1217  }
1218 
1219  case INFHEX8:
1220  {
1221  n_base_vertices = 4;
1222  n_base_side_nodes = 0;
1223  n_base_face_nodes = 0;
1224  n_base_side_dof = 0;
1225  n_base_face_dof = 0;
1226  break;
1227  }
1228 
1229  case INFHEX16:
1230  {
1231  n_base_vertices = 4;
1232  n_base_side_nodes = 4;
1233  n_base_face_nodes = 0;
1234  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
1235  n_base_face_dof = 0;
1236  break;
1237  }
1238 
1239  case INFHEX18:
1240  {
1241  n_base_vertices = 4;
1242  n_base_side_nodes = 4;
1243  n_base_face_nodes = 1;
1244  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
1245  n_base_face_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, 8);
1246  break;
1247  }
1248 
1249 
1250  case INFPRISM6:
1251  {
1252  n_base_vertices = 3;
1253  n_base_side_nodes = 0;
1254  n_base_face_nodes = 0;
1255  n_base_side_dof = 0;
1256  n_base_face_dof = 0;
1257  break;
1258  }
1259 
1260  case INFPRISM12:
1261  {
1262  n_base_vertices = 3;
1263  n_base_side_nodes = 3;
1264  n_base_face_nodes = 0;
1265  n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
1266  n_base_face_dof = 0;
1267  break;
1268  }
1269 
1270  default:
1271  libmesh_error_msg("Unrecognized inf_elem_type = " << Utility::enum_to_string(inf_elem_type));
1272  }
1273 
1274 
1275  {
1276  // these are the limits describing the intervals where the shape function lies
1277  const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof; // 8
1278  const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one; // 40
1279 
1280  const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof; // 12
1281  const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one; // 60
1282 
1283  const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof; // 5
1284  const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one; // 25
1285 
1286 
1287  // start locating the shape function
1288  if (i < n_dof_at_base_vertices) // range of i: 0..7
1289  {
1290  // belongs to vertex in the base
1291  radial_shape = 0;
1292  base_shape = i;
1293  }
1294 
1295  else if (i < n_dof_at_all_vertices) // range of i: 8..39
1296  {
1297  /* belongs to vertex in the outer shell
1298  *
1299  * subtract the number of dof already counted,
1300  * so that i_offset contains only the offset for the base
1301  */
1302  const unsigned int i_offset = i - n_dof_at_base_vertices; // 0..31
1303 
1304  // first the radial dof are counted, then the base dof
1305  radial_shape = (i_offset % radial_order) + 1;
1306  base_shape = i_offset / radial_order;
1307  }
1308 
1309  else if (i < n_dof_at_all_vertices+n_dof_at_base_sides) // range of i: 40..51
1310  {
1311  // belongs to base, is a side node
1312  radial_shape = 0;
1313  base_shape = i - radial_order * n_dof_at_base_vertices; // 8..19
1314  }
1315 
1316  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides) // range of i: 52..99
1317  {
1318  // belongs to side node in the outer shell
1319  const unsigned int i_offset = i - (n_dof_at_all_vertices
1320  + n_dof_at_base_sides); // 0..47
1321  radial_shape = (i_offset % radial_order) + 1;
1322  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1323  }
1324 
1325  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face) // range of i: 100..104
1326  {
1327  // belongs to the node in the base face
1328  radial_shape = 0;
1329  base_shape = i - radial_order*(n_dof_at_base_vertices
1330  + n_dof_at_base_sides); // 20..24
1331  }
1332 
1333  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces) // range of i: 105..124
1334  {
1335  // belongs to the node in the outer face
1336  const unsigned int i_offset = i - (n_dof_at_all_vertices
1337  + n_dof_at_all_sides
1338  + n_dof_at_base_face); // 0..19
1339  radial_shape = (i_offset % radial_order) + 1;
1340  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1341  }
1342 
1343  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
1344  {
1345  // belongs to the base and is an element associated shape
1346  radial_shape = 0;
1347  base_shape = i - (n_dof_at_all_vertices
1348  + n_dof_at_all_sides
1349  + n_dof_at_all_faces); // 0..8
1350  }
1351 
1352  else // range of i: 134..169
1353  {
1354  // belongs to the outer shell and is an element associated shape
1355  const unsigned int i_offset = i - (n_dof_at_all_vertices
1356  + n_dof_at_all_sides
1357  + n_dof_at_all_faces
1358  + n_base_elem_dof); // 0..19
1359  radial_shape = (i_offset % radial_order) + 1;
1360  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1361  }
1362  }
1363 
1364  return;
1365 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:531
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:303
std::string enum_to_string(const T e)
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:437

◆ compute_shape_indices() [2/2]

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 Elem inf_elem,
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 inf_elem.

Definition at line 926 of file inf_fe_static.C.

References libMesh::InfFEBase::build_elem(), libMesh::Utility::enum_to_string(), 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(), libMesh::FEType::radial_order, and libMesh::Elem::type().

931 {
932  // An example is provided: the numbers in comments refer to
933  // a fictitious InfHex18. The numbers are chosen as exemplary
934  // values. There is currently no base approximation that
935  // requires this many dof's at nodes, sides, faces and in the element.
936  //
937  // the order of the shape functions is heavily related with the
938  // order the dofs are assigned in \p DofMap::distributed_dofs().
939  // Due to the infinite elements with higher-order base approximation,
940  // some more effort is necessary.
941  //
942  // numbering scheme:
943  // 1. all vertices in the base, assign node->n_comp() dofs to each vertex
944  // 2. all vertices further out: innermost loop: radial shapes,
945  // then the base approximation shapes
946  // 3. all side nodes in the base, assign node->n_comp() dofs to each side node
947  // 4. all side nodes further out: innermost loop: radial shapes,
948  // then the base approximation shapes
949  // 5. (all) face nodes in the base, assign node->n_comp() dofs to each face node
950  // 6. (all) face nodes further out: innermost loop: radial shapes,
951  // then the base approximation shapes
952  // 7. element-associated dof in the base
953  // 8. element-associated dof further out
954 
955  const unsigned int radial_order = static_cast<unsigned int>(fet.radial_order.get_order()); // 4
956  const unsigned int radial_order_p_one = radial_order+1; // 5
957 
958  std::unique_ptr<const Elem> base_elem = InfFEBase::build_elem(inf_elem); // QUAD9
959 
960  // assume that the number of dof is the same for all vertices
961  unsigned int n_base_vertices = libMesh::invalid_uint; // 4
962  const unsigned int n_base_vertex_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), 0); // 2
963 
964  unsigned int n_base_side_nodes = libMesh::invalid_uint; // 4
965  unsigned int n_base_side_dof = libMesh::invalid_uint; // 3
966 
967  unsigned int n_base_face_nodes = libMesh::invalid_uint; // 1
968  unsigned int n_base_face_dof = libMesh::invalid_uint; // 5
969 
970  const unsigned int n_base_elem_dof = FEInterface::n_dofs_per_elem (fet, base_elem.get()); // 9
971 
972  const ElemType inf_elem_type = inf_elem->type();
973 
974  switch (inf_elem_type)
975  {
976  case INFEDGE2:
977  {
978  n_base_vertices = 1;
979  n_base_side_nodes = 0;
980  n_base_face_nodes = 0;
981  n_base_side_dof = 0;
982  n_base_face_dof = 0;
983  break;
984  }
985 
986  case INFQUAD4:
987  {
988  n_base_vertices = 2;
989  n_base_side_nodes = 0;
990  n_base_face_nodes = 0;
991  n_base_side_dof = 0;
992  n_base_face_dof = 0;
993  break;
994  }
995 
996  case INFQUAD6:
997  {
998  n_base_vertices = 2;
999  n_base_side_nodes = 1;
1000  n_base_face_nodes = 0;
1001  n_base_side_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), n_base_vertices);
1002  n_base_face_dof = 0;
1003  break;
1004  }
1005 
1006  case INFHEX8:
1007  {
1008  n_base_vertices = 4;
1009  n_base_side_nodes = 0;
1010  n_base_face_nodes = 0;
1011  n_base_side_dof = 0;
1012  n_base_face_dof = 0;
1013  break;
1014  }
1015 
1016  case INFHEX16:
1017  {
1018  n_base_vertices = 4;
1019  n_base_side_nodes = 4;
1020  n_base_face_nodes = 0;
1021  n_base_side_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), n_base_vertices);
1022  n_base_face_dof = 0;
1023  break;
1024  }
1025 
1026  case INFHEX18:
1027  {
1028  n_base_vertices = 4;
1029  n_base_side_nodes = 4;
1030  n_base_face_nodes = 1;
1031  n_base_side_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), n_base_vertices);
1032  n_base_face_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), 8);
1033  break;
1034  }
1035 
1036 
1037  case INFPRISM6:
1038  {
1039  n_base_vertices = 3;
1040  n_base_side_nodes = 0;
1041  n_base_face_nodes = 0;
1042  n_base_side_dof = 0;
1043  n_base_face_dof = 0;
1044  break;
1045  }
1046 
1047  case INFPRISM12:
1048  {
1049  n_base_vertices = 3;
1050  n_base_side_nodes = 3;
1051  n_base_face_nodes = 0;
1052  n_base_side_dof = FEInterface::n_dofs_at_node (fet, base_elem.get(), n_base_vertices);
1053  n_base_face_dof = 0;
1054  break;
1055  }
1056 
1057  default:
1058  libmesh_error_msg("Unrecognized inf_elem type = " << Utility::enum_to_string(inf_elem_type));
1059  }
1060 
1061 
1062  {
1063  // these are the limits describing the intervals where the shape function lies
1064  const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof; // 8
1065  const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one; // 40
1066 
1067  const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof; // 12
1068  const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one; // 60
1069 
1070  const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof; // 5
1071  const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one; // 25
1072 
1073 
1074  // start locating the shape function
1075  if (i < n_dof_at_base_vertices) // range of i: 0..7
1076  {
1077  // belongs to vertex in the base
1078  radial_shape = 0;
1079  base_shape = i;
1080  }
1081 
1082  else if (i < n_dof_at_all_vertices) // range of i: 8..39
1083  {
1084  /* belongs to vertex in the outer shell
1085  *
1086  * subtract the number of dof already counted,
1087  * so that i_offset contains only the offset for the base
1088  */
1089  const unsigned int i_offset = i - n_dof_at_base_vertices; // 0..31
1090 
1091  // first the radial dof are counted, then the base dof
1092  radial_shape = (i_offset % radial_order) + 1;
1093  base_shape = i_offset / radial_order;
1094  }
1095 
1096  else if (i < n_dof_at_all_vertices+n_dof_at_base_sides) // range of i: 40..51
1097  {
1098  // belongs to base, is a side node
1099  radial_shape = 0;
1100  base_shape = i - radial_order * n_dof_at_base_vertices; // 8..19
1101  }
1102 
1103  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides) // range of i: 52..99
1104  {
1105  // belongs to side node in the outer shell
1106  const unsigned int i_offset = i - (n_dof_at_all_vertices
1107  + n_dof_at_base_sides); // 0..47
1108  radial_shape = (i_offset % radial_order) + 1;
1109  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
1110  }
1111 
1112  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face) // range of i: 100..104
1113  {
1114  // belongs to the node in the base face
1115  radial_shape = 0;
1116  base_shape = i - radial_order*(n_dof_at_base_vertices
1117  + n_dof_at_base_sides); // 20..24
1118  }
1119 
1120  else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces) // range of i: 105..124
1121  {
1122  // belongs to the node in the outer face
1123  const unsigned int i_offset = i - (n_dof_at_all_vertices
1124  + n_dof_at_all_sides
1125  + n_dof_at_base_face); // 0..19
1126  radial_shape = (i_offset % radial_order) + 1;
1127  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
1128  }
1129 
1130  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
1131  {
1132  // belongs to the base and is an element associated shape
1133  radial_shape = 0;
1134  base_shape = i - (n_dof_at_all_vertices
1135  + n_dof_at_all_sides
1136  + n_dof_at_all_faces); // 0..8
1137  }
1138 
1139  else // range of i: 134..169
1140  {
1141  libmesh_assert_less (i, n_dofs(fet, inf_elem));
1142  // belongs to the outer shell and is an element associated shape
1143  const unsigned int i_offset = i - (n_dof_at_all_vertices
1144  + n_dof_at_all_sides
1145  + n_dof_at_all_faces
1146  + n_base_elem_dof); // 0..19
1147  radial_shape = (i_offset % radial_order) + 1;
1148  base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
1149  }
1150  }
1151 
1152  return;
1153 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:531
ElemType
Defines an enum for geometric element types.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:303
static std::unique_ptr< const Elem > build_elem(const Elem *inf_elem)
Build the base element of an infinite element.
std::string enum_to_string(const T e)
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:437
static unsigned int n_dofs(const FEType &fet, const Elem *inf_elem)
Definition: inf_fe_static.C:66
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ determine_calculations()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::determine_calculations ( )
overrideprotectedvirtual

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

Definition at line 329 of file inf_fe.C.

330 {
331  this->calculations_started = true;
332 
333  // If the user did not explicitly pre-request something (or nothing)
334  // to be computed, then we throw an error here.
335  bool requested_ok =
336  this->calculate_nothing || this->calculate_phi ||
337  this->calculate_dphi || this->calculate_dphiref ||
339  this->calculate_xyz || this->calculate_jxw ||
340  this->calculate_map_scaled || this->calculate_map ||
341  this->calculate_curl_phi || this->calculate_div_phi;
342 
343 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
344  requested_ok = requested_ok || this->calculate_d2phi;
345 #endif
346 
347  libmesh_error_msg_if(
348  !requested_ok,
349  "You must call one or more of the FE accessors "
350  "(e.g. get_phi(), get_dphi(), get_nothing()) "
351  "_before_ calling reinit()!");
352 
353  // set further terms necessary to do the requested task
354  if (calculate_jxw)
355  this->calculate_map = true;
356  if (this->calculate_dphi)
357  this->calculate_map = true;
358  if (this->calculate_dphi_scaled)
359  this->calculate_map_scaled = true;
360  // if Cartesian positions were requested but the calculation of map
361  // was not triggered, we'll opt for the 'scaled' variant.
363  this->calculate_map_scaled = true;
364  base_fe->calculate_phi = this->calculate_phi || this->calculate_phi_scaled
365  || this->calculate_dphi || this->calculate_dphi_scaled;
366  base_fe->calculate_dphi = this->calculate_dphi || this->calculate_dphi_scaled;
367  if (this->calculate_map || this->calculate_map_scaled
368  || this->calculate_dphiref)
369  {
370  base_fe->calculate_dphiref = true;
371  base_fe->get_xyz(); // trigger base_fe->fe_map to 'calculate_xyz'
372  base_fe->get_JxW(); // trigger base_fe->fe_map to 'calculate_dxyz'
373  }
374  base_fe->determine_calculations();
375 
376 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
377  if (this->calculate_d2phi)
378  libmesh_not_implemented();
379 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
380 }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculate_curl_phi
Should we calculate shape function curls?
Definition: fe_abstract.h:712
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
bool calculate_div_phi
Should we calculate shape function divergences?
Definition: fe_abstract.h:717
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition: inf_fe.h:983
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
bool calculate_nothing
Are we potentially deliberately calculating nothing?
Definition: fe_abstract.h:681

◆ disable_print_counter_info()

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 100 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

101 {
102  _enable_print_counter = false;
103  return;
104 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ 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 117 of file inf_fe_boundary.C.

122 {
123  // We don't do this for 1D elements!
124  //libmesh_assert_not_equal_to (Dim, 1);
125  libmesh_not_implemented_msg("ERROR: Edge conditions for infinite elements not implemented!");
126 
127  if (pts != nullptr)
128  libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements not implemented!");
129 }

◆ enable_print_counter_info()

void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

Enabled by default.

Definition at line 94 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

95 {
96  _enable_print_counter = true;
97  return;
98 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ eval() [1/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() [2/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() [3/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() [4/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() [5/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() [6/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() [7/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() [8/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() [9/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() [10/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.

References libMesh::InfFEMap::eval().

63 { return InfFEMap::eval(v, o, i); }
static Real eval(Real v, Order o, unsigned int i)

◆ eval() [11/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.

References libMesh::InfFEMap::eval().

64 { return InfFEMap::eval(v, o, i); }
static Real eval(Real v, Order o, unsigned int i)

◆ eval() [12/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.

References libMesh::InfFEMap::eval().

65 { return InfFEMap::eval(v, o, i); }
static Real eval(Real v, Order o, unsigned int i)

◆ eval() [13/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 >::shape(), and libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv().

◆ eval() [14/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() [15/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() [16/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_deriv() [1/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() [2/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() [3/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() [4/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() [5/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() [6/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() [7/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() [8/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() [9/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); }

◆ eval_deriv() [10/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.

References libMesh::InfFEMap::eval_deriv().

69 { return InfFEMap::eval_deriv(v, o, i); }
static Real eval_deriv(Real v, Order o, unsigned int i)

◆ eval_deriv() [11/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.

References libMesh::InfFEMap::eval_deriv().

70 { return InfFEMap::eval_deriv(v, o, i); }
static Real eval_deriv(Real v, Order o, unsigned int i)

◆ eval_deriv() [12/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.

References libMesh::InfFEMap::eval_deriv().

71 { return InfFEMap::eval_deriv(v, o, i); }
static Real eval_deriv(Real v, Order o, unsigned int i)

◆ eval_deriv() [13/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(), and libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv().

◆ eval_deriv() [14/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() [15/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() [16/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); }

◆ 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 434 of file inf_fe.h.

References libMesh::C_ZERO.

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

◆ get_curl_phi()

template<typename OutputType>
virtual_for_inffe const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_curl_phi ( ) const
inlineinherited
Returns
The curl of the shape function at the quadrature points.

Definition at line 252 of file fe_base.h.

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

254  calculate_curl_phi = calculate_dphiref = true; return curl_phi; }
bool calculate_curl_phi
Should we calculate shape function curls?
Definition: fe_abstract.h:712
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > curl_phi
Shape function curl values.
Definition: fe_base.h:631
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ get_curvatures()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_curvatures ( ) const
inlineoverridevirtual
Returns
The curvatures for use in face integration.

Definition at line 812 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

813  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2phi()

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

Definition at line 319 of file fe_base.h.

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::FEMContext::build_new_fe(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::LaplacianErrorEstimator::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), libMesh::FEMContext::interior_hessians(), libMesh::LaplacianErrorEstimator::internal_side_integration(), libMesh::FEMContext::side_hessians(), and libMesh::FEMContext::some_hessian().

321  calculate_d2phi = calculate_dphiref = true; return d2phi; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:674
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 403 of file fe_base.h.

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

405  calculate_d2phi = calculate_dphiref = true; return d2phideta2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phideta2
Shape function second derivatives in the eta direction.
Definition: fe_base.h:695
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 411 of file fe_base.h.

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

bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidetadzeta
Shape function second derivatives in the eta-zeta direction.
Definition: fe_base.h:700
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 331 of file fe_base.h.

333  calculate_d2phi = calculate_dphiref = true; return d2phidx2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidx2
Shape function second derivatives in the x direction.
Definition: fe_base.h:710
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 339 of file fe_base.h.

341  calculate_d2phi = calculate_dphiref = true; return d2phidxdy; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidxdy
Shape function second derivatives in the x-y direction.
Definition: fe_base.h:715
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 347 of file fe_base.h.

349  calculate_d2phi = calculate_dphiref = true; return d2phidxdz; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
std::vector< std::vector< OutputShape > > d2phidxdz
Shape function second derivatives in the x-z direction.
Definition: fe_base.h:720
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 379 of file fe_base.h.

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

381  calculate_d2phi = calculate_dphiref = true; return d2phidxi2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
std::vector< std::vector< OutputShape > > d2phidxi2
Shape function second derivatives in the xi direction.
Definition: fe_base.h:680

◆ 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 387 of file fe_base.h.

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

bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidxideta
Shape function second derivatives in the xi-eta direction.
Definition: fe_base.h:685
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 395 of file fe_base.h.

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

bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidxidzeta
Shape function second derivatives in the xi-zeta direction.
Definition: fe_base.h:690
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 355 of file fe_base.h.

357  calculate_d2phi = calculate_dphiref = true; return d2phidy2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidy2
Shape function second derivatives in the y direction.
Definition: fe_base.h:725
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 363 of file fe_base.h.

365  calculate_d2phi = calculate_dphiref = true; return d2phidydz; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > d2phidydz
Shape function second derivatives in the y-z direction.
Definition: fe_base.h:730
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 371 of file fe_base.h.

373  calculate_d2phi = calculate_dphiref = true; return d2phidz2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
std::vector< std::vector< OutputShape > > d2phidz2
Shape function second derivatives in the z direction.
Definition: fe_base.h:735

◆ 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 419 of file fe_base.h.

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

421  calculate_d2phi = calculate_dphiref = true; return d2phidzeta2; }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
std::vector< std::vector< OutputShape > > d2phidzeta2
Shape function second derivatives in the zeta direction.
Definition: fe_base.h:705

◆ get_d2xyzdeta2()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdeta2 ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in eta.

Definition at line 666 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

667  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2xyzdetadzeta()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdetadzeta ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in eta-zeta.

Definition at line 686 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

687  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2xyzdxi2()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxi2 ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in xi.

Definition at line 661 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

662  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2xyzdxideta()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxideta ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in xi-eta.

Definition at line 676 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

677  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2xyzdxidzeta()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxidzeta ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in xi-zeta.

Definition at line 681 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

682  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_d2xyzdzeta2()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdzeta2 ( ) const
inlineoverridevirtual
Returns
The second partial derivatives in zeta.

Definition at line 671 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

672  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_detadx()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_detadx ( ) const
inlineoverridevirtual
Returns
The deta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 721 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::detadx_map, and libMesh::libmesh_assert().

723  calculate_map = true; return detadx_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > detadx_map
Definition: inf_fe.h:1092
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_detady()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_detady ( ) const
inlineoverridevirtual
Returns
The deta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 730 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::detady_map, and libMesh::libmesh_assert().

732  calculate_map = true; return detady_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< Real > detady_map
Definition: inf_fe.h:1093

◆ get_detadz()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_detadz ( ) const
inlineoverridevirtual
Returns
The deta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 739 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::detadz_map, and libMesh::libmesh_assert().

741  calculate_map = true; return detadz_map;}
std::vector< Real > detadz_map
Definition: inf_fe.h:1094
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dim()

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

Definition at line 258 of file fe_abstract.h.

References libMesh::FEAbstract::dim.

259  { return dim; }
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:660

◆ get_div_phi()

template<typename OutputType>
virtual_for_inffe 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 261 of file fe_base.h.

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

263  calculate_div_phi = calculate_dphiref = true; return div_phi; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_div_phi
Should we calculate shape function divergences?
Definition: fe_abstract.h:717
libmesh_assert(ctx)
std::vector< std::vector< OutputDivergence > > div_phi
Shape function divergence values.
Definition: fe_base.h:636
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 437 of file fe_base.h.

Referenced by assemble_SchroedingerEquation().

438  { return 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:753

◆ 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 230 of file fe_base.h.

Referenced by libMesh::ExactSolution::_compute_error(), assembly_with_dg_fem_context(), libMesh::FEMContext::build_new_fe(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), ElasticitySystem::element_time_derivative(), HeatSystem::element_time_derivative(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi_over_decay(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi_over_decayxR(), PoissonSystem::init_context(), LaplaceSystem::init_context(), ElasticitySystem::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), HeatSystem::init_context(), libMesh::KellyErrorEstimator::init_context(), ElasticityRBConstruction::init_context(), libMesh::FEMContext::interior_gradients(), libMesh::FEGenericBase< FEOutputType< T >::type >::request_dphi(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), and libMesh::FEMContext::some_gradient().

232  calculate_dphi = calculate_dphiref = true; return dphi; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696

◆ get_dphi_over_decay()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<std::vector<OutputGradient> >& libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decay ( ) const
inlineoverridevirtual
Returns
the gradient of the shape function (see get_dphi()), but in case of InfFE, weighted with 1/decay.

In contrast to the shape function, its gradient stays finite when divided by the decay function.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 629 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_dphi_scaled, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dphixr_sq, and libMesh::libmesh_assert().

631  calculate_dphi_scaled = true; return dphixr_sq; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1117

◆ get_dphi_over_decayxR()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<std::vector<OutputGradient> >& libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decayxR ( ) const
inlineoverridevirtual
Returns
the gradient of the shape function (see get_dphi()), but in case of InfFE, weighted with r/decay. See get_phi_over_decayxR() for details.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 617 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_dphi_scaled, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dphixr, and libMesh::libmesh_assert().

619  calculate_dphi_scaled = true; return dphixr; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1116
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977

◆ get_dphideta()

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

Definition at line 301 of file fe_base.h.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::HDivFETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().

303  calculate_dphiref = true; return dphideta; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
std::vector< std::vector< OutputShape > > dphideta
Shape function derivatives in the eta direction.
Definition: fe_base.h:646

◆ 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 269 of file fe_base.h.

271  calculate_dphi = calculate_dphiref = true; return dphidx; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > dphidx
Shape function derivatives in the x direction.
Definition: fe_base.h:656
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696

◆ get_dphidxi()

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

Definition at line 293 of file fe_base.h.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::HDivFETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().

295  calculate_dphiref = true; return dphidxi; }
std::vector< std::vector< OutputShape > > dphidxi
Shape function derivatives in the xi direction.
Definition: fe_base.h:641
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ 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 277 of file fe_base.h.

279  calculate_dphi = calculate_dphiref = true; return dphidy; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputShape > > dphidy
Shape function derivatives in the y direction.
Definition: fe_base.h:661
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696

◆ 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 285 of file fe_base.h.

287  calculate_dphi = calculate_dphiref = true; return dphidz; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
std::vector< std::vector< OutputShape > > dphidz
Shape function derivatives in the z direction.
Definition: fe_base.h:666

◆ get_dphidzeta()

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

Definition at line 309 of file fe_base.h.

Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::HDivFETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().

311  calculate_dphiref = true; return dphidzeta; }
std::vector< std::vector< OutputShape > > dphidzeta
Shape function derivatives in the zeta direction.
Definition: fe_base.h:651
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722

◆ get_dual_coeff()

template<typename OutputType>
const DenseMatrix<Real>& libMesh::FEGenericBase< OutputType >::get_dual_coeff ( ) const
inlineinherited

Definition at line 244 of file fe_base.h.

245  { return dual_coeff; }
DenseMatrix< Real > dual_coeff
Coefficient matrix for the dual basis.
Definition: fe_base.h:626

◆ get_dual_d2phi()

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

Definition at line 323 of file fe_base.h.

bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputTensor > > dual_d2phi
Definition: fe_base.h:675
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dual
Are we calculating dual basis?
Definition: fe_abstract.h:671

◆ get_dual_dphi()

template<typename OutputType>
const std::vector<std::vector<OutputGradient> >& libMesh::FEGenericBase< OutputType >::get_dual_dphi ( ) const
inlineinherited

Definition at line 234 of file fe_base.h.

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

bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< std::vector< OutputGradient > > dual_dphi
Definition: fe_base.h:621
libmesh_assert(ctx)
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:722
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_dual
Are we calculating dual basis?
Definition: fe_abstract.h:671

◆ get_dual_phi()

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

Definition at line 211 of file fe_base.h.

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

212  {
214  calculate_dual = true;
215  // Dual phi computation relies on primal phi computation
216  this->request_phi();
217  return dual_phi;
218  }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
virtual void request_phi() const override
request phi calculations
Definition: fe_base.h:220
std::vector< std::vector< OutputShape > > dual_phi
Definition: fe_base.h:615
libmesh_assert(ctx)
bool calculate_dual
Are we calculating dual basis?
Definition: fe_abstract.h:671

◆ get_dxidx()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxidx ( ) const
inlineoverridevirtual
Returns
The dxi/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 694 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dxidx_map, and libMesh::libmesh_assert().

696  calculate_map = true; return dxidx_map;}
std::vector< Real > dxidx_map
Definition: inf_fe.h:1089
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dxidy()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxidy ( ) const
inlineoverridevirtual
Returns
The dxi/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 703 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dxidy_map, and libMesh::libmesh_assert().

705  calculate_map = true; return dxidy_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > dxidy_map
Definition: inf_fe.h:1090
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dxidz()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxidz ( ) const
inlineoverridevirtual
Returns
The dxi/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 712 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dxidz_map, and libMesh::libmesh_assert().

714  calculate_map = true; return dxidz_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > dxidz_map
Definition: inf_fe.h:1091
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dxyzdeta()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdeta ( ) const
inlineoverridevirtual
Returns
The element tangents in eta-direction at the quadrature points.

Definition at line 646 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

647  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dxyzdxi()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdxi ( ) const
inlineoverridevirtual
Returns
The element tangents in xi-direction at the quadrature points.

Definition at line 638 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

639  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dxyzdzeta()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdzeta ( ) const
inlineoverridevirtual
Returns
The element tangents in zeta-direction at the quadrature points.

Definition at line 654 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

655  { calculate_map = true; libmesh_not_implemented();}
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dzetadx()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadx ( ) const
inlineoverridevirtual
Returns
The dzeta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 748 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dzetadx_map, and libMesh::libmesh_assert().

750  calculate_map = true; return dzetadx_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< Real > dzetadx_map
Definition: inf_fe.h:1095

◆ get_dzetady()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dzetady ( ) const
inlineoverridevirtual
Returns
The dzeta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 757 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dzetady_map, and libMesh::libmesh_assert().

759  calculate_map = true; return dzetady_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > dzetady_map
Definition: inf_fe.h:1096
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_dzetadz()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadz ( ) const
inlineoverridevirtual
Returns
The dzeta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 766 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dzetadz_map, and libMesh::libmesh_assert().

768  calculate_map = true; return dzetadz_map;}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > dzetadz_map
Definition: inf_fe.h:1097
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686

◆ get_elem()

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

Definition at line 496 of file fe_abstract.h.

References libMesh::FEAbstract::_elem.

496 { return _elem; }
const Elem * _elem
The element the current data structures were set up for.
Definition: fe_abstract.h:740

◆ get_family()

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

Definition at line 547 of file fe_abstract.h.

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

547 { return fe_type.family; }
FEFamily family
The type of finite element.
Definition: fe_type.h:228
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730

◆ get_fe_map() [1/2]

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

◆ get_fe_map() [2/2]

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

Definition at line 555 of file fe_abstract.h.

References libMesh::FEAbstract::_fe_map.

555 { return *_fe_map.get(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:654

◆ 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.

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

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

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 & [name, cd] : _counts)
59  oss << "| " << name << " reference count information:\n"
60  << "| Creations: " << cd.first << '\n'
61  << "| Destructions: " << cd.second << '\n';
62 
63  oss << " ---------------------------------------------------------------------------- \n";
64 
65  return oss.str();
66 
67 #else
68 
69  return "";
70 
71 #endif
72 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
static Counts _counts
Actually holds the data.

◆ get_JxW()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_JxW ( ) const
inlineoverridevirtual
Returns
the Jacobian times quadrature weight. Due to the divergence with increasing radial distance, this quantity is numerically unstable. Thus, it is safer to use get_JxWxdecay_sq() instead!

Definition at line 577 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_jxw, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::JxW, and libMesh::libmesh_assert().

578  {
580  calculate_jxw = true;
581  return this->JxW;
582  }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
std::vector< Real > JxW
Definition: inf_fe.h:1120
libmesh_assert(ctx)

◆ get_JxWxdecay_sq()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_JxWxdecay_sq ( ) const
inlineoverridevirtual
Returns
Jacobian times quadrature weight times square of the decaying function \( decay= r^{-\frac{dim+1}{2}}\)

This function is the variant of get_JxW() for InfFE. Since J diverges there, a respectize decay-function must be applied to obtain well-defined quantities.

Reimplemented from libMesh::FEAbstract.

Definition at line 592 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_map_scaled, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::JxWxdecay, and libMesh::libmesh_assert().

594  calculate_map_scaled = true; return this->JxWxdecay;}
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1119
libmesh_assert(ctx)

◆ get_normals()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Point>& libMesh::InfFE< Dim, T_radial, T_map >::get_normals ( ) const
inlineoverridevirtual
Returns
The outward pointing normal vectors for face integration.

Definition at line 804 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::normals.

806  calculate_map = true; return normals; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< Point > normals
Definition: inf_fe.h:1122

◆ get_nothing()

void libMesh::FEAbstract::get_nothing ( ) const
inlineinherited
Returns
nothing, but lets the FE know you're explicitly prerequesting calculations. This is useful when you only want the FE for n_quadrature_points, n_dofs_on_side, or other methods that don't require shape function calculations, but you don't want libMesh "backwards compatibility" mode to assume you've made no prerequests and need to calculate everything.

Definition at line 269 of file fe_abstract.h.

References libMesh::FEAbstract::calculate_nothing.

Referenced by libMesh::ExactSolution::_compute_error(), CoupledSystemQoI::init_context(), NavierSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), libMesh::WrappedFunctor< Output >::init_context(), HeatSystem::init_context(), and Integrate::operator()().

270  { calculate_nothing = true; }
bool calculate_nothing
Are we potentially deliberately calculating nothing?
Definition: fe_abstract.h:681

◆ get_order()

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

Definition at line 525 of file fe_abstract.h.

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

526  { return fe_type.order + _p_level; }
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:757
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition: fe_type.h:203
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730

◆ 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 515 of file fe_abstract.h.

References libMesh::FEAbstract::_p_level.

515 { return _p_level; }
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:757

◆ 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 207 of file fe_base.h.

Referenced by libMesh::ExactSolution::_compute_error(), assembly_with_dg_fem_context(), libMesh::FEMContext::build_new_fe(), compute_enriched_soln(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::SubProjector::construct_projection(), NavierSystem::element_constraint(), CoupledSystem::element_constraint(), NavierSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), CoupledSystem::element_time_derivative(), HeatSystem::element_time_derivative(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi_over_decayxR(), CoupledSystemQoI::init_context(), NavierSystem::init_context(), SolidSystem::init_context(), PoissonSystem::init_context(), LaplaceSystem::init_context(), CurlCurlSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), libMesh::ParsedFEMFunction< T >::init_context(), libMesh::DiscontinuityMeasure::init_context(), HeatSystem::init_context(), ElasticityRBConstruction::init_context(), libMesh::FEMSystem::init_context(), libMesh::FEMContext::interior_values(), ElasticitySystem::mass_residual(), libMesh::FEMPhysics::mass_residual(), libMesh::FEGenericBase< FEOutputType< T >::type >::request_phi(), SolidSystem::side_time_derivative(), ElasticitySystem::side_time_derivative(), libMesh::FEMContext::side_values(), libMesh::FEMContext::some_value(), InfFERadialTest::testRefinement(), SlitMeshRefinedSystemTest::testRestart(), and SlitMeshRefinedSystemTest::testSystem().

209  calculate_phi = true; return phi; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
libmesh_assert(ctx)

◆ get_phi_over_decayxR()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<std::vector<OutputShape> >& libMesh::InfFE< Dim, T_radial, T_map >::get_phi_over_decayxR ( ) const
inlineoverridevirtual
Returns
The shape function phi weighted by r/decay where \( decay = r^{-\frac{dim+1}{2}} \)

To compensate for the decay function applied to the Jacobian (see get_JxWxdecay_sq), the wave function phi should be divided by this function.

The factor r must be compensated for by the Sobolev weight. (i.e. by using get_Sobolev_weightxR_sq())

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 607 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_phi_scaled, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::phixr.

609  calculate_phi_scaled = true; return phixr; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1115
libmesh_assert(ctx)

◆ 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 400 of file fe_abstract.C.

References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::Utility::enum_to_string(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::invalid_uint, n_nodes, libMesh::NODEELEM, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM20, libMesh::PRISM21, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID18, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::QUADSHELL9, libMesh::Real, libMesh::TET10, libMesh::TET14, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, libMesh::TRI7, libMesh::TRISHELL3, and libMesh::Elem::type_to_n_nodes_map.

Referenced by libMesh::LIBMESH_DEFAULT_VECTORIZED_FE().

401 {
402  const unsigned int n_nodes = Elem::type_to_n_nodes_map[itemType];
403  if (n_nodes == invalid_uint)
404  libmesh_error_msg("Number of nodes is not well-defined for " <<
405  Utility::enum_to_string(itemType));
406 
407  nodes.resize(n_nodes);
408  switch(itemType)
409  {
410  case NODEELEM:
411  {
412  nodes[0] = Point (0.,0.,0.);
413  return;
414  }
415  case EDGE3:
416  {
417  nodes[2] = Point (0.,0.,0.);
418  libmesh_fallthrough();
419  }
420  case EDGE2:
421  {
422  nodes[0] = Point (-1.,0.,0.);
423  nodes[1] = Point (1.,0.,0.);
424  return;
425  }
426  case EDGE4: // not nested with EDGE3
427  {
428  nodes[0] = Point (-1.,0.,0.);
429  nodes[1] = Point (1.,0.,0.);
430  nodes[2] = Point (-1./3.,0.,0.);
431  nodes[3] - Point (1./3.,0.,0.);
432  return;
433  }
434  case TRI7:
435  {
436  nodes[6] = Point (1./3.,1./3.,0.);
437  libmesh_fallthrough();
438  }
439  case TRI6:
440  {
441  nodes[3] = Point (.5,0.,0.);
442  nodes[4] = Point (.5,.5,0.);
443  nodes[5] = Point (0.,.5,0.);
444  libmesh_fallthrough();
445  }
446  case TRI3:
447  case TRISHELL3:
448  {
449  nodes[0] = Point (0.,0.,0.);
450  nodes[1] = Point (1.,0.,0.);
451  nodes[2] = Point (0.,1.,0.);
452  return;
453  }
454  case QUAD9:
455  case QUADSHELL9:
456  {
457  nodes[8] = Point (0.,0.,0.);
458  libmesh_fallthrough();
459  }
460  case QUAD8:
461  case QUADSHELL8:
462  {
463  nodes[4] = Point (0.,-1.,0.);
464  nodes[5] = Point (1.,0.,0.);
465  nodes[6] = Point (0.,1.,0.);
466  nodes[7] = Point (-1.,0.,0.);
467  libmesh_fallthrough();
468  }
469  case QUAD4:
470  case QUADSHELL4:
471  {
472  nodes[0] = Point (-1.,-1.,0.);
473  nodes[1] = Point (1.,-1.,0.);
474  nodes[2] = Point (1.,1.,0.);
475  nodes[3] = Point (-1.,1.,0.);
476  return;
477  }
478  case TET14:
479  {
480  nodes[10] = Point (1/Real(3),1/Real(3),0.);
481  nodes[11] = Point (1/Real(3),0.,1/Real(3));
482  nodes[12] = Point (1/Real(3),1/Real(3),1/Real(3));
483  nodes[13] = Point (0.,1/Real(3),1/Real(3));
484  libmesh_fallthrough();
485  }
486  case TET10:
487  {
488  nodes[4] = Point (.5,0.,0.);
489  nodes[5] = Point (.5,.5,0.);
490  nodes[6] = Point (0.,.5,0.);
491  nodes[7] = Point (0.,0.,.5);
492  nodes[8] = Point (.5,0.,.5);
493  nodes[9] = Point (0.,.5,.5);
494  libmesh_fallthrough();
495  }
496  case TET4:
497  {
498  nodes[0] = Point (0.,0.,0.);
499  nodes[1] = Point (1.,0.,0.);
500  nodes[2] = Point (0.,1.,0.);
501  nodes[3] = Point (0.,0.,1.);
502  return;
503  }
504  case HEX27:
505  {
506  nodes[20] = Point (0.,0.,-1.);
507  nodes[21] = Point (0.,-1.,0.);
508  nodes[22] = Point (1.,0.,0.);
509  nodes[23] = Point (0.,1.,0.);
510  nodes[24] = Point (-1.,0.,0.);
511  nodes[25] = Point (0.,0.,1.);
512  nodes[26] = Point (0.,0.,0.);
513  libmesh_fallthrough();
514  }
515  case HEX20:
516  {
517  nodes[8] = Point (0.,-1.,-1.);
518  nodes[9] = Point (1.,0.,-1.);
519  nodes[10] = Point (0.,1.,-1.);
520  nodes[11] = Point (-1.,0.,-1.);
521  nodes[12] = Point (-1.,-1.,0.);
522  nodes[13] = Point (1.,-1.,0.);
523  nodes[14] = Point (1.,1.,0.);
524  nodes[15] = Point (-1.,1.,0.);
525  nodes[16] = Point (0.,-1.,1.);
526  nodes[17] = Point (1.,0.,1.);
527  nodes[18] = Point (0.,1.,1.);
528  nodes[19] = Point (-1.,0.,1.);
529  libmesh_fallthrough();
530  }
531  case HEX8:
532  {
533  nodes[0] = Point (-1.,-1.,-1.);
534  nodes[1] = Point (1.,-1.,-1.);
535  nodes[2] = Point (1.,1.,-1.);
536  nodes[3] = Point (-1.,1.,-1.);
537  nodes[4] = Point (-1.,-1.,1.);
538  nodes[5] = Point (1.,-1.,1.);
539  nodes[6] = Point (1.,1.,1.);
540  nodes[7] = Point (-1.,1.,1.);
541  return;
542  }
543  case PRISM21:
544  {
545  nodes[20] = Point (1/Real(3),1/Real(3),0);
546  libmesh_fallthrough();
547  }
548  case PRISM20:
549  {
550  nodes[18] = Point (1/Real(3),1/Real(3),-1);
551  nodes[19] = Point (1/Real(3),1/Real(3),1);
552  libmesh_fallthrough();
553  }
554  case PRISM18:
555  {
556  nodes[15] = Point (.5,0.,0.);
557  nodes[16] = Point (.5,.5,0.);
558  nodes[17] = Point (0.,.5,0.);
559  libmesh_fallthrough();
560  }
561  case PRISM15:
562  {
563  nodes[6] = Point (.5,0.,-1.);
564  nodes[7] = Point (.5,.5,-1.);
565  nodes[8] = Point (0.,.5,-1.);
566  nodes[9] = Point (0.,0.,0.);
567  nodes[10] = Point (1.,0.,0.);
568  nodes[11] = Point (0.,1.,0.);
569  nodes[12] = Point (.5,0.,1.);
570  nodes[13] = Point (.5,.5,1.);
571  nodes[14] = Point (0.,.5,1.);
572  libmesh_fallthrough();
573  }
574  case PRISM6:
575  {
576  nodes[0] = Point (0.,0.,-1.);
577  nodes[1] = Point (1.,0.,-1.);
578  nodes[2] = Point (0.,1.,-1.);
579  nodes[3] = Point (0.,0.,1.);
580  nodes[4] = Point (1.,0.,1.);
581  nodes[5] = Point (0.,1.,1.);
582  return;
583  }
584  case PYRAMID18:
585  {
586  // triangle centers
587  nodes[14] = Point (-2/Real(3),0.,1/Real(3));
588  nodes[15] = Point (0.,2/Real(3),1/Real(3));
589  nodes[16] = Point (2/Real(3),0.,1/Real(3));
590  nodes[17] = Point (0.,-2/Real(3),1/Real(3));
591 
592  libmesh_fallthrough();
593  }
594  case PYRAMID14:
595  {
596  // base center
597  nodes[13] = Point (0.,0.,0.);
598 
599  libmesh_fallthrough();
600  }
601  case PYRAMID13:
602  {
603  // base midedge
604  nodes[5] = Point (0.,-1.,0.);
605  nodes[6] = Point (1.,0.,0.);
606  nodes[7] = Point (0.,1.,0.);
607  nodes[8] = Point (-1,0.,0.);
608 
609  // lateral midedge
610  nodes[9] = Point (-.5,-.5,.5);
611  nodes[10] = Point (.5,-.5,.5);
612  nodes[11] = Point (.5,.5,.5);
613  nodes[12] = Point (-.5,.5,.5);
614 
615  libmesh_fallthrough();
616  }
617  case PYRAMID5:
618  {
619  // base corners
620  nodes[0] = Point (-1.,-1.,0.);
621  nodes[1] = Point (1.,-1.,0.);
622  nodes[2] = Point (1.,1.,0.);
623  nodes[3] = Point (-1.,1.,0.);
624  // apex
625  nodes[4] = Point (0.,0.,1.);
626  return;
627  }
628 
629  default:
630  libmesh_error_msg("ERROR: Unknown element type " << Utility::enum_to_string(itemType));
631  }
632 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
Definition: libmesh.h:303
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of nodes in the element...
Definition: elem.h:643
const dof_id_type n_nodes
Definition: tecplot_io.C:67
std::string enum_to_string(const T e)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ get_Sobolev_dweight()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweight ( ) const
inlineoverridevirtual
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.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 788 of file inf_fe.h.

References libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dweight, and libMesh::libmesh_assert().

790  calculate_dphi = true; return dweight; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
std::vector< RealGradient > dweight
Used for certain infinite element families: the global derivative of the additional radial weight ...
Definition: fe_base.h:760

◆ get_Sobolev_dweightxR_sq()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<RealGradient>& libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweightxR_sq ( ) const
inlineoverridevirtual
Returns
The first global derivative of the multiplicative weight (see get_Sobolev_weight()) but weighted with the radial coordinate square.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 832 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_dphi_scaled, libMesh::FEAbstract::calculations_started, libMesh::InfFE< Dim, T_radial, T_map >::dweightxr_sq, and libMesh::libmesh_assert().

834  calculate_dphi_scaled = true; return dweightxr_sq; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1057
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977

◆ get_Sobolev_weight()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weight ( ) const
inlineoverridevirtual
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.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 778 of file inf_fe.h.

References libMesh::FEAbstract::calculate_phi, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::FEGenericBase< OutputType >::weight.

780  calculate_phi = true; return weight; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
std::vector< Real > weight
Used for certain infinite element families: the additional radial weight in local coordinates...
Definition: fe_base.h:767
libmesh_assert(ctx)

◆ get_Sobolev_weightxR_sq()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Real>& libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weightxR_sq ( ) const
inlineoverridevirtual
Returns
The multiplicative weight (see get_Sobolev_weight()) but weighted with the radial coordinate square.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 821 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_phi_scaled, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::weightxr_sq.

823  calculate_phi_scaled = true; return weightxr_sq; }
std::vector< Real > weightxr_sq
Definition: inf_fe.h:1048
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
libmesh_assert(ctx)

◆ get_tangents()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<std::vector<Point> >& libMesh::InfFE< Dim, T_radial, T_map >::get_tangents ( ) const
inlineoverridevirtual
Returns
The tangent vectors for face integration.

Definition at line 797 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::tangents.

799  calculate_map = true; return tangents; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
libmesh_assert(ctx)
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< std::vector< Point > > tangents
Definition: inf_fe.h:1123

◆ get_type()

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

This is generally redundant with _elem->type(), but must be cached separately for cases (such as internal FE use in QComposite) where _elem might be a dangling pointer to a temporary.

Definition at line 509 of file fe_abstract.h.

References libMesh::FEAbstract::_elem_type.

509 { return _elem_type; }
ElemType _elem_type
The element type the current data structures were set up for.
Definition: fe_abstract.h:735

◆ get_xyz()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector<Point>& libMesh::InfFE< Dim, T_radial, T_map >::get_xyz ( ) const
inlineoverridevirtual
Returns
the xyz spatial locations of the quadrature points on the element.

Definition at line 567 of file inf_fe.h.

References libMesh::InfFE< Dim, T_radial, T_map >::calculate_xyz, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::xyz.

569  calculate_xyz = true; return xyz; }
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:666
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition: inf_fe.h:983
libmesh_assert(ctx)
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1046

◆ increment_constructor_count()

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

Increments the construction counter.

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

Definition at line 183 of file reference_counter.h.

References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

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

184 {
185  libmesh_try
186  {
187  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
188  std::pair<unsigned int, unsigned int> & p = _counts[name];
189  p.first++;
190  }
191  libmesh_catch (...)
192  {
193  auto stream = libMesh::err.get();
194  stream->exceptions(stream->goodbit); // stream must not throw
195  libMesh::err << "Encountered unrecoverable error while calling "
196  << "ReferenceCounter::increment_constructor_count() "
197  << "for a(n) " << name << " object." << std::endl;
198  std::terminate();
199  }
200 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ increment_destructor_count()

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

Increments the destruction counter.

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

Definition at line 207 of file reference_counter.h.

References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

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

208 {
209  libmesh_try
210  {
211  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
212  std::pair<unsigned int, unsigned int> & p = _counts[name];
213  p.second++;
214  }
215  libmesh_catch (...)
216  {
217  auto stream = libMesh::err.get();
218  stream->exceptions(stream->goodbit); // stream must not throw
219  libMesh::err << "Encountered unrecoverable error while calling "
220  << "ReferenceCounter::increment_destructor_count() "
221  << "for a(n) " << name << " object." << std::endl;
222  std::terminate();
223  }
224 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
OStreamProxy err
static Counts _counts
Actually holds the data.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we&#39;ll be lazy and make esoteric uses go th...
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ inf_compute_constraints()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_constraints ( DofConstraints constraints,
DofMap dof_map,
const unsigned int  variable_number,
const Elem child_elem 
)
static

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

Definition at line 1417 of file inf_fe_static.C.

References libMesh::Elem::build_side_ptr(), libMesh::Elem::contains_point(), libMesh::DofMap::dof_indices(), libMesh::FEType::family, libMesh::FEMap::inverse_map(), libMesh::DofMap::is_constrained_dof(), libMesh::LAGRANGE, libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEInterface::n_dofs(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::neighbor_ptr_range(), libMesh::Elem::parent(), libMesh::Real, libMesh::remote_elem, libMesh::FEInterface::shape(), libMesh::Elem::side_index_range(), libMesh::Threads::spin_mtx, libMesh::Elem::subactive(), and libMesh::DofMap::variable_type().

1421 {
1422 
1423  // only constrain elements in 2,3d.
1424  if (Dim == 1)
1425  return;
1426 
1427  libmesh_assert(child_elem);
1428 
1429  // only constrain active and ancestor elements
1430  if (child_elem->subactive())
1431  return;
1432 
1433  // Before we start to compute anything, lets check if any confinement is needed:
1434  bool need_constraints=false;
1435  for (auto child_neighbor : child_elem->neighbor_ptr_range())
1436  if (child_neighbor->level() < child_elem->level())
1437  {
1438  need_constraints = true;
1439  break;
1440  }
1441  if (!need_constraints)
1442  return;
1443 
1444  // For infinite elements, the computation of constraints is somewhat different
1445  // than for Lagrange elements:
1446  // 1) When an infinite element is refined, only the base element (i.e. side(0) ) is refined.
1447  //
1448  // 2) Due to the tensorial structure of shape functions (base_shape * radial_function),
1449  // it must be ensured that all element DOFs inherit that constraint.
1450  // It is important here to distinguish the (total) DOF from base DOF and radial DOF contributions.
1451  //
1452  // 3) Due to the generality of radial polynomial (of type fe_type.radial_family and with order fe_type.radial_order)
1453  // here basis functions cannot be mapped to nodes: Independent from the radial polynomial,
1454  // infinite elements have one set of nodes at the base (side(0)) and a second set at twice the distance to their origin.
1455  //
1456  // Independent from the polynomial and degree used, the first radial DOF is 1 at the base while all others are 0 there
1457  //
1458  //Constraining of DOFs is only needed when a DOF is nonzero at the elements face shared with a coarser element.
1459  // Thus, the following scheme is used here:
1460  //
1461  // -If the coarser element is the neighbor(0) (i.e. we share only the base), we must constrain
1462  // all DOFs that correspond to the first order radial contribution.
1463  // -if an infinite neighbor is coarser (than 'child_elem'), all those DOFs must be constrained
1464  // whose contribution from the base is non-zero at the interface.
1465  // In this case, we lack a point-assignement between DOFs and nodes, but since there is no refinement in radial direction,
1466  // the radial polynomials coincide on neighboring elements.
1467  // Thus, if one constraines these DOFs at one (arbitrary) point correctly, they match for each point along the radial direction.
1468  // Hence, we constrain them with the same values as those DOFs belonging to the first order polynomial, obtaining consistent
1469  // constraints that mimic constraints that are computed at the support points for each radial polynomial contribution.
1470 
1471  FEType fe_type = dof_map.variable_type(variable_number);
1472 
1474 
1475  std::vector<dof_id_type> child_base_dof_indices, parent_base_dof_indices;
1476  std::vector<dof_id_type> child_elem_dof_indices, parent_elem_dof_indices;
1477 
1478  const Elem * parent_elem = child_elem->parent();
1479 
1480  // This can't happen... Only level-0 elements have nullptr
1481  // parents, and no level-0 elements can be at a higher
1482  // level than their neighbors!
1483  libmesh_assert(parent_elem);
1484 
1485  dof_map.dof_indices (child_elem, child_elem_dof_indices,
1486  variable_number);
1487  dof_map.dof_indices (parent_elem, parent_elem_dof_indices,
1488  variable_number);
1489 
1490  const unsigned int n_total_dofs = child_elem_dof_indices.size();
1491  // fill the elements shape index map: we will have to use it later
1492  // to find the elements dofs that correspond to certain base_elem_dofs.
1493  std::vector<unsigned int> radial_shape_index(n_total_dofs);
1494  std::vector<unsigned int> base_shape_index(n_total_dofs);
1495  // fill the shape index map
1496 #ifdef DEBUG
1497  unsigned int max_base_id=0;
1498  unsigned int max_radial_id=0;
1499 #endif
1500  for (unsigned int n=0; n<n_total_dofs; ++n)
1501  {
1503  child_elem,
1504  n,
1505  base_shape_index[n],
1506  radial_shape_index[n]);
1507 
1508 #ifdef DEBUG
1509  if (base_shape_index[n] > max_base_id)
1510  max_base_id = base_shape_index[n];
1511  if (radial_shape_index[n] > max_radial_id)
1512  max_radial_id = radial_shape_index[n];
1513 #endif
1514  }
1515 
1516 #ifdef DEBUG
1517  libmesh_assert_equal_to( (max_base_id+1)*(max_radial_id+1), n_total_dofs );
1518 #endif
1519 
1520  for (auto s : child_elem->side_index_range())
1521  if (child_elem->neighbor_ptr(s) != nullptr &&
1522  child_elem->neighbor_ptr(s) != remote_elem)
1523  if (child_elem->neighbor_ptr(s)->level() < child_elem->level())
1524  {
1525  // we ALWAYS take the base element for reference:
1526  // - For s=0, we refine all dofs with `radial_shape_index == 0
1527  // - for s>0, we refine all dofs whose corresponding base_shape has its support point shared with neighbor(s)
1528  std::unique_ptr<const Elem> child_base, parent_base;
1529  child_elem->build_side_ptr(child_base, 0);
1530  parent_elem->build_side_ptr(parent_base, 0);
1531 
1532  const unsigned int n_base_dofs =
1533  FEInterface::n_dofs(fe_type, child_base.get());
1534 
1535  // We need global DOF indices for both base and 'full' elements
1536  dof_map.dof_indices (child_base.get(), child_base_dof_indices,
1537  variable_number);
1538  dof_map.dof_indices (parent_base.get(), parent_base_dof_indices,
1539  variable_number);
1540 
1541 
1542  // First we loop over the childs base DOFs (nodes) and check which of them needs constraint
1543  // and which can be skipped.
1544  for (unsigned int child_base_dof=0; child_base_dof != n_base_dofs; ++child_base_dof)
1545  {
1546  libmesh_assert_less (child_base_dof, child_base->n_nodes());
1547 
1548  // Childs global dof index.
1549  const dof_id_type child_base_dof_g = child_base_dof_indices[child_base_dof];
1550 
1551  // Hunt for "constraining against myself" cases before
1552  // we bother creating a constraint row
1553  bool self_constraint = false;
1554  for (unsigned int parent_base_dof=0;
1555  parent_base_dof != n_base_dofs; parent_base_dof++)
1556  {
1557  libmesh_assert_less (parent_base_dof, parent_base->n_nodes());
1558 
1559  // Their global dof index.
1560  const dof_id_type parent_base_dof_g =
1561  parent_base_dof_indices[parent_base_dof];
1562 
1563  if (parent_base_dof_g == child_base_dof_g)
1564  {
1565  self_constraint = true;
1566  break;
1567  }
1568  }
1569 
1570  if (self_constraint)
1571  continue;
1572 
1573  // now we need to constrain all __child_elem__ DOFs whose base corresponds to
1574  // child_base_dof.
1575  // --> loop over all child_elem dofs whose base_shape_index == child_base_dof
1576  unsigned int n_elem_dofs = FEInterface::n_dofs(fe_type, child_elem);
1577  libmesh_assert_equal_to(n_elem_dofs, n_total_dofs);
1578  for(unsigned int child_elem_dof=0; child_elem_dof != n_elem_dofs; ++child_elem_dof)
1579  {
1580  if (base_shape_index[child_elem_dof] != child_base_dof)
1581  continue;
1582 
1583  // independent from the radial description, the first radial DOF is 1 at the base
1584  // while all others start with 0.
1585  // Thus, to confine for the bases neighbor, we only need to refine DOFs that correspond
1586  // to the first radial DOF
1587  if (s==0)
1588  {
1589  if (radial_shape_index[child_elem_dof] > 0)
1590  continue;
1591  }
1592  else
1593  {
1594  // If the neighbor is not the base, we must check now if the support point of the dof
1595  // is actually shared with that neighbor:
1596  if ( !child_elem->neighbor_ptr(s)->contains_point(child_base->point(child_base_dof)) )
1597  continue;
1598  }
1599 
1600 
1601  const dof_id_type child_elem_dof_g = child_elem_dof_indices[child_elem_dof];
1602 
1603  DofConstraintRow * constraint_row;
1604 
1605  // we may be running constraint methods concurrently
1606  // on multiple threads, so we need a lock to
1607  // ensure that this constraint is "ours"
1608  {
1609  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1610 
1611  if (dof_map.is_constrained_dof(child_elem_dof_g))
1612  continue;
1613 
1614  constraint_row = &(constraints[child_elem_dof_g]);
1615  libmesh_assert(constraint_row->empty());
1616  }
1617 
1618  // The support point of the DOF
1619  const Point & support_point = child_base->point(child_base_dof);
1620 
1621  // Figure out where my (base) node lies on the parents reference element.
1622  const Point mapped_point = FEMap::inverse_map(Dim-1,
1623  parent_base.get(),
1624  support_point);
1625 
1626  // now we need the parents base DOFs, evaluated at the mapped_point for refinement:
1627  for (unsigned int parent_base_dof=0;
1628  parent_base_dof != n_base_dofs; parent_base_dof++)
1629  {
1630 
1631  const Real parent_base_dof_value = FEInterface::shape(fe_type,
1632  parent_base.get(),
1633  parent_base_dof,
1634  mapped_point);
1635 
1636 
1637  // all parent elements DOFs whose base_index corresponds to parent_base_dof
1638  // must be constrained with the parent_base_dof_value.
1639 
1640  // The value of the radial function does not play a role here:
1641  // 1) only the function with radial_shape_index[] == 0 are 1 at the base,
1642  // the others are 0.
1643  // 2) The radial basis is (usually) not a Lagrange polynomial.
1644  // Thus, constraining according to a support point doesn't work.
1645  // However, they reach '1' at a certain (radial) distance which is the same for parent and child.
1646  for (unsigned int parent_elem_dof=0;
1647  parent_elem_dof != n_elem_dofs; parent_elem_dof++)
1648  {
1649  if (base_shape_index[parent_elem_dof] != parent_base_dof)
1650  continue;
1651 
1652  // only constrain with coinciding radial DOFs.
1653  // Otherwise, we start coupling all DOFs with each other and end up in a mess.
1654  if (radial_shape_index[parent_elem_dof] != radial_shape_index[child_elem_dof])
1655  continue;
1656 
1657  // Their global dof index.
1658  const dof_id_type parent_elem_dof_g =
1659  parent_elem_dof_indices[parent_elem_dof];
1660 
1661  // Only add non-zero and non-identity values
1662  // for Lagrange basis functions. (parent_base is assumed to be of Lagrange-type).
1663  if ((std::abs(parent_base_dof_value) > 1.e-5) &&
1664  (std::abs(parent_base_dof_value) < .999))
1665  {
1666  constraint_row->emplace(parent_elem_dof_g, parent_base_dof_value);
1667  }
1668 #ifdef DEBUG
1669  // Protect for the case u_i = 0.999 u_j,
1670  // in which case i better equal j.
1671  else if (parent_base_dof_value >= .999)
1672  {
1673  libmesh_assert_equal_to (child_base_dof_g, parent_base_dof_indices[parent_base_dof]);
1674  libmesh_assert_equal_to (child_elem_dof_g, parent_elem_dof_g);
1675  }
1676 #endif
1677  }
1678 
1679  }
1680  }
1681 
1682  }
1683  }
1684 }
FEFamily family
The type of finite element.
Definition: fe_type.h:228
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Definition: fe_map.C:1512
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:761
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)
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:100
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
uint8_t dof_id_type
Definition: id_types.h:67
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30
const RemoteElem * remote_elem
Definition: remote_elem.C:57

◆ inf_compute_node_constraints()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
void libMesh::InfFE< Dim, T_radial, T_map >::inf_compute_node_constraints ( NodeConstraints constraints,
const Elem elem 
)
static

Definition at line 1373 of file inf_fe_static.C.

References libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::Elem::neighbor_ptr(), libMesh::remote_elem, libMesh::Elem::side_index_range(), and libMesh::Elem::subactive().

1374 {
1375  // only constrain elements in 2,3d.
1376  if (Dim == 1)
1377  return;
1378 
1379  libmesh_assert(elem);
1380 
1381  // only constrain active and ancestor elements
1382  if (elem->subactive())
1383  return;
1384 
1385  // for infinite elements, the computation of constraints is somewhat different
1386  // than for Lagrange elements:
1387  // 1) Only the base element (i.e. side(0) ) may be refined.
1388  // Thus, in radial direction no constraints must be considered.
1389  // 2) Due to the tensorial structure of shape functions (base_shape * radial_function),
1390  // it must be ensured that all element DOFs inherit that constraint.
1391  // Consequently, the constraints are computed on the base (baseh_shape) but must
1392  // be applied to all DOFs with the respective base_shape index (i.e. for all radial_functions).
1393  //
1394  // FIXME: In the current form, this function does not work for infinite elements
1395  // because constraining the non-base points requires knowledge of the T_map and T_radial
1396  // parameters; but they are not accessible via the element and may differ between variables.
1397  //
1398  // For the moment being, we just check if this element can be skipped and fail otherwise.
1399 
1400  // if one of the sides needs a constraint, an error is thrown.
1401  // In other cases, we leave the function regularly.
1402  for (auto s : elem->side_index_range())
1403  {
1404  if (elem->neighbor_ptr(s) != nullptr &&
1405  elem->neighbor_ptr(s) != remote_elem)
1406  if (elem->neighbor_ptr(s)->level() < elem->level())
1407  {
1408  libmesh_not_implemented();
1409  }
1410  }
1411 }
libmesh_assert(ctx)
const RemoteElem * remote_elem
Definition: remote_elem.C:57

◆ 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 902 of file inf_fe.h.

904  { 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 135 of file inf_fe_boundary.C.

References libMesh::FEGenericBase< OutputType >::build(), libMesh::Elem::infinite(), libMesh::Elem::interior_parent(), libMesh::libmesh_assert(), and libMesh::Elem::p_level().

137 {
138  libmesh_assert(inf_side);
139 
140  // Currently, this makes only sense in 3-D!
141  libmesh_assert_equal_to (Dim, 3);
142 
143  // Initialize the radial shape functions (in particular som)
144  this->init_radial_shape_functions(inf_side);
145 
146  // Initialize the base shape functions
147  if (inf_side->infinite())
148  this->update_base_elem(inf_side);
149  else
150  // in this case, I need the 2D base
151  this->update_base_elem(inf_side->interior_parent());
152 
153  // Initialize the base quadrature rule
154  base_qrule->init(*base_elem, inf_side->p_level());
155 
156  // base_fe still corresponds to the (dim-1)-dimensional base of the InfFE object,
157  // so update the fe_base.
158  if (inf_side->infinite())
159  {
160  base_fe = FEBase::build(Dim-2, this->fe_type);
161  base_fe->attach_quadrature_rule(base_qrule.get());
162  }
163  else
164  {
165  base_fe = FEBase::build(Dim-1, this->fe_type);
166  base_fe->attach_quadrature_rule(base_qrule.get());
167  }
168 
169  if (this->calculate_map || this->calculate_map_scaled)
170  {
171  //before initializing, we should say what to compute:
172  base_fe->_fe_map->get_xyz();
173  base_fe->_fe_map->get_JxW();
174  }
175 
177  // initialize the shape functions on the base
178  base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
179  base_elem.get());
180 
181  // the number of quadrature points
182  const unsigned int n_radial_qp = radial_qrule->n_points();
183  const unsigned int n_base_qp = base_qrule->n_points();
184  const unsigned int n_total_qp = n_radial_qp * n_base_qp;
185 
186 #ifdef DEBUG
187  if (som.size() > 0)
188  libmesh_assert_equal_to(n_radial_qp, som.size());
189  // when evaluating the base side, there should be only one radial point.
190  if (!inf_side->infinite())
191  libmesh_assert_equal_to (n_radial_qp, 1);
192 #endif
193 
194  // the quadrature weights
195  _total_qrule_weights.resize(n_total_qp);
196  std::vector<Point> qp(n_total_qp);
197 
198  // quadrature rule weights
199  if (Dim < 3)
200  {
201  // the quadrature points must be assembled differently for lower dims.
202  libmesh_not_implemented();
203  }
204  else
205  {
206  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
207  const std::vector<Real> & base_qw = base_qrule->get_weights();
208  const std::vector<Point> & radial_qp = radial_qrule->get_points();
209  const std::vector<Point> & base_qp = base_qrule->get_points();
210 
211  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
212  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
213 
214  for (unsigned int rp=0; rp<n_radial_qp; rp++)
215  for (unsigned int bp=0; bp<n_base_qp; bp++)
216  {
217  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
218  // initialize the quadrature-points for the 2D side element
219  // - either the base element or it has a 1D base + radial direction.
220  if (inf_side->infinite())
221  qp[bp + rp*n_base_qp]=Point(base_qp[bp](0),
222  0.,
223  radial_qp[rp](0));
224  else
225  qp[bp + rp*n_base_qp]=Point(base_qp[bp](0),
226  base_qp[bp](1),
227  -1.);
228  }
229  }
230 
231  this->reinit(inf_side->interior_parent(), &qp);
232 
233 }
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
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:387
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1066
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
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:120
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
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:1179
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:109
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ 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 387 of file inf_fe.C.

References libMesh::InfFERadial::decay(), libMesh::InfFERadial::decay_deriv(), libMesh::libmesh_assert(), and libMesh::InfFERadial::n_dofs().

389 {
390  libmesh_assert(radial_qrule.get() || radial_pts);
391  libmesh_assert(inf_elem);
392 
393  // Start logging the radial shape function initialization
394  LOG_SCOPE("init_radial_shape_functions()", "InfFE");
395 
396  // initialize most of the things related to physical approximation
397  const Order radial_approx_order = fe_type.radial_order;
398  const unsigned int n_radial_approx_shape_functions =
399  InfFERadial::n_dofs(radial_approx_order);
400 
401  const std::size_t n_radial_qp =
402  radial_pts ? radial_pts->size() : radial_qrule->n_points();
403  const std::vector<Point> & radial_qp =
404  radial_pts ? *radial_pts : radial_qrule->get_points();
405 
406  // the radial polynomials (eval)
408  {
409  mode.resize (n_radial_approx_shape_functions);
410  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
411  mode[i].resize (n_radial_qp);
412 
413  // evaluate the mode shapes in radial direction at radial quadrature points
414  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
415  for (std::size_t p=0; p<n_radial_qp; ++p)
416  mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
417  }
418 
420  {
421  dmodedv.resize (n_radial_approx_shape_functions);
422  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
423  dmodedv[i].resize (n_radial_qp);
424 
425  // evaluate the mode shapes in radial direction at radial quadrature points
426  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
427  for (std::size_t p=0; p<n_radial_qp; ++p)
428  dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
429  }
430 
431  // the (1-v)/2 weight.
433  {
434  som.resize (n_radial_qp);
435  // compute scalar values at radial quadrature points
436  for (std::size_t p=0; p<n_radial_qp; ++p)
437  som[p] = InfFERadial::decay (Dim, radial_qp[p](0));
438  }
440  {
441  dsomdv.resize (n_radial_qp);
442  // compute scalar values at radial quadrature points
443  for (std::size_t p=0; p<n_radial_qp; ++p)
444  dsomdv[p] = InfFERadial::decay_deriv (Dim, radial_qp[p](0));
445  }
446 }
std::vector< Real > dsomdv
the first local derivative of the radial decay in local coordinates.
Definition: inf_fe.h:1071
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1292
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
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:1077
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1066
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
std::vector< std::vector< Real > > dmodedv
the first local derivative of the radial approximation shapes.
Definition: inf_fe.h:1083

◆ 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 451 of file inf_fe.C.

References libMesh::InfFERadial::D(), libMesh::InfFERadial::D_deriv(), libMesh::InfFERadial::Dxr_sq(), libMesh::libmesh_assert(), libMesh::InfFERadial::n_dofs(), libMesh::FEInterface::n_dofs(), and libMesh::MeshTools::weight().

454 {
455  libmesh_assert(inf_elem);
456 
457  // Start logging the radial shape function initialization
458  LOG_SCOPE("init_shape_functions()", "InfFE");
459 
460  // fast access to some const ints for the radial data
461  const unsigned int n_radial_approx_sf = InfFERadial::n_dofs(fe_type.radial_order);
462  const std::size_t n_radial_qp = radial_qp.size();
463 #ifdef DEBUG
465  libmesh_assert_equal_to(n_radial_approx_sf, mode.size());
467  libmesh_assert_equal_to(som.size(), n_radial_qp);
468 #endif
469 
470 
471  // initialize most of the quantities related to mapping
472 
473  // The element type and order to use in the base map
474  //const Order base_mapping_order = base_elem->default_order();
475 
476  // the number of base shape functions used to construct the map
477  // (Lagrange shape functions are used for mapping in the base)
478  //unsigned int n_base_mapping_shape_functions =
479  // InfFEBase::n_base_mapping_sf(*base_elem,
480  // base_mapping_order);
481 
482  // initialize most of the things related to physical approximation
483  unsigned int n_base_approx_shape_functions;
484  if (Dim > 1)
485  n_base_approx_shape_functions =
486  FEInterface::n_dofs(base_fe->get_fe_type(), base_elem.get());
487  else
488  n_base_approx_shape_functions = 1;
489 
490 
491  // update class member field
493  n_radial_approx_sf * n_base_approx_shape_functions;
494 
495 
496  // The number of the base quadrature points.
497  const unsigned int n_base_qp = cast_int<unsigned int>(base_qp.size());
498 
499  // The total number of quadrature points.
500  _n_total_qp = n_radial_qp * n_base_qp;
501 
502 
503  // initialize the node and shape numbering maps
504  {
505  // similar for the shapes: the i-th entry stores
506  // the associated base/radial shape number
509 
510  // fill the shape index map
511  for (unsigned int n=0; n<_n_total_approx_sf; ++n)
512  {
514  inf_elem,
515  n,
518  libmesh_assert_less (_base_shape_index[n], n_base_approx_shape_functions);
519  libmesh_assert_less (_radial_shape_index[n], n_radial_approx_sf);
520  }
521  }
522 
523  // resize the base data fields
524  //dist.resize(n_base_mapping_shape_functions);
525 
526  // resize the total data fields
527 
528  // the phase term varies with xi, eta and zeta(v): store it for _all_ qp
529  //
530  // when computing the phase, we need the base approximations
531  // therefore, initialize the phase here, but evaluate it
532  // in compute_shape_functions().
533  //
534  // the weight, though, is only needed at the radial quadrature points, n_radial_qp.
535  // but for a uniform interface to the protected data fields
536  // the weight data field (which are accessible from the outside) are expanded to _n_total_qp.
538  weight.resize (_n_total_qp);
540  weightxr_sq.resize (_n_total_qp);
542  dweightdv.resize (n_radial_qp);
543  if (calculate_dphi)
544  dweight.resize (_n_total_qp);
546  dweightxr_sq.resize(_n_total_qp);
547 
549  dphase.resize (_n_total_qp);
550 
551  // this vector contains the integration weights for the combined quadrature rule
552  // if no quadrature rules are given, use only ones.
554 
555  // InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
556  // shape and mapping functions, respectively
557  {
559  JxWxdecay.resize(_n_total_qp);
560  if (calculate_jxw)
561  JxW.resize(_n_total_qp);
563  {
564  xyz.resize(_n_total_qp);
574  }
575  if (calculate_map)
576  {
577  dxidx_map.resize(_n_total_qp);
578  dxidy_map.resize(_n_total_qp);
579  dxidz_map.resize(_n_total_qp);
580  detadx_map.resize(_n_total_qp);
581  detady_map.resize(_n_total_qp);
582  detadz_map.resize(_n_total_qp);
583  dzetadx_map.resize(_n_total_qp);
584  dzetady_map.resize(_n_total_qp);
585  dzetadz_map.resize(_n_total_qp);
586  }
587  if (calculate_phi)
588  phi.resize (_n_total_approx_sf);
590  phixr.resize (_n_total_approx_sf);
591  if (calculate_dphi)
592  {
593  dphi.resize (_n_total_approx_sf);
594  dphidx.resize (_n_total_approx_sf);
595  dphidy.resize (_n_total_approx_sf);
596  dphidz.resize (_n_total_approx_sf);
597  }
598 
600  {
601  dphixr.resize (_n_total_approx_sf);
603  }
604 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
605 
606  if (calculate_d2phi)
607  {
608  libmesh_not_implemented();
609  d2phi.resize (_n_total_approx_sf);
610  d2phidx2.resize (_n_total_approx_sf);
611  d2phidxdy.resize (_n_total_approx_sf);
612  d2phidxdz.resize (_n_total_approx_sf);
613  d2phidy2.resize (_n_total_approx_sf);
614  d2phidydz.resize (_n_total_approx_sf);
615  d2phidz2.resize (_n_total_approx_sf);
616  d2phidxi2.resize (_n_total_approx_sf);
617 
618  if (Dim > 1)
619  {
622  }
623 
624  if (Dim > 2)
625  {
629  }
630  }
631 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
632 
634  {
635  dphidxi.resize (_n_total_approx_sf);
636 
637  if (Dim > 1)
639 
640  if (Dim == 3)
642  }
643 
644  }
645 
646  // collect all the for loops, where inner vectors are
647  // resized to the appropriate number of quadrature points
648  {
649  if (calculate_phi)
650  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
651  phi[i].resize (_n_total_qp);
652 
653  if (calculate_dphi)
654  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
655  {
656  dphi[i].resize (_n_total_qp);
657  dphidx[i].resize (_n_total_qp);
658  dphidy[i].resize (_n_total_qp);
659  dphidz[i].resize (_n_total_qp);
660  }
661 
663  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
664  {
665  phixr[i].resize (_n_total_qp);
666  }
668  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
669  {
670  dphixr[i].resize(_n_total_qp);
671  dphixr_sq[i].resize(_n_total_qp);
672  }
673 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
674  if (calculate_d2phi)
675  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
676  {
677  d2phi[i].resize (_n_total_qp);
678  d2phidx2[i].resize (_n_total_qp);
679  d2phidxdy[i].resize (_n_total_qp);
680  d2phidxdz[i].resize (_n_total_qp);
681  d2phidy2[i].resize (_n_total_qp);
682  d2phidydz[i].resize (_n_total_qp);
683  d2phidy2[i].resize (_n_total_qp);
684  d2phidxi2[i].resize (_n_total_qp);
685 
686  if (Dim > 1)
687  {
688  d2phidxideta[i].resize (_n_total_qp);
689  d2phideta2[i].resize (_n_total_qp);
690  }
691  if (Dim > 2)
692  {
693  d2phidxidzeta[i].resize (_n_total_qp);
694  d2phidetadzeta[i].resize (_n_total_qp);
695  d2phidzeta2[i].resize (_n_total_qp);
696  }
697  }
698 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
699 
701  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
702  {
703  dphidxi[i].resize (_n_total_qp);
704 
705  if (Dim > 1)
706  dphideta[i].resize (_n_total_qp);
707 
708  if (Dim == 3)
709  dphidzeta[i].resize (_n_total_qp);
710 
711  }
712 
713  }
714  {
715  // (a) compute scalar values at _all_ quadrature points -- for uniform
716  // access from the outside to these fields
717  // (b) form a std::vector<Real> which contains the appropriate weights
718  // of the combined quadrature rule!
719  libmesh_assert_equal_to (radial_qp.size(), n_radial_qp);
720 
721  if (radial_qrule && base_qrule)
722  {
723  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
724  const std::vector<Real> & base_qw = base_qrule->get_weights();
725  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
726  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
727 
728  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
729  for (unsigned int bp=0; bp<n_base_qp; ++bp)
730  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
731  }
732 
733 
734  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
735  {
737  for (unsigned int bp=0; bp<n_base_qp; ++bp)
738  weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
739 
741  for (unsigned int bp=0; bp<n_base_qp; ++bp)
742  weightxr_sq[bp + rp*n_base_qp] = InfFERadial::Dxr_sq(radial_qp[rp](0));
743 
745  dweightdv[rp] = InfFERadial::D_deriv(radial_qp[rp](0));
746  }
747  }
748 }
std::vector< Real > weightxr_sq
Definition: inf_fe.h:1048
std::vector< Real > detadz_map
Definition: inf_fe.h:1094
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:702
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:674
std::vector< std::vector< OutputShape > > dphidxi
Shape function derivatives in the xi direction.
Definition: fe_base.h:641
std::vector< Real > dxidx_map
Definition: inf_fe.h:1089
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:967
std::vector< std::vector< OutputShape > > d2phidxdz
Shape function second derivatives in the x-z direction.
Definition: fe_base.h:720
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: fe_abstract.h:774
std::vector< std::vector< OutputShape > > dphidzeta
Shape function derivatives in the zeta direction.
Definition: fe_base.h:651
std::vector< std::vector< OutputShape > > d2phidydz
Shape function second derivatives in the y-z direction.
Definition: fe_base.h:730
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::vector< Real > detadx_map_scaled
Definition: inf_fe.h:1104
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
std::vector< Real > dzetadz_map
Definition: inf_fe.h:1097
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:1055
std::vector< Real > dxidx_map_scaled
Definition: inf_fe.h:1101
std::vector< Real > dzetady_map
Definition: inf_fe.h:1096
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1115
std::vector< Real > dxidz_map
Definition: inf_fe.h:1091
static Real Dxr_sq(const Real)
Definition: inf_fe.h:84
std::vector< std::vector< OutputShape > > d2phidxideta
Shape function second derivatives in the xi-eta direction.
Definition: fe_base.h:685
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
std::vector< Real > dxidy_map_scaled
Definition: inf_fe.h:1102
std::vector< Real > dxidy_map
Definition: inf_fe.h:1090
std::vector< Real > detadx_map
Definition: inf_fe.h:1092
std::vector< Real > weight
Used for certain infinite element families: the additional radial weight in local coordinates...
Definition: fe_base.h:767
std::vector< Real > detady_map_scaled
Definition: inf_fe.h:1105
std::vector< std::vector< OutputShape > > d2phidx2
Shape function second derivatives in the x direction.
Definition: fe_base.h:710
std::vector< std::vector< OutputShape > > dphidy
Shape function derivatives in the y direction.
Definition: fe_base.h:661
std::vector< std::vector< OutputShape > > d2phidy2
Shape function second derivatives in the y direction.
Definition: fe_base.h:725
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:1077
std::vector< Real > dzetady_map_scaled
Definition: inf_fe.h:1108
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1057
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1116
std::vector< std::vector< OutputShape > > d2phidetadzeta
Shape function second derivatives in the eta-zeta direction.
Definition: fe_base.h:700
static Real D(const Real v)
Definition: inf_fe.h:82
std::vector< std::vector< OutputShape > > d2phidxidzeta
Shape function second derivatives in the xi-zeta direction.
Definition: fe_base.h:690
std::vector< std::vector< OutputShape > > d2phidxdy
Shape function second derivatives in the x-y direction.
Definition: fe_base.h:715
std::vector< std::vector< OutputShape > > dphidx
Shape function derivatives in the x direction.
Definition: fe_base.h:656
std::vector< Real > detadz_map_scaled
Definition: inf_fe.h:1106
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1119
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:990
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
std::vector< std::vector< OutputShape > > d2phideta2
Shape function second derivatives in the eta direction.
Definition: fe_base.h:695
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
std::vector< Real > JxW
Definition: inf_fe.h:1120
std::vector< OutputGradient > dphase
Used for certain infinite element families: the first derivatives of the phase term in global coordin...
Definition: fe_base.h:753
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1173
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1066
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:686
std::vector< Real > dzetadx_map
Definition: inf_fe.h:1095
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
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)
std::vector< Real > dxidz_map_scaled
Definition: inf_fe.h:1103
std::vector< unsigned int > _radial_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1155
static Real D_deriv(const Real v)
Definition: inf_fe.h:90
std::vector< std::vector< OutputShape > > d2phidz2
Shape function second derivatives in the z direction.
Definition: fe_base.h:735
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1046
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1117
std::vector< std::vector< OutputShape > > d2phidxi2
Shape function second derivatives in the xi direction.
Definition: fe_base.h:680
std::vector< unsigned int > _base_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1165
std::vector< Real > dzetadz_map_scaled
Definition: inf_fe.h:1109
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
std::vector< Real > detady_map
Definition: inf_fe.h:1093
std::vector< Real > dzetadx_map_scaled
Definition: inf_fe.h:1107
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:1179
std::vector< std::vector< OutputShape > > d2phidzeta2
Shape function second derivatives in the zeta direction.
Definition: fe_base.h:705
std::vector< std::vector< OutputShape > > dphidz
Shape function derivatives in the z direction.
Definition: fe_base.h:666
std::vector< std::vector< OutputShape > > dphideta
Shape function derivatives in the eta direction.
Definition: fe_base.h:646
std::vector< RealGradient > dweight
Used for certain infinite element families: the global derivative of the additional radial weight ...
Definition: fe_base.h:760
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ 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 465 of file inf_fe.h.

References libMesh::InfFEMap::inverse_map().

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

469  {
470  // libmesh_deprecated(); // soon
471  return InfFEMap::inverse_map(Dim, elem, p, tolerance, secure);
472  }
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:96

◆ 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 475 of file inf_fe.h.

References libMesh::InfFEMap::inverse_map().

480  {
481  // libmesh_deprecated(); // soon
482  return InfFEMap::inverse_map(Dim, elem, physical_points,
483  reference_points, tolerance, secure);
484  }
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:96

◆ 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 441 of file inf_fe.h.

442  { 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 457 of file inf_fe.h.

References libMesh::InfFEMap::map().

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

459  {
460  // libmesh_deprecated(); // soon
461  return InfFEMap::map(Dim, inf_elem, reference_point);
462  }
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40

◆ 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 Elem inf_elem 
)
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 66 of file inf_fe_static.C.

References libMesh::Elem::build_side_ptr(), 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().

68 {
69  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
70  // the InfElem.
71  auto base_elem = inf_elem->build_side_ptr(0);
72 
73  if (Dim > 1)
74  return FEInterface::n_dofs(fet, base_elem.get()) *
75  InfFERadial::n_dofs(fet.radial_order);
76  else
77  return InfFERadial::n_dofs(fet.radial_order);
78 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:353
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ n_dofs_at_node() [1/2]

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 84 of file inf_fe_static.C.

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

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

87 {
88  libmesh_deprecated();
89 
90  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
91 
92  unsigned int n_base, n_radial;
93  compute_node_indices(inf_elem_type, n, n_base, n_radial);
94 
95  // libMesh::out << "elem_type=" << inf_elem_type
96  // << ", fet.radial_order=" << fet.radial_order
97  // << ", n=" << n
98  // << ", n_radial=" << n_radial
99  // << ", n_base=" << n_base
100  // << std::endl;
101 
102  if (Dim > 1)
103  return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
104  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
105  else
106  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
107 }
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
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...
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
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:437

◆ n_dofs_at_node() [2/2]

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 Elem inf_elem,
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 113 of file inf_fe_static.C.

References libMesh::Elem::build_side_ptr(), libMesh::InfFERadial::n_dofs_at_node(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEType::radial_order, and libMesh::Elem::type().

116 {
117  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
118  // the InfElem.
119  auto base_elem = inf_elem->build_side_ptr(0);
120 
121  unsigned int n_base, n_radial;
122  compute_node_indices(inf_elem->type(), n, n_base, n_radial);
123 
124  if (Dim > 1)
125  return FEInterface::n_dofs_at_node(fet, base_elem.get(), n_base)
126  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
127  else
128  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
129 }
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...
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
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:437
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ n_dofs_per_elem() [1/2]

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.
Deprecated:
Call the version of this function that takes an Elem* instead for consistency with other FEInterface::n_dofs() methods.

Definition at line 135 of file inf_fe_static.C.

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().

137 {
138  libmesh_deprecated();
139 
140  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
141 
142  if (Dim > 1)
143  return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
144  * InfFERadial::n_dofs_per_elem(fet.radial_order);
145  else
146  return InfFERadial::n_dofs_per_elem(fet.radial_order);
147 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:531
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition: inf_fe.h:136

◆ n_dofs_per_elem() [2/2]

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 Elem inf_elem 
)
static
Returns
The number of dofs interior to the element, not associated with any interior nodes.

Definition at line 153 of file inf_fe_static.C.

References libMesh::Elem::build_side_ptr(), libMesh::InfFERadial::n_dofs_per_elem(), libMesh::FEInterface::n_dofs_per_elem(), and libMesh::FEType::radial_order.

155 {
156  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
157  // the InfElem.
158  auto base_elem = inf_elem->build_side_ptr(0);
159 
160  if (Dim > 1)
161  return FEInterface::n_dofs_per_elem(fet, base_elem.get())
162  * InfFERadial::n_dofs_per_elem(fet.radial_order);
163  else
164  return InfFERadial::n_dofs_per_elem(fet.radial_order);
165 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:531
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition: inf_fe.h:136
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ n_objects()

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

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

Definition at line 85 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

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

86  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of 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.

Reimplemented from libMesh::FEAbstract.

Definition at line 560 of file inf_fe.h.

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

561  { libmesh_assert(radial_qrule); return this->_n_total_qp; }
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: fe_abstract.h:774
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
libmesh_assert(ctx)

◆ n_shape_functions() [1/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 Elem inf_elem 
)
inlinestatic
Returns
The number of shape functions associated with a finite element of type t and approximation order o.

Definition at line 381 of file inf_fe.h.

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

383  { return n_dofs(fet, inf_elem); }
static unsigned int n_dofs(const FEType &fet, const Elem *inf_elem)
Definition: inf_fe_static.C:66

◆ n_shape_functions() [2/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 552 of file inf_fe.h.

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

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

553  { return _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:1173

◆ 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 170 of file inf_fe_static.C.

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

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

174 {
175 #ifdef DEBUG
177  {
178  libMesh::err << "WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
179  << " Will return an empty nodal solution. Use " << std::endl
180  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
181  _warned_for_nodal_soln = true;
182  }
183 #endif
184 
185  /*
186  * In the base the infinite element couples to
187  * conventional finite elements. To not destroy
188  * the values there, clear \p nodal_soln. This
189  * indicates to the user of \p nodal_soln to
190  * not use this result.
191  */
192  nodal_soln.clear();
193  libmesh_assert (nodal_soln.empty());
194  return;
195 }
OStreamProxy err
libmesh_assert(ctx)
static bool _warned_for_nodal_soln
static members that are used to issue warning messages only once.
Definition: inf_fe.h:1241
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.

◆ 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 \).
Deprecated:
This method overload does not support all finite element types; e.g. the reference element for an arbitrary polygon or polyhedron type may differ from element to element. Use Elem::on_reference_element() instead.

Definition at line 637 of file fe_abstract.C.

References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::Utility::enum_to_string(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::NODEELEM, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM20, libMesh::PRISM21, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID18, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::QUADSHELL4, libMesh::QUADSHELL8, libMesh::QUADSHELL9, libMesh::Real, libMesh::TET10, libMesh::TET14, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, libMesh::TRI7, and libMesh::TRISHELL3.

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

638 {
639  // Use Elem::on_reference_element() instead
640  libmesh_deprecated();
641 
642  libmesh_assert_greater_equal (eps, 0.);
643 
644  const Real xi = p(0);
645 #if LIBMESH_DIM > 1
646  const Real eta = p(1);
647 #else
648  const Real eta = 0.;
649 #endif
650 #if LIBMESH_DIM > 2
651  const Real zeta = p(2);
652 #else
653  const Real zeta = 0.;
654 #endif
655 
656  switch (t)
657  {
658  case NODEELEM:
659  {
660  return (!xi && !eta && !zeta);
661  }
662  case EDGE2:
663  case EDGE3:
664  case EDGE4:
665  {
666  // The reference 1D element is [-1,1].
667  if ((xi >= -1.-eps) &&
668  (xi <= 1.+eps))
669  return true;
670 
671  return false;
672  }
673 
674 
675  case TRI3:
676  case TRISHELL3:
677  case TRI6:
678  case TRI7:
679  {
680  // The reference triangle is isosceles
681  // and is bound by xi=0, eta=0, and xi+eta=1.
682  if ((xi >= 0.-eps) &&
683  (eta >= 0.-eps) &&
684  ((xi + eta) <= 1.+eps))
685  return true;
686 
687  return false;
688  }
689 
690 
691  case QUAD4:
692  case QUADSHELL4:
693  case QUAD8:
694  case QUADSHELL8:
695  case QUAD9:
696  case QUADSHELL9:
697  {
698  // The reference quadrilateral element is [-1,1]^2.
699  if ((xi >= -1.-eps) &&
700  (xi <= 1.+eps) &&
701  (eta >= -1.-eps) &&
702  (eta <= 1.+eps))
703  return true;
704 
705  return false;
706  }
707 
708 
709  case TET4:
710  case TET10:
711  case TET14:
712  {
713  // The reference tetrahedral is isosceles
714  // and is bound by xi=0, eta=0, zeta=0,
715  // and xi+eta+zeta=1.
716  if ((xi >= 0.-eps) &&
717  (eta >= 0.-eps) &&
718  (zeta >= 0.-eps) &&
719  ((xi + eta + zeta) <= 1.+eps))
720  return true;
721 
722  return false;
723  }
724 
725 
726  case HEX8:
727  case HEX20:
728  case HEX27:
729  {
730  /*
731  if ((xi >= -1.) &&
732  (xi <= 1.) &&
733  (eta >= -1.) &&
734  (eta <= 1.) &&
735  (zeta >= -1.) &&
736  (zeta <= 1.))
737  return true;
738  */
739 
740  // The reference hexahedral element is [-1,1]^3.
741  if ((xi >= -1.-eps) &&
742  (xi <= 1.+eps) &&
743  (eta >= -1.-eps) &&
744  (eta <= 1.+eps) &&
745  (zeta >= -1.-eps) &&
746  (zeta <= 1.+eps))
747  {
748  // libMesh::out << "Strange Point:\n";
749  // p.print();
750  return true;
751  }
752 
753  return false;
754  }
755 
756  case PRISM6:
757  case PRISM15:
758  case PRISM18:
759  case PRISM20:
760  case PRISM21:
761  {
762  // Figure this one out...
763  // inside the reference triangle with zeta in [-1,1]
764  if ((xi >= 0.-eps) &&
765  (eta >= 0.-eps) &&
766  (zeta >= -1.-eps) &&
767  (zeta <= 1.+eps) &&
768  ((xi + eta) <= 1.+eps))
769  return true;
770 
771  return false;
772  }
773 
774 
775  case PYRAMID5:
776  case PYRAMID13:
777  case PYRAMID14:
778  case PYRAMID18:
779  {
780  // Check that the point is on the same side of all the faces
781  // by testing whether:
782  //
783  // n_i.(x - x_i) <= 0
784  //
785  // for each i, where:
786  // n_i is the outward normal of face i,
787  // x_i is a point on face i.
788  if ((-eta - 1. + zeta <= 0.+eps) &&
789  ( xi - 1. + zeta <= 0.+eps) &&
790  ( eta - 1. + zeta <= 0.+eps) &&
791  ( -xi - 1. + zeta <= 0.+eps) &&
792  ( zeta >= 0.-eps))
793  return true;
794 
795  return false;
796  }
797 
798 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
799  case INFHEX8:
800  case INFHEX16:
801  case INFHEX18:
802  {
803  // The reference infhex8 is a [-1,1]^3.
804  if ((xi >= -1.-eps) &&
805  (xi <= 1.+eps) &&
806  (eta >= -1.-eps) &&
807  (eta <= 1.+eps) &&
808  (zeta >= -1.-eps) &&
809  (zeta <= 1.+eps))
810  {
811  return true;
812  }
813  return false;
814  }
815 
816  case INFPRISM6:
817  case INFPRISM12:
818  {
819  // inside the reference triangle with zeta in [-1,1]
820  if ((xi >= 0.-eps) &&
821  (eta >= 0.-eps) &&
822  (zeta >= -1.-eps) &&
823  (zeta <= 1.+eps) &&
824  ((xi + eta) <= 1.+eps))
825  {
826  return true;
827  }
828 
829  return false;
830  }
831 #endif
832 
833  default:
834  libmesh_error_msg("ERROR: Unknown element type " << Utility::enum_to_string(t));
835  }
836 
837  // If we get here then the point is _not_ in the
838  // reference element. Better return false.
839 
840  return false;
841 }
std::string enum_to_string(const T e)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ print_d2phi()

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

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

Implements libMesh::FEAbstract.

Definition at line 953 of file fe_base.C.

954 {
955  for (auto i : index_range(dphi))
956  for (auto j : index_range(dphi[i]))
957  os << " d2phi[" << i << "][" << j << "]=" << d2phi[i][j];
958 }
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:674
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ print_dphi()

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

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

Implements libMesh::FEAbstract.

Definition at line 895 of file fe_base.C.

896 {
897  for (auto i : index_range(dphi))
898  for (auto j : index_range(dphi[i]))
899  os << " dphi[" << i << "][" << j << "]=" << dphi[i][j];
900 }
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ print_dual_d2phi()

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

Implements libMesh::FEAbstract.

Definition at line 961 of file fe_base.C.

962 {
963  for (auto i : index_range(dual_d2phi))
964  for (auto j : index_range(dual_d2phi[i]))
965  os << " dual_d2phi[" << i << "][" << j << "]=" << dual_d2phi[i][j];
966 }
std::vector< std::vector< OutputTensor > > dual_d2phi
Definition: fe_base.h:675
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ print_dual_dphi()

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

Implements libMesh::FEAbstract.

Definition at line 903 of file fe_base.C.

904 {
905  for (auto i : index_range(dphi))
906  for (auto j : index_range(dphi[i]))
907  os << " dual_dphi[" << i << "][" << j << "]=" << dual_dphi[i][j];
908 }
std::vector< std::vector< OutputGradient > > dual_dphi
Definition: fe_base.h:621
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ print_dual_phi()

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

Implements libMesh::FEAbstract.

Definition at line 884 of file fe_base.C.

885 {
886  for (auto i : index_range(dual_phi))
887  for (auto j : index_range(dual_phi[i]))
888  os << " dual_phi[" << i << "][" << j << "]=" << dual_phi[i][j] << std::endl;
889 }
std::vector< std::vector< OutputShape > > dual_phi
Definition: fe_base.h:615
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ print_info() [1/2]

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

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

Definition at line 81 of file reference_counter.C.

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

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

82 {
84  out_stream << ReferenceCounter::get_info();
85 }
static std::string get_info()
Gets a string containing the reference information.
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

◆ print_info() [2/2]

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

Prints all the relevant information about the current element.

Definition at line 859 of file fe_abstract.C.

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

Referenced by libMesh::operator<<().

860 {
861  os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
862  this->print_phi(os);
863 
864  os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
865  this->print_dphi(os);
866 
867  os << "XYZ locations of the quadrature pts." << std::endl;
868  this->print_xyz(os);
869 
870  os << "Values of JxW at the quadrature pts." << std::endl;
871  this->print_JxW(os);
872 }
virtual void print_phi(std::ostream &os) const =0
Prints the value of each shape function at each quadrature point.
virtual void print_dphi(std::ostream &os) const =0
Prints the value of each shape function&#39;s derivative at each quadrature point.
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).
Definition: fe_abstract.C:853
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
Definition: fe_abstract.C:846

◆ 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 846 of file fe_abstract.C.

References libMesh::FEAbstract::_fe_map.

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

847 {
848  this->_fe_map->print_JxW(os);
849 }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:654

◆ print_phi()

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

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

Implements libMesh::FEAbstract.

Definition at line 876 of file fe_base.C.

877 {
878  for (auto i : index_range(phi))
879  for (auto j : index_range(phi[i]))
880  os << " phi[" << i << "][" << j << "]=" << phi[i][j] << std::endl;
881 }
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:153

◆ 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 853 of file fe_abstract.C.

References libMesh::FEAbstract::_fe_map.

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

854 {
855  this->_fe_map->print_xyz(os);
856 }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:654

◆ 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 120 of file inf_fe.C.

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

123 {
124  libmesh_assert(base_fe.get());
125  libmesh_assert(inf_elem);
126 
127  // checks for consistency of requested calculations,
128  // adds further quantities as needed.
129  this->determine_calculations();
130 
131  if (pts == nullptr)
132  {
133  libmesh_assert(base_fe->qrule);
134  libmesh_assert_equal_to (base_fe->qrule, base_qrule.get());
136 
137  bool init_shape_functions_required = false;
138 
139  // init the radial data fields only when the radial order changes
141  {
143 
144  // Watch out: this call to QBase->init() only works for
145  // current_fe_type = const! To allow variable Order,
146  // the init() of QBase has to be modified...
147  radial_qrule->init(EDGE2);
148 
149  // initialize the radial shape functions
150  this->init_radial_shape_functions(inf_elem);
151 
152  init_shape_functions_required=true;
153  }
154 
155 
156  bool update_base_elem_required=true;
157 
158  // update the type in accordance to the current cell
159  // and reinit if the cell type has changed or (as in
160  // the case of the hierarchics) the shape functions
161  // depend on the particular element and need a reinit
162  if ((Dim != 1) &&
163  ((this->get_type() != inf_elem->type()) ||
164  (base_fe->shapes_need_reinit())))
165  {
166  // store the new element type, update base_elem
167  // here. Through \p update_base_elem_required,
168  // remember whether it has to be updated (see below).
169  this->_elem = inf_elem;
170  this->_elem_type = inf_elem->type();
171  this->update_base_elem(inf_elem);
172  update_base_elem_required=false;
173 
174  // initialize the base quadrature rule for the new element
175  base_qrule->init(*base_elem);
176  init_shape_functions_required=true;
177 
178  }
179  else
180  this->_elem = inf_elem;
181 
182  // computing the reference-to-physical map and coordinates works
183  // only, if we have the current base_elem stored.
184  // This happens when fe_type is const,
185  // the inf_elem->type remains the same. Then we have to
186  // update the base elem _here_.
187  if (update_base_elem_required)
188  this->update_base_elem(inf_elem);
189 
191  // initialize the shape functions in the base
192  base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
193  base_elem.get());
194 
195  // compute the shape functions and map functions of base_fe
196  // before using them later in compute_shape_functions.
197  base_fe->_fe_map->compute_map (base_fe->dim, base_fe->qrule->get_weights(),
198  base_elem.get(), base_fe->calculate_d2phi);
199  base_fe->compute_shape_functions(base_elem.get(), base_fe->qrule->get_points());
200 
201  // when either the radial or base part change,
202  // we have to init the whole fields
203  if (init_shape_functions_required)
204  this->init_shape_functions (radial_qrule->get_points(),
205  base_fe->qrule->get_points(),
206  inf_elem);
207 
208  // Compute the shape functions and the derivatives
209  // at all quadrature points.
210  this->compute_shape_functions (inf_elem,
211  base_fe->qrule->get_points(),
212  radial_qrule->get_points()
213  /* weights are computed inside the function*/
214  );
215  }
216 
217  else // if pts != nullptr
218  {
219  // update the elem
220  this->_elem = inf_elem;
221  this->_elem_type = inf_elem->type();
222 
223  // We'll assume that pts is a tensor product mesh of points.
224  // pts[i] = pts[ angular_index + n_angular_pts * radial_index]
225  // That will handle the pts.size()==1 case that we care about
226  // right now, and it will generalize a bit, and it won't break
227  // the assumptions elsewhere in InfFE.
228  std::vector<Point> radial_pts;
229  if (pts->size() > 0)
230  {
231  Real radius = (*pts)[0](Dim-1);
232  radial_pts.push_back(radius);
233  unsigned int n_radial_pts=1;
234  unsigned int n_angular_pts=1;
235  for (auto p : IntRange<std::size_t>(1, pts->size()))
236  {
237  radius = (*pts)[p](Dim-1);
238  // check for changes of radius: The max. allowed distance is somewhat arbitrary
239  // but the given value should not produce false positives...
240  if (std::abs(radial_pts[n_radial_pts-1](0) - radius) > 1e-4)
241  {
242  // it may change only every n_angular_pts:
243  if (p == (n_radial_pts)*n_angular_pts)
244  {
245  radial_pts.push_back(radius);
246  ++n_radial_pts;
247  }
248  else
249  {
250  libmesh_error_msg("We assumed that the "<<pts->size()
251  <<" points are of tensor-product type with "
252  <<n_radial_pts<<" radial points and "
253  <<n_angular_pts<< " angular points."<<std::endl
254  <<"But apparently point "<<p+1
255  <<" does not fit that scheme: Its radius is "
256  <<radius <<"but should have "
257  <<radial_pts[n_radial_pts*n_angular_pts-p]<<".");
258  //<<radial_pts[p-n_radial_pts*n_angular_pts]<<".");
259  }
260  }
261  // if we are still at the first radial segment,
262  // we consider another angular point
263  else if (n_radial_pts == 1)
264  {
265  ++n_angular_pts;
266  }
267  // if there was repetition but this does not, the assumed
268  // format does not work:
269  }
270  }
271  else
272  {
273  // I don't see any reason to call this function with no points.
274  libmesh_error_msg("Calling reinit() with an empty point list is prohibited.\n");
275  }
276 
277  const std::size_t radial_pts_size = radial_pts.size();
278  const std::size_t base_pts_size = pts->size() / radial_pts_size;
279  // If we're a tensor product we should have no remainder
280  libmesh_assert_equal_to
281  (base_pts_size * radial_pts_size, pts->size());
282 
283 
284  std::vector<Point> base_pts;
285  base_pts.reserve(base_pts_size);
286  for (std::size_t p=0; p != base_pts_size; ++p)
287  {
288  Point pt = (*pts)[p];
289  pt(Dim-1) = 0;
290  base_pts.push_back(pt);
291  }
292 
293  // init radial shapes
294  this->init_radial_shape_functions(inf_elem, &radial_pts);
295 
296  // update the base
297  this->update_base_elem(inf_elem);
298 
299  // the finite element on the ifem base
300  base_fe = FEBase::build(Dim-1, this->fe_type);
301 
302  // having a new base_fe, we need to redetermine the tasks...
303  this->determine_calculations();
304 
305  base_fe->reinit( base_elem.get(), &base_pts);
306 
307  this->init_shape_functions (radial_pts, base_pts, inf_elem);
308 
309  // finally compute the ifem shapes
310  if (weights != nullptr)
311  {
312  this->compute_shape_functions (inf_elem,base_pts,radial_pts);
313  }
314  else
315  {
316  this->compute_shape_functions (inf_elem, base_pts, radial_pts);
317  }
318 
319  }
320 
321  if (this->calculate_dual)
322  libmesh_not_implemented_msg("Dual shape support for infinite elements is "
323  "not currently implemented");
324 }
virtual void determine_calculations() override
Determine which values are to be calculated, for both the FE itself and for the FEMap.
Definition: inf_fe.C:329
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:691
const Real radius
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:972
ElemType get_type() const
Definition: fe_abstract.h:509
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
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.
Definition: inf_fe.C:451
ElemType _elem_type
The element type the current data structures were set up for.
Definition: fe_abstract.h:735
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
libmesh_assert(ctx)
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:1216
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:977
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:387
void compute_shape_functions(const Elem *inf_elem, const std::vector< Point > &base_qp, const std::vector< Point > &radial_qp)
After having updated the jacobian and the transformation from local to global coordinates in FEAbstra...
Definition: inf_fe.C:753
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:696
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
bool calculate_dual
Are we calculating dual basis?
Definition: fe_abstract.h:671
const Elem * _elem
The element the current data structures were set up for.
Definition: fe_abstract.h:740
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:109
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

◆ 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.

After the recent larger changes, this case was not tested. It might work, but maybe it gives wrong results.

Implements libMesh::FEAbstract.

Definition at line 37 of file inf_fe_boundary.C.

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

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  // Build the side of interest
56  const std::unique_ptr<const Elem> side(inf_elem->build_side_ptr(s));
57 
58  // set the element and type
59  this->_elem = inf_elem;
60  this->_elem_type = inf_elem->type();
61 
62  // eventually initialize radial quadrature rule
63  bool radial_qrule_initialized = false;
64 
65  // if we are working on the base-side, the radial function is constant.
66  // With this, we ensure that at least for base elements we reinitialize all quantities
67  // when we enter for the first time.
68  if (s == 0)
70  else
75  libmesh_not_implemented();
76 
78  {
79  if (s > 0)
80  {
82  radial_qrule->init(EDGE2, inf_elem->p_level());
83  }
84  else
85  {
86  // build a new 0-dimensional quadrature-rule:
88  radial_qrule->init(NODEELEM, 0, /*simple_type_only=*/true);
89 
90  //the base_qrule is set up with dim-1, but apparently we need dim, so we replace it:
91  base_qrule=QBase::build(qrule->type(), side->dim(), qrule->get_order());
92 
93  unsigned int side_p_level = inf_elem->p_level();
94  if (inf_elem->neighbor_ptr(s) != nullptr)
95  side_p_level = std::max(side_p_level, inf_elem->neighbor_ptr(s)->p_level());
96  base_qrule->init(*side, side_p_level);
97  }
98  radial_qrule_initialized = true;
99  }
100 
101  // Initialize the face shape functions
102  if (this->get_type() != inf_elem->type() ||
103  base_fe->shapes_need_reinit() ||
104  radial_qrule_initialized)
105  this->init_face_shape_functions (qrule->get_points(), side.get());
106 
107  // The reinit() function computes all what we want except for
108  // - normal, tangents: They are not considered
109  // This is done below:
111 }
ElemType get_type() const
Definition: fe_abstract.h:509
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1191
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:263
ElemType _elem_type
The element type the current data structures were set up for.
Definition: fe_abstract.h:735
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.
virtual QuadratureType type() const =0
void compute_face_functions()
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1206
libmesh_assert(ctx)
Order get_order() const
Definition: quadrature.h:249
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:1216
QBase * qrule
A pointer to the quadrature rule employed.
Definition: fe_abstract.h:762
const std::vector< Point > & get_points() const
Definition: quadrature.h:156
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1185
static std::unique_ptr< QBase > build(std::string_view name, const unsigned int dim, const Order order=INVALID_ORDER)
Builds a specific quadrature rule based on the name string.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
const Elem * _elem
The element the current data structures were set up for.
Definition: fe_abstract.h:740

◆ reinit_default_dual_shape_coeffs()

virtual void libMesh::FEAbstract::reinit_default_dual_shape_coeffs ( const Elem )
inlinevirtualinherited

◆ reinit_dual_shape_coeffs()

virtual void libMesh::FEAbstract::reinit_dual_shape_coeffs ( const Elem ,
const std::vector< Point > &  ,
const std::vector< Real > &   
)
inlinevirtualinherited

This re-computes the dual shape function coefficients using CUSTOMIZED qrule.

The dual shape coefficients are utilized when calculating dual shape functions. This has not been implemented for InfFE

Reimplemented in libMesh::FE< Dim, T >, libMesh::FE< 2, SUBDIVISION >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, L2_RAVIART_THOMAS >, libMesh::FE< Dim, SCALAR >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, L2_LAGRANGE_VEC >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, HIERARCHIC_VEC >, libMesh::FE< Dim, RAVIART_THOMAS >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, L2_HIERARCHIC_VEC >, libMesh::FE< Dim, CLOUGH >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, XYZ >, libMesh::FE< Dim, MONOMIAL_VEC >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, L2_HIERARCHIC >, and libMesh::FE< Dim, LAGRANGE_VEC >.

Definition at line 150 of file fe_abstract.h.

153  {
154  libmesh_error_msg("Customized dual shape coefficient calculation has not been implemented for this FE type.");
155  }

◆ request_dphi()

template<typename OutputType>
virtual void libMesh::FEGenericBase< OutputType >::request_dphi ( ) const
inlineoverridevirtualinherited

request dphi calculations

Implements libMesh::FEAbstract.

Definition at line 238 of file fe_base.h.

239  { get_dphi(); }
const std::vector< std::vector< OutputGradient > > & get_dphi() const
Definition: fe_base.h:230

◆ request_dual_dphi()

template<typename OutputType>
virtual void libMesh::FEGenericBase< OutputType >::request_dual_dphi ( ) const
inlineoverridevirtualinherited

Implements libMesh::FEAbstract.

Definition at line 241 of file fe_base.h.

242  { get_dual_dphi(); }
const std::vector< std::vector< OutputGradient > > & get_dual_dphi() const
Definition: fe_base.h:234

◆ request_dual_phi()

template<typename OutputType>
virtual void libMesh::FEGenericBase< OutputType >::request_dual_phi ( ) const
inlineoverridevirtualinherited

Implements libMesh::FEAbstract.

Definition at line 223 of file fe_base.h.

224  { get_dual_phi(); }
const std::vector< std::vector< OutputShape > > & get_dual_phi() const
Definition: fe_base.h:211

◆ request_phi()

template<typename OutputType>
virtual void libMesh::FEGenericBase< OutputType >::request_phi ( ) const
inlineoverridevirtualinherited

request phi calculations

Implements libMesh::FEAbstract.

Definition at line 220 of file fe_base.h.

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

221  { get_phi(); }
const std::vector< std::vector< OutputShape > > & get_phi() const
Definition: fe_base.h:207

◆ set_calculate_default_dual_coeff()

void libMesh::FEAbstract::set_calculate_default_dual_coeff ( const bool  val)
inlineinherited

set calculate_default_dual_coeff as needed

Definition at line 626 of file fe_abstract.h.

References libMesh::FEAbstract::calculate_default_dual_coeff.

bool calculate_default_dual_coeff
Are we calculating the coefficient for the dual basis using the default qrule?
Definition: fe_abstract.h:676

◆ set_calculate_dual()

void libMesh::FEAbstract::set_calculate_dual ( const bool  val)
inlineinherited

set calculate_dual as needed

Definition at line 621 of file fe_abstract.h.

References libMesh::FEAbstract::calculate_dual.

621 {calculate_dual = val; }
bool calculate_dual
Are we calculating dual basis?
Definition: fe_abstract.h:671

◆ 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 531 of file fe_abstract.h.

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

531 { fe_type.order = new_order; }
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
Definition: fe_type.h:203
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730

◆ shape() [1/3]

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 206 of file inf_fe_static.C.

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::InfFE< Dim, T_radial, T_map >::shape().

210 {
211  libmesh_deprecated();
212 
213  libmesh_assert_not_equal_to (Dim, 0);
214 
215 #ifdef DEBUG
216  // this makes only sense when used for mapping
217  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
218  {
219  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
220  << " return the correct trial function! Use " << std::endl
221  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
222  << std::endl;
223  _warned_for_shape = true;
224  }
225 #endif
226 
227  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
228  const Order o_radial (fet.radial_order);
229  const Real v (p(Dim-1));
230 
231  unsigned int i_base, i_radial;
232  compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
233 
234  //TODO:[SP/DD] exp(ikr) is still missing here!
235  // but is it intended? It would be probably somehow nice, but than it would be Number, not Real !
236  // --> thus it would destroy the interface...
237  if (Dim > 1)
238  return FEInterface::shape(Dim-1, fet, base_et, i_base, p)
239  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
240  * InfFERadial::decay(Dim,v);
241  else
242  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
243  * InfFERadial::decay(Dim,v);
244 }
OStreamProxy err
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static bool _warned_for_shape
Definition: inf_fe.h:1242
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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:761
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)

◆ shape() [2/3]

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 250 of file inf_fe_static.C.

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, and libMesh::FEInterface::shape().

254 {
255  libmesh_assert(inf_elem);
256  libmesh_assert_not_equal_to (Dim, 0);
257 
258 #ifdef DEBUG
259  // this makes only sense when used for mapping
260  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
261  {
262  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
263  << " return the correct trial function! Use " << std::endl
264  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
265  << std::endl;
266  _warned_for_shape = true;
267  }
268 #endif
269 
270  const Order o_radial (fet.radial_order);
271  const Real v (p(Dim-1));
272  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
273 
274  unsigned int i_base, i_radial;
275  compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
276 
277  if (Dim > 1)
278  return FEInterface::shape(fet, base_el.get(), i_base, p)
279  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
280  * InfFERadial::decay(Dim,v);
281  else
282  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
283  * InfFERadial::decay(Dim,v);
284 }
OStreamProxy err
static bool _warned_for_shape
Definition: inf_fe.h:1242
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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:761
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)

◆ shape() [3/3]

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,
const bool  add_p_level 
)
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 289 of file inf_fe_static.C.

References libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::InfFE< Dim, T_radial, T_map >::shape().

294 {
295  if (add_p_level)
296  {
297  FEType tmp_fet=fet;
298  tmp_fet = fet.order + add_p_level * inf_elem->p_level();
299  return InfFE<Dim,T_radial,T_map>::shape(tmp_fet, inf_elem, i, p);
300  }
301  return InfFE<Dim,T_radial,T_map>::shape(fet, inf_elem, i, p);
302 }
static Real shape(const FEType &fet, const ElemType t, const unsigned int i, const Point &p)

◆ shape_deriv() [1/3]

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 354 of file inf_fe_static.C.

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(), and libMesh::FEInterface::shape_deriv().

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

359 {
360  libmesh_assert_not_equal_to (Dim, 0);
361  libmesh_assert_greater (Dim,j);
362 #ifdef DEBUG
363  // this makes only sense when used for mapping
364  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
365  {
366  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
367  << " return the correct trial function gradients! Use " << std::endl
368  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
369  << std::endl;
370  _warned_for_dshape = true;
371  }
372 #endif
373  const Order o_radial (fe_t.radial_order);
374  const Real v (p(Dim-1));
375 
376  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
377 
378  unsigned int i_base, i_radial;
379 
380  if ((-1. > v ) || (v > 1.))
381  {
382  //TODO: This is for debugging. We should never come here.
383  // Therefore we can do very useless things then:
384  i_base=0;
385  }
386  compute_shape_indices(fe_t, inf_elem, i, i_base, i_radial);
387 
388  if (j== Dim -1)
389  {
390  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
391  * InfFERadial::decay(Dim,v)
392  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
393  * InfFERadial::decay_deriv(Dim,v);
394 
395  return FEInterface::shape(fe_t, base_el.get(), i_base, p)*RadialDeriv;
396  }
397  return FEInterface::shape_deriv(fe_t, base_el.get(), i_base, j, p)
398  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
399  * InfFERadial::decay(Dim,v);
400 }
OStreamProxy err
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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)
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1292
static bool _warned_for_dshape
Definition: inf_fe.h:1243
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:761
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)

◆ shape_deriv() [2/3]

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,
const bool  add_p_level 
)
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 588 of file inf_fe_static.C.

References libMesh::FEType::order, libMesh::Elem::p_level(), and libMesh::InfFE< Dim, T_radial, T_map >::shape_deriv().

594 {
595  if (add_p_level)
596  {
597  FEType tmp_fet=fet;
598  tmp_fet = fet.order + add_p_level * inf_elem->p_level();
599  return InfFE<Dim,T_radial,T_map>::shape_deriv(tmp_fet, inf_elem, i, j, p);
600  }
601  return InfFE<Dim,T_radial,T_map>::shape_deriv(fet, inf_elem, i, j, p);
602 }
static Real shape_deriv(const FEType &fet, const Elem *inf_elem, const unsigned int i, const unsigned int j, const Point &p)

◆ shape_deriv() [3/3]

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 307 of file inf_fe_static.C.

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().

312 {
313  libmesh_deprecated();
314 
315  libmesh_assert_not_equal_to (Dim, 0);
316  libmesh_assert_greater (Dim,j);
317 #ifdef DEBUG
318  // this makes only sense when used for mapping
319  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
320  {
321  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
322  << " return the correct trial function gradients! Use " << std::endl
323  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
324  << std::endl;
325  _warned_for_dshape = true;
326  }
327 #endif
328 
329  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
330  const Order o_radial (fe_t.radial_order);
331  const Real v (p(Dim-1));
332 
333  unsigned int i_base, i_radial;
334  compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
335 
336  if (j== Dim -1)
337  {
338  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
339  * InfFERadial::decay(Dim,v)
340  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
341  * InfFERadial::decay_deriv(Dim, v);
342 
343  return FEInterface::shape(Dim-1, fe_t, base_et, i_base, p)*RadialDeriv;
344  }
345 
346  return FEInterface::shape_deriv(Dim-1, fe_t, base_et, i_base, j, p)
347  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
348  * InfFERadial::decay(Dim,v);
349 }
OStreamProxy err
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
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)
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1292
static bool _warned_for_dshape
Definition: inf_fe.h:1243
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:761
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1266
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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)

◆ 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 1121 of file inf_fe.C.

1122 {
1123  // We never call this.
1124  libmesh_not_implemented();
1125  return false;
1126 }

◆ 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 526 of file inf_fe.h.

531  {
532  libmesh_not_implemented();
533  }

◆ 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 109 of file inf_fe.C.

References libMesh::InfFEBase::build_elem().

110 {
111  base_elem = InfFEBase::build_elem(inf_elem);
112 }
static std::unique_ptr< const Elem > build_elem(const Elem *inf_elem)
Build the base element of an infinite element.
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1198

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 1253 of file inf_fe.h.

◆ InfFEMap

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

Definition at line 1255 of file inf_fe.h.

Member Data Documentation

◆ _add_p_level_in_reinit

bool libMesh::FEAbstract::_add_p_level_in_reinit
protectedinherited

Whether to add p-refinement levels in init/reinit methods.

Definition at line 787 of file fe_abstract.h.

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

◆ _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 1145 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 1165 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 1233 of file inf_fe.h.

◆ _counts

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

Actually holds the data.

Definition at line 124 of file reference_counter.h.

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

◆ _elem

const Elem* libMesh::FEAbstract::_elem
protectedinherited

The element the current data structures were set up for.

Definition at line 740 of file fe_abstract.h.

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

◆ _elem_p_level

unsigned int libMesh::FEAbstract::_elem_p_level
protectedinherited

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

Note that this is different from _p_level which is the p-refinement level this finite elment object is operating at, e.g. how many dofs per elem, etc. On the other hand, this data member can indicate things like the order of the quadrature rule. We will use this primarily to determine whether cached data is still valid

Definition at line 751 of file fe_abstract.h.

◆ _elem_type

ElemType libMesh::FEAbstract::_elem_type
protectedinherited

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

Definition at line 735 of file fe_abstract.h.

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

◆ _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 143 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 609 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 137 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 132 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 1173 of file inf_fe.h.

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

◆ _n_total_qp

unsigned int libMesh::FEAbstract::_n_total_qp
protectedinherited

The total number of quadrature points for the current configuration.

Definition at line 774 of file fe_abstract.h.

Referenced by libMesh::FEAbstract::n_quadrature_points(), and 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 757 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 1135 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 1155 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 1179 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 1243 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 1241 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 1242 of file inf_fe.h.

◆ base_elem

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

The "base" (aka non-infinite) element associated with the current infinite element.

We treat is as const since the InfFE should not have to modify the geometric Elem in order to do its calculations.

Definition at line 1198 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 1206 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 1185 of file inf_fe.h.

◆ calculate_curl_phi

bool libMesh::FEAbstract::calculate_curl_phi
mutableprotectedinherited

◆ 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 705 of file fe_abstract.h.

◆ calculate_default_dual_coeff

bool libMesh::FEAbstract::calculate_default_dual_coeff
mutableprotectedinherited

Are we calculating the coefficient for the dual basis using the default qrule?

Definition at line 676 of file fe_abstract.h.

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

◆ calculate_div_phi

bool libMesh::FEAbstract::calculate_div_phi
mutableprotectedinherited

◆ calculate_dphi

bool libMesh::FEAbstract::calculate_dphi
mutableprotectedinherited

◆ calculate_dphi_scaled

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::calculate_dphi_scaled
mutableprotected

◆ calculate_dphiref

bool libMesh::FEAbstract::calculate_dphiref
mutableprotectedinherited

Should we calculate reference shape function gradients?

Definition at line 722 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_dual_d2phi(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_dphi().

◆ calculate_dual

bool libMesh::FEAbstract::calculate_dual
mutableprotectedinherited

◆ calculate_jxw

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::calculate_jxw
mutableprotected

Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst stability.

Definition at line 990 of file inf_fe.h.

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

◆ calculate_map

bool libMesh::FEAbstract::calculate_map
mutableprotectedinherited

Are we calculating mapping functions?

Definition at line 686 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::calculating_nothing(), libMesh::FEAbstract::get_curvatures(), libMesh::InfFE< Dim, T_radial, T_map >::get_curvatures(), libMesh::FEAbstract::get_d2xyzdeta2(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdeta2(), libMesh::FEAbstract::get_d2xyzdetadzeta(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdetadzeta(), libMesh::FEAbstract::get_d2xyzdxi2(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxi2(), libMesh::FEAbstract::get_d2xyzdxideta(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxideta(), libMesh::FEAbstract::get_d2xyzdxidzeta(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdxidzeta(), libMesh::FEAbstract::get_d2xyzdzeta2(), libMesh::InfFE< Dim, T_radial, T_map >::get_d2xyzdzeta2(), libMesh::FEAbstract::get_detadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_detadx(), libMesh::FEAbstract::get_detady(), libMesh::InfFE< Dim, T_radial, T_map >::get_detady(), libMesh::FEAbstract::get_detadz(), libMesh::InfFE< Dim, T_radial, T_map >::get_detadz(), libMesh::FEAbstract::get_dxidx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidx(), libMesh::FEAbstract::get_dxidy(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidy(), libMesh::FEAbstract::get_dxidz(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidz(), libMesh::FEAbstract::get_dxyzdeta(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdeta(), libMesh::FEAbstract::get_dxyzdxi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdxi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxyzdzeta(), libMesh::FEAbstract::get_dzetadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadx(), libMesh::FEAbstract::get_dzetady(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetady(), libMesh::FEAbstract::get_dzetadz(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadz(), libMesh::FEAbstract::get_JxW(), libMesh::FEAbstract::get_normals(), libMesh::InfFE< Dim, T_radial, T_map >::get_normals(), libMesh::FEAbstract::get_tangents(), libMesh::InfFE< Dim, T_radial, T_map >::get_tangents(), and libMesh::FEAbstract::get_xyz().

◆ calculate_map_scaled

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::calculate_map_scaled
mutableprotected

Are we calculating scaled mapping functions?

Definition at line 967 of file inf_fe.h.

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

◆ calculate_nothing

bool libMesh::FEAbstract::calculate_nothing
mutableprotectedinherited

Are we potentially deliberately calculating nothing?

Definition at line 681 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::calculating_nothing(), and libMesh::FEAbstract::get_nothing().

◆ calculate_phi

bool libMesh::FEAbstract::calculate_phi
mutableprotectedinherited

◆ calculate_phi_scaled

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::calculate_phi_scaled
mutableprotected

Are we calculating scaled shape functions?

Definition at line 972 of file inf_fe.h.

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

◆ calculate_xyz

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
bool libMesh::InfFE< Dim, T_radial, T_map >::calculate_xyz
mutableprotected

Are we calculating the positions of quadrature points?

Definition at line 983 of file inf_fe.h.

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

◆ 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 666 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::InfFE< Dim, T_radial, T_map >::get_detadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_detady(), libMesh::InfFE< Dim, T_radial, T_map >::get_detadz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decay(), libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decayxR(), 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_dual_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_phi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidy(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidz(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetady(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadz(), libMesh::InfFE< Dim, T_radial, T_map >::get_JxW(), libMesh::InfFE< Dim, T_radial, T_map >::get_JxWxdecay_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_normals(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), libMesh::InfFE< Dim, T_radial, T_map >::get_phi_over_decayxR(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweightxR_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weightxR_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_tangents(), and libMesh::InfFE< Dim, T_radial, T_map >::get_xyz().

◆ 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 631 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 1216 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 674 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 695 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 700 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 710 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 715 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 720 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 680 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 685 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 690 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 725 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 730 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 735 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 705 of file fe_base.h.

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

◆ detadx_map

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

Definition at line 1092 of file inf_fe.h.

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

◆ detadx_map_scaled

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

Definition at line 1104 of file inf_fe.h.

◆ detady_map

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

Definition at line 1093 of file inf_fe.h.

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

◆ detady_map_scaled

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

Definition at line 1105 of file inf_fe.h.

◆ detadz_map

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

Definition at line 1094 of file inf_fe.h.

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

◆ detadz_map_scaled

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

Definition at line 1106 of file inf_fe.h.

◆ dim

const unsigned int libMesh::FEAbstract::dim
protectedinherited

The dimensionality of the object.

Definition at line 660 of file fe_abstract.h.

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

◆ 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 636 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 1083 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 753 of file fe_base.h.

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

◆ dphi

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

Shape function derivative values.

Definition at line 620 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 646 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 656 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 641 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 661 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 666 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 651 of file fe_base.h.

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

◆ dphixr

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

◆ dphixr_sq

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

◆ 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 1071 of file inf_fe.h.

◆ dual_coeff

template<typename OutputType>
DenseMatrix<Real> libMesh::FEGenericBase< OutputType >::dual_coeff
mutableprotectedinherited

Coefficient matrix for the dual basis.

Definition at line 626 of file fe_base.h.

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

◆ dual_d2phi

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

◆ dual_dphi

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

◆ dual_phi

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

◆ 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 760 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_dweight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweight(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_dweightxR_sq().

◆ 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 1055 of file inf_fe.h.

◆ dweightxr_sq

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

◆ dxidx_map

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

Definition at line 1089 of file inf_fe.h.

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

◆ dxidx_map_scaled

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

Definition at line 1101 of file inf_fe.h.

◆ dxidy_map

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

Definition at line 1090 of file inf_fe.h.

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

◆ dxidy_map_scaled

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

Definition at line 1102 of file inf_fe.h.

◆ dxidz_map

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

Definition at line 1091 of file inf_fe.h.

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

◆ dxidz_map_scaled

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

Definition at line 1103 of file inf_fe.h.

◆ dzetadx_map

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

Definition at line 1095 of file inf_fe.h.

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

◆ dzetadx_map_scaled

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

Definition at line 1107 of file inf_fe.h.

◆ dzetady_map

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

Definition at line 1096 of file inf_fe.h.

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

◆ dzetady_map_scaled

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

Definition at line 1108 of file inf_fe.h.

◆ dzetadz_map

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

Definition at line 1097 of file inf_fe.h.

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

◆ dzetadz_map_scaled

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

Definition at line 1109 of file inf_fe.h.

◆ fe_type

FEType libMesh::FEAbstract::fe_type
protectedinherited

◆ JxW

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

Definition at line 1120 of file inf_fe.h.

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

◆ JxWxdecay

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

Definition at line 1119 of file inf_fe.h.

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

◆ 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 1077 of file inf_fe.h.

◆ normals

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

Definition at line 1122 of file inf_fe.h.

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

◆ phi

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

Shape function values.

Definition at line 614 of file fe_base.h.

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

◆ phixr

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

◆ qrule

QBase* libMesh::FEAbstract::qrule
protectedinherited

A pointer to the quadrature rule employed.

Definition at line 762 of file fe_abstract.h.

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

◆ 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 1191 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 768 of file fe_abstract.h.

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

◆ 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 1066 of file inf_fe.h.

◆ tangents

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

Definition at line 1123 of file inf_fe.h.

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

◆ 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 767 of file fe_base.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_weight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weight(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_weightxR_sq().

◆ weightxr_sq

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

◆ xyz

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

Physical quadrature points.

Usually, this is obtained from the FEMap class, but here FEMap does not know enough to compute it.

Definition at line 1046 of file inf_fe.h.

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


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