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_shape_functions (const FEType &fet, const ElemType t)
 
static unsigned int n_dofs (const FEType &fet, const ElemType inf_elem_type)
 
static unsigned int n_dofs (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:984
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:989
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition: inf_fe.h:1000
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:1007
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1223
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:275
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:1233
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994
FEGenericBase< Real > FEBase
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1190
FEFamily radial_family
The type of approximation in radial direction.
Definition: fe_type.h:267
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:54

◆ 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:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1223
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:1202
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_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::PatchRecoveryErrorEstimator::EstimateError::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, 1 >::setUp(), FETest< order, family, elem_type >::testCustomReinit(), 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:221
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:221
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:275
FEFamily radial_family
The type of approximation in radial direction.
Definition: fe_type.h:267
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 1012 of file fe_base.C.

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

1018 {
1019  // Side/edge local DOF indices
1020  std::vector<unsigned int> new_side_dofs, old_side_dofs;
1021 
1022  // FIXME: what about 2D shells in 3D space?
1023  unsigned int dim = elem->dim();
1024 
1025  // Cache n_children(); it's a virtual call but it's const.
1026  const unsigned int n_children = elem->n_children();
1027 
1028  // We use local FE objects for now
1029  // FIXME: we should use more, external objects instead for efficiency
1030  const FEType & base_fe_type = dof_map.variable_type(var);
1031  std::unique_ptr<FEGenericBase<OutputShape>> fe
1032  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
1033  std::unique_ptr<FEGenericBase<OutputShape>> fe_coarse
1034  (FEGenericBase<OutputShape>::build(dim, base_fe_type));
1035 
1036  std::unique_ptr<QBase> qrule (base_fe_type.default_quadrature_rule(dim));
1037  std::unique_ptr<QBase> qedgerule (base_fe_type.default_quadrature_rule(1));
1038  std::unique_ptr<QBase> qsiderule (base_fe_type.default_quadrature_rule(dim-1));
1039  std::vector<Point> coarse_qpoints;
1040 
1041  // The values of the shape functions at the quadrature
1042  // points
1043  const std::vector<std::vector<OutputShape>> & phi_values =
1044  fe->get_phi();
1045  const std::vector<std::vector<OutputShape>> & phi_coarse =
1046  fe_coarse->get_phi();
1047 
1048  // The gradients of the shape functions at the quadrature
1049  // points on the child element.
1050  const std::vector<std::vector<OutputGradient>> * dphi_values =
1051  nullptr;
1052  const std::vector<std::vector<OutputGradient>> * dphi_coarse =
1053  nullptr;
1054 
1055  const FEContinuity cont = fe->get_continuity();
1056 
1057  if (cont == C_ONE)
1058  {
1059  const std::vector<std::vector<OutputGradient>> &
1060  ref_dphi_values = fe->get_dphi();
1061  dphi_values = &ref_dphi_values;
1062  const std::vector<std::vector<OutputGradient>> &
1063  ref_dphi_coarse = fe_coarse->get_dphi();
1064  dphi_coarse = &ref_dphi_coarse;
1065  }
1066 
1067  // The Jacobian * quadrature weight at the quadrature points
1068  const std::vector<Real> & JxW =
1069  fe->get_JxW();
1070 
1071  // The XYZ locations of the quadrature points on the
1072  // child element
1073  const std::vector<Point> & xyz_values =
1074  fe->get_xyz();
1075 
1076  // Number of nodes on parent element
1077  const unsigned int n_nodes = elem->n_nodes();
1078 
1079  // Number of dofs on parent element
1080  const unsigned int new_n_dofs =
1081  FEInterface::n_dofs(base_fe_type, elem->max_descendant_p_level(), elem);
1082 
1083  // Fixed vs. free DoFs on edge/face projections
1084  std::vector<char> dof_is_fixed(new_n_dofs, false); // bools
1085  std::vector<int> free_dof(new_n_dofs, 0);
1086 
1087  DenseMatrix<Real> Ke;
1089  Ue.resize(new_n_dofs); Ue.zero();
1090 
1091 
1092  // When coarsening, in general, we need a series of
1093  // projections to ensure a unique and continuous
1094  // solution. We start by interpolating nodes, then
1095  // hold those fixed and project edges, then
1096  // hold those fixed and project faces, then
1097  // hold those fixed and project interiors
1098 
1099  // Copy node values first
1100  {
1101  std::vector<dof_id_type> node_dof_indices;
1102  if (use_old_dof_indices)
1103  dof_map.old_dof_indices (elem, node_dof_indices, var);
1104  else
1105  dof_map.dof_indices (elem, node_dof_indices, var);
1106 
1107  unsigned int current_dof = 0;
1108  for (unsigned int n=0; n!= n_nodes; ++n)
1109  {
1110  // FIXME: this should go through the DofMap,
1111  // not duplicate dof_indices code badly!
1112  const unsigned int my_nc =
1113  FEInterface::n_dofs_at_node (base_fe_type, elem->max_descendant_p_level(), elem, n);
1114  if (!elem->is_vertex(n))
1115  {
1116  current_dof += my_nc;
1117  continue;
1118  }
1119 
1120  // We're assuming here that child n shares vertex n,
1121  // which is wrong on non-simplices right now
1122  // ... but this code isn't necessary except on elements
1123  // where p refinement creates more vertex dofs; we have
1124  // no such elements yet.
1125  int extra_order = 0;
1126  // if (elem->child_ptr(n)->p_level() < elem->p_level())
1127  // extra_order = elem->child_ptr(n)->p_level();
1128  const unsigned int nc =
1129  FEInterface::n_dofs_at_node (base_fe_type, extra_order, elem, n);
1130  for (unsigned int i=0; i!= nc; ++i)
1131  {
1132  Ue(current_dof) =
1133  old_vector(node_dof_indices[current_dof]);
1134  dof_is_fixed[current_dof] = true;
1135  current_dof++;
1136  }
1137  }
1138  }
1139 
1140  FEType fe_type = base_fe_type, temp_fe_type;
1141  fe_type.order = fe_type.order + elem->max_descendant_p_level();
1142 
1143  // In 3D, project any edge values next
1144  if (dim > 2 && cont != DISCONTINUOUS)
1145  for (auto e : elem->edge_index_range())
1146  {
1148  e, new_side_dofs);
1149 
1150  const unsigned int n_new_side_dofs =
1151  cast_int<unsigned int>(new_side_dofs.size());
1152 
1153  // Some edge dofs are on nodes and already
1154  // fixed, others are free to calculate
1155  unsigned int free_dofs = 0;
1156  for (unsigned int i=0; i != n_new_side_dofs; ++i)
1157  if (!dof_is_fixed[new_side_dofs[i]])
1158  free_dof[free_dofs++] = i;
1159  Ke.resize (free_dofs, free_dofs); Ke.zero();
1160  Fe.resize (free_dofs); Fe.zero();
1161  // The new edge coefficients
1162  DenseVector<Number> Uedge(free_dofs);
1163 
1164  // Add projection terms from each child sharing
1165  // this edge
1166  for (unsigned int c=0; c != n_children; ++c)
1167  {
1168  if (!elem->is_child_on_edge(c,e))
1169  continue;
1170  const Elem * child = elem->child_ptr(c);
1171 
1172  std::vector<dof_id_type> child_dof_indices;
1173  if (use_old_dof_indices)
1174  dof_map.old_dof_indices (child,
1175  child_dof_indices, var);
1176  else
1177  dof_map.dof_indices (child,
1178  child_dof_indices, var);
1179  const unsigned int child_n_dofs =
1180  cast_int<unsigned int>
1181  (child_dof_indices.size());
1182 
1183  temp_fe_type = base_fe_type;
1184  temp_fe_type.order = temp_fe_type.order + child->p_level();
1185 
1187  temp_fe_type, e, old_side_dofs);
1188 
1189  // Initialize both child and parent FE data
1190  // on the child's edge
1191  fe->attach_quadrature_rule (qedgerule.get());
1192  fe->edge_reinit (child, e);
1193  const unsigned int n_qp = qedgerule->n_points();
1194 
1195  FEMap::inverse_map (dim, elem, xyz_values,
1196  coarse_qpoints);
1197 
1198  fe_coarse->reinit(elem, &coarse_qpoints);
1199 
1200  // Loop over the quadrature points
1201  for (unsigned int qp=0; qp<n_qp; qp++)
1202  {
1203  // solution value at the quadrature point
1204  OutputNumber fineval = libMesh::zero;
1205  // solution grad at the quadrature point
1206  OutputNumberGradient finegrad;
1207 
1208  // Sum the solution values * the DOF
1209  // values at the quadrature point to
1210  // get the solution value and gradient.
1211  for (unsigned int i=0; i<child_n_dofs;
1212  i++)
1213  {
1214  fineval +=
1215  (old_vector(child_dof_indices[i])*
1216  phi_values[i][qp]);
1217  if (cont == C_ONE)
1218  finegrad += (*dphi_values)[i][qp] *
1219  old_vector(child_dof_indices[i]);
1220  }
1221 
1222  // Form edge projection matrix
1223  for (unsigned int sidei=0, freei=0; sidei != n_new_side_dofs; ++sidei)
1224  {
1225  unsigned int i = new_side_dofs[sidei];
1226  // fixed DoFs aren't test functions
1227  if (dof_is_fixed[i])
1228  continue;
1229  for (unsigned int sidej=0, freej=0; sidej != n_new_side_dofs; ++sidej)
1230  {
1231  unsigned int j =
1232  new_side_dofs[sidej];
1233  if (dof_is_fixed[j])
1234  Fe(freei) -=
1235  TensorTools::inner_product(phi_coarse[i][qp],
1236  phi_coarse[j][qp]) *
1237  JxW[qp] * Ue(j);
1238  else
1239  Ke(freei,freej) +=
1240  TensorTools::inner_product(phi_coarse[i][qp],
1241  phi_coarse[j][qp]) *
1242  JxW[qp];
1243  if (cont == C_ONE)
1244  {
1245  if (dof_is_fixed[j])
1246  Fe(freei) -=
1247  TensorTools::inner_product((*dphi_coarse)[i][qp],
1248  (*dphi_coarse)[j][qp]) *
1249  JxW[qp] * Ue(j);
1250  else
1251  Ke(freei,freej) +=
1252  TensorTools::inner_product((*dphi_coarse)[i][qp],
1253  (*dphi_coarse)[j][qp]) *
1254  JxW[qp];
1255  }
1256  if (!dof_is_fixed[j])
1257  freej++;
1258  }
1259  Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp],
1260  fineval) * JxW[qp];
1261  if (cont == C_ONE)
1262  Fe(freei) +=
1263  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1264  freei++;
1265  }
1266  }
1267  }
1268  Ke.cholesky_solve(Fe, Uedge);
1269 
1270  // Transfer new edge solutions to element
1271  for (unsigned int i=0; i != free_dofs; ++i)
1272  {
1273  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1274  libmesh_assert(std::abs(ui) < TOLERANCE ||
1275  std::abs(ui - Uedge(i)) < TOLERANCE);
1276  ui = Uedge(i);
1277  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1278  }
1279  }
1280 
1281  // Project any side values (edges in 2D, faces in 3D)
1282  if (dim > 1 && cont != DISCONTINUOUS)
1283  for (auto s : elem->side_index_range())
1284  {
1286  s, new_side_dofs);
1287 
1288  const unsigned int n_new_side_dofs =
1289  cast_int<unsigned int>(new_side_dofs.size());
1290 
1291  // Some side dofs are on nodes/edges and already
1292  // fixed, others are free to calculate
1293  unsigned int free_dofs = 0;
1294  for (unsigned int i=0; i != n_new_side_dofs; ++i)
1295  if (!dof_is_fixed[new_side_dofs[i]])
1296  free_dof[free_dofs++] = i;
1297  Ke.resize (free_dofs, free_dofs); Ke.zero();
1298  Fe.resize (free_dofs); Fe.zero();
1299  // The new side coefficients
1300  DenseVector<Number> Uside(free_dofs);
1301 
1302  // Add projection terms from each child sharing
1303  // this side
1304  for (unsigned int c=0; c != n_children; ++c)
1305  {
1306  if (!elem->is_child_on_side(c,s))
1307  continue;
1308  const Elem * child = elem->child_ptr(c);
1309 
1310  std::vector<dof_id_type> child_dof_indices;
1311  if (use_old_dof_indices)
1312  dof_map.old_dof_indices (child,
1313  child_dof_indices, var);
1314  else
1315  dof_map.dof_indices (child,
1316  child_dof_indices, var);
1317  const unsigned int child_n_dofs =
1318  cast_int<unsigned int>
1319  (child_dof_indices.size());
1320 
1321  temp_fe_type = base_fe_type;
1322  temp_fe_type.order = temp_fe_type.order + child->p_level();
1323 
1325  temp_fe_type, s, old_side_dofs);
1326 
1327  // Initialize both child and parent FE data
1328  // on the child's side
1329  fe->attach_quadrature_rule (qsiderule.get());
1330  fe->reinit (child, s);
1331  const unsigned int n_qp = qsiderule->n_points();
1332 
1333  FEMap::inverse_map (dim, elem, xyz_values,
1334  coarse_qpoints);
1335 
1336  fe_coarse->reinit(elem, &coarse_qpoints);
1337 
1338  // Loop over the quadrature points
1339  for (unsigned int qp=0; qp<n_qp; qp++)
1340  {
1341  // solution value at the quadrature point
1342  OutputNumber fineval = libMesh::zero;
1343  // solution grad at the quadrature point
1344  OutputNumberGradient finegrad;
1345 
1346  // Sum the solution values * the DOF
1347  // values at the quadrature point to
1348  // get the solution value and gradient.
1349  for (unsigned int i=0; i<child_n_dofs;
1350  i++)
1351  {
1352  fineval +=
1353  old_vector(child_dof_indices[i]) *
1354  phi_values[i][qp];
1355  if (cont == C_ONE)
1356  finegrad += (*dphi_values)[i][qp] *
1357  old_vector(child_dof_indices[i]);
1358  }
1359 
1360  // Form side projection matrix
1361  for (unsigned int sidei=0, freei=0; sidei != n_new_side_dofs; ++sidei)
1362  {
1363  unsigned int i = new_side_dofs[sidei];
1364  // fixed DoFs aren't test functions
1365  if (dof_is_fixed[i])
1366  continue;
1367  for (unsigned int sidej=0, freej=0; sidej != n_new_side_dofs; ++sidej)
1368  {
1369  unsigned int j =
1370  new_side_dofs[sidej];
1371  if (dof_is_fixed[j])
1372  Fe(freei) -=
1373  TensorTools::inner_product(phi_coarse[i][qp],
1374  phi_coarse[j][qp]) *
1375  JxW[qp] * Ue(j);
1376  else
1377  Ke(freei,freej) +=
1378  TensorTools::inner_product(phi_coarse[i][qp],
1379  phi_coarse[j][qp]) *
1380  JxW[qp];
1381  if (cont == C_ONE)
1382  {
1383  if (dof_is_fixed[j])
1384  Fe(freei) -=
1385  TensorTools::inner_product((*dphi_coarse)[i][qp],
1386  (*dphi_coarse)[j][qp]) *
1387  JxW[qp] * Ue(j);
1388  else
1389  Ke(freei,freej) +=
1390  TensorTools::inner_product((*dphi_coarse)[i][qp],
1391  (*dphi_coarse)[j][qp]) *
1392  JxW[qp];
1393  }
1394  if (!dof_is_fixed[j])
1395  freej++;
1396  }
1397  Fe(freei) += TensorTools::inner_product(fineval, phi_coarse[i][qp]) * JxW[qp];
1398  if (cont == C_ONE)
1399  Fe(freei) +=
1400  TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1401  freei++;
1402  }
1403  }
1404  }
1405  Ke.cholesky_solve(Fe, Uside);
1406 
1407  // Transfer new side solutions to element
1408  for (unsigned int i=0; i != free_dofs; ++i)
1409  {
1410  Number & ui = Ue(new_side_dofs[free_dof[i]]);
1411  libmesh_assert(std::abs(ui) < TOLERANCE ||
1412  std::abs(ui - Uside(i)) < TOLERANCE);
1413  ui = Uside(i);
1414  dof_is_fixed[new_side_dofs[free_dof[i]]] = true;
1415  }
1416  }
1417 
1418  // Project the interior values, finally
1419 
1420  // Some interior dofs are on nodes/edges/sides and
1421  // already fixed, others are free to calculate
1422  unsigned int free_dofs = 0;
1423  for (unsigned int i=0; i != new_n_dofs; ++i)
1424  if (!dof_is_fixed[i])
1425  free_dof[free_dofs++] = i;
1426  Ke.resize (free_dofs, free_dofs); Ke.zero();
1427  Fe.resize (free_dofs); Fe.zero();
1428  // The new interior coefficients
1429  DenseVector<Number> Uint(free_dofs);
1430 
1431  // Add projection terms from each child
1432  for (auto & child : elem->child_ref_range())
1433  {
1434  std::vector<dof_id_type> child_dof_indices;
1435  if (use_old_dof_indices)
1436  dof_map.old_dof_indices (&child,
1437  child_dof_indices, var);
1438  else
1439  dof_map.dof_indices (&child,
1440  child_dof_indices, var);
1441  const unsigned int child_n_dofs =
1442  cast_int<unsigned int>
1443  (child_dof_indices.size());
1444 
1445  // Initialize both child and parent FE data
1446  // on the child's quadrature points
1447  fe->attach_quadrature_rule (qrule.get());
1448  fe->reinit (&child);
1449  const unsigned int n_qp = qrule->n_points();
1450 
1451  FEMap::inverse_map (dim, elem, xyz_values, coarse_qpoints);
1452 
1453  fe_coarse->reinit(elem, &coarse_qpoints);
1454 
1455  // Loop over the quadrature points
1456  for (unsigned int qp=0; qp<n_qp; qp++)
1457  {
1458  // solution value at the quadrature point
1459  OutputNumber fineval = libMesh::zero;
1460  // solution grad at the quadrature point
1461  OutputNumberGradient finegrad;
1462 
1463  // Sum the solution values * the DOF
1464  // values at the quadrature point to
1465  // get the solution value and gradient.
1466  for (unsigned int i=0; i<child_n_dofs; i++)
1467  {
1468  fineval +=
1469  (old_vector(child_dof_indices[i]) *
1470  phi_values[i][qp]);
1471  if (cont == C_ONE)
1472  finegrad += (*dphi_values)[i][qp] *
1473  old_vector(child_dof_indices[i]);
1474  }
1475 
1476  // Form interior projection matrix
1477  for (unsigned int i=0, freei=0;
1478  i != new_n_dofs; ++i)
1479  {
1480  // fixed DoFs aren't test functions
1481  if (dof_is_fixed[i])
1482  continue;
1483  for (unsigned int j=0, freej=0; j !=
1484  new_n_dofs; ++j)
1485  {
1486  if (dof_is_fixed[j])
1487  Fe(freei) -=
1488  TensorTools::inner_product(phi_coarse[i][qp],
1489  phi_coarse[j][qp]) *
1490  JxW[qp] * Ue(j);
1491  else
1492  Ke(freei,freej) +=
1493  TensorTools::inner_product(phi_coarse[i][qp],
1494  phi_coarse[j][qp]) *
1495  JxW[qp];
1496  if (cont == C_ONE)
1497  {
1498  if (dof_is_fixed[j])
1499  Fe(freei) -=
1500  TensorTools::inner_product((*dphi_coarse)[i][qp],
1501  (*dphi_coarse)[j][qp]) *
1502  JxW[qp] * Ue(j);
1503  else
1504  Ke(freei,freej) +=
1505  TensorTools::inner_product((*dphi_coarse)[i][qp],
1506  (*dphi_coarse)[j][qp]) *
1507  JxW[qp];
1508  }
1509  if (!dof_is_fixed[j])
1510  freej++;
1511  }
1512  Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp], fineval) *
1513  JxW[qp];
1514  if (cont == C_ONE)
1515  Fe(freei) += TensorTools::inner_product(finegrad, (*dphi_coarse)[i][qp]) * JxW[qp];
1516  freei++;
1517  }
1518  }
1519  }
1520  Ke.cholesky_solve(Fe, Uint);
1521 
1522  // Transfer new interior solutions to element
1523  for (unsigned int i=0; i != free_dofs; ++i)
1524  {
1525  Number & ui = Ue(free_dof[i]);
1526  libmesh_assert(std::abs(ui) < TOLERANCE ||
1527  std::abs(ui - Uint(i)) < TOLERANCE);
1528  ui = Uint(i);
1529  // We should be fixing all dofs by now; no need to keep track of
1530  // that unless we're debugging
1531 #ifndef NDEBUG
1532  dof_is_fixed[free_dof[i]] = true;
1533 #endif
1534  }
1535 
1536 #ifndef NDEBUG
1537  // Make sure every DoF got reached!
1538  for (unsigned int i=0; i != new_n_dofs; ++i)
1539  libmesh_assert(dof_is_fixed[i]);
1540 #endif
1541 }
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:355
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:2164
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:1628
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:611
const FEType & variable_type(const unsigned int c) const
Definition: dof_map.h:2220
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:3108
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:215
const Number zero
.
Definition: libmesh.h:304
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)
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:436
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
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:597
This class forms the foundation from which generic finite elements may be derived.
boostcopy::enable_if_c< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:51
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:3163
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:2418

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

