libMesh
Loading...
Searching...
No Matches
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 <inf_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.
 
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.
 
 ~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.
 
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.
 
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.
 
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.
 
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.
 
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
 
std::unique_ptr< FEGenericBase< Real > > build (const unsigned int dim, const FEType &fet)
 
std::unique_ptr< FEGenericBase< RealGradient > > build (const unsigned int dim, const FEType &fet)
 
std::unique_ptr< FEGenericBase< Real > > build_InfFE (const unsigned int dim, const FEType &fet)
 
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
 
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
 
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.
 
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.
 
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.
 
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.
 
virtual void reinit_default_dual_shape_coeffs (const Elem *)
 This re-computes the dual shape function coefficients using DEFAULT qrule.
 
unsigned int get_dim () const
 
void get_nothing () const
 
const Elem * get_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.
 
FEFamily get_family () const
 
const FEMap & get_fe_map () const
 
FEMap & get_fe_map ()
 
void print_JxW (std::ostream &os) const
 Prints the Jacobian times the weight for each quadrature point.
 
void print_xyz (std::ostream &os) const
 Prints the spatial location of each quadrature point (on the physical element).
 
void print_info (std::ostream &os) const
 Prints all the relevant information about the current element.
 
void set_calculate_dual (const bool val)
 set calculate_dual as needed
 
void set_calculate_default_dual_coeff (const bool val)
 set calculate_default_dual_coeff as needed
 
void add_p_level_in_reinit (bool value)
 Indicate whether to add p-refinement levels in init/reinit methods.
 
bool add_p_level_in_reinit () const
 Whether to add p-refinement levels in init/reinit methods.
 

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 *.
 
static unsigned int n_shape_functions (const FEType &fet, const Elem *inf_elem)
 
static unsigned int n_dofs (const FEType &fet, const Elem *inf_elem)
 
static unsigned int n_dofs_at_node (const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
 
static unsigned int n_dofs_at_node (const FEType &fet, const Elem *inf_elem, const unsigned int n)
 
static unsigned int n_dofs_per_elem (const FEType &fet, const ElemType inf_elem_type)
 
static unsigned int n_dofs_per_elem (const FEType &fet, const Elem *inf_elem)
 
static void nodal_soln (const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
 Usually, this method would build the nodal soln from the element soln.
 
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.
 
static void inf_compute_node_constraints (NodeConstraints &constraints, const Elem *elem)
 
static std::unique_ptr< FEGenericBase > build (const unsigned int dim, const FEType &type)
 Builds a specific finite element type.
 
static std::unique_ptr< FEGenericBase > build_InfFE (const unsigned int dim, const FEType &type)
 Builds a specific infinite element type.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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)
 
static void print_info (std::ostream &out_stream=libMesh::out)
 Prints the reference information, by default to libMesh::out.
 
static std::string get_info ()
 Gets a string containing the reference information.
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects.
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info().
 
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.
 

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.
 
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>.
 
virtual void determine_calculations () override
 Determine which values are to be calculated, for both the FE itself and for the FEMap.
 
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.
 
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.
 
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.
 
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.
 
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.
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval_deriv (Real v, Order o, unsigned i)
 
Real eval_deriv (Real v, Order o, unsigned i)
 
Real eval_deriv (Real v, Order o, unsigned i)
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval_deriv (Real x, Order, unsigned n)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval (Real v, Order o, unsigned i)
 
Real eval_deriv (Real v, Order o, unsigned i)
 
Real eval_deriv (Real v, Order o, unsigned i)
 
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.
 
void compute_dual_shape_coeffs (const std::vector< Real > &, const std::vector< std::vector< OutputShape > > &)
 
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.
 
void compute_dual_shape_functions ()
 
void compute_dual_shape_functions ()
 
void increment_constructor_count (const std::string &name) noexcept
 Increments the construction counter.
 
void increment_destructor_count (const std::string &name) noexcept
 Increments the destruction counter.
 

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

Protected Attributes

bool calculate_map_scaled
 Are we calculating scaled mapping functions?
 
bool calculate_phi_scaled
 Are we calculating scaled shape functions?
 
bool calculate_dphi_scaled
 Are we calculating scaled shape function gradients?
 
bool calculate_xyz
 Are we calculating the positions of quadrature points?
 
bool calculate_jxw
 Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst stability.
 
std::vector< Point > xyz
 Physical quadrature points.
 
std::vector< Real > weightxr_sq
 
std::vector< Real > dweightdv
 the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points.
 
std::vector< RealGradient > dweightxr_sq
 
std::vector< Real > som
 the radial decay \( 1/r \) in local coordinates.
 
std::vector< Real > dsomdv
 the first local derivative of the radial decay \( 1/r \) in local coordinates.
 
std::vector< std::vector< Real > > mode
 the radial approximation shapes in local coordinates Needed when setting up the overall shape functions.
 
std::vector< std::vector< Real > > dmodedv
 the first local derivative of the radial approximation shapes.
 
std::vector< Real > dxidx_map
 
std::vector< Real > dxidy_map
 
std::vector< Real > dxidz_map
 
std::vector< Real > detadx_map
 
std::vector< Real > detady_map
 
std::vector< Real > detadz_map
 
std::vector< Real > dzetadx_map
 
std::vector< Real > dzetady_map
 
std::vector< Real > dzetadz_map
 
std::vector< Real > dxidx_map_scaled
 
std::vector< Real > dxidy_map_scaled
 
std::vector< Real > dxidz_map_scaled
 
std::vector< Real > detadx_map_scaled
 
std::vector< Real > detady_map_scaled
 
std::vector< Real > detadz_map_scaled
 
std::vector< Real > dzetadx_map_scaled
 
std::vector< Real > dzetady_map_scaled
 
std::vector< Real > dzetadz_map_scaled
 
std::vector< std::vector< Real > > phixr
 
std::vector< std::vector< RealGradient > > dphixr
 
std::vector< std::vector< RealGradient > > dphixr_sq
 
std::vector< Real > JxWxdecay
 
std::vector< Real > JxW
 
std::vector< Point > normals
 
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.
 
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.
 
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.
 
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.
 
unsigned int _n_total_approx_sf
 The number of total approximation shape functions for the current configuration.
 
std::vector< Real > _total_qrule_weights
 this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be used
 
std::unique_ptr< QBase > base_qrule
 The quadrature rule for the base element associated with the current infinite element.
 
std::unique_ptr< QBase > radial_qrule
 The quadrature rule for the base element associated with the current infinite element.
 
std::unique_ptr< const Elem > base_elem
 The "base" (aka non-infinite) element associated with the current infinite element.
 
std::unique_ptr< FEBase > base_fe
 Have a FE<Dim-1,T_base> handy for base approximation.
 
FEType current_fe_type
 This FEType stores the characteristics for which the data structures phi, phi_map etc are currently initialized.
 
std::unique_ptr< FETransformationBase< OutputType > > _fe_trans
 Object that handles computing shape function values, gradients, etc in the physical domain.
 
std::vector< std::vector< OutputShape > > phi
 Shape function values.
 
std::vector< std::vector< OutputShape > > dual_phi
 
std::vector< std::vector< OutputGradient > > dphi
 Shape function derivative values.
 
std::vector< std::vector< OutputGradient > > dual_dphi
 
DenseMatrix< Real > dual_coeff
 Coefficient matrix for the dual basis.
 
std::vector< std::vector< OutputShape > > curl_phi
 Shape function curl values.
 
std::vector< std::vector< OutputDivergence > > div_phi
 Shape function divergence values.
 
std::vector< std::vector< OutputShape > > dphidxi
 Shape function derivatives in the xi direction.
 
std::vector< std::vector< OutputShape > > dphideta
 Shape function derivatives in the eta direction.
 
std::vector< std::vector< OutputShape > > dphidzeta
 Shape function derivatives in the zeta direction.
 
std::vector< std::vector< OutputShape > > dphidx
 Shape function derivatives in the x direction.
 
std::vector< std::vector< OutputShape > > dphidy
 Shape function derivatives in the y direction.
 
std::vector< std::vector< OutputShape > > dphidz
 Shape function derivatives in the z direction.
 
std::vector< std::vector< OutputTensor > > d2phi
 Shape function second derivative values.
 
std::vector< std::vector< OutputTensor > > dual_d2phi
 
std::vector< std::vector< OutputShape > > d2phidxi2
 Shape function second derivatives in the xi direction.
 
std::vector< std::vector< OutputShape > > d2phidxideta
 Shape function second derivatives in the xi-eta direction.
 
std::vector< std::vector< OutputShape > > d2phidxidzeta
 Shape function second derivatives in the xi-zeta direction.
 
std::vector< std::vector< OutputShape > > d2phideta2
 Shape function second derivatives in the eta direction.
 
std::vector< std::vector< OutputShape > > d2phidetadzeta
 Shape function second derivatives in the eta-zeta direction.
 
std::vector< std::vector< OutputShape > > d2phidzeta2
 Shape function second derivatives in the zeta direction.
 
std::vector< std::vector< OutputShape > > d2phidx2
 Shape function second derivatives in the x direction.
 
std::vector< std::vector< OutputShape > > d2phidxdy
 Shape function second derivatives in the x-y direction.
 
std::vector< std::vector< OutputShape > > d2phidxdz
 Shape function second derivatives in the x-z direction.
 
std::vector< std::vector< OutputShape > > d2phidy2
 Shape function second derivatives in the y direction.
 
std::vector< std::vector< OutputShape > > d2phidydz
 Shape function second derivatives in the y-z direction.
 
std::vector< std::vector< OutputShape > > d2phidz2
 Shape function second derivatives in the z direction.
 
std::vector< OutputGradient > dphase
 Used for certain infinite element families: the first derivatives of the phase term in global coordinates, over all quadrature points.
 
std::vector< RealGradient > dweight
 Used for certain infinite element families: the global derivative of the additional radial weight \( 1/{r^2} \), over all quadrature points.
 
std::vector< Real > weight
 Used for certain infinite element families: the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points.
 
std::unique_ptr< FEMap > _fe_map
 
const unsigned int dim
 The dimensionality of the object.
 
bool calculations_started
 Have calculations with this object already been started? Then all get_* functions should already have been called.
 
bool calculate_dual
 Are we calculating dual basis?
 
bool calculate_default_dual_coeff
 Are we calculating the coefficient for the dual basis using the default qrule?
 
bool calculate_nothing
 Are we potentially deliberately calculating nothing?
 
bool calculate_map
 Are we calculating mapping functions?
 
bool calculate_phi
 Should we calculate shape functions?
 
bool calculate_dphi
 Should we calculate shape function gradients?
 
bool calculate_d2phi
 Should we calculate shape function hessians?
 
const bool calculate_d2phi =false
 
bool calculate_curl_phi
 Should we calculate shape function curls?
 
bool calculate_div_phi
 Should we calculate shape function divergences?
 
bool calculate_dphiref
 Should we calculate reference shape function gradients?
 
FEType fe_type
 The finite element type for this object.
 
ElemType _elem_type
 The element type the current data structures were set up for.
 
const Elem * _elem
 The element the current data structures were set up for.
 
unsigned int _elem_p_level
 The element p-refinement level the current data structures are set up for.
 
unsigned int _p_level
 The p refinement level the current data structures are set up for.
 
QBase * qrule
 A pointer to the quadrature rule employed.
 
bool shapes_on_quadrature
 A flag indicating if current data structures correspond to quadrature rule points.
 
unsigned int _n_total_qp
 The total number of quadrature points for the current configuration.
 
bool _add_p_level_in_reinit
 Whether to add p-refinement levels in init/reinit methods.
 

Static Protected Attributes

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

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.
 
static bool _warned_for_nodal_soln = false
 static members that are used to issue warning messages only once.
 
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.
 
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 224 of file inf_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.

43 :
44 FEBase (Dim, fet),
45
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}
FEType fe_type
The finite element type for this object.
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition fe_type.h:284
FEFamily radial_family
The type of approximation in radial direction.
Definition fe_type.h:276
FEType current_fe_type
This FEType stores the characteristics for which the data structures phi, phi_map etc are currently i...
Definition inf_fe.h:1216
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition inf_fe.h:977
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition inf_fe.h:990
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition inf_fe.h:983
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition inf_fe.h:1173
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition inf_fe.h:1206
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition inf_fe.h:967
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition inf_fe.h:972
FEGenericBase< Real > FEBase
@ INVALID_ORDER
Definition enum_order.h:88

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

◆ ~InfFE()

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

Member Function Documentation