1552 {
1553  Ue.resize(0);
1554 
1555  for (auto v : make_range(dof_map.n_variables()))
1556  {
1557  DenseVector<Number> Usub;
1558 
1559  coarsened_dof_values(old_vector, dof_map, elem, Usub,
1560  v, use_old_dof_indices);
1561 
1562  Ue.append (Usub);
1563  }
1564 }
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:1012
unsigned int n_variables() const override
Definition: dof_map.h:628
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:140

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

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

◆ 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:117

◆ 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:117

◆ 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:984
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1136
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:1007
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:1223
std::vector< Real > JxW
Definition: inf_fe.h:1137
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:1139
std::vector< std::vector< Point > > tangents
Definition: inf_fe.h:1140
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:1196

◆ 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:355
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:1628
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:215
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:760
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 629 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.

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

840 {
841  libmesh_assert_not_equal_to (inf_elem_type, INVALID_ELEM);
842 
843  static std::vector<unsigned int> _static_base_node_index;
844  static std::vector<unsigned int> _static_radial_node_index;
845 
846  /*
847  * fast counterpart to compute_node_indices(), uses local static buffers
848  * to store the index maps. The class member
849  * \p _compute_node_indices_fast_current_elem_type remembers
850  * the current element type.
851  *
852  * Note that there exist non-static members storing the
853  * same data. However, you never know what element type
854  * is currently used by the \p InfFE object, and what
855  * request is currently directed to the static \p InfFE
856  * members (which use \p compute_node_indices_fast()).
857  * So separate these.
858  *
859  * check whether the work for this elemtype has already
860  * been done. If so, use this index. Otherwise, refresh
861  * the buffer to this element type.
862  */
864  {
865  base_node = _static_base_node_index [outer_node_index];
866  radial_node = _static_radial_node_index[outer_node_index];
867  return;
868  }
869  else
870  {
871  // store the map for _all_ nodes for this element type
873 
874  unsigned int n_nodes = libMesh::invalid_uint;
875 
876  switch (inf_elem_type)
877  {
878  case INFEDGE2:
879  {
880  n_nodes = 2;
881  break;
882  }
883  case INFQUAD4:
884  {
885  n_nodes = 4;
886  break;
887  }
888  case INFQUAD6:
889  {
890  n_nodes = 6;
891  break;
892  }
893  case INFHEX8:
894  {
895  n_nodes = 8;
896  break;
897  }
898  case INFHEX16:
899  {
900  n_nodes = 16;
901  break;
902  }
903  case INFHEX18:
904  {
905  n_nodes = 18;
906  break;
907  }
908  case INFPRISM6:
909  {
910  n_nodes = 6;
911  break;
912  }
913  case INFPRISM12:
914  {
915  n_nodes = 12;
916  break;
917  }
918  default:
919  libmesh_error_msg("ERROR: Bad infinite element type=" << Utility::enum_to_string(inf_elem_type) << ", node=" << outer_node_index);
920  }
921 
922 
923  _static_base_node_index.resize (n_nodes);
924  _static_radial_node_index.resize(n_nodes);
925 
926  for (unsigned int n=0; n<n_nodes; n++)
927  compute_node_indices (inf_elem_type,
928  n,
929  _static_base_node_index [outer_node_index],
930  _static_radial_node_index[outer_node_index]);
931 
932  // and return for the specified node
933  base_node = _static_base_node_index [outer_node_index];
934  radial_node = _static_radial_node_index[outer_node_index];
935  return;
936  }
937 }
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:310
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:1250

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

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

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

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

1574 {
1575  libmesh_assert(elem);
1576 
1577  const unsigned int Dim = elem->dim();
1578 
1579  // Only constrain elements in 2,3D.
1580  if (Dim == 1)
1581  return;
1582 
1583  // Only constrain active elements with this method
1584  if (!elem->active())
1585  return;
1586 
1587  const Variable & var = dof_map.variable(variable_number);
1588  const FEType & base_fe_type = var.type();
1589  const bool add_p_level = dof_map.should_p_refine_var(variable_number);
1590 
1591  // Construct FE objects for this element and its neighbors.
1592  std::unique_ptr<FEGenericBase<OutputShape>> my_fe
1593  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1594  my_fe->add_p_level_in_reinit(add_p_level);
1595  const FEContinuity cont = my_fe->get_continuity();
1596 
1597  // We don't need to constrain discontinuous elements
1598  if (cont == DISCONTINUOUS)
1599  return;
1600  libmesh_assert (cont == C_ZERO || cont == C_ONE ||
1601  cont == SIDE_DISCONTINUOUS);
1602 
1603  // this would require some generalisation:
1604  // - e.g. the 'my_fe'-object needs generalisation
1605  // - due to lack of one-to-one correspondence of DOFs and nodes,
1606  // this doesn't work easily.
1607  if (elem->infinite())
1608  libmesh_not_implemented();
1609 
1610  std::unique_ptr<FEGenericBase<OutputShape>> neigh_fe
1611  (FEGenericBase<OutputShape>::build(Dim, base_fe_type));
1612  neigh_fe->add_p_level_in_reinit(add_p_level);
1613 
1614  QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
1615  my_fe->attach_quadrature_rule (&my_qface);
1616  std::vector<Point> neigh_qface;
1617 
1618  const std::vector<Real> & JxW = my_fe->get_JxW();
1619  const std::vector<Point> & q_point = my_fe->get_xyz();
1620  const std::vector<std::vector<OutputShape>> & phi = my_fe->get_phi();
1621  const std::vector<std::vector<OutputShape>> & neigh_phi =
1622  neigh_fe->get_phi();
1623  const std::vector<Point> * face_normals = nullptr;
1624  const std::vector<std::vector<OutputGradient>> * dphi = nullptr;
1625  const std::vector<std::vector<OutputGradient>> * neigh_dphi = nullptr;
1626 
1627  std::vector<dof_id_type> my_dof_indices, neigh_dof_indices;
1628  std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
1629 
1630  if (cont == C_ONE)
1631  {
1632  const std::vector<Point> & ref_face_normals =
1633  my_fe->get_normals();
1634  face_normals = &ref_face_normals;
1635  const std::vector<std::vector<OutputGradient>> & ref_dphi =
1636  my_fe->get_dphi();
1637  dphi = &ref_dphi;
1638  const std::vector<std::vector<OutputGradient>> & ref_neigh_dphi =
1639  neigh_fe->get_dphi();
1640  neigh_dphi = &ref_neigh_dphi;
1641  }
1642 
1643  DenseMatrix<Real> Ke;
1644  DenseVector<Real> Fe;
1645  std::vector<DenseVector<Real>> Ue;
1646 
1647  // Look at the element faces. Check to see if we need to
1648  // build constraints.
1649  for (auto s : elem->side_index_range())
1650  {
1651  // Get pointers to the element's neighbor.
1652  const Elem * neigh = elem->neighbor_ptr(s);
1653 
1654  if (!neigh)
1655  continue;
1656 
1657  if (!var.active_on_subdomain(neigh->subdomain_id()))
1658  continue;
1659 
1660  // h refinement constraints:
1661  // constrain dofs shared between
1662  // this element and ones coarser
1663  // than this element.
1664  if (neigh->level() < elem->level())
1665  {
1666  unsigned int s_neigh = neigh->which_neighbor_am_i(elem);
1667  libmesh_assert_less (s_neigh, neigh->n_neighbors());
1668 
1669  // Find the minimum p level; we build the h constraint
1670  // matrix with this and then constrain away all higher p
1671  // DoFs.
1672  libmesh_assert(neigh->active());
1673  const unsigned int min_p_level = add_p_level *
1674  std::min(elem->p_level(), neigh->p_level());
1675  // we may need to make the FE objects reinit with the
1676  // minimum shared p_level
1677  const unsigned int old_elem_level = add_p_level * elem->p_level();
1678  if (old_elem_level != min_p_level)
1679  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() + min_p_level - old_elem_level);
1680  const unsigned int old_neigh_level = add_p_level * neigh->p_level();
1681  if (old_neigh_level != min_p_level)
1682  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() + min_p_level - old_neigh_level);
1683 
1684  my_fe->reinit(elem, s);
1685 
1686  // This function gets called element-by-element, so there
1687  // will be a lot of memory allocation going on. We can
1688  // at least minimize this for the case of the dof indices
1689  // by efficiently preallocating the requisite storage.
1690  // n_nodes is not necessarily n_dofs, but it is better
1691  // than nothing!
1692  my_dof_indices.reserve (elem->n_nodes());
1693  neigh_dof_indices.reserve (neigh->n_nodes());
1694 
1695  dof_map.dof_indices (elem, my_dof_indices,
1696  variable_number,
1697  min_p_level);
1698  dof_map.dof_indices (neigh, neigh_dof_indices,
1699  variable_number,
1700  min_p_level);
1701 
1702  const unsigned int n_qp = my_qface.n_points();
1703 
1704  FEMap::inverse_map (Dim, neigh, q_point, neigh_qface);
1705 
1706  neigh_fe->reinit(neigh, &neigh_qface);
1707 
1708  // We're only concerned with DOFs whose values (and/or first
1709  // derivatives for C1 elements) are supported on side nodes
1710  FEType elem_fe_type = base_fe_type;
1711  if (old_elem_level != min_p_level)
1712  elem_fe_type.order = base_fe_type.order.get_order() + min_p_level - old_elem_level;
1713  FEType neigh_fe_type = base_fe_type;
1714  if (old_neigh_level != min_p_level)
1715  neigh_fe_type.order = base_fe_type.order.get_order() + min_p_level - old_neigh_level;
1716  FEInterface::dofs_on_side(elem, Dim, elem_fe_type, s, my_side_dofs);
1717  FEInterface::dofs_on_side(neigh, Dim, neigh_fe_type, s_neigh, neigh_side_dofs);
1718 
1719  const unsigned int n_side_dofs =
1720  cast_int<unsigned int>(my_side_dofs.size());
1721  libmesh_assert_equal_to (n_side_dofs, neigh_side_dofs.size());
1722 
1723 #ifndef NDEBUG
1724  for (auto i : my_side_dofs)
1725  libmesh_assert_less(i, my_dof_indices.size());
1726  for (auto i : neigh_side_dofs)
1727  libmesh_assert_less(i, neigh_dof_indices.size());
1728 #endif
1729 
1730  Ke.resize (n_side_dofs, n_side_dofs);
1731  Ue.resize(n_side_dofs);
1732 
1733  // Form the projection matrix, (inner product of fine basis
1734  // functions against fine test functions)
1735  for (unsigned int is = 0; is != n_side_dofs; ++is)
1736  {
1737  const unsigned int i = my_side_dofs[is];
1738  for (unsigned int js = 0; js != n_side_dofs; ++js)
1739  {
1740  const unsigned int j = my_side_dofs[js];
1741  for (unsigned int qp = 0; qp != n_qp; ++qp)
1742  {
1743  Ke(is,js) += JxW[qp] * TensorTools::inner_product(phi[i][qp], phi[j][qp]);
1744  if (cont == C_ONE)
1745  Ke(is,js) += JxW[qp] *
1746  TensorTools::inner_product((*dphi)[i][qp] *
1747  (*face_normals)[qp],
1748  (*dphi)[j][qp] *
1749  (*face_normals)[qp]);
1750  }
1751  }
1752  }
1753 
1754  // Form the right hand sides, (inner product of coarse basis
1755  // functions against fine test functions)
1756  for (unsigned int is = 0; is != n_side_dofs; ++is)
1757  {
1758  const unsigned int i = neigh_side_dofs[is];
1759  Fe.resize (n_side_dofs);
1760  for (unsigned int js = 0; js != n_side_dofs; ++js)
1761  {
1762  const unsigned int j = my_side_dofs[js];
1763  for (unsigned int qp = 0; qp != n_qp; ++qp)
1764  {
1765  Fe(js) += JxW[qp] *
1766  TensorTools::inner_product(neigh_phi[i][qp],
1767  phi[j][qp]);
1768  if (cont == C_ONE)
1769  Fe(js) += JxW[qp] *
1770  TensorTools::inner_product((*neigh_dphi)[i][qp] *
1771  (*face_normals)[qp],
1772  (*dphi)[j][qp] *
1773  (*face_normals)[qp]);
1774  }
1775  }
1776  Ke.cholesky_solve(Fe, Ue[is]);
1777  }
1778 
1779  for (unsigned int js = 0; js != n_side_dofs; ++js)
1780  {
1781  const unsigned int j = my_side_dofs[js];
1782  const dof_id_type my_dof_g = my_dof_indices[j];
1783  libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
1784 
1785  // Hunt for "constraining against myself" cases before
1786  // we bother creating a constraint row
1787  bool self_constraint = false;
1788  for (unsigned int is = 0; is != n_side_dofs; ++is)
1789  {
1790  const unsigned int i = neigh_side_dofs[is];
1791  const dof_id_type their_dof_g = neigh_dof_indices[i];
1792  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1793 
1794  if (their_dof_g == my_dof_g)
1795  {
1796 #ifndef NDEBUG
1797  const Real their_dof_value = Ue[is](js);
1798  libmesh_assert_less (std::abs(their_dof_value-1.),
1799  10*TOLERANCE);
1800 
1801  for (unsigned int k = 0; k != n_side_dofs; ++k)
1802  libmesh_assert(k == is ||
1803  std::abs(Ue[k](js)) <
1804  10*TOLERANCE);
1805 #endif
1806 
1807  self_constraint = true;
1808  break;
1809  }
1810  }
1811 
1812  if (self_constraint)
1813  continue;
1814 
1815  DofConstraintRow * constraint_row;
1816 
1817  // we may be running constraint methods concurrently
1818  // on multiple threads, so we need a lock to
1819  // ensure that this constraint is "ours"
1820  {
1821  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1822 
1823  if (dof_map.is_constrained_dof(my_dof_g))
1824  continue;
1825 
1826  constraint_row = &(constraints[my_dof_g]);
1827  libmesh_assert(constraint_row->empty());
1828  }
1829 
1830  for (unsigned int is = 0; is != n_side_dofs; ++is)
1831  {
1832  const unsigned int i = neigh_side_dofs[is];
1833  const dof_id_type their_dof_g = neigh_dof_indices[i];
1834  libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
1835  libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
1836 
1837  const Real their_dof_value = Ue[is](js);
1838 
1839  if (std::abs(their_dof_value) < 10*TOLERANCE)
1840  continue;
1841 
1842  constraint_row->emplace(their_dof_g, their_dof_value);
1843  }
1844  }
1845 
1846  my_fe->set_fe_order(my_fe->get_fe_type().order.get_order() + old_elem_level - min_p_level);
1847  neigh_fe->set_fe_order(neigh_fe->get_fe_type().order.get_order() + old_neigh_level - min_p_level);
1848  }
1849 
1850  if (add_p_level)
1851  {
1852  // p refinement constraints:
1853  // constrain dofs shared between
1854  // active elements and neighbors with
1855  // lower polynomial degrees
1856  const unsigned int min_p_level =
1857  neigh->min_p_level_by_neighbor(elem, elem->p_level());
1858  if (min_p_level < elem->p_level())
1859  {
1860  // Adaptive p refinement of non-hierarchic bases will
1861  // require more coding
1862  libmesh_assert(my_fe->is_hierarchic());
1863  dof_map.constrain_p_dofs(variable_number, elem,
1864  s, min_p_level);
1865  }
1866  }
1867  }
1868 }
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
Definition: fe_type.h:196
IntRange< unsigned short > side_index_range() const
Definition: elem.h:2710
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Definition: dof_map.C:2164
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:1628
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:371
unsigned int p_level() const
Definition: elem.h:3108
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:215
unsigned int min_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
Definition: elem.C:2323
const Variable & variable(const unsigned int c) const override
Definition: dof_map.h:2190
bool should_p_refine_var(unsigned int var) const
Whether the given variable should be p-refined.
Definition: dof_map.h:2437
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
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:2919
libmesh_assert(ctx)
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:2258
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:482
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:2598
unsigned int level() const
Definition: elem.h:3074
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
Definition: elem.h:2582
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:714
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.
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:2941
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:597
This class forms the foundation from which generic finite elements may be derived.
boostcopy::enable_if_c< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product(const T &a, const T2 &b)
Definition: tensor_tools.h:51
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 784 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().