◆ add_p_level_in_reinit() [1/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.

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

References libMesh::FEAbstract::_add_p_level_in_reinit.

◆ add_p_level_in_reinit() [2/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.

static const bool value
Definition xdr_io.C:55

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

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

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

80{
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}
QBase * qrule
A pointer to the quadrature rule employed.
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition fe_type.h:263
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition inf_fe.h:1185
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition inf_fe.h:1191
int get_order() const
Explicitly request the order as an int.
Definition fe_type.h:80
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.
libmesh_assert(ctx)

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

◆ build() [1/3]

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

◆ build() [2/3]

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

Definition at line 437 of file fe_base.C.

439{
440 switch (dim)
441 {
442 // 0D
443 case 0:
444 {
445 switch (fet.family)
446 {
447 case HIERARCHIC_VEC:
448 return std::make_unique<FEHierarchicVec<0>>(fet);
449
451 return std::make_unique<FEL2HierarchicVec<0>>(fet);
452
453 case LAGRANGE_VEC:
454 return std::make_unique<FELagrangeVec<0>>(fet);
455
456 case L2_LAGRANGE_VEC:
457 return std::make_unique<FEL2LagrangeVec<0>>(fet);
458
459 case MONOMIAL_VEC:
460 return std::make_unique<FEMonomialVec<0>>(fet);
461
462 default:
463 libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
464 }
465 }
466 case 1:
467 {
468 switch (fet.family)
469 {
470 case HIERARCHIC_VEC:
471 return std::make_unique<FEHierarchicVec<1>>(fet);
472
474 return std::make_unique<FEL2HierarchicVec<1>>(fet);
475
476 case LAGRANGE_VEC:
477 return std::make_unique<FELagrangeVec<1>>(fet);
478
479 case L2_LAGRANGE_VEC:
480 return std::make_unique<FEL2LagrangeVec<1>>(fet);
481
482 case MONOMIAL_VEC:
483 return std::make_unique<FEMonomialVec<1>>(fet);
484
485 default:
486 libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
487 }
488 }
489 case 2:
490 {
491 switch (fet.family)
492 {
493 case HIERARCHIC_VEC:
494 return std::make_unique<FEHierarchicVec<2>>(fet);
495
497 return std::make_unique<FEL2HierarchicVec<2>>(fet);
498
499 case LAGRANGE_VEC:
500 return std::make_unique<FELagrangeVec<2>>(fet);
501
502 case L2_LAGRANGE_VEC:
503 return std::make_unique<FEL2LagrangeVec<2>>(fet);
504
505 case MONOMIAL_VEC:
506 return std::make_unique<FEMonomialVec<2>>(fet);
507
508 case NEDELEC_ONE:
509 return std::make_unique<FENedelecOne<2>>(fet);
510
511 case RAVIART_THOMAS:
512 return std::make_unique<FERaviartThomas<2>>(fet);
513
515 return std::make_unique<FEL2RaviartThomas<2>>(fet);
516
517 default:
518 libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
519 }
520 }
521 case 3:
522 {
523 switch (fet.family)
524 {
525 case HIERARCHIC_VEC:
526 return std::make_unique<FEHierarchicVec<3>>(fet);
527
529 return std::make_unique<FEL2HierarchicVec<3>>(fet);
530
531 case LAGRANGE_VEC:
532 return std::make_unique<FELagrangeVec<3>>(fet);
533
534 case L2_LAGRANGE_VEC:
535 return std::make_unique<FEL2LagrangeVec<3>>(fet);
536
537 case MONOMIAL_VEC:
538 return std::make_unique<FEMonomialVec<3>>(fet);
539
540 case NEDELEC_ONE:
541 return std::make_unique<FENedelecOne<3>>(fet);
542
543 case RAVIART_THOMAS:
544 return std::make_unique<FERaviartThomas<3>>(fet);
545
547 return std::make_unique<FEL2RaviartThomas<3>>(fet);
548
549 default:
550 libmesh_error_msg("ERROR: Bad FEType.family == " << Utility::enum_to_string(fet.family));
551 }
552 }
553
554 default:
555 libmesh_error_msg("Invalid dimension dim = " << dim);
556 } // switch(dim)
557}
@ L2_RAVIART_THOMAS
@ L2_HIERARCHIC_VEC

References dim, libMesh::Utility::enum_to_string(), libMesh::FEType::family, libMesh::HIERARCHIC_VEC, libMesh::L2_HIERARCHIC_VEC, libMesh::L2_LAGRANGE_VEC, libMesh::L2_RAVIART_THOMAS, libMesh::LAGRANGE_VEC, libMesh::MONOMIAL_VEC, libMesh::NEDELEC_ONE, and libMesh::RAVIART_THOMAS.

◆ build() [3/3]

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

Builds a specific finite element type.

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

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

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::MeshFunction::_gradient_on_elem(), alternative_fe_assembly(), LinearElasticity::assemble(), assemble(), assemble(), assemble_1D(), AssembleOptimization::assemble_A_and_F(), libMesh::ClawSystem::assemble_advection_matrices(), libMesh::ClawSystem::assemble_avg_coupling_matrices(), assemble_biharmonic(), libMesh::ClawSystem::assemble_boundary_condition_matrices(), assemble_cd(), 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_poisson(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_shell(), assemble_stokes(), assemble_temperature_jump(), assemble_wave(), assemble_wave(), Biharmonic::JR::bounds(), libMesh::FEMContext::cached_fe(), libMesh::FEInterface::compute_data(), compute_enriched_soln(), compute_jacobian(), compute_residual(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), LinearElasticityWithContact::compute_stresses(), 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(), LargeDeformationElasticity::jacobian(), LaplaceYoung::jacobian(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::SmoothnessEstimator::EstimateSmoothness::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), OverlappingCouplingFunctor::operator()(), libMesh::MeshFunction::operator()(), periodic_bc_test_poisson(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), LargeDeformationElasticity::residual(), LaplaceYoung::residual(), LinearElasticityWithContact::residual_and_jacobian(), Biharmonic::JR::residual_and_jacobian(), libMesh::HPCoarsenTest::select_refinement(), DualShapeTest::setUp(), RationalMapTest< elem_type >::setUp(), FETestBase< order, family, elem_type, build_nx, CaseName >::setUp(), libMesh::Elem::side_vertex_average_normal(), SideVertexAverageNormalTest::testC0Polygon(), FETest< order, family, elem_type, CaseName >::testCustomReinit(), SideVertexAverageNormalTest::testEdge3(), HDivGradTest::testGradByFiniteDifference(), SideVertexAverageNormalTest::testHexes(), FECollocationTest< family, elem_type, order >::testMassMatrixIsDiagonal(), InfFERadialTest::testRefinement(), FECollocationTest< family, elem_type, order >::testShapesArePermutation(), InfFERadialTest::testSides(), DualShapeTest::testTransformedDual(), libMesh::Elem::true_centroid(), and libMesh::Elem::volume().

◆ build_InfFE() [1/3]

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

Definition at line 570 of file fe_base.C.

572{
573 switch (dim)
574 {
575
576 // 1D
577 case 1:
578 {
579 switch (fet.radial_family)
580 {
581 case INFINITE_MAP:
582 libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
583
584 case JACOBI_20_00:
585 {
586 switch (fet.inf_map)
587 {
588 case CARTESIAN:
589 return std::make_unique<InfFE<1,JACOBI_20_00,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 JACOBI_30_00:
597 {
598 switch (fet.inf_map)
599 {
600 case CARTESIAN:
601 return std::make_unique<InfFE<1,JACOBI_30_00,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 case LEGENDRE:
609 {
610 switch (fet.inf_map)
611 {
612 case CARTESIAN:
613 return std::make_unique<InfFE<1,LEGENDRE,CARTESIAN>>(fet);
614
615 default:
616 libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
617 }
618 }
619
620 case LAGRANGE:
621 {
622 switch (fet.inf_map)
623 {
624 case CARTESIAN:
625 return std::make_unique<InfFE<1,LAGRANGE,CARTESIAN>>(fet);
626
627 default:
628 libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
629 }
630 }
631
632 default:
633 libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
634 }
635 }
636
637
638
639
640 // 2D
641 case 2:
642 {
643 switch (fet.radial_family)
644 {
645 case INFINITE_MAP:
646 libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
647
648 case JACOBI_20_00:
649 {
650 switch (fet.inf_map)
651 {
652 case CARTESIAN:
653 return std::make_unique<InfFE<2,JACOBI_20_00,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 JACOBI_30_00:
661 {
662 switch (fet.inf_map)
663 {
664 case CARTESIAN:
665 return std::make_unique<InfFE<2,JACOBI_30_00,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 case LEGENDRE:
673 {
674 switch (fet.inf_map)
675 {
676 case CARTESIAN:
677 return std::make_unique<InfFE<2,LEGENDRE,CARTESIAN>>(fet);
678
679 default:
680 libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
681 }
682 }
683
684 case LAGRANGE:
685 {
686 switch (fet.inf_map)
687 {
688 case CARTESIAN:
689 return std::make_unique<InfFE<2,LAGRANGE,CARTESIAN>>(fet);
690
691 default:
692 libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
693 }
694 }
695
696 default:
697 libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
698 }
699 }
700
701
702
703
704 // 3D
705 case 3:
706 {
707 switch (fet.radial_family)
708 {
709 case INFINITE_MAP:
710 libmesh_error_msg("ERROR: Don't build an infinite element with FEFamily = " << Utility::enum_to_string(fet.radial_family));
711
712 case JACOBI_20_00:
713 {
714 switch (fet.inf_map)
715 {
716 case CARTESIAN:
717 return std::make_unique<InfFE<3,JACOBI_20_00,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 JACOBI_30_00:
725 {
726 switch (fet.inf_map)
727 {
728 case CARTESIAN:
729 return std::make_unique<InfFE<3,JACOBI_30_00,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 case LEGENDRE:
737 {
738 switch (fet.inf_map)
739 {
740 case CARTESIAN:
741 return std::make_unique<InfFE<3,LEGENDRE,CARTESIAN>>(fet);
742
743 default:
744 libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
745 }
746 }
747
748 case LAGRANGE:
749 {
750 switch (fet.inf_map)
751 {
752 case CARTESIAN:
753 return std::make_unique<InfFE<3,LAGRANGE,CARTESIAN>>(fet);
754
755 default:
756 libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << Utility::enum_to_string(fet.inf_map));
757 }
758 }
759
760 default:
761 libmesh_error_msg("ERROR: Bad FEType.radial_family= " << Utility::enum_to_string(fet.radial_family));
762 }
763 }
764
765 default:
766 libmesh_error_msg("Invalid dimension dim = " << dim);
767 }
768}

◆ build_InfFE() [2/3]

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

Builds a specific infinite element type.

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

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

Referenced by assemble_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() [3/3]

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

Definition at line 774 of file fe_base.C.

776{
777 // No vector types defined... YET.
778 libmesh_not_implemented();
779 return std::unique_ptr<FEVectorBase>();
780}

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

607 {
608 return calculate_nothing &&
609 !this->calculate_phi && !this->calculate_dphi &&
610#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
611 !this->calculate_d2phi &&
612#endif
613 !this->calculate_curl_phi && !this->calculate_div_phi &&
614 !this->calculate_map;
615 }
bool calculate_map
Are we calculating mapping functions?
bool calculate_nothing
Are we potentially deliberately calculating nothing?
bool calculate_d2phi
Should we calculate shape function hessians?
bool calculate_phi
Should we calculate shape functions?
bool calculate_dphi
Should we calculate shape function gradients?
bool calculate_curl_phi
Should we calculate shape function curls?
bool calculate_div_phi
Should we calculate shape function divergences?

References libMesh::FEAbstract::calculate_curl_phi, libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_div_phi, libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculate_map, libMesh::FEAbstract::calculate_nothing, and libMesh::FEAbstract::calculate_phi.

◆ coarsened_dof_values() [1/2]

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

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

Computes a vector of coefficients corresponding to all dof_indices.

Definition at line 1561 of file fe_base.C.

1566{
1567 Ue.resize(0);
1568
1569 for (auto v : make_range(dof_map.n_variables()))
1570 {
1572
1573 coarsened_dof_values(old_vector, dof_map, elem, Usub,
1574 v, use_old_dof_indices);
1575
1576 Ue.append (Usub);
1577 }
1578}
Defines a dense vector for use in Finite Element-type computations.
static void coarsened_dof_values(const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const unsigned int var, const bool use_old_dof_indices=false)
Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children...
Definition fe_base.C:1026
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
Definition int_range.h:176

References libMesh::DenseVector< T >::append(), libMesh::make_range(), libMesh::DofMap::n_variables(), and libMesh::DenseVector< T >::resize().

◆ coarsened_dof_values() [2/2]

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

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

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

Definition at line 1026 of file fe_base.C.

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

References libMesh::C_ONE, libMesh::Elem::child_ptr(), libMesh::Elem::child_ref_range(), libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::FEType::default_quadrature_rule(), dim, libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::FEInterface::dofs_on_edge(), libMesh::FEInterface::dofs_on_side(), libMesh::Elem::edge_index_range(), libMesh::TensorTools::inner_product(), libMesh::FEMap::inverse_map(), libMesh::Elem::is_child_on_edge(), libMesh::Elem::is_child_on_side(), libMesh::Elem::is_vertex(), libMesh::libmesh_assert(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::n_children(), libMesh::FEInterface::n_dofs(), libMesh::FEInterface::n_dofs_at_node(), libMesh::Elem::n_nodes(), n_nodes, libMesh::DofMap::old_dof_indices(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::Elem::side_index_range(), libMesh::TOLERANCE, libMesh::DofMap::variable_type(), libMesh::zero, libMesh::DenseMatrix< T >::zero(), and libMesh::DenseVector< T >::zero().

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

◆ compute_data()

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

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

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

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

Definition at line 407 of file inf_fe_static.C.

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

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::TypeVector< T >::norm(), libMesh::Elem::origin(), libMesh::FEComputeData::p, libMesh::FEComputeData::phase, libMesh::pi, libMesh::Elem::point(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::FEComputeData::shape, libMesh::FEInterface::shape(), libMesh::FEInterface::shape_deriv(), libMesh::FEComputeData::speed, and libMesh::Elem::type().

◆ compute_dual_shape_coeffs() [1/3]

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

◆ compute_dual_shape_coeffs() [2/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 838 of file fe_base.h.

839{
840 libmesh_error_msg(
841 "Computation of dual shape functions for vector finite element "
842 "families is not currently implemented");
843}

◆ compute_dual_shape_coeffs() [3/3]

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

829{
830 // Start logging the dual coeff computation
831 LOG_SCOPE("compute_dual_shape_coeffs()", "FE");
832
833 const unsigned int sz=phi_vals.size();
834 libmesh_error_msg_if(!sz, "ERROR: cannot compute dual shape coefficients with empty phi values");
835
836 //compute dual basis coefficient (dual_coeff)
837 dual_coeff.resize(sz, sz);
838 DenseMatrix<Real> A(sz, sz), D(sz, sz);
839
840 for (const auto i : index_range(phi_vals))
841 for (const auto qp : index_range(phi_vals[i]))
842 {
843 D(i,i) += JxW[qp]*phi_vals[i][qp];
844 for (const auto j : index_range(phi_vals))
845 A(i,j) += JxW[qp]*phi_vals[i][qp]*phi_vals[j][qp];
846 }
847
848 // The integral positivity condition on the dual basis (Popp, Wohlmuth, Gee and Wall, SIAM J. Sci.
849 // Comput. 34(4):B421-B446, 2012, Eq. (4.2)) fails on QUAD8 and TRI6: D(k,k) = \int N_k is -1/3 at a
850 // QUAD8 corner and exactly 0 at a TRI6 vertex (their Eqs. (4.3) and (4.4)), the latter leaving those
851 // dual shape functions identically zero. Biorthogonalize instead against the locally quadratic
852 // transformed basis Ntilde = T N of their Sec. 4.4.1, in which each vertex absorbs a fraction alpha
853 // of its adjacent mid-edge shapes. That replaces D by T^-1 diag(T d), which for this T is the sparse
854 // update below. alpha = 1/5 is recommended there, and makes the weights strictly positive (QUAD8
855 // 1/5 and 4/5, TRI6 1/15 and 1/10) while preserving the partition of unity. T = I elsewhere.
856 // SECOND order on TRI7 is the TRI6 basis, with no degree of freedom at the centroid node, and
857 // L2_LAGRANGE shares the LAGRANGE shape functions.
858 if (_elem && (get_family() == LAGRANGE || get_family() == L2_LAGRANGE) &&
859 (((_elem->type() == TRI6 || _elem->type() == TRI7) && sz == 6) ||
860 (_elem->type() == QUAD8 && sz == 8)))
861 {
862 const Real alpha = Real(1)/5;
863 // Mid-edge nodes are the trailing indices, and only vertex entries are written, so D(m,m) here
864 // is never a value an earlier iteration modified.
865 for (const auto m : make_range(_elem->n_vertices(), sz))
866 for (const auto v : make_range(_elem->n_second_order_adjacent_vertices(m)))
867 {
868 const auto vertex = _elem->second_order_adjacent_vertex(m, v);
869 D(vertex, vertex) += alpha*D(m,m);
870 D(vertex, m) -= alpha*D(m,m);
871 }
872 }
873
874 // dual_coeff = A^-1*D
875 for (const auto j : index_range(phi_vals))
876 {
877 DenseVector<Real> Dcol(sz), coeffcol(sz);
878 for (const auto i : index_range(phi_vals))
879 Dcol(i) = D(i, j);
880 A.cholesky_solve(Dcol, coeffcol);
881
882 for (const auto row : index_range(phi_vals))
883 dual_coeff(row, j)=coeffcol(row);
884 }
885}
virtual ElemType type() const =0
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const
Definition elem.C:3183
const Elem * _elem
The element the current data structures were set up for.
FEFamily get_family() const
DenseMatrix< Real > dual_coeff
Coefficient matrix for the dual basis.
Definition fe_base.h:664
LIBMESH_DEVICE_INLINE ResultVector row(const TensorLike &T_in, const unsigned int row_index)
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition int_range.h:153

References libMesh::index_range(), libMesh::L2_LAGRANGE, libMesh::LAGRANGE, libMesh::make_range(), libMesh::QUAD8, libMesh::Real, libMesh::TRI6, and libMesh::TRI7.

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

831{
832 libmesh_error_msg(
833 "Computation of dual shape functions for vector finite element "
834 "families is not currently implemented");
835}

◆ compute_dual_shape_functions() [2/3]

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

◆ compute_dual_shape_functions() [3/3]

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

Definition at line 888 of file fe_base.C.

889{
890 // Start logging the shape function computation
891 LOG_SCOPE("compute_dual_shape_functions()", "FE");
892
893 // The dual coeffs matrix should have the same size as phi
894 libmesh_assert(dual_coeff.m() == phi.size());
895 libmesh_assert(dual_coeff.n() == phi.size());
896
897 // initialize dual basis
898 for (const auto j : index_range(phi))
899 for (const auto qp : index_range(phi[j]))
900 {
901 dual_phi[j][qp] = 0;
902 if (calculate_dphi)
903 dual_dphi[j][qp] = 0;
904#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
905 if (calculate_d2phi)
906 dual_d2phi[j][qp] = 0;
907#endif
908 }
909
910 // compute dual basis
911 for (const auto j : index_range(phi))
912 for (const auto i : index_range(phi))
913 for (const auto qp : index_range(phi[j]))
914 {
915 dual_phi[j][qp] += dual_coeff(i, j) * phi[i][qp];
916 if (calculate_dphi)
917 dual_dphi[j][qp] += dual_coeff(i, j) * dphi[i][qp];
918#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
919 if (calculate_d2phi)
920 dual_d2phi[j][qp] += dual_coeff(i, j) * d2phi[i][qp];
921#endif
922 }
923}
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition fe_base.h:712
std::vector< std::vector< OutputGradient > > dual_dphi
Definition fe_base.h:659
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition fe_base.h:658
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition fe_base.h:652
std::vector< std::vector< OutputTensor > > dual_d2phi
Definition fe_base.h:713
std::vector< std::vector< OutputShape > > dual_phi
Definition fe_base.h:653

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

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

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}
std::vector< Real > JxW
Definition inf_fe.h:1120
std::vector< Point > normals
Definition inf_fe.h:1122
std::vector< Real > _total_qrule_weights
this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be...
Definition inf_fe.h:1179
std::vector< Real > JxWxdecay
Definition inf_fe.h:1119
std::vector< std::vector< Point > > tangents
Definition inf_fe.h:1123
LIBMESH_DEVICE_INLINE auto det(const TensorLike &T_in) -> std::enable_if_t< is_tensor_like_v< TensorLike >, decltype(T_in.det())>
OStreamProxy err

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

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

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

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

◆ compute_node_indices()

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

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

Definition at line 610 of file inf_fe_static.C.

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

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

◆ compute_node_indices_fast()

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

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

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

Definition at line 817 of file inf_fe_static.C.

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

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.

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

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

References libMesh::TypeVector< T >::absolute_fuzzy_equals(), libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::BoundaryInfo::boundary_ids(), libMesh::C_ONE, libMesh::C_ZERO, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::DofMap::constrain_p_dofs(), libMesh::FEType::default_quadrature_order(), libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::FEInterface::dofs_on_side(), libMesh::MeshBase::get_boundary_info(), libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::PeriodicBoundaryBase::get_transformation_matrix(), libMesh::PeriodicBoundaryBase::get_variables(), libMesh::PeriodicBoundaryBase::has_transformation_matrix(), libMesh::Elem::hmin(), libMesh::DofObject::id(), libMesh::index_range(), libMesh::Elem::infinite(), libMesh::TensorTools::inner_product(), libMesh::DofObject::invalid_id, libMesh::FEMap::inverse_map(), libMesh::is, libMesh::DofMap::is_constrained_dof(), libMesh::Elem::is_edge(), libMesh::Elem::is_face(), libMesh::PeriodicBoundaryBase::is_my_variable(), libMesh::Elem::is_node_on_edge(), libMesh::Elem::is_node_on_side(), libMesh::Elem::is_vertex(), libMesh::Elem::level(), libMesh::libmesh_assert(), mesh, libMesh::Elem::min_p_level_by_neighbor(), libMesh::DofObject::n_comp(), libMesh::Elem::n_edges(), libMesh::QBase::n_points(), libMesh::Elem::n_sides(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::node_index_range(), libMesh::Elem::node_ptr(), libMesh::Elem::node_ref(), libMesh::Elem::p_level(), libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::SIDE_DISCONTINUOUS, libMesh::Threads::spin_mtx, libMesh::DofMap::sys_number(), libMesh::TOLERANCE, and libMesh::DofMap::variable_type().

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

◆ compute_periodic_node_constraints()

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

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

Definition at line 1102 of file fe_abstract.C.

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

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.

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

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

References libMesh::Elem::active(), libMesh::Variable::active_on_subdomain(), libMesh::C_ONE, libMesh::C_ZERO, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::DofMap::constrain_p_dofs(), libMesh::FEType::default_quadrature_order(), libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::FEInterface::dofs_on_side(), libMesh::OrderWrapper::get_order(), libMesh::Elem::infinite(), libMesh::TensorTools::inner_product(), libMesh::DofObject::invalid_id, libMesh::FEMap::inverse_map(), libMesh::is, libMesh::DofMap::is_constrained_dof(), libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::Elem::n_neighbors(), libMesh::Elem::n_nodes(), libMesh::QBase::n_points(), libMesh::Elem::neighbor_ptr(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::FEType::p_refinement, libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::SIDE_DISCONTINUOUS, libMesh::Elem::side_index_range(), libMesh::Threads::spin_mtx, libMesh::Elem::subdomain_id(), libMesh::TOLERANCE, libMesh::Variable::type(), libMesh::DofMap::variable(), and libMesh::Elem::which_neighbor_am_i().

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

◆ compute_shape_functions() [1/2]

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

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 957 of file inf_fe.h.

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

◆ compute_shape_functions() [2/2]

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

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

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

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

Definition at line 753 of file inf_fe.C.

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

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::TypeVector< T >::norm(), libMesh::Elem::origin(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().

◆ 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 Elem *  inf_elem,
const unsigned int  i,
unsigned int &  base_shape,
unsigned int &  radial_shape 
)
staticprotected

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

Definition at line 926 of file inf_fe_static.C.

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

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

◆ 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 ElemType  inf_elem_type,
const unsigned int  i,
unsigned int &  base_shape,
unsigned int &  radial_shape 
)
staticprotected

Definition at line 1159 of file inf_fe_static.C.

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

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.

◆ determine_calculations()

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

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

Definition at line 329 of file inf_fe.C.

330{
331 this->calculations_started = true;
332
333 // If the user did not explicitly pre-request something (or nothing)
334 // to be computed, then we throw an error here.
335 bool requested_ok =
336 this->calculate_nothing || this->calculate_phi ||
337 this->calculate_dphi || this->calculate_dphiref ||
339 this->calculate_xyz || this->calculate_jxw ||
340 this->calculate_map_scaled || this->calculate_map ||
342
343#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
344 requested_ok = requested_ok || this->calculate_d2phi;
345#endif
346
347 libmesh_error_msg_if(
348 !requested_ok,
349 "You must call one or more of the FE accessors "
350 "(e.g. get_phi(), get_dphi(), get_nothing()) "
351 "_before_ calling reinit()!");
352
353 // set further terms necessary to do the requested task
354 if (calculate_jxw)
355 this->calculate_map = true;
356 if (this->calculate_dphi)
357 this->calculate_map = true;
358 if (this->calculate_dphi_scaled)
359 this->calculate_map_scaled = true;
360 // if Cartesian positions were requested but the calculation of map
361 // was not triggered, we'll opt for the 'scaled' variant.
363 this->calculate_map_scaled = true;
364 base_fe->calculate_phi = this->calculate_phi || this->calculate_phi_scaled
365 || this->calculate_dphi || this->calculate_dphi_scaled;
366 base_fe->calculate_dphi = this->calculate_dphi || this->calculate_dphi_scaled;
367 if (this->calculate_map || this->calculate_map_scaled
368 || this->calculate_dphiref)
369 {
370 base_fe->calculate_dphiref = true;
371 base_fe->get_xyz(); // trigger base_fe->fe_map to 'calculate_xyz'
372 base_fe->get_JxW(); // trigger base_fe->fe_map to 'calculate_dxyz'
373 }
374 base_fe->determine_calculations();
375
376#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
377 if (this->calculate_d2phi)
378 libmesh_not_implemented();
379#endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
380}
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
bool calculate_dphiref
Should we calculate reference shape function gradients?

◆ disable_print_counter_info()

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 100 of file reference_counter.C.

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.

References libMesh::ReferenceCounter::_enable_print_counter.

◆ edge_reinit()

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

Not implemented yet.

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

Implements libMesh::FEAbstract.

Definition at line 117 of file inf_fe_boundary.C.

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

◆ enable_print_counter_info()

void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

Enabled by default.

Definition at line 94 of file reference_counter.C.

95{
97 return;
98}

References libMesh::ReferenceCounter::_enable_print_counter.

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

◆ eval() [1/16]

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() [2/16]

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() [3/16]

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() [4/16]

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

Definition at line 63 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval().

◆ eval() [5/16]

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

Definition at line 64 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval().

◆ eval() [6/16]

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

Definition at line 65 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval().

◆ eval() [7/16]

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

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

◆ eval() [8/16]

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

Definition at line 57 of file inf_fe_jacobi_20_00_eval.C.

57{ return jacobi_20_00_eval(n, x); }

◆ eval() [9/16]

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() [10/16]

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() [11/16]

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() [12/16]

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() [13/16]

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

Definition at line 59 of file inf_fe_jacobi_30_00_eval.C.

59{ return jacobi_30_00_eval(n, x); }

◆ eval() [14/16]

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

Definition at line 59 of file inf_fe_legendre_eval.C.

59{ return legendre_eval(n, x); }

◆ eval() [15/16]

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

Definition at line 60 of file inf_fe_legendre_eval.C.

60{ return legendre_eval(n, x); }

◆ eval() [16/16]

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

Definition at line 61 of file inf_fe_legendre_eval.C.

61{ return legendre_eval(n, x); }

◆ eval_deriv() [1/16]

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() [2/16]

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() [3/16]

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

Definition at line 2615 of file inf_fe_lagrange_eval.C.

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

◆ eval_deriv() [4/16]

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

Definition at line 69 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [5/16]

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

Definition at line 70 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [6/16]

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

Definition at line 71 of file inf_fe_map_eval.C.

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

References libMesh::InfFEMap::eval_deriv().

◆ eval_deriv() [7/16]

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

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

◆ eval_deriv() [8/16]

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

Definition at line 63 of file inf_fe_jacobi_20_00_eval.C.

63{ return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [9/16]

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() [10/16]

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() [11/16]

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() [12/16]

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() [13/16]

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

Definition at line 65 of file inf_fe_jacobi_30_00_eval.C.

65{ return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [14/16]

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

Definition at line 65 of file inf_fe_legendre_eval.C.

65{ return legendre_eval_deriv(n, x); }

◆ eval_deriv() [15/16]

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

Definition at line 66 of file inf_fe_legendre_eval.C.

66{ return legendre_eval_deriv(n, x); }

◆ eval_deriv() [16/16]

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

Definition at line 67 of file inf_fe_legendre_eval.C.

67{ return legendre_eval_deriv(n, x); }

◆ get_continuity()

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

Implements libMesh::FEAbstract.

Definition at line 434 of file inf_fe.h.

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

References libMesh::C_ZERO.

◆ get_curl_phi()

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

◆ get_curvatures()

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

Definition at line 812 of file inf_fe.h.

813 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2phi()

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

◆ get_d2phideta2()

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

Definition at line 441 of file fe_base.h.

std::vector< std::vector< OutputShape > > d2phideta2
Shape function second derivatives in the eta direction.
Definition fe_base.h:733

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phideta2, and libMesh::libmesh_assert().

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

◆ get_d2phidetadzeta()

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

Definition at line 449 of file fe_base.h.

std::vector< std::vector< OutputShape > > d2phidetadzeta
Shape function second derivatives in the eta-zeta direction.
Definition fe_base.h:738

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidetadzeta, and libMesh::libmesh_assert().

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

◆ get_d2phidx2()

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

Definition at line 369 of file fe_base.h.

371 calculate_d2phi = calculate_dphiref = true; return d2phidx2; }
std::vector< std::vector< OutputShape > > d2phidx2
Shape function second derivatives in the x direction.
Definition fe_base.h:748

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidx2, and libMesh::libmesh_assert().

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

std::vector< std::vector< OutputShape > > d2phidxdy
Shape function second derivatives in the x-y direction.
Definition fe_base.h:753

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxdy, and libMesh::libmesh_assert().

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

std::vector< std::vector< OutputShape > > d2phidxdz
Shape function second derivatives in the x-z direction.
Definition fe_base.h:758

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxdz, and libMesh::libmesh_assert().

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

std::vector< std::vector< OutputShape > > d2phidxi2
Shape function second derivatives in the xi direction.
Definition fe_base.h:718

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxi2, and libMesh::libmesh_assert().

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

◆ get_d2phidxideta()

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

Definition at line 425 of file fe_base.h.

std::vector< std::vector< OutputShape > > d2phidxideta
Shape function second derivatives in the xi-eta direction.
Definition fe_base.h:723

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxideta, and libMesh::libmesh_assert().

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

◆ get_d2phidxidzeta()

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

Definition at line 433 of file fe_base.h.

std::vector< std::vector< OutputShape > > d2phidxidzeta
Shape function second derivatives in the xi-zeta direction.
Definition fe_base.h:728

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxidzeta, and libMesh::libmesh_assert().

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

◆ get_d2phidy2()

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

Definition at line 393 of file fe_base.h.

395 calculate_d2phi = calculate_dphiref = true; return d2phidy2; }
std::vector< std::vector< OutputShape > > d2phidy2
Shape function second derivatives in the y direction.
Definition fe_base.h:763

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidy2, and libMesh::libmesh_assert().

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

std::vector< std::vector< OutputShape > > d2phidydz
Shape function second derivatives in the y-z direction.
Definition fe_base.h:768

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidydz, and libMesh::libmesh_assert().

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

411 calculate_d2phi = calculate_dphiref = true; return d2phidz2; }
std::vector< std::vector< OutputShape > > d2phidz2
Shape function second derivatives in the z direction.
Definition fe_base.h:773

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidz2, and libMesh::libmesh_assert().

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

std::vector< std::vector< OutputShape > > d2phidzeta2
Shape function second derivatives in the zeta direction.
Definition fe_base.h:743

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidzeta2, and libMesh::libmesh_assert().

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

◆ get_d2xyzdeta2()

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

Definition at line 666 of file inf_fe.h.

667 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdetadzeta()

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

Definition at line 686 of file inf_fe.h.

687 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxi2()

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

Definition at line 661 of file inf_fe.h.

662 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxideta()

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

Definition at line 676 of file inf_fe.h.

677 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdxidzeta()

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

Definition at line 681 of file inf_fe.h.

682 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_d2xyzdzeta2()

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

Definition at line 671 of file inf_fe.h.

672 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_detadx()

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

Definition at line 721 of file inf_fe.h.

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

◆ get_detady()

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

Definition at line 730 of file inf_fe.h.

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

◆ get_detadz()

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

Definition at line 739 of file inf_fe.h.

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

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

259 { return dim; }

References libMesh::FEAbstract::dim.

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

std::vector< std::vector< OutputDivergence > > div_phi
Shape function divergence values.
Definition fe_base.h:674

References libMesh::FEAbstract::calculate_div_phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::div_phi, and libMesh::libmesh_assert().

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

◆ get_dphase()

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

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

Definition at line 475 of file fe_base.h.

476 { return dphase; }

References libMesh::FEGenericBase< OutputType >::dphase.

Referenced by assemble_SchroedingerEquation(), and assemble_wave().

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

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

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(), CoupledSystem::element_constraint(), NavierSystem::element_constraint(), LaplaceSystem::element_time_derivative(), CoupledSystem::element_time_derivative(), HeatSystem::element_time_derivative(), PoissonSystem::element_time_derivative(), NavierSystem::element_time_derivative(), SolidSystem::element_time_derivative(), ElasticitySystem::element_time_derivative(), SigmaPhysics::element_time_derivative(), NonlinearDiffusionSystem::element_time_derivative(), libMesh::OldSolutionCoefs< Output, point_output >::eval_at_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_point_gradient(), libMesh::FEGenericBase< OutputType >::get_dphi_over_decay(), libMesh::FEGenericBase< OutputType >::get_dphi_over_decayxR(), libMesh::ParsedFEMFunction< Output >::init_context(), LaplaceSystem::init_context(), CoupledSystem::init_context(), HeatSystem::init_context(), PoissonSystem::init_context(), NavierSystem::init_context(), SolidSystem::init_context(), ElasticitySystem::init_context(), SigmaPhysics::init_context(), NonlinearDiffusionSystem::init_context(), ElasticityRBConstruction::init_context(), libMesh::KellyErrorEstimator::init_context(), HilbertSystem::init_context(), libMesh::FEMContext::interior_gradients(), libMesh::FEMContext::point_gradient(), libMesh::FEGenericBase< OutputType >::request_dphi(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), LaplaceSystem::side_qoi_derivative(), and libMesh::FEMContext::some_gradient().

◆ get_dphi_over_decay()

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

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 629 of file inf_fe.h.

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

◆ 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

◆ get_dphideta()

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

◆ get_dphidx()

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

◆ get_dphidxi()

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

◆ get_dphidy()

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

◆ get_dphidz()

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

◆ get_dphidzeta()

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

◆ get_dual_coeff()

template<typename OutputType >
const DenseMatrix< Real > & libMesh::FEGenericBase< OutputType >::get_dual_coeff ( ) const
inlineinherited
Returns
The coefficients expressing the dual basis in the primal basis.
Note
See get_dual_phi() for the QUAD8/TRI6 caveat.

Definition at line 276 of file fe_base.h.

277 { return dual_coeff; }

References libMesh::FEGenericBase< OutputType >::dual_coeff.

◆ get_dual_d2phi()

template<typename OutputType >
const std::vector< std::vector< OutputTensor > > & libMesh::FEGenericBase< OutputType >::get_dual_d2phi ( ) const
inlineinherited
Returns
The dual shape function second derivatives at the quadrature points.
Note
See get_dual_phi() for the QUAD8/TRI6 caveat.

Definition at line 361 of file fe_base.h.

bool calculate_dual
Are we calculating dual basis?

References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculate_dual, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dual_d2phi, and libMesh::libmesh_assert().

◆ get_dual_dphi()

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

◆ get_dual_phi()

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

The dual basis is constructed to satisfy \( \int \Phi_j N_k \, d\gamma = \delta_{jk} \int N_k \, d\gamma \) against the primal basis \( N \). That biorthogonality is what makes a mortar coupling matrix diagonal, so a Lagrange multiplier can be condensed with a diagonal inverse.

Note
For SECOND order LAGRANGE and L2_LAGRANGE on QUAD8, TRI6 and TRI7 these functions are biorthogonal to a locally transformed primal basis rather than to \( N \) itself: \( \int N_k \) is not positive on those faces (exactly 0 at a TRI6 vertex, -1/3 at a QUAD8 corner), so the usual construction degenerates. For those element types \( \int \Phi_j N_k \) is therefore not diagonal; it factors as \( D = \tilde{D} T^{-1} \) with \( \tilde{D} \) diagonal, leaving \( D^{-1} = T \tilde{D}^{-1} \) sparse and cheap to apply. The functions returned here are still expressed in the primal basis, so the type and meaning of this return value are unchanged. See Popp, Wohlmuth, Gee and Wall, SIAM J. Sci. Comput. 34(4):B421-B446, 2012, Sec. 4.4.1 and Eq. (4.12).

Definition at line 233 of file fe_base.h.

234 {
236 calculate_dual = true;
237 // Dual phi computation relies on primal phi computation
238 this->request_phi();
239 return dual_phi;
240 }
virtual void request_phi() const override
request phi calculations
Definition fe_base.h:242

References libMesh::FEAbstract::calculate_dual, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dual_phi, libMesh::libmesh_assert(), and libMesh::FEGenericBase< OutputType >::request_phi().

Referenced by libMesh::FEGenericBase< OutputType >::request_dual_phi().

◆ get_dxidx()

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

Definition at line 694 of file inf_fe.h.

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

◆ get_dxidy()

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

Definition at line 703 of file inf_fe.h.

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

◆ get_dxidz()

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

Definition at line 712 of file inf_fe.h.

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

◆ get_dxyzdeta()

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

Definition at line 646 of file inf_fe.h.

647 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_dxyzdxi()

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

Definition at line 638 of file inf_fe.h.

639 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_dxyzdzeta()

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

Definition at line 654 of file inf_fe.h.

655 { calculate_map = true; libmesh_not_implemented();}

References libMesh::FEAbstract::calculate_map.

◆ get_dzetadx()

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

Definition at line 748 of file inf_fe.h.

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

◆ get_dzetady()

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

Definition at line 757 of file inf_fe.h.

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

◆ get_dzetadz()

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

Definition at line 766 of file inf_fe.h.

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

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

496{ return _elem; }

References libMesh::FEAbstract::_elem.

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

547{ return fe_type.family; }

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

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

◆ get_fe_map() [1/2]

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

Definition at line 555 of file fe_abstract.h.

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

References libMesh::FEAbstract::_fe_map.

◆ get_fe_map() [2/2]

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

◆ get_fe_type()

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

◆ get_info()

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

Gets a string containing the reference information.

Definition at line 47 of file reference_counter.C.

48{
49#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50
51 std::ostringstream oss;
52
53 oss << '\n'
54 << " ---------------------------------------------------------------------------- \n"
55 << "| Reference count information |\n"
56 << " ---------------------------------------------------------------------------- \n";
57
58 for (const auto & [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}
static Counts _counts
Actually holds the data.
std::string name(const ElemQuality q)
This function returns a string containing some name for q.

References libMesh::ReferenceCounter::_counts.

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

◆ get_JxW()

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

Definition at line 577 of file inf_fe.h.

578 {
580 calculate_jxw = true;
581 return this->JxW;
582 }

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

◆ get_JxWxdecay_sq()

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

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

Reimplemented from libMesh::FEAbstract.

Definition at line 592 of file inf_fe.h.

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

◆ get_normals()

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

Definition at line 804 of file inf_fe.h.

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

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

270 { calculate_nothing = true; }

References libMesh::FEAbstract::calculate_nothing.

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

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

526 { return fe_type.order + _p_level; }
unsigned int _p_level
The p refinement level the current data structures are set up for.

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

◆ get_p_level()

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

Definition at line 515 of file fe_abstract.h.

515{ return _p_level; }

References libMesh::FEAbstract::_p_level.

◆ get_phi()

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

Definition at line 207 of file fe_base.h.

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

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

◆ get_phi_over_decayxR()

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

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

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 607 of file inf_fe.h.

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

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

425{
426 const unsigned int n_nodes = Elem::type_to_n_nodes_map[itemType];
427 if (n_nodes == invalid_uint)
428 libmesh_error_msg("Number of nodes is not well-defined for " <<
429 Utility::enum_to_string(itemType));
430
431 nodes.resize(n_nodes);
432 switch(itemType)
433 {
434 case NODEELEM:
435 {
436 nodes[0] = Point (0.,0.,0.);
437 return;
438 }
439 case EDGE3:
440 {
441 nodes[2] = Point (0.,0.,0.);
442 libmesh_fallthrough();
443 }
444 case EDGE2:
445 {
446 nodes[0] = Point (-1.,0.,0.);
447 nodes[1] = Point (1.,0.,0.);
448 return;
449 }
450 case EDGE4: // not nested with EDGE3
451 {
452 nodes[0] = Point (-1.,0.,0.);
453 nodes[1] = Point (1.,0.,0.);
454 nodes[2] = Point (-1./3.,0.,0.);
455 nodes[3] = Point (1./3.,0.,0.);
456 return;
457 }
458 case TRI7:
459 {
460 nodes[6] = Point (1./3.,1./3.,0.);
461 libmesh_fallthrough();
462 }
463 case TRI6:
464 {
465 nodes[3] = Point (.5,0.,0.);
466 nodes[4] = Point (.5,.5,0.);
467 nodes[5] = Point (0.,.5,0.);
468 libmesh_fallthrough();
469 }
470 case TRI3:
471 case TRISHELL3:
472 {
473 nodes[0] = Point (0.,0.,0.);
474 nodes[1] = Point (1.,0.,0.);
475 nodes[2] = Point (0.,1.,0.);
476 return;
477 }
478 case QUAD9:
479 case QUADSHELL9:
480 {
481 nodes[8] = Point (0.,0.,0.);
482 libmesh_fallthrough();
483 }
484 case QUAD8:
485 case QUADSHELL8:
486 {
487 nodes[4] = Point (0.,-1.,0.);
488 nodes[5] = Point (1.,0.,0.);
489 nodes[6] = Point (0.,1.,0.);
490 nodes[7] = Point (-1.,0.,0.);
491 libmesh_fallthrough();
492 }
493 case QUAD4:
494 case QUADSHELL4:
495 {
496 nodes[0] = Point (-1.,-1.,0.);
497 nodes[1] = Point (1.,-1.,0.);
498 nodes[2] = Point (1.,1.,0.);
499 nodes[3] = Point (-1.,1.,0.);
500 return;
501 }
502 case TET14:
503 {
504 nodes[10] = Point (1/Real(3),1/Real(3),0.);
505 nodes[11] = Point (1/Real(3),0.,1/Real(3));
506 nodes[12] = Point (1/Real(3),1/Real(3),1/Real(3));
507 nodes[13] = Point (0.,1/Real(3),1/Real(3));
508 libmesh_fallthrough();
509 }
510 case TET10:
511 {
512 nodes[4] = Point (.5,0.,0.);
513 nodes[5] = Point (.5,.5,0.);
514 nodes[6] = Point (0.,.5,0.);
515 nodes[7] = Point (0.,0.,.5);
516 nodes[8] = Point (.5,0.,.5);
517 nodes[9] = Point (0.,.5,.5);
518 libmesh_fallthrough();
519 }
520 case TET4:
521 {
522 nodes[0] = Point (0.,0.,0.);
523 nodes[1] = Point (1.,0.,0.);
524 nodes[2] = Point (0.,1.,0.);
525 nodes[3] = Point (0.,0.,1.);
526 return;
527 }
528 case HEX27:
529 {
530 nodes[20] = Point (0.,0.,-1.);
531 nodes[21] = Point (0.,-1.,0.);
532 nodes[22] = Point (1.,0.,0.);
533 nodes[23] = Point (0.,1.,0.);
534 nodes[24] = Point (-1.,0.,0.);
535 nodes[25] = Point (0.,0.,1.);
536 nodes[26] = Point (0.,0.,0.);
537 libmesh_fallthrough();
538 }
539 case HEX20:
540 {
541 nodes[8] = Point (0.,-1.,-1.);
542 nodes[9] = Point (1.,0.,-1.);
543 nodes[10] = Point (0.,1.,-1.);
544 nodes[11] = Point (-1.,0.,-1.);
545 nodes[12] = Point (-1.,-1.,0.);
546 nodes[13] = Point (1.,-1.,0.);
547 nodes[14] = Point (1.,1.,0.);
548 nodes[15] = Point (-1.,1.,0.);
549 nodes[16] = Point (0.,-1.,1.);
550 nodes[17] = Point (1.,0.,1.);
551 nodes[18] = Point (0.,1.,1.);
552 nodes[19] = Point (-1.,0.,1.);
553 libmesh_fallthrough();
554 }
555 case HEX8:
556 {
557 nodes[0] = Point (-1.,-1.,-1.);
558 nodes[1] = Point (1.,-1.,-1.);
559 nodes[2] = Point (1.,1.,-1.);
560 nodes[3] = Point (-1.,1.,-1.);
561 nodes[4] = Point (-1.,-1.,1.);
562 nodes[5] = Point (1.,-1.,1.);
563 nodes[6] = Point (1.,1.,1.);
564 nodes[7] = Point (-1.,1.,1.);
565 return;
566 }
567 case PRISM21:
568 {
569 nodes[20] = Point (1/Real(3),1/Real(3),0);
570 libmesh_fallthrough();
571 }
572 case PRISM20:
573 {
574 nodes[18] = Point (1/Real(3),1/Real(3),-1);
575 nodes[19] = Point (1/Real(3),1/Real(3),1);
576 libmesh_fallthrough();
577 }
578 case PRISM18:
579 {
580 nodes[15] = Point (.5,0.,0.);
581 nodes[16] = Point (.5,.5,0.);
582 nodes[17] = Point (0.,.5,0.);
583 libmesh_fallthrough();
584 }
585 case PRISM15:
586 {
587 nodes[6] = Point (.5,0.,-1.);
588 nodes[7] = Point (.5,.5,-1.);
589 nodes[8] = Point (0.,.5,-1.);
590 nodes[9] = Point (0.,0.,0.);
591 nodes[10] = Point (1.,0.,0.);
592 nodes[11] = Point (0.,1.,0.);
593 nodes[12] = Point (.5,0.,1.);
594 nodes[13] = Point (.5,.5,1.);
595 nodes[14] = Point (0.,.5,1.);
596 libmesh_fallthrough();
597 }
598 case PRISM6:
599 {
600 nodes[0] = Point (0.,0.,-1.);
601 nodes[1] = Point (1.,0.,-1.);
602 nodes[2] = Point (0.,1.,-1.);
603 nodes[3] = Point (0.,0.,1.);
604 nodes[4] = Point (1.,0.,1.);
605 nodes[5] = Point (0.,1.,1.);
606 return;
607 }
608 case PYRAMID18:
609 {
610 // triangle centers
611 nodes[14] = Point (0., -2/Real(3),1/Real(3));
612 nodes[15] = Point (2/Real(3),0.,1/Real(3));
613 nodes[16] = Point (0.,2/Real(3),1/Real(3));
614 nodes[17] = Point (-2/Real(3),0.,1/Real(3));
615
616 libmesh_fallthrough();
617 }
618 case PYRAMID14:
619 {
620 // base center
621 nodes[13] = Point (0.,0.,0.);
622
623 libmesh_fallthrough();
624 }
625 case PYRAMID13:
626 {
627 // base midedge
628 nodes[5] = Point (0.,-1.,0.);
629 nodes[6] = Point (1.,0.,0.);
630 nodes[7] = Point (0.,1.,0.);
631 nodes[8] = Point (-1,0.,0.);
632
633 // lateral midedge
634 nodes[9] = Point (-.5,-.5,.5);
635 nodes[10] = Point (.5,-.5,.5);
636 nodes[11] = Point (.5,.5,.5);
637 nodes[12] = Point (-.5,.5,.5);
638
639 libmesh_fallthrough();
640 }
641 case PYRAMID5:
642 {
643 // base corners
644 nodes[0] = Point (-1.,-1.,0.);
645 nodes[1] = Point (1.,-1.,0.);
646 nodes[2] = Point (1.,1.,0.);
647 nodes[3] = Point (-1.,1.,0.);
648 // apex
649 nodes[4] = Point (0.,0.,1.);
650 return;
651 }
652
653 default:
654 libmesh_error_msg("ERROR: Unknown element type " << Utility::enum_to_string(itemType));
655 }
656}
static constexpr 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:664

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::l2_lagrange_gll_nodal_soln(), libMesh::lagrange_gll_nodal_soln(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), and libMesh::LIBMESH_DEFAULT_VECTORIZED_FE().

◆ get_Sobolev_dweight()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector< RealGradient > & libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweight ( ) const
inlineoverridevirtual
Returns
The first global derivative of the multiplicative weight at each quadrature point. See get_Sobolev_weight() for details. In case of FE initialized to all zero.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 788 of file inf_fe.h.

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

◆ get_Sobolev_dweightxR_sq()

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 832 of file inf_fe.h.

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

◆ get_Sobolev_weight()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
virtual const std::vector< Real > & libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weight ( ) const
inlineoverridevirtual
Returns
The multiplicative weight at each quadrature point. This weight is used for certain infinite element weak formulations, so that weighted Sobolev spaces are used for the trial function space. This renders the variational form easily computable.

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 778 of file inf_fe.h.

780 calculate_phi = true; return weight; }
std::vector< Real > weight
Used for certain infinite element families: the additional radial weight in local coordinates,...
Definition fe_base.h:805

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

◆ 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

◆ 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

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

509{ return _elem_type; }
ElemType _elem_type
The element type the current data structures were set up for.

References libMesh::FEAbstract::_elem_type.

◆ get_xyz()

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

Definition at line 567 of file inf_fe.h.

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

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

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}
streamT * get()
Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go th...

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

Referenced by libMesh::ReferenceCountedObject< T >::ReferenceCountedObject(), libMesh::ReferenceCountedObject< T >::ReferenceCountedObject(), and libMesh::ReferenceCountedObject< T >::ReferenceCountedObject().

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

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}

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

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

◆ inf_compute_constraints()

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

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

Definition at line 1417 of file inf_fe_static.C.

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

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

◆ inf_compute_node_constraints()

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

Definition at line 1373 of file inf_fe_static.C.

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

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

◆ init_base_shape_functions()

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

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

Implements libMesh::FEGenericBase< OutputType >.

Definition at line 902 of file inf_fe.h.

904 { libmesh_not_implemented(); }

◆ init_face_shape_functions()

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

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

Definition at line 135 of file inf_fe_boundary.C.

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}
void init_radial_shape_functions(const Elem *inf_elem, const std::vector< Point > *radial_pts=nullptr)
Some of the member data only depend on the radial part of the infinite element.
Definition inf_fe.C:387
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
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

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

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

389{
390 libmesh_assert(radial_qrule.get() || radial_pts);
391 libmesh_assert(inf_elem);
392
393 // Start logging the radial shape function initialization
394 LOG_SCOPE("init_radial_shape_functions()", "InfFE");
395
396 // initialize most of the things related to physical approximation
397 const Order radial_approx_order = fe_type.radial_order;
398 const unsigned int n_radial_approx_shape_functions =
399 InfFERadial::n_dofs(radial_approx_order);
400
401 const std::size_t n_radial_qp =
402 radial_pts ? radial_pts->size() : radial_qrule->n_points();
403 const std::vector<Point> & radial_qp =
404 radial_pts ? *radial_pts : radial_qrule->get_points();
405
406 // the radial polynomials (eval)
408 {
409 mode.resize (n_radial_approx_shape_functions);
410 for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
411 mode[i].resize (n_radial_qp);
412
413 // evaluate the mode shapes in radial direction at radial quadrature points
414 for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
415 for (std::size_t p=0; p<n_radial_qp; ++p)
416 mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
417 }
418
420 {
421 dmodedv.resize (n_radial_approx_shape_functions);
422 for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
423 dmodedv[i].resize (n_radial_qp);
424
425 // evaluate the mode shapes in radial direction at radial quadrature points
426 for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
427 for (std::size_t p=0; p<n_radial_qp; ++p)
428 dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
429 }
430
431 // the (1-v)/2 weight.
433 {
434 som.resize (n_radial_qp);
435 // compute scalar values at radial quadrature points
436 for (std::size_t p=0; p<n_radial_qp; ++p)
437 som[p] = InfFERadial::decay (Dim, radial_qp[p](0));
438 }
440 {
441 dsomdv.resize (n_radial_qp);
442 // compute scalar values at radial quadrature points
443 for (std::size_t p=0; p<n_radial_qp; ++p)
444 dsomdv[p] = InfFERadial::decay_deriv (Dim, radial_qp[p](0));
445 }
446}

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

◆ init_shape_functions()

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

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

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

Definition at line 451 of file inf_fe.C.

454{
455 libmesh_assert(inf_elem);
456
457 // Start logging the radial shape function initialization
458 LOG_SCOPE("init_shape_functions()", "InfFE");
459
460 // fast access to some const ints for the radial data
461 const unsigned int n_radial_approx_sf = InfFERadial::n_dofs(fe_type.radial_order);
462 const std::size_t n_radial_qp = radial_qp.size();
463#ifdef DEBUG
465 libmesh_assert_equal_to(n_radial_approx_sf, mode.size());
467 libmesh_assert_equal_to(som.size(), n_radial_qp);
468#endif
469
470
471 // initialize most of the quantities related to mapping
472
473 // The element type and order to use in the base map
474 //const Order base_mapping_order = base_elem->default_order();
475
476 // the number of base shape functions used to construct the map
477 // (Lagrange shape functions are used for mapping in the base)
478 //unsigned int n_base_mapping_shape_functions =
479 // InfFEBase::n_base_mapping_sf(*base_elem,
480 // base_mapping_order);
481
482 // initialize most of the things related to physical approximation
483 unsigned int n_base_approx_shape_functions;
484 if (Dim > 1)
485 n_base_approx_shape_functions =
486 FEInterface::n_dofs(base_fe->get_fe_type(), base_elem.get());
487 else
488 n_base_approx_shape_functions = 1;
489
490
491 // update class member field
493 n_radial_approx_sf * n_base_approx_shape_functions;
494
495
496 // The number of the base quadrature points.
497 const unsigned int n_base_qp = cast_int<unsigned int>(base_qp.size());
498
499 // The total number of quadrature points.
500 _n_total_qp = n_radial_qp * n_base_qp;
501
502
503 // initialize the node and shape numbering maps
504 {
505 // similar for the shapes: the i-th entry stores
506 // the associated base/radial shape number
509
510 // fill the shape index map
511 for (unsigned int n=0; n<_n_total_approx_sf; ++n)
512 {
514 inf_elem,
515 n,
518 libmesh_assert_less (_base_shape_index[n], n_base_approx_shape_functions);
519 libmesh_assert_less (_radial_shape_index[n], n_radial_approx_sf);
520 }
521 }
522
523 // resize the base data fields
524 //dist.resize(n_base_mapping_shape_functions);
525
526 // resize the total data fields
527
528 // the phase term varies with xi, eta and zeta(v): store it for _all_ qp
529 //
530 // when computing the phase, we need the base approximations
531 // therefore, initialize the phase here, but evaluate it
532 // in compute_shape_functions().
533 //
534 // the weight, though, is only needed at the radial quadrature points, n_radial_qp.
535 // but for a uniform interface to the protected data fields
536 // the weight data field (which are accessible from the outside) are expanded to _n_total_qp.
538 weight.resize (_n_total_qp);
540 weightxr_sq.resize (_n_total_qp);
542 dweightdv.resize (n_radial_qp);
543 if (calculate_dphi)
544 dweight.resize (_n_total_qp);
547
549 dphase.resize (_n_total_qp);
550
551 // this vector contains the integration weights for the combined quadrature rule
552 // if no quadrature rules are given, use only ones.
554
555 // InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
556 // shape and mapping functions, respectively
557 {
559 JxWxdecay.resize(_n_total_qp);
560 if (calculate_jxw)
561 JxW.resize(_n_total_qp);
563 {
564 xyz.resize(_n_total_qp);
574 }
575 if (calculate_map)
576 {
577 dxidx_map.resize(_n_total_qp);
578 dxidy_map.resize(_n_total_qp);
579 dxidz_map.resize(_n_total_qp);
580 detadx_map.resize(_n_total_qp);
581 detady_map.resize(_n_total_qp);
582 detadz_map.resize(_n_total_qp);
583 dzetadx_map.resize(_n_total_qp);
584 dzetady_map.resize(_n_total_qp);
585 dzetadz_map.resize(_n_total_qp);
586 }
587 if (calculate_phi)
588 phi.resize (_n_total_approx_sf);
590 phixr.resize (_n_total_approx_sf);
591 if (calculate_dphi)
592 {
593 dphi.resize (_n_total_approx_sf);
594 dphidx.resize (_n_total_approx_sf);
595 dphidy.resize (_n_total_approx_sf);
596 dphidz.resize (_n_total_approx_sf);
597 }
598
600 {
601 dphixr.resize (_n_total_approx_sf);
603 }
604#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
605
606 if (calculate_d2phi)
607 {
608 libmesh_not_implemented();
609 d2phi.resize (_n_total_approx_sf);
617
618 if (Dim > 1)
619 {
622 }
623
624 if (Dim > 2)
625 {
629 }
630 }
631#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
632
634 {
636
637 if (Dim > 1)
639
640 if (Dim == 3)
642 }
643
644 }
645
646 // collect all the for loops, where inner vectors are
647 // resized to the appropriate number of quadrature points
648 {
649 if (calculate_phi)
650 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
651 phi[i].resize (_n_total_qp);
652
653 if (calculate_dphi)
654 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
655 {
656 dphi[i].resize (_n_total_qp);
657 dphidx[i].resize (_n_total_qp);
658 dphidy[i].resize (_n_total_qp);
659 dphidz[i].resize (_n_total_qp);
660 }
661
663 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
664 {
665 phixr[i].resize (_n_total_qp);
666 }
668 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
669 {
670 dphixr[i].resize(_n_total_qp);
671 dphixr_sq[i].resize(_n_total_qp);
672 }
673#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
674 if (calculate_d2phi)
675 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
676 {
677 d2phi[i].resize (_n_total_qp);
678 d2phidx2[i].resize (_n_total_qp);
679 d2phidxdy[i].resize (_n_total_qp);
680 d2phidxdz[i].resize (_n_total_qp);
681 d2phidy2[i].resize (_n_total_qp);
682 d2phidydz[i].resize (_n_total_qp);
683 d2phidy2[i].resize (_n_total_qp);
684 d2phidxi2[i].resize (_n_total_qp);
685
686 if (Dim > 1)
687 {
688 d2phidxideta[i].resize (_n_total_qp);
689 d2phideta2[i].resize (_n_total_qp);
690 }
691 if (Dim > 2)
692 {
693 d2phidxidzeta[i].resize (_n_total_qp);
694 d2phidetadzeta[i].resize (_n_total_qp);
695 d2phidzeta2[i].resize (_n_total_qp);
696 }
697 }
698#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
699
701 for (unsigned int i=0; i<_n_total_approx_sf; ++i)
702 {
703 dphidxi[i].resize (_n_total_qp);
704
705 if (Dim > 1)
706 dphideta[i].resize (_n_total_qp);
707
708 if (Dim == 3)
709 dphidzeta[i].resize (_n_total_qp);
710
711 }
712
713 }
714 {
715 // (a) compute scalar values at _all_ quadrature points -- for uniform
716 // access from the outside to these fields
717 // (b) form a std::vector<Real> which contains the appropriate weights
718 // of the combined quadrature rule!
719 libmesh_assert_equal_to (radial_qp.size(), n_radial_qp);
720
722 {
723 const std::vector<Real> & radial_qw = radial_qrule->get_weights();
724 const std::vector<Real> & base_qw = base_qrule->get_weights();
725 libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
726 libmesh_assert_equal_to (base_qw.size(), n_base_qp);
727
728 for (unsigned int rp=0; rp<n_radial_qp; ++rp)
729 for (unsigned int bp=0; bp<n_base_qp; ++bp)
730 _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
731 }
732
733
734 for (unsigned int rp=0; rp<n_radial_qp; ++rp)
735 {
737 for (unsigned int bp=0; bp<n_base_qp; ++bp)
738 weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
739
741 for (unsigned int bp=0; bp<n_base_qp; ++bp)
742 weightxr_sq[bp + rp*n_base_qp] = InfFERadial::Dxr_sq(radial_qp[rp](0));
743
745 dweightdv[rp] = InfFERadial::D_deriv(radial_qp[rp](0));
746 }
747 }
748}
static Real D(const Real v)
Definition inf_fe.h:82
static Real D_deriv(const Real v)
Definition inf_fe.h:90
static Real Dxr_sq(const Real)
Definition inf_fe.h:84

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

◆ inverse_map() [1/2]

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

Definition at line 465 of file inf_fe.h.

469 {
470 // libmesh_deprecated(); // soon
471 return InfFEMap::inverse_map(Dim, elem, p, tolerance, secure);
472 }
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition inf_fe_map.C:96

References libMesh::InfFEMap::inverse_map().

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

◆ inverse_map() [2/2]

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

Definition at line 475 of file inf_fe.h.

480 {
481 // libmesh_deprecated(); // soon
482 return InfFEMap::inverse_map(Dim, elem, physical_points,
483 reference_points, tolerance, secure);
484 }

References libMesh::InfFEMap::inverse_map().

◆ is_hierarchic()

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

Implements libMesh::FEAbstract.

Definition at line 441 of file inf_fe.h.

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

◆ map()

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

Definition at line 457 of file inf_fe.h.

459 {
460 // libmesh_deprecated(); // soon
461 return InfFEMap::map(Dim, inf_elem, reference_point);
462 }

References libMesh::InfFEMap::map().

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

◆ n_dofs()

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs ( const FEType &  fet,
const 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
static unsigned int n_dofs(const ElemType t, const Order o)
in the base.

Definition at line 66 of file inf_fe_static.C.

68{
69 // The "base" Elem is a non-infinite Elem corresponding to side 0 of
70 // the InfElem.
71 auto base_elem = inf_elem->build_side_ptr(0);
72
73 if (Dim > 1)
74 return FEInterface::n_dofs(fet, base_elem.get()) *
75 InfFERadial::n_dofs(fet.radial_order);
76 else
77 return InfFERadial::n_dofs(fet.radial_order);
78}

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

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

◆ n_dofs_at_node() [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 Elem *  inf_elem,
const unsigned int  n 
)
static
Returns
The number of dofs at infinite element node n (not dof!) for an element of type t and order o.

Definition at line 113 of file inf_fe_static.C.

116{
117 // The "base" Elem is a non-infinite Elem corresponding to side 0 of
118 // the InfElem.
119 auto base_elem = inf_elem->build_side_ptr(0);
120
121 unsigned int n_base, n_radial;
122 compute_node_indices(inf_elem->type(), n, n_base, n_radial);
123
124 if (Dim > 1)
125 return FEInterface::n_dofs_at_node(fet, base_elem.get(), n_base)
126 * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
127 else
128 return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
129}
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)

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

◆ 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 ElemType  inf_elem_type,
const unsigned int  n 
)
static
Returns
The number of dofs at infinite element node n (not dof!) for an element of type t and order o.

Definition at line 84 of file inf_fe_static.C.

87{
88 libmesh_deprecated();
89
90 const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
91
92 unsigned int n_base, n_radial;
93 compute_node_indices(inf_elem_type, n, n_base, n_radial);
94
95 // libMesh::out << "elem_type=" << inf_elem_type
96 // << ", fet.radial_order=" << fet.radial_order
97 // << ", n=" << n
98 // << ", n_radial=" << n_radial
99 // << ", n_base=" << n_base
100 // << std::endl;
101
102 if (Dim > 1)
103 return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
104 * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
105 else
106 return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
107}

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

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

Definition at line 153 of file inf_fe_static.C.

155{
156 // The "base" Elem is a non-infinite Elem corresponding to side 0 of
157 // the InfElem.
158 auto base_elem = inf_elem->build_side_ptr(0);
159
160 if (Dim > 1)
161 return FEInterface::n_dofs_per_elem(fet, base_elem.get())
162 * InfFERadial::n_dofs_per_elem(fet.radial_order);
163 else
164 return InfFERadial::n_dofs_per_elem(fet.radial_order);
165}
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition inf_fe.h:136

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

◆ 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 ElemType  inf_elem_type 
)
static
Returns
The number of dofs interior to the element, not associated with any interior nodes.
Deprecated:
Call the version of this function that takes an Elem* instead for consistency with other FEInterface::n_dofs() methods.

Definition at line 135 of file inf_fe_static.C.

137{
138 libmesh_deprecated();
139
140 const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
141
142 if (Dim > 1)
143 return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
144 * InfFERadial::n_dofs_per_elem(fet.radial_order);
145 else
146 return InfFERadial::n_dofs_per_elem(fet.radial_order);
147}

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

◆ n_objects()

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

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

Definition at line 85 of file reference_counter.h.

86 { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

References libMesh::ReferenceCounter::_n_objects.

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

◆ n_quadrature_points()

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

Reimplemented from libMesh::FEAbstract.

Definition at line 560 of file inf_fe.h.

561 { libmesh_assert(radial_qrule); return this->_n_total_qp; }

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

◆ n_shape_functions() [1/2]

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

Implements libMesh::FEAbstract.

Definition at line 552 of file inf_fe.h.

553 { return _n_total_approx_sf; }

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

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

◆ n_shape_functions() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
static unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions ( const FEType &  fet,
const 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.

383 { return n_dofs(fet, inf_elem); }

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

◆ nodal_soln()

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

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

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

Definition at line 170 of file inf_fe_static.C.

174{
175#ifdef DEBUG
177 {
178 libMesh::err << "WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
179 << " Will return an empty nodal solution. Use " << std::endl
180 << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
182 }
183#endif
184
185 /*
186 * In the base the infinite element couples to
187 * conventional finite elements. To not destroy
188 * the values there, clear \p nodal_soln. This
189 * indicates to the user of \p nodal_soln to
190 * not use this result.
191 */
192 nodal_soln.clear();
193 libmesh_assert (nodal_soln.empty());
194 return;
195}
static bool _warned_for_nodal_soln
static members that are used to issue warning messages only once.
Definition inf_fe.h:1241
static void nodal_soln(const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Usually, this method would build the nodal soln from the element soln.

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

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

◆ on_reference_element()

bool libMesh::FEAbstract::on_reference_element ( const Point &  p,
const ElemType  t,
const Real  eps = TOLERANCE 
)
staticinherited
Returns
true if the point p is located on the reference element for element type t, false otherwise. Since we are doing floating point comparisons here the parameter eps can be specified to indicate a tolerance. For example, \( x \le 1 \) becomes \( x \le 1 + \epsilon \).
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 661 of file fe_abstract.C.

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

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

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

1004{
1005 for (auto i : index_range(dphi))
1006 for (auto j : index_range(dphi[i]))
1007 os << " d2phi[" << i << "][" << j << "]=" << d2phi[i][j];
1008}

References libMesh::index_range().

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

946{
947 for (auto i : index_range(dphi))
948 for (auto j : index_range(dphi[i]))
949 os << " dphi[" << i << "][" << j << "]=" << dphi[i][j];
950}

References libMesh::index_range().

◆ print_dual_d2phi()

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

Implements libMesh::FEAbstract.

Definition at line 1011 of file fe_base.C.

1012{
1013 for (auto i : index_range(dual_d2phi))
1014 for (auto j : index_range(dual_d2phi[i]))
1015 os << " dual_d2phi[" << i << "][" << j << "]=" << dual_d2phi[i][j];
1016}

References libMesh::index_range().

◆ print_dual_dphi()

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

Implements libMesh::FEAbstract.

Definition at line 953 of file fe_base.C.

954{
955 for (auto i : index_range(dphi))
956 for (auto j : index_range(dphi[i]))
957 os << " dual_dphi[" << i << "][" << j << "]=" << dual_dphi[i][j];
958}

References libMesh::index_range().

◆ print_dual_phi()

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

Implements libMesh::FEAbstract.

Definition at line 934 of file fe_base.C.

935{
936 for (auto i : index_range(dual_phi))
937 for (auto j : index_range(dual_phi[i]))
938 os << " dual_phi[" << i << "][" << j << "]=" << dual_phi[i][j] << std::endl;
939}

References libMesh::index_range().

◆ print_info() [1/2]

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

Prints all the relevant information about the current element.

Definition at line 883 of file fe_abstract.C.

884{
885 os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
886 this->print_phi(os);
887
888 os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
889 this->print_dphi(os);
890
891 os << "XYZ locations of the quadrature pts." << std::endl;
892 this->print_xyz(os);
893
894 os << "Values of JxW at the quadrature pts." << std::endl;
895 this->print_JxW(os);
896}
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
virtual void print_dphi(std::ostream &os) const =0
Prints the value of each shape function's derivative at each quadrature point.
virtual void print_phi(std::ostream &os) const =0
Prints the value of each shape function at each quadrature point.
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).

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

◆ print_info() [2/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.

82{
84 out_stream << ReferenceCounter::get_info();
85}
static std::string get_info()
Gets a string containing the reference information.

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

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

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

871{
872 this->_fe_map->print_JxW(os);
873}

References libMesh::FEAbstract::_fe_map.

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

◆ print_phi()

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

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

Implements libMesh::FEAbstract.

Definition at line 926 of file fe_base.C.

927{
928 for (auto i : index_range(phi))
929 for (auto j : index_range(phi[i]))
930 os << " phi[" << i << "][" << j << "]=" << phi[i][j] << std::endl;
931}

References libMesh::index_range().

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

878{
879 this->_fe_map->print_xyz(os);
880}

References libMesh::FEAbstract::_fe_map.

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

◆ reinit() [1/2]

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

This is at the core of this class.

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

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

Implements libMesh::FEAbstract.

Definition at line 120 of file inf_fe.C.

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.
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...
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}
ElemType get_type() const
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
void compute_shape_functions(const Elem *inf_elem, const std::vector< Point > &base_qp, const std::vector< Point > &radial_qp)
After having updated the jacobian and the transformation from local to global coordinates in FEAbstra...
Definition inf_fe.C:753
void init_shape_functions(const std::vector< Point > &radial_qp, const std::vector< Point > &base_qp, const Elem *inf_elem)
Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta,...
Definition inf_fe.C:451
const Real radius

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

◆ reinit() [2/2]

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

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

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.

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}
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.
void compute_face_functions()
Order get_order() const
Definition quadrature.h:249
const std::vector< Point > & get_points() const
Definition quadrature.h:156
virtual QuadratureType type() const =0

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

◆ 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, CLOUGH >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, HIERARCHIC_VEC >, libMesh::FE< Dim, L2_HIERARCHIC >, libMesh::FE< Dim, L2_HIERARCHIC_VEC >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, L2_LAGRANGE_VEC >, libMesh::FE< Dim, L2_RAVIART_THOMAS >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, LAGRANGE_VEC >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, MONOMIAL_VEC >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, RAVIART_THOMAS >, libMesh::FE< Dim, SCALAR >, and libMesh::FE< Dim, XYZ >.

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

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

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

◆ request_dual_dphi()

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

Implements libMesh::FEAbstract.

Definition at line 268 of file fe_base.h.

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

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

◆ request_dual_phi()

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

Implements libMesh::FEAbstract.

Definition at line 245 of file fe_base.h.

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

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

◆ request_phi()

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

request phi calculations

Implements libMesh::FEAbstract.

Definition at line 242 of file fe_base.h.

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

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

Referenced by libMesh::FEGenericBase< OutputType >::get_dual_phi().

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

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

References libMesh::FEAbstract::calculate_default_dual_coeff.

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

621{calculate_dual = val; }

References libMesh::FEAbstract::calculate_dual.

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

531{ fe_type.order = new_order; }

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

◆ 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 Elem *  elem,
const unsigned int  i,
const Point &  p 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping.

Definition at line 250 of file inf_fe_static.C.

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

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

◆ 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 ElemType  t,
const unsigned int  i,
const Point &  p 
)
static
Returns
The value of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping.

Definition at line 206 of file inf_fe_static.C.

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

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

◆ shape() [3/3]

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

Definition at line 289 of file inf_fe_static.C.

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

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

◆ shape_deriv() [1/3]

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

Definition at line 354 of file inf_fe_static.C.

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

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

◆ 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 ElemType  inf_elem_type,
const unsigned int  i,
const unsigned int  j,
const Point &  p 
)
static
Returns
The \( j^{th} \) derivative of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shape gradients, instead use compute_data(). The shape_deriv() methods should only be used for mapping.

Definition at line 307 of file inf_fe_static.C.

312{
313 libmesh_deprecated();
314
315 libmesh_assert_not_equal_to (Dim, 0);
316 libmesh_assert_greater (Dim,j);
317#ifdef DEBUG
318 // this makes only sense when used for mapping
319 if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
320 {
321 libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
322 << " return the correct trial function gradients! Use " << std::endl
323 << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
324 << std::endl;
325 _warned_for_dshape = true;
326 }
327#endif
328
329 const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
330 const Order o_radial (fe_t.radial_order);
331 const Real v (p(Dim-1));
332
333 unsigned int i_base, i_radial;
334 compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
335
336 if (j== Dim -1)
337 {
338 Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
339 * InfFERadial::decay(Dim,v)
340 + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
341 * InfFERadial::decay_deriv(Dim, v);
342
343 return FEInterface::shape(Dim-1, fe_t, base_et, i_base, p)*RadialDeriv;
344 }
345
346 return FEInterface::shape_deriv(Dim-1, fe_t, base_et, i_base, j, p)
347 * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
348 * InfFERadial::decay(Dim,v);
349}

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

◆ 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 Elem *  inf_elem,
const unsigned int  i,
const unsigned int  j,
const Point &  p,
const bool  add_p_level 
)
static
Returns
The \( j^{th} \) derivative of the \( i^{th} \) shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static.
Note
This class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle.
This method does not return physically correct shape gradients, instead use compute_data(). The shape_deriv() methods should only be used for mapping.

Definition at line 588 of file inf_fe_static.C.

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

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

◆ shapes_need_reinit()

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

Implements libMesh::FEAbstract.

Definition at line 1121 of file inf_fe.C.

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

◆ side_map()

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

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

Implements libMesh::FEAbstract.

Definition at line 526 of file inf_fe.h.

531 {
532 libmesh_not_implemented();
533 }

◆ update_base_elem()

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

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

Definition at line 109 of file inf_fe.C.

110{
112}

References libMesh::InfFEBase::build_elem().

Friends And Related Symbol Documentation

◆ InfFE

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

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

Definition at line 1253 of file inf_fe.h.

◆ InfFEMap

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

Definition at line 1255 of file inf_fe.h.

Member Data Documentation

◆ _add_p_level_in_reinit

bool libMesh::FEAbstract::_add_p_level_in_reinit
protectedinherited

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

Definition at line 787 of file fe_abstract.h.

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

◆ _base_node_index

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

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

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

Definition at line 1145 of file inf_fe.h.

◆ _base_shape_index

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

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

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

Definition at line 1165 of file inf_fe.h.

◆ _compute_node_indices_fast_current_elem_type

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

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

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

Definition at line 1233 of file inf_fe.h.

◆ _counts

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

Actually holds the data.

Definition at line 124 of file reference_counter.h.

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

◆ _elem

const Elem* libMesh::FEAbstract::_elem
protectedinherited

The element the current data structures were set up for.

Definition at line 740 of file fe_abstract.h.

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

◆ _elem_p_level

unsigned int libMesh::FEAbstract::_elem_p_level
protectedinherited

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

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

Definition at line 751 of file fe_abstract.h.

◆ _elem_type

ElemType libMesh::FEAbstract::_elem_type
protectedinherited

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

Definition at line 735 of file fe_abstract.h.

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

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter = true
staticprotectedinherited

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

Definition at line 143 of file reference_counter.h.

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

◆ _fe_map

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

◆ _fe_trans

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

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

Definition at line 647 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

◆ _n_total_approx_sf

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

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

Definition at line 1173 of file inf_fe.h.

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

◆ _n_total_qp

unsigned int libMesh::FEAbstract::_n_total_qp
protectedinherited

The total number of quadrature points for the current configuration.

Definition at line 774 of file fe_abstract.h.

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

◆ _p_level

unsigned int libMesh::FEAbstract::_p_level
protectedinherited

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

Definition at line 757 of file fe_abstract.h.

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

◆ _radial_node_index

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

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

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

Definition at line 1135 of file inf_fe.h.

◆ _radial_shape_index

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

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

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

Definition at line 1155 of file inf_fe.h.

◆ _total_qrule_weights

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

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

Definition at line 1179 of file inf_fe.h.

◆ _warned_for_dshape

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

Definition at line 1243 of file inf_fe.h.

◆ _warned_for_nodal_soln

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

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

Definition at line 1241 of file inf_fe.h.

◆ _warned_for_shape

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

Definition at line 1242 of file inf_fe.h.

◆ base_elem

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

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

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

Definition at line 1198 of file inf_fe.h.

◆ base_fe

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

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

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

Definition at line 1206 of file inf_fe.h.

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

◆ base_qrule

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

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

Definition at line 1185 of file inf_fe.h.

◆ calculate_curl_phi

bool libMesh::FEAbstract::calculate_curl_phi
mutableprotectedinherited

Should we calculate shape function curls?

Definition at line 712 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< OutputType >::calculating_nothing(), and libMesh::FEGenericBase< OutputType >::get_curl_phi().

◆ calculate_d2phi [1/2]

bool libMesh::FEAbstract::calculate_d2phi
mutableprotectedinherited

◆ calculate_d2phi [2/2]

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

Definition at line 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

Should we calculate shape function divergences?

Definition at line 717 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< OutputType >::calculating_nothing(), and libMesh::FEGenericBase< OutputType >::get_div_phi().

◆ 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

◆ calculate_dual

bool libMesh::FEAbstract::calculate_dual
mutableprotectedinherited

◆ calculate_jxw

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

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

Definition at line 990 of file inf_fe.h.

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

◆ calculate_map

bool libMesh::FEAbstract::calculate_map
mutableprotectedinherited

Are we calculating mapping functions?

Definition at line 686 of file fe_abstract.h.

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

◆ calculate_map_scaled

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

Are we calculating scaled mapping functions?

Definition at line 967 of file inf_fe.h.

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

◆ calculate_nothing

bool libMesh::FEAbstract::calculate_nothing
mutableprotectedinherited

Are we potentially deliberately calculating nothing?

Definition at line 681 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< OutputType >::calculating_nothing(), and libMesh::FEAbstract::get_nothing().

◆ calculate_phi

bool libMesh::FEAbstract::calculate_phi
mutableprotectedinherited

◆ calculate_phi_scaled

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

Are we calculating scaled shape functions?

Definition at line 972 of file inf_fe.h.

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

◆ calculate_xyz

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

Are we calculating the positions of quadrature points?

Definition at line 983 of file inf_fe.h.

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

◆ calculations_started

bool libMesh::FEAbstract::calculations_started
mutableprotectedinherited

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

Definition at line 666 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_curl_phi(), libMesh::FEGenericBase< OutputType >::get_d2phi(), libMesh::FEGenericBase< OutputType >::get_d2phideta2(), libMesh::FEGenericBase< OutputType >::get_d2phidetadzeta(), libMesh::FEGenericBase< OutputType >::get_d2phidx2(), libMesh::FEGenericBase< OutputType >::get_d2phidxdy(), libMesh::FEGenericBase< OutputType >::get_d2phidxdz(), libMesh::FEGenericBase< OutputType >::get_d2phidxi2(), libMesh::FEGenericBase< OutputType >::get_d2phidxideta(), libMesh::FEGenericBase< OutputType >::get_d2phidxidzeta(), libMesh::FEGenericBase< OutputType >::get_d2phidy2(), libMesh::FEGenericBase< OutputType >::get_d2phidydz(), libMesh::FEGenericBase< OutputType >::get_d2phidz2(), libMesh::FEGenericBase< OutputType >::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< OutputType >::get_div_phi(), libMesh::FEGenericBase< OutputType >::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< OutputType >::get_dphideta(), libMesh::FEGenericBase< OutputType >::get_dphidx(), libMesh::FEGenericBase< OutputType >::get_dphidxi(), libMesh::FEGenericBase< OutputType >::get_dphidy(), libMesh::FEGenericBase< OutputType >::get_dphidz(), libMesh::FEGenericBase< OutputType >::get_dphidzeta(), libMesh::FEGenericBase< OutputType >::get_dual_d2phi(), libMesh::FEGenericBase< OutputType >::get_dual_dphi(), libMesh::FEGenericBase< OutputType >::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< OutputType >::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 669 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_curl_phi().

◆ current_fe_type

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

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

This avoids re-initializing the radial part.

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

Definition at line 1216 of file inf_fe.h.

◆ d2phi

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

Shape function second derivative values.

Definition at line 712 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 733 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 738 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 748 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 753 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 758 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 718 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 723 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 728 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 763 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 768 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 773 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 743 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_d2phidzeta2().

◆ detadx_map

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

Definition at line 1092 of file inf_fe.h.

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

◆ detadx_map_scaled

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

Definition at line 1104 of file inf_fe.h.

◆ detady_map

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

Definition at line 1093 of file inf_fe.h.

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

◆ detady_map_scaled

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

Definition at line 1105 of file inf_fe.h.

◆ detadz_map

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

Definition at line 1094 of file inf_fe.h.

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

◆ detadz_map_scaled

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

Definition at line 1106 of file inf_fe.h.

◆ dim

const unsigned int libMesh::FEAbstract::dim
protectedinherited

The dimensionality of the object.

Definition at line 660 of file fe_abstract.h.

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

◆ div_phi

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

Shape function divergence values.

Only defined for vector types.

Definition at line 674 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_div_phi().

◆ dmodedv

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

the first local derivative of the radial approximation shapes.

Needed when setting up the overall shape functions.

Definition at line 1083 of file inf_fe.h.

◆ dphase

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

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

Definition at line 791 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dphase().

◆ dphi

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

Shape function derivative values.

Definition at line 658 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 684 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 694 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 679 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 699 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 704 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::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 689 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dphidzeta().

◆ dphixr

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

◆ dphixr_sq

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

◆ dsomdv

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

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

Needed when setting up the overall shape functions.

Definition at line 1071 of file inf_fe.h.

◆ dual_coeff

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

Coefficient matrix for the dual basis.

Definition at line 664 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dual_coeff().

◆ dual_d2phi

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

Definition at line 713 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dual_d2phi().

◆ dual_dphi

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

Definition at line 659 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dual_dphi().

◆ dual_phi

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

Definition at line 653 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_dual_phi().

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

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

◆ dweightdv

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

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

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

Definition at line 1055 of file inf_fe.h.

◆ dweightxr_sq

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

◆ dxidx_map

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

Definition at line 1089 of file inf_fe.h.

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

◆ dxidx_map_scaled

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

Definition at line 1101 of file inf_fe.h.

◆ dxidy_map

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

Definition at line 1090 of file inf_fe.h.

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

◆ dxidy_map_scaled

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

Definition at line 1102 of file inf_fe.h.

◆ dxidz_map

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

Definition at line 1091 of file inf_fe.h.

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

◆ dxidz_map_scaled

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

Definition at line 1103 of file inf_fe.h.

◆ dzetadx_map

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

Definition at line 1095 of file inf_fe.h.

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

◆ dzetadx_map_scaled

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

Definition at line 1107 of file inf_fe.h.

◆ dzetady_map

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

Definition at line 1096 of file inf_fe.h.

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

◆ dzetady_map_scaled

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

Definition at line 1108 of file inf_fe.h.

◆ dzetadz_map

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

Definition at line 1097 of file inf_fe.h.

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

◆ dzetadz_map_scaled

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

Definition at line 1109 of file inf_fe.h.

◆ fe_type

FEType libMesh::FEAbstract::fe_type
protectedinherited

◆ JxW

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

Definition at line 1120 of file inf_fe.h.

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

◆ JxWxdecay

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

Definition at line 1119 of file inf_fe.h.

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

◆ mode

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

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

Definition at line 1077 of file inf_fe.h.

◆ normals

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

Definition at line 1122 of file inf_fe.h.

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

◆ phi

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

Shape function values.

Definition at line 652 of file fe_base.h.

Referenced by libMesh::FEGenericBase< OutputType >::get_phi().

◆ phixr

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

◆ qrule

QBase* libMesh::FEAbstract::qrule
protectedinherited

A pointer to the quadrature rule employed.

Definition at line 762 of file fe_abstract.h.

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

◆ radial_qrule

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

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

Definition at line 1191 of file inf_fe.h.

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

◆ shapes_on_quadrature

bool libMesh::FEAbstract::shapes_on_quadrature
protectedinherited

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

Definition at line 768 of file fe_abstract.h.

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

◆ som

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

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

Needed when setting up the overall shape functions.

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

Definition at line 1066 of file inf_fe.h.

◆ tangents

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

Definition at line 1123 of file inf_fe.h.

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

◆ weight

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

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

Definition at line 805 of file fe_base.h.

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

◆ weightxr_sq

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

◆ xyz

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

Physical quadrature points.

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

Definition at line 1046 of file inf_fe.h.

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


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