788 {
789  libmesh_assert(inf_elem);
790  // at least check whether the base element type is correct.
791  // otherwise this version of computing dist would give problems
792  libmesh_assert_equal_to (base_elem->type(),
793  InfFEBase::get_elem_type(inf_elem->type()));
794 
795  // Start logging the overall computation of shape functions
796  LOG_SCOPE("compute_shape_functions()", "InfFE");
797 
798  //const unsigned int n_radial_qp = cast_int<unsigned int>(som.size());
799  //const unsigned int n_base_qp = cast_int<unsigned int>(S_map[0].size());
800  const std::size_t n_radial_qp = radial_qp.size();
801  const unsigned int n_base_qp = base_qp.size();
802 
803  libmesh_assert_equal_to (_n_total_qp, n_radial_qp*n_base_qp);
804  libmesh_assert_equal_to (_n_total_qp, _total_qrule_weights.size());
805 #ifdef DEBUG
806  if (som.size() > 0)
807  libmesh_assert_equal_to(n_radial_qp, som.size());
808 
809  if (this->calculate_map || this->calculate_map_scaled)
810  {
811  // these vectors are needed later; initialize here already to have access to
812  // n_base_qp etc.
813  const std::vector<std::vector<Real>> & S_map = (base_fe->get_fe_map()).get_phi_map();
814  if (S_map[0].size() > 0)
815  libmesh_assert_equal_to(n_base_qp, S_map[0].size());
816  }
817  if (radial_qrule)
818  libmesh_assert_equal_to(n_radial_qp, radial_qrule->n_points());
819  if (base_qrule)
820  libmesh_assert_equal_to(n_base_qp, base_qrule->n_points());
821  libmesh_assert_equal_to(_n_total_qp % n_radial_qp, 0); // "Error in the structure of quadrature points!");
822 #endif
823 
824 
826  FEInterface::n_dofs(base_fe->get_fe_type(), base_elem.get());
827 
828 
829 
830  const Point origin = inf_elem->origin();
831 
832  // Compute the shape function values (and derivatives)
833  // at the Quadrature points. Note that the actual values
834  // have already been computed via init_shape_functions
835 
836  unsigned int elem_dim = inf_elem->dim();
837  // Compute the value of the derivative shape function i at quadrature point p
838  switch (elem_dim)
839  {
840  case 1:
841  case 2:
842  {
843  libmesh_not_implemented();
844  break;
845  }
846  case 3:
847  {
848  std::vector<std::vector<Real>> S (0);
849  std::vector<std::vector<Real>> Ss(0);
850  std::vector<std::vector<Real>> St(0);
851 
852  std::vector<Real> base_dxidx (0);
853  std::vector<Real> base_dxidy (0);
854  std::vector<Real> base_dxidz (0);
855  std::vector<Real> base_detadx(0);
856  std::vector<Real> base_detady(0);
857  std::vector<Real> base_detadz(0);
858 
859  std::vector<Point> base_xyz (0);
860 
863  S=base_fe->phi;
864 
865  // fast access to the approximation and mapping shapes of base_fe
867  {
868  Ss = base_fe->dphidxi;
869  St = base_fe->dphideta;
870 
871  base_dxidx = base_fe->get_dxidx();
872  base_dxidy = base_fe->get_dxidy();
873  base_dxidz = base_fe->get_dxidz();
874  base_detadx = base_fe->get_detadx();
875  base_detady = base_fe->get_detady();
876  base_detadz = base_fe->get_detadz();
877 
878  base_xyz = base_fe->get_xyz();
879  }
880 
881  ElemType base_type= base_elem->type();
882 
883 #ifdef DEBUG
884  if (calculate_phi)
885  libmesh_assert_equal_to (phi.size(), _n_total_approx_sf);
886  if (calculate_dphi)
887  {
888  libmesh_assert_equal_to (dphidxi.size(), _n_total_approx_sf);
889  libmesh_assert_equal_to (dphideta.size(), _n_total_approx_sf);
890  libmesh_assert_equal_to (dphidzeta.size(), _n_total_approx_sf);
891  }
892 #endif
893 
894  unsigned int tp=0; // total qp
895  for (unsigned int rp=0; rp<n_radial_qp; ++rp) // over radial qps
896  for (unsigned int bp=0; bp<n_base_qp; ++bp) // over base qps
897 
898  { // First compute the map from base element quantities to physical space:
899 
900  // initialize them with invalid value to not use them
901  // without setting them to the correct value before.
902  Point unit_r(NAN);
903  RealGradient grad_a_scaled(NAN);
904  Real a(NAN);
905  Real r_norm(NAN);
907  {
908  xyz[tp] = InfFEMap::map(elem_dim, inf_elem, Point(base_qp[bp](0),base_qp[bp](1),radial_qp[rp](0)));
909 
910  const Point r(xyz[tp]-origin);
911  a=(base_xyz[bp]-origin).norm();
912  r_norm = r.norm();
913 
914  // check that 'som' == a/r.
915 #ifndef NDEVEL
916  if (som.size())
917  libmesh_assert_less(std::abs(som[rp] -a/r_norm) , 1e-7);
918 #endif
919  unit_r=(r/r_norm);
920 
921  // They are used for computing the normal and do not correspond to the direction of eta and xi in this element:
922  // Due to the stretch of these axes in radial direction, they are deformed.
923  Point e_xi(base_dxidx[bp],
924  base_dxidy[bp],
925  base_dxidz[bp]);
926  Point e_eta(base_detadx[bp],
927  base_detady[bp],
928  base_detadz[bp]);
929 
930  const RealGradient normal=e_eta.cross(e_xi).unit();
931 
932  // grad a = a/r.norm() * grad_a_scaled
933  grad_a_scaled=unit_r - normal/(normal*unit_r);
934 
935  const Real dxi_er=base_dxidx[bp]* unit_r(0) + base_dxidy[bp] *unit_r(1) + base_dxidz[bp] *unit_r(2);
936  const Real deta_er=base_detadx[bp]*unit_r(0) + base_detady[bp]*unit_r(1) + base_detadz[bp]*unit_r(2);
937 
938  // in case of non-affine map, further terms need to be taken into account,
939  // involving \p e_eta and \p e_xi and thus recursive computation is needed
940  if (!base_elem->has_affine_map())
941  {
950  const unsigned int n_sf = base_elem->n_nodes();
951  RealGradient tmp(0.,0.,0.);
952  for (unsigned int i=0; i< n_sf; ++i)
953  {
954  RealGradient dL_da_i = (FE<2,LAGRANGE>::shape_deriv(base_type,
955  base_elem->default_order(),
956  i, 0, base_qp[bp]) * e_xi
957  +FE<2,LAGRANGE>::shape_deriv(base_type,
958  base_elem->default_order(),
959  i, 1, base_qp[bp]) * e_eta);
960 
961  tmp += (base_elem->node_ref(i) -origin).norm()* dL_da_i;
962 
963  }
964  libmesh_assert(tmp*unit_r < .95 ); // in a proper setup, tmp should have only a small radial component.
965  grad_a_scaled = ( tmp - (tmp*unit_r)*unit_r ) / ( 1. - tmp*unit_r);
966 
967  }
968 
969  // 'scale' = r/a
970  dxidx_map_scaled[tp] = (grad_a_scaled(0) - unit_r(0))*dxi_er +base_dxidx[bp];
971  dxidy_map_scaled[tp] = (grad_a_scaled(1) - unit_r(1))*dxi_er +base_dxidy[bp];
972  dxidz_map_scaled[tp] = (grad_a_scaled(2) - unit_r(2))*dxi_er +base_dxidz[bp];
973 
974  // 'scale' = r/a
975  detadx_map_scaled[tp] = (grad_a_scaled(0) - unit_r(0))*deta_er + base_detadx[bp];
976  detady_map_scaled[tp] = (grad_a_scaled(1) - unit_r(1))*deta_er + base_detady[bp];
977  detadz_map_scaled[tp] = (grad_a_scaled(2) - unit_r(2))*deta_er + base_detadz[bp];
978 
979  // 'scale' = (r/a)**2
980  dzetadx_map_scaled[tp] =-2./a*(grad_a_scaled(0) - unit_r(0));
981  dzetady_map_scaled[tp] =-2./a*(grad_a_scaled(1) - unit_r(1));
982  dzetadz_map_scaled[tp] =-2./a*(grad_a_scaled(2) - unit_r(2));
983 
984  }
985 
986  if (calculate_map)
987  {
988  dxidx_map[tp] = a/r_norm * dxidx_map_scaled[tp];
989  dxidy_map[tp] = a/r_norm * dxidy_map_scaled[tp];
990  dxidz_map[tp] = a/r_norm * dxidz_map_scaled[tp];
991 
992  detadx_map[tp] = a/r_norm * detadx_map_scaled[tp];
993  detady_map[tp] = a/r_norm * detady_map_scaled[tp];
994  detadz_map[tp] = a/r_norm * detadz_map_scaled[tp];
995 
996  // dzetadx = dzetadr*dr/dx - 2/r * grad_a
997  // = dzetadr*dr/dx - 2*a/r^2 * grad_a_scaled
998  dzetadx_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(0) - unit_r(0));
999  dzetady_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(1) - unit_r(1));
1000  dzetadz_map[tp] =-2.*a/(r_norm*r_norm)*(grad_a_scaled(2) - unit_r(2));
1001 
1002  if (calculate_jxw)
1003  {
1004  Real inv_jac = (dxidx_map[tp]*( detady_map[tp]*dzetadz_map[tp]- dzetady_map[tp]*detadz_map[tp]) +
1005  detadx_map[tp]*(dzetady_map[tp]* dxidz_map[tp]- dxidy_map[tp]*dzetadz_map[tp]) +
1006  dzetadx_map[tp]*( dxidy_map[tp]*detadz_map[tp]- detady_map[tp]* dxidz_map[tp]));
1007 
1008  if (inv_jac <= 1e-10)
1009  {
1010  libmesh_error_msg("ERROR: negative inverse Jacobian " \
1011  << inv_jac \
1012  << " at point " \
1013  << xyz[tp] \
1014  << " in element " \
1015  << inf_elem->id());
1016  }
1017 
1018 
1019  JxW[tp] = _total_qrule_weights[tp]/inv_jac;
1020  }
1021 
1022  }
1024  {
1025  Real inv_jacxR_pow4 = (dxidx_map_scaled[tp] *( detady_map_scaled[tp]*dzetadz_map_scaled[tp]
1030  -detady_map_scaled[tp]* dxidz_map_scaled[tp]));
1031  if (inv_jacxR_pow4 <= 1e-7)
1032  {
1033  libmesh_error_msg("ERROR: negative weighted inverse Jacobian " \
1034  << inv_jacxR_pow4 \
1035  << " at point " \
1036  << xyz[tp] \
1037  << " in element " \
1038  << inf_elem->id());
1039  }
1040 
1041  JxWxdecay[tp] = _total_qrule_weights[tp]/inv_jacxR_pow4;
1042  }
1043 
1044  // phase term mu(r)=i*k*(r-a).
1045  // skip i*k: it is added separately during matrix assembly.
1046 
1048  dphase[tp] = unit_r - grad_a_scaled*a/r_norm;
1049 
1050  if (calculate_dphi)
1051  {
1052  dweight[tp](0) = dweightdv[rp] * dzetadx_map[tp];
1053  dweight[tp](1) = dweightdv[rp] * dzetady_map[tp];
1054  dweight[tp](2) = dweightdv[rp] * dzetadz_map[tp];
1055  }
1057  {
1058  dweightxr_sq[tp](0) = dweightdv[rp] * dzetadx_map_scaled[tp];
1059  dweightxr_sq[tp](1) = dweightdv[rp] * dzetady_map_scaled[tp];
1060  dweightxr_sq[tp](2) = dweightdv[rp] * dzetadz_map_scaled[tp];
1061  }
1062 
1064  // compute the shape-functions and derivative quantities:
1065  for (unsigned int i=0; i <_n_total_approx_sf ; ++i)
1066  {
1067  // let the index vectors take care of selecting the appropriate base/radial shape
1068  unsigned int bi = _base_shape_index [i];
1069  unsigned int ri = _radial_shape_index[i];
1070  if (calculate_phi)
1071  phi [i][tp] = S [bi][bp] * mode[ri][rp] * som[rp];
1072 
1074  phixr [i][tp] = S [bi][bp] * mode[ri][rp];
1075 
1077  {
1078  dphidxi [i][tp] = Ss[bi][bp] * mode[ri][rp] * som[rp];
1079  dphideta [i][tp] = St[bi][bp] * mode[ri][rp] * som[rp];
1080  dphidzeta[i][tp] = S [bi][bp]
1081  * (dmodedv[ri][rp] * som[rp] + mode[ri][rp] * dsomdv[rp]);
1082  }
1083 
1084  if (calculate_dphi)
1085  {
1086 
1087  // dphi/dx = (dphi/dxi)*(dxi/dx) + (dphi/deta)*(deta/dx) + (dphi/dzeta)*(dzeta/dx);
1088  dphi[i][tp](0) =
1089  dphidx[i][tp] = (dphidxi[i][tp]*dxidx_map[tp] +
1090  dphideta[i][tp]*detadx_map[tp] +
1091  dphidzeta[i][tp]*dzetadx_map[tp]);
1092 
1093  // dphi/dy = (dphi/dxi)*(dxi/dy) + (dphi/deta)*(deta/dy) + (dphi/dzeta)*(dzeta/dy);
1094  dphi[i][tp](1) =
1095  dphidy[i][tp] = (dphidxi[i][tp]*dxidy_map[tp] +
1096  dphideta[i][tp]*detady_map[tp] +
1097  dphidzeta[i][tp]*dzetady_map[tp]);
1098 
1099  // dphi/dz = (dphi/dxi)*(dxi/dz) + (dphi/deta)*(deta/dz) + (dphi/dzeta)*(dzeta/dz);
1100  dphi[i][tp](2) =
1101  dphidz[i][tp] = (dphidxi[i][tp]*dxidz_map[tp] +
1102  dphideta[i][tp]*detadz_map[tp] +
1103  dphidzeta[i][tp]*dzetadz_map[tp]);
1104 
1105  }
1107  { // we don't distinguish between the different levels of scaling here...
1108 
1109  dphixr[i][tp](0)= (dphidxi[i][tp]*dxidx_map_scaled[tp] +
1110  dphideta[i][tp]*detadx_map_scaled[tp] +
1111  dphidzeta[i][tp]*dzetadx_map_scaled[tp]*som[rp]);
1112 
1113  dphixr[i][tp](1) = (dphidxi[i][tp]*dxidy_map_scaled[tp] +
1114  dphideta[i][tp]*detady_map_scaled[tp] +
1115  dphidzeta[i][tp]*dzetady_map_scaled[tp]*som[rp]);
1116 
1117  dphixr[i][tp](2) = (dphidxi[i][tp]*dxidz_map_scaled[tp] +
1118  dphideta[i][tp]*detadz_map_scaled[tp] +
1119  dphidzeta[i][tp]*dzetadz_map_scaled[tp]*som[rp]);
1120 
1121  const Real dphidxixr = Ss[bi][bp] * mode[ri][rp];
1122  const Real dphidetaxr= St[bi][bp] * mode[ri][rp];
1123 
1124  dphixr_sq[i][tp](0)= (dphidxixr*dxidx_map_scaled[tp] +
1125  dphidetaxr*detadx_map_scaled[tp] +
1126  dphidzeta[i][tp]*dzetadx_map_scaled[tp]);
1127 
1128  dphixr_sq[i][tp](1) = (dphidxixr*dxidy_map_scaled[tp] +
1129  dphidetaxr*detady_map_scaled[tp] +
1130  dphidzeta[i][tp]*dzetady_map_scaled[tp]);
1131 
1132  dphixr_sq[i][tp](2) = (dphidxixr*dxidz_map_scaled[tp] +
1133  dphidetaxr*detadz_map_scaled[tp] +
1134  dphidzeta[i][tp]*dzetadz_map_scaled[tp]);
1135  }
1136 
1137  }
1138  tp++;
1139  }
1140 
1141  break;
1142  }
1143 
1144  default:
1145  libmesh_error_msg("Unsupported dim = " << dim);
1146  }
1147 }
std::vector< Real > detadz_map
Definition: inf_fe.h:1111
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:1106
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:984
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:1088
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:355
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::vector< Real > detadx_map_scaled
Definition: inf_fe.h:1121
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:989
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:1114
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:1072
std::vector< Real > dxidx_map_scaled
Definition: inf_fe.h:1118
std::vector< Real > dzetady_map
Definition: inf_fe.h:1113
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1132
std::vector< Real > dxidz_map
Definition: inf_fe.h:1108
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
std::vector< Real > dxidy_map_scaled
Definition: inf_fe.h:1119
std::vector< Real > dxidy_map
Definition: inf_fe.h:1107
std::vector< Real > detadx_map
Definition: inf_fe.h:1109
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:1122
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:1094
std::vector< Real > dzetady_map_scaled
Definition: inf_fe.h:1125
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1074
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1133
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:1123
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1136
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:1007
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:1223
std::vector< Real > JxW
Definition: inf_fe.h:1137
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:884
auto norm(const T &a) -> decltype(std::abs(a))
Definition: tensor_tools.h:74
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994
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:1190
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1083
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
std::vector< Real > dzetadx_map
Definition: inf_fe.h:1112
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1202
std::vector< Real > dxidz_map_scaled
Definition: inf_fe.h:1120
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:1172
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1063
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1134
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:1182
std::vector< Real > dzetadz_map_scaled
Definition: inf_fe.h:1126
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:1100
std::vector< Real > detady_map
Definition: inf_fe.h:1110
std::vector< Real > dzetadx_map_scaled
Definition: inf_fe.h:1124
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:1196
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:1215

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

975  {
976  //FIXME: it seems this function cannot be left out because
977  // it is pure virtual in \p FEBase
978  libmesh_not_implemented();
979  }

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

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

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

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

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

References libMesh::FEInterface::field_type(), libMesh::libmesh_assert(), and libMesh::TYPE_VECTOR.

330 {
331  this->calculations_started = true;
332 
333  // If the user forgot to request anything, but we're enabling
334  // deprecated backwards compatibility, then we'll be safe and
335  // calculate everything. If we haven't enable deprecated backwards
336  // compatibility then we'll scream and die.
337 #ifdef LIBMESH_ENABLE_DEPRECATED
338  if (!this->calculate_nothing &&
339  !this->calculate_phi && !this->calculate_dphi &&
340  !this->calculate_dphiref &&
341  !this->calculate_phi_scaled && !this->calculate_dphi_scaled &&
342  !this->calculate_xyz && !this->calculate_jxw &&
343  !this->calculate_map_scaled && !this->calculate_map &&
344 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
345  !this->calculate_d2phi &&
346 #endif
347  !this->calculate_curl_phi && !this->calculate_div_phi)
348  {
349  libmesh_deprecated();
350  this->calculate_phi = this->calculate_dphi = this->calculate_jxw = true;
351  this->calculate_dphiref = true;
352 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
353  this->calculate_d2phi = true;
354 #endif
355  this->calculate_phi_scaled = this->calculate_dphi_scaled = this->calculate_xyz = true;
357  {
358  this->calculate_curl_phi = true;
359  this->calculate_div_phi = true;
360  }
361  }
362 #else //LIBMESH_ENABLE_DEPRECATED
363  // ANSI C does not allow to embed the preprocessor-statement into the assert, so we
364  // make two statements, just different by 'calculate_d2phi'.
365 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
367  this->calculate_phi || this->calculate_dphi ||
368  this->calculate_dphiref ||
370  this->calculate_xyz || this->calculate_jxw ||
371  this->calculate_map_scaled || this->calculate_map ||
372  this->calculate_curl_phi || this->calculate_div_phi);
373 #else
375  this->calculate_phi || this->calculate_dphi ||
376  this->calculate_dphiref ||
378  this->calculate_xyz || this->calculate_jxw ||
379  this->calculate_map_scaled || this->calculate_map ||
380  this->calculate_curl_phi || this->calculate_div_phi);
381 #endif
382 #endif // LIBMESH_ENABLE_DEPRECATED
383 
384  // set further terms necessary to do the requested task
385  if (calculate_jxw)
386  this->calculate_map = true;
387  if (this->calculate_dphi)
388  this->calculate_map = true;
389  if (this->calculate_dphi_scaled)
390  this->calculate_map_scaled = true;
392  // if Cartesian positions were requested but the calculation of map
393  // was not triggered, we'll opt for the 'scaled' variant.
394  this->calculate_map_scaled = true;
395  base_fe->calculate_phi = this->calculate_phi || this->calculate_phi_scaled
396  || this->calculate_dphi || this->calculate_dphi_scaled;
397  base_fe->calculate_dphi = this->calculate_dphi || this->calculate_dphi_scaled;
398  if (this->calculate_map || this->calculate_map_scaled
399  || this->calculate_dphiref)
400  {
401  base_fe->calculate_dphiref = true;
402  base_fe->get_xyz(); // trigger base_fe->fe_map to 'calculate_xyz'
403  base_fe->get_JxW(); // trigger base_fe->fe_map to 'calculate_dxyz'
404  }
405  base_fe->determine_calculations();
406 
407 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
408  if (this->calculate_d2phi)
409  libmesh_not_implemented();
410 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
411 }
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
FEFamily family
The type of finite element.
Definition: fe_type.h:221
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:984
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:989
static FEFieldType field_type(const FEType &fe_type)
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:1000
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:1007
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1223
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994
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
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
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()

Definition at line 94 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

References libMesh::C_ZERO.

452  { 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 829 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

830  { 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 683 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

684  { 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 703 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

704  { 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 678 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

679  { 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 693 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

694  { 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 698 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

699  { 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 688 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

689  { 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 738 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().

740  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:1109
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 747 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().

749  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:1110

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

758  calculate_map = true; return detadz_map;}
std::vector< Real > detadz_map
Definition: inf_fe.h:1111
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 646 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().

648  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:994
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1134

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

636  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:1133
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994

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

713  calculate_map = true; return dxidx_map;}
std::vector< Real > dxidx_map
Definition: inf_fe.h:1106
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 720 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().

722  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:1107
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 729 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().

731  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:1108
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 663 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

664  { 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 655 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

656  { 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 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_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 765 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().

767  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:1112

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

776  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:1113
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 783 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().

785  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:1114
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:221
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 594 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().

595  {
597  calculate_jxw = true;
598  return this->JxW;
599  }
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:1007
std::vector< Real > JxW
Definition: inf_fe.h:1137
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 609 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().

611  calculate_map_scaled = true; return this->JxWxdecay;}
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:984
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:1136
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 821 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.

823  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:1139

◆ 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.
Definition: fe_type.h:215
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 624 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.

626  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:989
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1132
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:310
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:650
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 805 of file inf_fe.h.

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

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

851  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:1074
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994

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

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

797  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 838 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.

840  calculate_phi_scaled = true; return weightxr_sq; }
std::vector< Real > weightxr_sq
Definition: inf_fe.h:1065
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:989
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 814 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.

816  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:1140

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

586  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:1000
libmesh_assert(ctx)
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1063

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

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

1394 {
1395  // only constrain elements in 2,3d.
1396  if (Dim == 1)
1397  return;
1398 
1399  libmesh_assert(elem);
1400 
1401  // only constrain active and ancestor elements
1402  if (elem->subactive())
1403  return;
1404 
1405  // for infinite elements, the computation of constraints is somewhat different
1406  // than for Lagrange elements:
1407  // 1) Only the base element (i.e. side(0) ) may be refined.
1408  // Thus, in radial direction no constraints must be considered.
1409  // 2) Due to the tensorial structure of shape functions (base_shape * radial_function),
1410  // it must be ensured that all element DOFs inherit that constraint.
1411  // Consequently, the constraints are computed on the base (baseh_shape) but must
1412  // be applied to all DOFs with the respective base_shape index (i.e. for all radial_functions).
1413  //
1414  // FIXME: In the current form, this function does not work for infinite elements
1415  // because constraining the non-base points requires knowledge of the T_map and T_radial
1416  // parameters; but they are not accessible via the element and may differ between variables.
1417  //
1418  // For the moment being, we just check if this element can be skipped and fail otherwise.
1419 
1420  // if one of the sides needs a constraint, an error is thrown.
1421  // In other cases, we leave the function regularly.
1422  for (auto s : elem->side_index_range())
1423  {
1424  if (elem->neighbor_ptr(s) != nullptr &&
1425  elem->neighbor_ptr(s) != remote_elem)
1426  if (elem->neighbor_ptr(s)->level() < elem->level())
1427  {
1428  libmesh_not_implemented();
1429  }
1430  }
1431 }
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 919 of file inf_fe.h.

921  { 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:984
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:989
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1208
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1223
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:994
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:418
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1083
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:1202
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:1196
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:1215

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

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

420 {
421  libmesh_assert(radial_qrule.get() || radial_pts);
422  libmesh_assert(inf_elem);
423 
424  // Start logging the radial shape function initialization
425  LOG_SCOPE("init_radial_shape_functions()", "InfFE");
426 
427  // initialize most of the things related to physical approximation
428  const Order radial_approx_order = fe_type.radial_order;
429  const unsigned int n_radial_approx_shape_functions =
430  InfFERadial::n_dofs(radial_approx_order);
431 
432  const std::size_t n_radial_qp =
433  radial_pts ? radial_pts->size() : radial_qrule->n_points();
434  const std::vector<Point> & radial_qp =
435  radial_pts ? *radial_pts : radial_qrule->get_points();
436 
437  // the radial polynomials (eval)
439  {
440  mode.resize (n_radial_approx_shape_functions);
441  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
442  mode[i].resize (n_radial_qp);
443 
444  // evaluate the mode shapes in radial direction at radial quadrature points
445  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
446  for (std::size_t p=0; p<n_radial_qp; ++p)
447  mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
448  }
449 
451  {
452  dmodedv.resize (n_radial_approx_shape_functions);
453  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
454  dmodedv[i].resize (n_radial_qp);
455 
456  // evaluate the mode shapes in radial direction at radial quadrature points
457  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
458  for (std::size_t p=0; p<n_radial_qp; ++p)
459  dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
460  }
461 
462  // the (1-v)/2 weight.
464  {
465  som.resize (n_radial_qp);
466  // compute scalar values at radial quadrature points
467  for (std::size_t p=0; p<n_radial_qp; ++p)
468  som[p] = InfFERadial::decay (Dim, radial_qp[p](0));
469  }
471  {
472  dsomdv.resize (n_radial_qp);
473  // compute scalar values at radial quadrature points
474  for (std::size_t p=0; p<n_radial_qp; ++p)
475  dsomdv[p] = InfFERadial::decay_deriv (Dim, radial_qp[p](0));
476  }
477 }
std::vector< Real > dsomdv
the first local derivative of the radial decay in local coordinates.
Definition: inf_fe.h:1088
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:989
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:1309
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
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:1094
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1283
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:994
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1083
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:1100

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

485 {
486  libmesh_assert(inf_elem);
487 
488  // Start logging the radial shape function initialization
489  LOG_SCOPE("init_shape_functions()", "InfFE");
490 
491  // fast access to some const ints for the radial data
492  const unsigned int n_radial_approx_sf = InfFERadial::n_dofs(fe_type.radial_order);
493  const std::size_t n_radial_qp = radial_qp.size();
494 #ifdef DEBUG
496  libmesh_assert_equal_to(n_radial_approx_sf, mode.size());
498  libmesh_assert_equal_to(som.size(), n_radial_qp);
499 #endif
500 
501 
502  // initialize most of the quantities related to mapping
503 
504  // The element type and order to use in the base map
505  //const Order base_mapping_order = base_elem->default_order();
506 
507  // the number of base shape functions used to construct the map
508  // (Lagrange shape functions are used for mapping in the base)
509  //unsigned int n_base_mapping_shape_functions =
510  // InfFEBase::n_base_mapping_sf(*base_elem,
511  // base_mapping_order);
512 
513  // initialize most of the things related to physical approximation
514  unsigned int n_base_approx_shape_functions;
515  if (Dim > 1)
516  n_base_approx_shape_functions =
517  FEInterface::n_dofs(base_fe->get_fe_type(), base_elem.get());
518  else
519  n_base_approx_shape_functions = 1;
520 
521 
522  // update class member field
524  n_radial_approx_sf * n_base_approx_shape_functions;
525 
526 
527  // The number of the base quadrature points.
528  const unsigned int n_base_qp = cast_int<unsigned int>(base_qp.size());
529 
530  // The total number of quadrature points.
531  _n_total_qp = n_radial_qp * n_base_qp;
532 
533 
534  // initialize the node and shape numbering maps
535  {
536  // similar for the shapes: the i-th entry stores
537  // the associated base/radial shape number
540 
541  // fill the shape index map
542  for (unsigned int n=0; n<_n_total_approx_sf; ++n)
543  {
545  inf_elem,
546  n,
549  libmesh_assert_less (_base_shape_index[n], n_base_approx_shape_functions);
550  libmesh_assert_less (_radial_shape_index[n], n_radial_approx_sf);
551  }
552  }
553 
554  // resize the base data fields
555  //dist.resize(n_base_mapping_shape_functions);
556 
557  // resize the total data fields
558 
559  // the phase term varies with xi, eta and zeta(v): store it for _all_ qp
560  //
561  // when computing the phase, we need the base approximations
562  // therefore, initialize the phase here, but evaluate it
563  // in compute_shape_functions().
564  //
565  // the weight, though, is only needed at the radial quadrature points, n_radial_qp.
566  // but for a uniform interface to the protected data fields
567  // the weight data field (which are accessible from the outside) are expanded to _n_total_qp.
569  weight.resize (_n_total_qp);
571  weightxr_sq.resize (_n_total_qp);
573  dweightdv.resize (n_radial_qp);
574  if (calculate_dphi)
575  dweight.resize (_n_total_qp);
577  dweightxr_sq.resize(_n_total_qp);
578 
580  dphase.resize (_n_total_qp);
581 
582  // this vector contains the integration weights for the combined quadrature rule
583  // if no quadrature rules are given, use only ones.
585 
586  // InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
587  // shape and mapping functions, respectively
588  {
590  JxWxdecay.resize(_n_total_qp);
591  if (calculate_jxw)
592  JxW.resize(_n_total_qp);
594  {
595  xyz.resize(_n_total_qp);
605  }
606  if (calculate_map)
607  {
608  dxidx_map.resize(_n_total_qp);
609  dxidy_map.resize(_n_total_qp);
610  dxidz_map.resize(_n_total_qp);
611  detadx_map.resize(_n_total_qp);
612  detady_map.resize(_n_total_qp);
613  detadz_map.resize(_n_total_qp);
614  dzetadx_map.resize(_n_total_qp);
615  dzetady_map.resize(_n_total_qp);
616  dzetadz_map.resize(_n_total_qp);
617  }
618  if (calculate_phi)
619  phi.resize (_n_total_approx_sf);
621  phixr.resize (_n_total_approx_sf);
622  if (calculate_dphi)
623  {
624  dphi.resize (_n_total_approx_sf);
625  dphidx.resize (_n_total_approx_sf);
626  dphidy.resize (_n_total_approx_sf);
627  dphidz.resize (_n_total_approx_sf);
628  }
629 
631  {
632  dphixr.resize (_n_total_approx_sf);
634  }
635 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
636 
637  if (calculate_d2phi)
638  {
639  libmesh_not_implemented();
640  d2phi.resize (_n_total_approx_sf);
641  d2phidx2.resize (_n_total_approx_sf);
642  d2phidxdy.resize (_n_total_approx_sf);
643  d2phidxdz.resize (_n_total_approx_sf);
644  d2phidy2.resize (_n_total_approx_sf);
645  d2phidydz.resize (_n_total_approx_sf);
646  d2phidz2.resize (_n_total_approx_sf);
647  d2phidxi2.resize (_n_total_approx_sf);
648 
649  if (Dim > 1)
650  {
653  }
654 
655  if (Dim > 2)
656  {
660  }
661  }
662 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
663 
665  {
666  dphidxi.resize (_n_total_approx_sf);
667 
668  if (Dim > 1)
670 
671  if (Dim == 3)
673  }
674 
675  }
676 
677  // collect all the for loops, where inner vectors are
678  // resized to the appropriate number of quadrature points
679  {
680  if (calculate_phi)
681  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
682  phi[i].resize (_n_total_qp);
683 
684  if (calculate_dphi)
685  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
686  {
687  dphi[i].resize (_n_total_qp);
688  dphidx[i].resize (_n_total_qp);
689  dphidy[i].resize (_n_total_qp);
690  dphidz[i].resize (_n_total_qp);
691  }
692 
694  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
695  {
696  phixr[i].resize (_n_total_qp);
697  }
699  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
700  {
701  dphixr[i].resize(_n_total_qp);
702  dphixr_sq[i].resize(_n_total_qp);
703  }
704 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
705  if (calculate_d2phi)
706  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
707  {
708  d2phi[i].resize (_n_total_qp);
709  d2phidx2[i].resize (_n_total_qp);
710  d2phidxdy[i].resize (_n_total_qp);
711  d2phidxdz[i].resize (_n_total_qp);
712  d2phidy2[i].resize (_n_total_qp);
713  d2phidydz[i].resize (_n_total_qp);
714  d2phidy2[i].resize (_n_total_qp);
715  d2phidxi2[i].resize (_n_total_qp);
716 
717  if (Dim > 1)
718  {
719  d2phidxideta[i].resize (_n_total_qp);
720  d2phideta2[i].resize (_n_total_qp);
721  }
722  if (Dim > 2)
723  {
724  d2phidxidzeta[i].resize (_n_total_qp);
725  d2phidetadzeta[i].resize (_n_total_qp);
726  d2phidzeta2[i].resize (_n_total_qp);
727  }
728  }
729 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
730 
732  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
733  {
734  dphidxi[i].resize (_n_total_qp);
735 
736  if (Dim > 1)
737  dphideta[i].resize (_n_total_qp);
738 
739  if (Dim == 3)
740  dphidzeta[i].resize (_n_total_qp);
741 
742  }
743 
744  }
745  {
746  // (a) compute scalar values at _all_ quadrature points -- for uniform
747  // access from the outside to these fields
748  // (b) form a std::vector<Real> which contains the appropriate weights
749  // of the combined quadrature rule!
750  libmesh_assert_equal_to (radial_qp.size(), n_radial_qp);
751 
752  if (radial_qrule && base_qrule)
753  {
754  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
755  const std::vector<Real> & base_qw = base_qrule->get_weights();
756  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
757  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
758 
759  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
760  for (unsigned int bp=0; bp<n_base_qp; ++bp)
761  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
762  }
763 
764 
765  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
766  {
768  for (unsigned int bp=0; bp<n_base_qp; ++bp)
769  weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
770 
772  for (unsigned int bp=0; bp<n_base_qp; ++bp)
773  weightxr_sq[bp + rp*n_base_qp] = InfFERadial::Dxr_sq(radial_qp[rp](0));
774 
776  dweightdv[rp] = InfFERadial::D_deriv(radial_qp[rp](0));
777  }
778  }
779 }
std::vector< Real > weightxr_sq
Definition: inf_fe.h:1065
std::vector< Real > detadz_map
Definition: inf_fe.h:1111
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:1106
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:984
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:355
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::vector< Real > detadx_map_scaled
Definition: inf_fe.h:1121
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:989
std::vector< Real > dzetadz_map
Definition: inf_fe.h:1114
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:1072
std::vector< Real > dxidx_map_scaled
Definition: inf_fe.h:1118
std::vector< Real > dzetady_map
Definition: inf_fe.h:1113
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1132
std::vector< Real > dxidz_map
Definition: inf_fe.h:1108
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:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
std::vector< Real > dxidy_map_scaled
Definition: inf_fe.h:1119
std::vector< Real > dxidy_map
Definition: inf_fe.h:1107
std::vector< Real > detadx_map
Definition: inf_fe.h:1109
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:1122
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:1094
std::vector< Real > dzetady_map_scaled
Definition: inf_fe.h:1125
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1074
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1133
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:1123
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1136
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:1007
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:1223
std::vector< Real > JxW
Definition: inf_fe.h:1137
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:994
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:1190
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1083
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:1112
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1202
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:1120
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:1172
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:1063
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1134
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:1182
std::vector< Real > dzetadz_map_scaled
Definition: inf_fe.h:1126
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:730
std::vector< Real > detady_map
Definition: inf_fe.h:1110
std::vector< Real > dzetadx_map_scaled
Definition: inf_fe.h:1124
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:1196
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:1215

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

References libMesh::InfFEMap::inverse_map().

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

486  {
487  // libmesh_deprecated(); // soon
488  return InfFEMap::inverse_map(Dim, elem, p, tolerance, secure);
489  }
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 492 of file inf_fe.h.

References libMesh::InfFEMap::inverse_map().

497  {
498  // libmesh_deprecated(); // soon
499  return InfFEMap::inverse_map(Dim, elem, physical_points,
500  reference_points, tolerance, secure);
501  }
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 458 of file inf_fe.h.

459  { 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 474 of file inf_fe.h.

References libMesh::InfFEMap::map().

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

476  {
477  // libmesh_deprecated(); // soon
478  return InfFEMap::map(Dim, inf_elem, reference_point);
479  }
static Point map(const unsigned int dim, const Elem *inf_elem, const Point &reference_point)
Definition: inf_fe_map.C:40

◆ n_dofs() [1/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs ( const FEType fet,
const ElemType  inf_elem_type 
)
static
Deprecated:
Call the version of this function that takes an Elem* instead for consistency with other FEInterface::n_dofs() methods.

Definition at line 67 of file inf_fe_static.C.

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

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

69 {
70  libmesh_deprecated();
71 
72  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
73 
74  if (Dim > 1)
75  return FEInterface::n_dofs(Dim-1, fet, base_et) *
76  InfFERadial::n_dofs(fet.radial_order);
77  else
78  return InfFERadial::n_dofs(fet.radial_order);
79 }
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:355
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113

◆ n_dofs() [2/2]

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

87 {
88  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
89  // the InfElem.
90  auto base_elem = inf_elem->build_side_ptr(0);
91 
92  if (Dim > 1)
93  return FEInterface::n_dofs(fet, base_elem.get()) *
94  InfFERadial::n_dofs(fet.radial_order);
95  else
96  return InfFERadial::n_dofs(fet.radial_order);
97 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:355
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:1215

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

106 {
107  libmesh_deprecated();
108 
109  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
110 
111  unsigned int n_base, n_radial;
112  compute_node_indices(inf_elem_type, n, n_base, n_radial);
113 
114  // libMesh::out << "elem_type=" << inf_elem_type
115  // << ", fet.radial_order=" << fet.radial_order
116  // << ", n=" << n
117  // << ", n_radial=" << n_radial
118  // << ", n_base=" << n_base
119  // << std::endl;
120 
121  if (Dim > 1)
122  return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
123  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
124  else
125  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
126 }
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:436

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

135 {
136  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
137  // the InfElem.
138  auto base_elem = inf_elem->build_side_ptr(0);
139 
140  unsigned int n_base, n_radial;
141  compute_node_indices(inf_elem->type(), n, n_base, n_radial);
142 
143  if (Dim > 1)
144  return FEInterface::n_dofs_at_node(fet, base_elem.get(), n_base)
145  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
146  else
147  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
148 }
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:436
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1215

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

156 {
157  libmesh_deprecated();
158 
159  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
160 
161  if (Dim > 1)
162  return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
163  * InfFERadial::n_dofs_per_elem(fet.radial_order);
164  else
165  return InfFERadial::n_dofs_per_elem(fet.radial_order);
166 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:530
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 172 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.

174 {
175  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
176  // the InfElem.
177  auto base_elem = inf_elem->build_side_ptr(0);
178 
179  if (Dim > 1)
180  return FEInterface::n_dofs_per_elem(fet, base_elem.get())
181  * InfFERadial::n_dofs_per_elem(fet.radial_order);
182  else
183  return InfFERadial::n_dofs_per_elem(fet.radial_order);
184 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:530
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:1215

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

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

578  { 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:1208
libmesh_assert(ctx)

◆ n_shape_functions() [1/3]

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 ElemType inf_elem_type)
Definition: inf_fe_static.C:67

◆ n_shape_functions() [2/3]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions ( const FEType fet,
const ElemType  t 
)
inlinestatic

Definition at line 390 of file inf_fe.h.

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

392  { return n_dofs(fet, t); }
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:67

◆ n_shape_functions() [3/3]

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

570  { 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:1190

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

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

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

193 {
194 #ifdef DEBUG
196  {
197  libMesh::err << "WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
198  << " Will return an empty nodal solution. Use " << std::endl
199  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
200  _warned_for_nodal_soln = true;
201  }
202 #endif
203 
204  /*
205  * In the base the infinite element couples to
206  * conventional finite elements. To not destroy
207  * the values there, clear \p nodal_soln. This
208  * indicates to the user of \p nodal_soln to
209  * not use this result.
210  */
211  nodal_soln.clear();
212  libmesh_assert (nodal_soln.empty());
213  return;
214 }
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:1258
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 989 of file fe_base.C.

990 {
991  for (auto i : index_range(dphi))
992  for (auto j : index_range(dphi[i]))
993  os << " d2phi[" << i << "][" << j << "]=" << d2phi[i][j];
994 }
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:117

◆ 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:117

◆ print_dual_d2phi()

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

Implements libMesh::FEAbstract.

Definition at line 997 of file fe_base.C.

998 {
999  for (auto i : index_range(dual_d2phi))
1000  for (auto j : index_range(dual_d2phi[i]))
1001  os << " dual_d2phi[" << i << "][" << j << "]=" << dual_d2phi[i][j];
1002 }
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:117

◆ 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:117

◆ 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:117

◆ 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:117

◆ 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:989
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:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
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:482
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:1223
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:1233
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:994
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:418
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:784
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:1202
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:1215

◆ 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:1208
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:254
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:1223
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:1233
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:1202
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.
Definition: fe_type.h:215
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 225 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().

229 {
230  libmesh_deprecated();
231 
232  libmesh_assert_not_equal_to (Dim, 0);
233 
234 #ifdef DEBUG
235  // this makes only sense when used for mapping
236  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
237  {
238  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
239  << " return the correct trial function! Use " << std::endl
240  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
241  << std::endl;
242  _warned_for_shape = true;
243  }
244 #endif
245 
246  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
247  const Order o_radial (fet.radial_order);
248  const Real v (p(Dim-1));
249 
250  unsigned int i_base, i_radial;
251  compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
252 
253  //TODO:[SP/DD] exp(ikr) is still missing here!
254  // but is it intended? It would be probably somehow nice, but than it would be Number, not Real !
255  // --> thus it would destroy the interface...
256  if (Dim > 1)
257  return FEInterface::shape(Dim-1, fet, base_et, i_base, p)
258  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
259  * InfFERadial::decay(Dim,v);
260  else
261  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
262  * InfFERadial::decay(Dim,v);
263 }
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:1259
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:760
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1283
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 269 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().

273 {
274  libmesh_assert(inf_elem);
275  libmesh_assert_not_equal_to (Dim, 0);
276 
277 #ifdef DEBUG
278  // this makes only sense when used for mapping
279  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
280  {
281  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
282  << " return the correct trial function! Use " << std::endl
283  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
284  << std::endl;
285  _warned_for_shape = true;
286  }
287 #endif
288 
289  const Order o_radial (fet.radial_order);
290  const Real v (p(Dim-1));
291  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
292 
293  unsigned int i_base, i_radial;
294  compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
295 
296  if (Dim > 1)
297  return FEInterface::shape(fet, base_el.get(), i_base, p)
298  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
299  * InfFERadial::decay(Dim,v);
300  else
301  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
302  * InfFERadial::decay(Dim,v);
303 }
OStreamProxy err
static bool _warned_for_shape
Definition: inf_fe.h:1259
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:760
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1283
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 308 of file inf_fe_static.C.

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

313 {
314  if (add_p_level)
315  {
316  FEType tmp_fet=fet;
317  tmp_fet = fet.order + add_p_level * inf_elem->p_level();
318  return InfFE<Dim,T_radial,T_map>::shape(tmp_fet, inf_elem, i, p);
319  }
320  return InfFE<Dim,T_radial,T_map>::shape(fet, inf_elem, i, p);
321 }
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 373 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().

378 {
379  libmesh_assert_not_equal_to (Dim, 0);
380  libmesh_assert_greater (Dim,j);
381 #ifdef DEBUG
382  // this makes only sense when used for mapping
383  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
384  {
385  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
386  << " return the correct trial function gradients! Use " << std::endl
387  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
388  << std::endl;
389  _warned_for_dshape = true;
390  }
391 #endif
392  const Order o_radial (fe_t.radial_order);
393  const Real v (p(Dim-1));
394 
395  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
396 
397  unsigned int i_base, i_radial;
398 
399  if ((-1. > v ) || (v > 1.))
400  {
401  //TODO: This is for debugging. We should never come here.
402  // Therefore we can do very useless things then:
403  i_base=0;
404  }
405  compute_shape_indices(fe_t, inf_elem, i, i_base, i_radial);
406 
407  if (j== Dim -1)
408  {
409  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
410  * InfFERadial::decay(Dim,v)
411  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
412  * InfFERadial::decay_deriv(Dim,v);
413 
414  return FEInterface::shape(fe_t, base_el.get(), i_base, p)*RadialDeriv;
415  }
416  return FEInterface::shape_deriv(fe_t, base_el.get(), i_base, j, p)
417  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
418  * InfFERadial::decay(Dim,v);
419 }
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:1309
static bool _warned_for_dshape
Definition: inf_fe.h:1260
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:760
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1283
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 607 of file inf_fe_static.C.

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

613 {
614  if (add_p_level)
615  {
616  FEType tmp_fet=fet;
617  tmp_fet = fet.order + add_p_level * inf_elem->p_level();
618  return InfFE<Dim,T_radial,T_map>::shape_deriv(tmp_fet, inf_elem, i, j, p);
619  }
620  return InfFE<Dim,T_radial,T_map>::shape_deriv(fet, inf_elem, i, j, p);
621 }
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 326 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().

331 {
332  libmesh_deprecated();
333 
334  libmesh_assert_not_equal_to (Dim, 0);
335  libmesh_assert_greater (Dim,j);
336 #ifdef DEBUG
337  // this makes only sense when used for mapping
338  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
339  {
340  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
341  << " return the correct trial function gradients! Use " << std::endl
342  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
343  << std::endl;
344  _warned_for_dshape = true;
345  }
346 #endif
347 
348  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
349  const Order o_radial (fe_t.radial_order);
350  const Real v (p(Dim-1));
351 
352  unsigned int i_base, i_radial;
353  compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
354 
355  if (j== Dim -1)
356  {
357  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
358  * InfFERadial::decay(Dim,v)
359  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
360  * InfFERadial::decay_deriv(Dim, v);
361 
362  return FEInterface::shape(Dim-1, fe_t, base_et, i_base, p)*RadialDeriv;
363  }
364 
365  return FEInterface::shape_deriv(Dim-1, fe_t, base_et, i_base, j, p)
366  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
367  * InfFERadial::decay(Dim,v);
368 }
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:1309
static bool _warned_for_dshape
Definition: inf_fe.h:1260
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:760
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1283
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 1152 of file inf_fe.C.

1153 {
1154  // We never call this.
1155  libmesh_not_implemented();
1156  return false;
1157 }

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

548  {
549  libmesh_not_implemented();
550  }

◆ 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:1215

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

◆ InfFEMap

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

Definition at line 1272 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 1162 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 1182 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 1250 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 1190 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 1152 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 1172 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 1196 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 1260 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 1258 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 1259 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 1215 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 1223 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 1202 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 1007 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 984 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 989 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 1000 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 1233 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 1109 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 1121 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 1110 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 1122 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 1111 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 1123 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 1100 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 1088 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 1072 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 1106 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 1118 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 1107 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 1119 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 1108 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 1120 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 1112 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 1124 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 1113 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 1125 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 1114 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 1126 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 1137 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 1136 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 1094 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 1139 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 1208 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 1083 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 1140 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 1063 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: