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

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

#include <fe.h>

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

Public Types

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

Public Member Functions

 InfFE (const FEType &fet)
 Constructor and empty destructor. More...
 
 ~InfFE ()=default
 
virtual FEContinuity get_continuity () const override
 
virtual bool is_hierarchic () const override
 
virtual void reinit (const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 This is at the core of this class. More...
 
virtual void reinit (const Elem *inf_elem, const unsigned int s, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 Reinitializes all the physical element-dependent data based on the side of an infinite element. More...
 
virtual void edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr) override
 Not implemented yet. More...
 
virtual void side_map (const Elem *, const Elem *, const unsigned int, const std::vector< Point > &, std::vector< Point > &) override
 Computes the reference space quadrature points on the side of an element based on the side quadrature points. More...
 
virtual void attach_quadrature_rule (QBase *q) override
 The use of quadrature rules with the InfFE class is somewhat different from the approach of the FE class. More...
 
virtual unsigned int n_shape_functions () const override
 
virtual unsigned int n_quadrature_points () const override
 
virtual const std::vector< Point > & get_xyz () const override
 
virtual const std::vector< Real > & get_JxW () const override
 
virtual const std::vector< Real > & get_JxWxdecay_sq () const override
 
virtual const std::vector< std::vector< OutputShape > > & get_phi_over_decayxR () const override
 
virtual const std::vector< std::vector< OutputGradient > > & get_dphi_over_decayxR () const override
 
virtual const std::vector< std::vector< OutputGradient > > & get_dphi_over_decay () const override
 
virtual const std::vector< RealGradient > & get_dxyzdxi () const override
 
virtual const std::vector< RealGradient > & get_dxyzdeta () const override
 
virtual const std::vector< RealGradient > & get_dxyzdzeta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxi2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdeta2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdzeta2 () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxideta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdxidzeta () const override
 
virtual const std::vector< RealGradient > & get_d2xyzdetadzeta () const override
 
virtual const std::vector< Real > & get_dxidx () const override
 
virtual const std::vector< Real > & get_dxidy () const override
 
virtual const std::vector< Real > & get_dxidz () const override
 
virtual const std::vector< Real > & get_detadx () const override
 
virtual const std::vector< Real > & get_detady () const override
 
virtual const std::vector< Real > & get_detadz () const override
 
virtual const std::vector< Real > & get_dzetadx () const override
 
virtual const std::vector< Real > & get_dzetady () const override
 
virtual const std::vector< Real > & get_dzetadz () const override
 
virtual const std::vector< Real > & get_Sobolev_weight () const override
 
virtual const std::vector< RealGradient > & get_Sobolev_dweight () const override
 
virtual const std::vector< std::vector< Point > > & get_tangents () const override
 
virtual const std::vector< Point > & get_normals () const override
 
virtual const std::vector< Real > & get_curvatures () const override
 
virtual const std::vector< Real > & get_Sobolev_weightxR_sq () const override
 
virtual const std::vector< RealGradient > & get_Sobolev_dweightxR_sq () const override
 
template<>
std::unique_ptr< FEGenericBase< Real > > build (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< RealGradient > > build (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< Real > > build_InfFE (const unsigned int dim, const FEType &fet)
 
template<>
std::unique_ptr< FEGenericBase< RealGradient > > build_InfFE (const unsigned int, const FEType &)
 
const std::vector< std::vector< OutputShape > > & get_phi () const
 
const std::vector< std::vector< OutputShape > > & get_dual_phi () const
 
virtual void request_phi () const override
 request phi calculations More...
 
virtual void request_dual_phi () const override
 
const std::vector< std::vector< OutputGradient > > & get_dphi () const
 
const std::vector< std::vector< OutputGradient > > & get_dual_dphi () const
 
virtual void request_dphi () const override
 request dphi calculations More...
 
virtual void request_dual_dphi () const override
 
const DenseMatrix< Real > & get_dual_coeff () const
 
virtual_for_inffe const std::vector< std::vector< OutputShape > > & get_curl_phi () const
 
virtual_for_inffe const std::vector< std::vector< OutputDivergence > > & get_div_phi () const
 
const std::vector< std::vector< OutputShape > > & get_dphidx () const
 
const std::vector< std::vector< OutputShape > > & get_dphidy () const
 
const std::vector< std::vector< OutputShape > > & get_dphidz () const
 
const std::vector< std::vector< OutputShape > > & get_dphidxi () const
 
const std::vector< std::vector< OutputShape > > & get_dphideta () const
 
const std::vector< std::vector< OutputShape > > & get_dphidzeta () const
 
const std::vector< std::vector< OutputTensor > > & get_d2phi () const
 
const std::vector< std::vector< OutputTensor > > & get_dual_d2phi () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidx2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxdy () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxdz () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidy2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidydz () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidz2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxi2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxideta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidxidzeta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phideta2 () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidetadzeta () const
 
const std::vector< std::vector< OutputShape > > & get_d2phidzeta2 () const
 
const std::vector< OutputGradient > & get_dphase () const
 
virtual void print_phi (std::ostream &os) const override
 Prints the value of each shape function at each quadrature point. More...
 
virtual void print_dual_phi (std::ostream &os) const override
 
virtual void print_dphi (std::ostream &os) const override
 Prints the value of each shape function's derivative at each quadrature point. More...
 
virtual void print_dual_dphi (std::ostream &os) const override
 
virtual void print_d2phi (std::ostream &os) const override
 Prints the value of each shape function's second derivatives at each quadrature point. More...
 
virtual void print_dual_d2phi (std::ostream &os) const override
 
virtual void reinit_dual_shape_coeffs (const Elem *, const std::vector< Point > &, const std::vector< Real > &)
 This re-computes the dual shape function coefficients using CUSTOMIZED qrule. More...
 
virtual void reinit_default_dual_shape_coeffs (const Elem *)
 This re-computes the dual shape function coefficients using DEFAULT qrule. More...
 
unsigned int get_dim () const
 
void get_nothing () const
 
ElemType get_type () const
 
unsigned int get_p_level () const
 
FEType get_fe_type () const
 
Order get_order () const
 
void set_fe_order (int new_order)
 Sets the base FE order of the finite element. More...
 
FEFamily get_family () const
 
const FEMapget_fe_map () const
 
FEMapget_fe_map ()
 
void print_JxW (std::ostream &os) const
 Prints the Jacobian times the weight for each quadrature point. More...
 
void print_xyz (std::ostream &os) const
 Prints the spatial location of each quadrature point (on the physical element). More...
 
void print_info (std::ostream &os) const
 Prints all the relevant information about the current element. More...
 
void set_calculate_dual (const bool val)
 set calculate_dual as needed More...
 
void set_calculate_default_dual_coeff (const bool val)
 set calculate_default_dual_coeff as needed More...
 
void add_p_level_in_reinit (bool value)
 Indicate whether to add p-refinement levels in init/reinit methods. More...
 
bool add_p_level_in_reinit () const
 Whether to add p-refinement levels in init/reinit methods. More...
 

Static Public Member Functions

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

Protected Types

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

Protected Member Functions

void update_base_elem (const Elem *inf_elem)
 Updates the protected member base_elem to the appropriate base element for the given inf_elem. More...
 
virtual void init_base_shape_functions (const std::vector< Point > &, const Elem *) override
 Do not use this derived member in InfFE<Dim,T_radial,T_map>. More...
 
virtual void determine_calculations () override
 Determine which values are to be calculated, for both the FE itself and for the FEMap. More...
 
void init_radial_shape_functions (const Elem *inf_elem, const std::vector< Point > *radial_pts=nullptr)
 Some of the member data only depend on the radial part of the infinite element. More...
 
void init_shape_functions (const std::vector< Point > &radial_qp, const std::vector< Point > &base_qp, const Elem *inf_elem)
 Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta, etc. More...
 
void init_face_shape_functions (const std::vector< Point > &, const Elem *inf_side)
 Initialize all the data fields like weight, phi, etc for the side s. More...
 
void compute_shape_functions (const Elem *inf_elem, const std::vector< Point > &base_qp, const std::vector< Point > &radial_qp)
 After having updated the jacobian and the transformation from local to global coordinates in FEAbstract::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx/y/z, dphasedx/y/z, dweight. More...
 
void compute_face_functions ()
 
virtual void compute_shape_functions (const Elem *, const std::vector< Point > &) override
 Use compute_shape_functions(const Elem*, const std::vector<Point> &, const std::vector<Point> &) instead. More...
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval_deriv (Real x, Order, unsigned n)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
template<>
Real eval_deriv (Real v, Order o, unsigned i)
 
bool calculating_nothing () const
 
void compute_dual_shape_coeffs (const std::vector< Real > &JxW, const std::vector< std::vector< OutputShape >> &phi)
 Compute the dual basis coefficients dual_coeff we rely on the JxW (or weights) and the phi values, which can come from default or customized qrule. More...
 
template<>
void compute_dual_shape_coeffs (const std::vector< Real > &, const std::vector< std::vector< OutputShape >> &)
 
template<>
void compute_dual_shape_coeffs (const std::vector< Real > &JxW, const std::vector< std::vector< OutputShape >> &phi_vals)
 
void compute_dual_shape_functions ()
 Compute dual_phi, dual_dphi, dual_d2phi It is only valid for this to be called after reinit has occurred with a quadrature rule. More...
 
template<>
void compute_dual_shape_functions ()
 
template<>
void compute_dual_shape_functions ()
 
void increment_constructor_count (const std::string &name) noexcept
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name) noexcept
 Increments the destruction counter. More...
 

Static Protected Member Functions

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

Protected Attributes

bool calculate_map_scaled
 Are we calculating scaled mapping functions? More...
 
bool calculate_phi_scaled
 Are we calculating scaled shape functions? More...
 
bool calculate_dphi_scaled
 Are we calculating scaled shape function gradients? More...
 
bool calculate_xyz
 Are we calculating the positions of quadrature points? More...
 
bool calculate_jxw
 Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst stability. More...
 
std::vector< Pointxyz
 Physical quadrature points. More...
 
std::vector< Realweightxr_sq
 
std::vector< Realdweightdv
 the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points. More...
 
std::vector< RealGradientdweightxr_sq
 
std::vector< Realsom
 the radial decay \( 1/r \) in local coordinates. More...
 
std::vector< Realdsomdv
 the first local derivative of the radial decay \( 1/r \) in local coordinates. More...
 
std::vector< std::vector< Real > > mode
 the radial approximation shapes in local coordinates Needed when setting up the overall shape functions. More...
 
std::vector< std::vector< Real > > dmodedv
 the first local derivative of the radial approximation shapes. More...
 
std::vector< Realdxidx_map
 
std::vector< Realdxidy_map
 
std::vector< Realdxidz_map
 
std::vector< Realdetadx_map
 
std::vector< Realdetady_map
 
std::vector< Realdetadz_map
 
std::vector< Realdzetadx_map
 
std::vector< Realdzetady_map
 
std::vector< Realdzetadz_map
 
std::vector< Realdxidx_map_scaled
 
std::vector< Realdxidy_map_scaled
 
std::vector< Realdxidz_map_scaled
 
std::vector< Realdetadx_map_scaled
 
std::vector< Realdetady_map_scaled
 
std::vector< Realdetadz_map_scaled
 
std::vector< Realdzetadx_map_scaled
 
std::vector< Realdzetady_map_scaled
 
std::vector< Realdzetadz_map_scaled
 
std::vector< std::vector< Real > > phixr
 
std::vector< std::vector< RealGradient > > dphixr
 
std::vector< std::vector< RealGradient > > dphixr_sq
 
std::vector< RealJxWxdecay
 
std::vector< RealJxW
 
std::vector< Pointnormals
 
std::vector< std::vector< Point > > tangents
 
std::vector< unsigned int_radial_node_index
 The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current infinite element. More...
 
std::vector< unsigned int_base_node_index
 The internal structure of the InfFE – tensor product of base element times radial nodes – has to be determined from the node numbering of the current element. More...
 
std::vector< unsigned int_radial_shape_index
 The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element. More...
 
std::vector< unsigned int_base_shape_index
 The internal structure of the InfFE – tensor product of base element shapes times radial shapes – has to be determined from the dof numbering scheme of the current infinite element. More...
 
unsigned int _n_total_approx_sf
 The number of total approximation shape functions for the current configuration. More...
 
unsigned int _n_total_qp
 The total number of quadrature points for the current configuration. More...
 
std::vector< Real_total_qrule_weights
 this vector contains the combined integration weights, so that FEAbstract::compute_map() can still be used More...
 
std::unique_ptr< QBasebase_qrule
 The quadrature rule for the base element associated with the current infinite element. More...
 
std::unique_ptr< QBaseradial_qrule
 The quadrature rule for the base element associated with the current infinite element. More...
 
std::unique_ptr< const Elembase_elem
 The "base" (aka non-infinite) element associated with the current infinite element. More...
 
std::unique_ptr< FEBasebase_fe
 Have a FE<Dim-1,T_base> handy for base approximation. More...
 
FEType current_fe_type
 This FEType stores the characteristics for which the data structures phi, phi_map etc are currently initialized. More...
 
std::unique_ptr< FETransformationBase< OutputType > > _fe_trans
 Object that handles computing shape function values, gradients, etc in the physical domain. More...
 
std::vector< std::vector< OutputShape > > phi
 Shape function values. More...
 
std::vector< std::vector< OutputShape > > dual_phi
 
std::vector< std::vector< OutputGradient > > dphi
 Shape function derivative values. More...
 
std::vector< std::vector< OutputGradient > > dual_dphi
 
DenseMatrix< Realdual_coeff
 Coefficient matrix for the dual basis. More...
 
std::vector< std::vector< OutputShape > > curl_phi
 Shape function curl values. More...
 
std::vector< std::vector< OutputDivergence > > div_phi
 Shape function divergence values. More...
 
std::vector< std::vector< OutputShape > > dphidxi
 Shape function derivatives in the xi direction. More...
 
std::vector< std::vector< OutputShape > > dphideta
 Shape function derivatives in the eta direction. More...
 
std::vector< std::vector< OutputShape > > dphidzeta
 Shape function derivatives in the zeta direction. More...
 
std::vector< std::vector< OutputShape > > dphidx
 Shape function derivatives in the x direction. More...
 
std::vector< std::vector< OutputShape > > dphidy
 Shape function derivatives in the y direction. More...
 
std::vector< std::vector< OutputShape > > dphidz
 Shape function derivatives in the z direction. More...
 
std::vector< std::vector< OutputTensor > > d2phi
 Shape function second derivative values. More...
 
std::vector< std::vector< OutputTensor > > dual_d2phi
 
std::vector< std::vector< OutputShape > > d2phidxi2
 Shape function second derivatives in the xi direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxideta
 Shape function second derivatives in the xi-eta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxidzeta
 Shape function second derivatives in the xi-zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phideta2
 Shape function second derivatives in the eta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidetadzeta
 Shape function second derivatives in the eta-zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidzeta2
 Shape function second derivatives in the zeta direction. More...
 
std::vector< std::vector< OutputShape > > d2phidx2
 Shape function second derivatives in the x direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxdy
 Shape function second derivatives in the x-y direction. More...
 
std::vector< std::vector< OutputShape > > d2phidxdz
 Shape function second derivatives in the x-z direction. More...
 
std::vector< std::vector< OutputShape > > d2phidy2
 Shape function second derivatives in the y direction. More...
 
std::vector< std::vector< OutputShape > > d2phidydz
 Shape function second derivatives in the y-z direction. More...
 
std::vector< std::vector< OutputShape > > d2phidz2
 Shape function second derivatives in the z direction. More...
 
std::vector< OutputGradientdphase
 Used for certain infinite element families: the first derivatives of the phase term in global coordinates, over all quadrature points. More...
 
std::vector< RealGradientdweight
 Used for certain infinite element families: the global derivative of the additional radial weight \( 1/{r^2} \), over all quadrature points. More...
 
std::vector< Realweight
 Used for certain infinite element families: the additional radial weight \( 1/{r^2} \) in local coordinates, over all quadrature points. More...
 
std::unique_ptr< FEMap_fe_map
 
const unsigned int dim
 The dimensionality of the object. More...
 
bool calculations_started
 Have calculations with this object already been started? Then all get_* functions should already have been called. More...
 
bool calculate_dual
 Are we calculating dual basis? More...
 
bool calculate_default_dual_coeff
 Are we calculating the coefficient for the dual basis using the default qrule? More...
 
bool calculate_nothing
 Are we potentially deliberately calculating nothing? More...
 
bool calculate_map
 Are we calculating mapping functions? More...
 
bool calculate_phi
 Should we calculate shape functions? More...
 
bool calculate_dphi
 Should we calculate shape function gradients? More...
 
bool calculate_d2phi
 Should we calculate shape function hessians? More...
 
const bool calculate_d2phi =false
 
bool calculate_curl_phi
 Should we calculate shape function curls? More...
 
bool calculate_div_phi
 Should we calculate shape function divergences? More...
 
bool calculate_dphiref
 Should we calculate reference shape function gradients? More...
 
FEType fe_type
 The finite element type for this object. More...
 
ElemType elem_type
 The element type the current data structures are set up for. More...
 
unsigned int _elem_p_level
 The element p-refinement level the current data structures are set up for. More...
 
unsigned int _p_level
 The p refinement level the current data structures are set up for. More...
 
QBaseqrule
 A pointer to the quadrature rule employed. More...
 
bool shapes_on_quadrature
 A flag indicating if current data structures correspond to quadrature rule points. More...
 
bool _add_p_level_in_reinit
 Whether to add p-refinement levels in init/reinit methods. More...
 

Static Protected Attributes

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

Private Member Functions

virtual bool shapes_need_reinit () const override
 

Static Private Attributes

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

Friends

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

Detailed Description

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

A specific instantiation of the FEBase class.

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

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

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

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

Definition at line 42 of file fe.h.

Member Typedef Documentation

◆ Counts

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

Data structure to log the information.

The log is identified by the class name.

Definition at line 119 of file reference_counter.h.

◆ OutputDivergence

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

Definition at line 122 of file fe_base.h.

◆ OutputGradient

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

Definition at line 120 of file fe_base.h.

◆ OutputNumber

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

Definition at line 123 of file fe_base.h.

◆ OutputNumberDivergence

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

Definition at line 126 of file fe_base.h.

◆ OutputNumberGradient

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

Definition at line 124 of file fe_base.h.

◆ OutputNumberTensor

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

Definition at line 125 of file fe_base.h.

◆ OutputShape

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

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

Definition at line 119 of file fe_base.h.

◆ OutputTensor

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

Definition at line 121 of file fe_base.h.

Constructor & Destructor Documentation

◆ InfFE()

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

Constructor and empty destructor.

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

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

Definition at line 43 of file inf_fe.C.

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

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

◆ ~InfFE()

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

Member Function Documentation

◆ add_p_level_in_reinit() [1/2]

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

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

Definition at line 610 of file fe_abstract.h.

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

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

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

◆ add_p_level_in_reinit() [2/2]

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

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

Definition at line 615 of file fe_abstract.h.

References libMesh::FEAbstract::_add_p_level_in_reinit.

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

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

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

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

◆ build() [1/3]

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

Builds a specific finite element type.

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

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

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::MeshFunction::_gradient_on_elem(), alternative_fe_assembly(), assemble(), LinearElasticity::assemble(), assemble_1D(), assemble_biharmonic(), assemble_cd(), assemble_divgrad(), assemble_elasticity(), assemble_ellipticdg(), assemble_func(), assemble_helmholtz(), assemble_laplace(), assemble_mass(), assemble_matrices(), assemble_poisson(), assemble_SchroedingerEquation(), assemble_shell(), assemble_stokes(), assemble_wave(), libMesh::FEMContext::cached_fe(), libMesh::System::calculate_norm(), libMesh::FEInterface::compute_data(), compute_enriched_soln(), compute_jacobian(), compute_residual(), compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), libMesh::ExactErrorEstimator::estimate_error(), fe_assembly(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), integrate_function(), LaplaceYoung::jacobian(), LargeDeformationElasticity::jacobian(), libMesh::LIBMESH_DEFAULT_VECTORIZED_FE(), main(), OverlappingCouplingFunctor::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), periodic_bc_test_poisson(), libMesh::System::point_hessian(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), LaplaceYoung::residual(), LargeDeformationElasticity::residual(), libMesh::HPCoarsenTest::select_refinement(), RationalMapTest< elem_type >::setUp(), DualShapeTest::setUp(), FETestBase< order, family, elem_type, 1 >::setUp(), FETest< order, family, elem_type >::testCustomReinit(), InfFERadialTest::testRefinement(), InfFERadialTest::testSides(), libMesh::Elem::true_centroid(), and libMesh::Elem::volume().

◆ build() [2/3]

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

Definition at line 191 of file fe_base.C.

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

◆ build() [3/3]

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

Definition at line 413 of file fe_base.C.

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

◆ build_InfFE() [1/3]

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

Builds a specific infinite element type.

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

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

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

◆ build_InfFE() [2/3]

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

Definition at line 546 of file fe_base.C.

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

◆ build_InfFE() [3/3]

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

Definition at line 750 of file fe_base.C.

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

◆ calculating_nothing()

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

Definition at line 568 of file fe_base.h.

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

◆ coarsened_dof_values() [1/2]

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

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

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

Definition at line 1012 of file fe_base.C.

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

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

◆ coarsened_dof_values() [2/2]

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

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

Computes a vector of coefficients corresponding to all dof_indices.

Definition at line 1552 of file fe_base.C.

1557 {
1558  Ue.resize(0);
1559 
1560  for (auto v : make_range(dof_map.n_variables()))
1561  {
1562  DenseVector<Number> Usub;
1563 
1564  coarsened_dof_values(old_vector, dof_map, elem, Usub,
1565  v, use_old_dof_indices);
1566 
1567  Ue.append (Usub);
1568  }
1569 }
unsigned int n_variables() const
Definition: dof_map.h:621
static void coarsened_dof_values(const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const unsigned int var, const bool use_old_dof_indices=false)
Creates a local projection on coarse_elem, based on the DoF values in global_vector for it&#39;s children...
Definition: fe_base.C:1012
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:134

◆ compute_data()

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

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

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

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

Definition at line 426 of file inf_fe_static.C.

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

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

◆ compute_dual_shape_coeffs() [1/3]

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

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

Definition at line 800 of file fe_base.h.

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

◆ compute_dual_shape_coeffs() [2/3]

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

Definition at line 804 of file fe_base.C.

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

◆ compute_dual_shape_coeffs() [3/3]

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

◆ compute_dual_shape_functions() [1/3]

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

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

Definition at line 792 of file fe_base.h.

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

◆ compute_dual_shape_functions() [2/3]

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

◆ compute_dual_shape_functions() [3/3]

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

Definition at line 838 of file fe_base.C.

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

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

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

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

◆ compute_node_constraints()

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

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

Definition at line 845 of file fe_abstract.C.

References std::abs(), 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().

847 {
848  libmesh_assert(elem);
849 
850  const unsigned int Dim = elem->dim();
851 
852  // Only constrain elements in 2,3D.
853  if (Dim == 1)
854  return;
855 
856  // Only constrain active and ancestor elements
857  if (elem->subactive())
858  return;
859 
860 
861 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
862  if (elem->infinite())
863  {
864  const FEType fe_t(elem->default_order(), FEMap::map_fe_type(*elem));
865 
866  // expand the infinite_compute_constraint in its template-arguments.
867  switch(Dim)
868  {
869  case 2:
870  {
871  inf_fe_family_mapping_switch(2, inf_compute_node_constraints (constraints, elem) , ,; break;);
872  break;
873  }
874  case 3:
875  {
876  inf_fe_family_mapping_switch(3, inf_compute_node_constraints (constraints, elem) , ,; break;);
877  break;
878  }
879  default:
880  libmesh_error_msg("Invalid dim = " << Dim);
881  }
882  return;
883  }
884 
885 #endif
886  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
887  const FEType fe_type(elem->default_side_order(), mapping_family);
888 
889  // Pull objects out of the loop to reduce heap operations
890  std::vector<const Node *> my_nodes, parent_nodes;
891  std::unique_ptr<const Elem> my_side, parent_side;
892 
893  // Look at the element faces. Check to see if we need to
894  // build constraints.
895  for (auto s : elem->side_index_range())
896  if (elem->neighbor_ptr(s) != nullptr &&
897  elem->neighbor_ptr(s) != remote_elem)
898  if (elem->neighbor_ptr(s)->level() < elem->level()) // constrain dofs shared between
899  { // this element and ones coarser
900  // than this element.
901  // Get pointers to the elements of interest and its parent.
902  const Elem * parent = elem->parent();
903 
904  // This can't happen... Only level-0 elements have nullptr
905  // parents, and no level-0 elements can be at a higher
906  // level than their neighbors!
907  libmesh_assert(parent);
908 
909  elem->build_side_ptr(my_side, s);
910  parent->build_side_ptr(parent_side, s);
911 
912  const unsigned int n_side_nodes = my_side->n_nodes();
913 
914  my_nodes.clear();
915  my_nodes.reserve (n_side_nodes);
916  parent_nodes.clear();
917  parent_nodes.reserve (n_side_nodes);
918 
919  for (unsigned int n=0; n != n_side_nodes; ++n)
920  my_nodes.push_back(my_side->node_ptr(n));
921 
922  for (unsigned int n=0; n != n_side_nodes; ++n)
923  parent_nodes.push_back(parent_side->node_ptr(n));
924 
925  for (unsigned int my_side_n=0;
926  my_side_n < n_side_nodes;
927  my_side_n++)
928  {
929  // We can have an FE type that supports an order
930  // partially, such that sides do not support the same
931  // order. E.g. we say that a LAGRANGE PRISM21 supports
932  // "third" order to distinguish its shape functions from
933  // a PRISM18, but the QUAD9 sides will still only
934  // support second order.
935  FEType side_fe_type = fe_type;
936  const int side_max_order =
937  FEInterface::max_order(fe_type, my_side->type());
938 
939  if ((int)fe_type.order > side_max_order)
940  side_fe_type.order = side_max_order;
941 
942  // Do not use the p_level(), if any, that is inherited by the side.
943  libmesh_assert_less
944  (my_side_n,
945  FEInterface::n_dofs(side_fe_type, /*extra_order=*/0,
946  my_side.get()));
947 
948  const Node * my_node = my_nodes[my_side_n];
949 
950  // The support point of the DOF
951  const Point & support_point = *my_node;
952 
953  // Figure out where my node lies on their reference element.
954  const Point mapped_point = FEMap::inverse_map(Dim-1,
955  parent_side.get(),
956  support_point);
957 
958  // Compute the parent's side shape function values.
959  for (unsigned int their_side_n=0;
960  their_side_n < n_side_nodes;
961  their_side_n++)
962  {
963  // Do not use the p_level(), if any, that is inherited by the side.
964  libmesh_assert_less
965  (their_side_n,
966  FEInterface::n_dofs(side_fe_type,
967  /*extra_order=*/0,
968  parent_side.get()));
969 
970  const Node * their_node = parent_nodes[their_side_n];
971  libmesh_assert(their_node);
972 
973  // Do not use the p_level(), if any, that is inherited by the side.
974  const Real their_value = FEInterface::shape(side_fe_type,
975  /*extra_order=*/0,
976  parent_side.get(),
977  their_side_n,
978  mapped_point);
979 
980  const Real their_mag = std::abs(their_value);
981 #ifdef DEBUG
982  // Protect for the case u_i ~= u_j,
983  // in which case i better equal j.
984  if (their_mag > 0.999)
985  {
986  libmesh_assert_equal_to (my_node, their_node);
987  libmesh_assert_less (std::abs(their_value - 1.), 0.001);
988  }
989  else
990 #endif
991  // To make nodal constraints useful for constructing
992  // sparsity patterns faster, we need to get EVERY
993  // POSSIBLE constraint coupling identified, even if
994  // there is no coupling in the isoparametric
995  // Lagrange case.
996  if (their_mag < 1.e-5)
997  {
998  // since we may be running this method concurrently
999  // on multiple threads we need to acquire a lock
1000  // before modifying the shared constraint_row object.
1001  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1002 
1003  // A reference to the constraint row.
1004  NodeConstraintRow & constraint_row = constraints[my_node].first;
1005 
1006  constraint_row.emplace(their_node, 0.);
1007  }
1008  // To get nodal coordinate constraints right, only
1009  // add non-zero and non-identity values for Lagrange
1010  // basis functions.
1011  else // (1.e-5 <= their_mag <= .999)
1012  {
1013  // since we may be running this method concurrently
1014  // on multiple threads we need to acquire a lock
1015  // before modifying the shared constraint_row object.
1016  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1017 
1018  // A reference to the constraint row.
1019  NodeConstraintRow & constraint_row = constraints[my_node].first;
1020 
1021  constraint_row.emplace(their_node, their_value);
1022  }
1023  }
1024  }
1025  }
1026 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:597
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:1626
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:201
static unsigned int max_order(const FEType &fe_t, const ElemType &el_t)
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
A row of the Node constraint mapping.
Definition: dof_map.h:138
FEFamily
defines an enum for finite element families.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30
const RemoteElem * remote_elem
Definition: remote_elem.C:54

◆ compute_node_indices()

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

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

Definition at line 629 of file inf_fe_static.C.

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

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

◆ compute_node_indices_fast()

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

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

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

Definition at line 836 of file inf_fe_static.C.

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

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

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

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

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

◆ compute_periodic_node_constraints()

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

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

Definition at line 1037 of file fe_abstract.C.

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

1042 {
1043  // Only bother if we truly have periodic boundaries
1044  if (boundaries.empty())
1045  return;
1046 
1047  libmesh_assert(elem);
1048 
1049  // Only constrain active elements with this method
1050  if (!elem->active())
1051  return;
1052 
1053  const unsigned int Dim = elem->dim();
1054 
1055  const FEFamily mapping_family = FEMap::map_fe_type(*elem);
1056  const FEType fe_type(elem->default_side_order(), mapping_family);
1057 
1058  // Pull objects out of the loop to reduce heap operations
1059  std::vector<const Node *> my_nodes, neigh_nodes;
1060  std::unique_ptr<const Elem> my_side, neigh_side;
1061 
1062  // Look at the element faces. Check to see if we need to
1063  // build constraints.
1064  std::vector<boundary_id_type> bc_ids;
1065  for (auto s : elem->side_index_range())
1066  {
1067  if (elem->neighbor_ptr(s))
1068  continue;
1069 
1070  mesh.get_boundary_info().boundary_ids (elem, s, bc_ids);
1071  for (const auto & boundary_id : bc_ids)
1072  {
1073  const PeriodicBoundaryBase * periodic = boundaries.boundary(boundary_id);
1074  if (periodic)
1075  {
1076  libmesh_assert(point_locator);
1077 
1078  // Get pointers to the element's neighbor.
1079  unsigned int s_neigh;
1080  const Elem * neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s, &s_neigh);
1081 
1082  libmesh_error_msg_if
1083  (!neigh, "PeriodicBoundaries can't find a periodic neighbor for element " <<
1084  elem->id() << " side " << s);
1085 
1086  // h refinement constraints:
1087  // constrain dofs shared between
1088  // this element and ones as coarse
1089  // as or coarser than this element.
1090  if (neigh->level() <= elem->level())
1091  {
1092 #ifdef LIBMESH_ENABLE_AMR
1093  libmesh_assert(neigh->active());
1094 #endif // #ifdef LIBMESH_ENABLE_AMR
1095 
1096  elem->build_side_ptr(my_side, s);
1097  neigh->build_side_ptr(neigh_side, s_neigh);
1098 
1099  const unsigned int n_side_nodes = my_side->n_nodes();
1100 
1101  my_nodes.clear();
1102  my_nodes.reserve (n_side_nodes);
1103  neigh_nodes.clear();
1104  neigh_nodes.reserve (n_side_nodes);
1105 
1106  for (unsigned int n=0; n != n_side_nodes; ++n)
1107  my_nodes.push_back(my_side->node_ptr(n));
1108 
1109  for (unsigned int n=0; n != n_side_nodes; ++n)
1110  neigh_nodes.push_back(neigh_side->node_ptr(n));
1111 
1112  // Make sure we're not adding recursive constraints
1113  // due to the redundancy in the way we add periodic
1114  // boundary constraints, or adding constraints to
1115  // nodes that already have AMR constraints
1116  std::vector<bool> skip_constraint(n_side_nodes, false);
1117 
1118  for (unsigned int my_side_n=0;
1119  my_side_n < n_side_nodes;
1120  my_side_n++)
1121  {
1122  // Do not use the p_level(), if any, that is inherited by the side.
1123  libmesh_assert_less (my_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1124 
1125  const Node * my_node = my_nodes[my_side_n];
1126 
1127  // If we've already got a constraint on this
1128  // node, then the periodic constraint is
1129  // redundant
1130  {
1131  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1132 
1133  if (constraints.count(my_node))
1134  {
1135  skip_constraint[my_side_n] = true;
1136  continue;
1137  }
1138  }
1139 
1140  // Compute the neighbors's side shape function values.
1141  for (unsigned int their_side_n=0;
1142  their_side_n < n_side_nodes;
1143  their_side_n++)
1144  {
1145  // Do not use the p_level(), if any, that is inherited by the side.
1146  libmesh_assert_less (their_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, neigh_side.get()));
1147 
1148  const Node * their_node = neigh_nodes[their_side_n];
1149 
1150  // If there's a constraint on an opposing node,
1151  // we need to see if it's constrained by
1152  // *our side* making any periodic constraint
1153  // on us recursive
1154  {
1155  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1156 
1157  if (!constraints.count(their_node))
1158  continue;
1159 
1160  const NodeConstraintRow & their_constraint_row =
1161  constraints[their_node].first;
1162 
1163  for (unsigned int orig_side_n=0;
1164  orig_side_n < n_side_nodes;
1165  orig_side_n++)
1166  {
1167  // Do not use the p_level(), if any, that is inherited by the side.
1168  libmesh_assert_less (orig_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1169 
1170  const Node * orig_node = my_nodes[orig_side_n];
1171 
1172  if (their_constraint_row.count(orig_node))
1173  skip_constraint[orig_side_n] = true;
1174  }
1175  }
1176  }
1177  }
1178  for (unsigned int my_side_n=0;
1179  my_side_n < n_side_nodes;
1180  my_side_n++)
1181  {
1182  // Do not use the p_level(), if any, that is inherited by the side.
1183  libmesh_assert_less (my_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, my_side.get()));
1184 
1185  if (skip_constraint[my_side_n])
1186  continue;
1187 
1188  const Node * my_node = my_nodes[my_side_n];
1189 
1190  // Figure out where my node lies on their reference element.
1191  const Point neigh_point = periodic->get_corresponding_pos(*my_node);
1192 
1193  // Figure out where my node lies on their reference element.
1194  const Point mapped_point =
1195  FEMap::inverse_map(Dim-1, neigh_side.get(),
1196  neigh_point);
1197 
1198  for (unsigned int their_side_n=0;
1199  their_side_n < n_side_nodes;
1200  their_side_n++)
1201  {
1202  // Do not use the p_level(), if any, that is inherited by the side.
1203  libmesh_assert_less (their_side_n, FEInterface::n_dofs(fe_type, /*extra_order=*/0, neigh_side.get()));
1204 
1205  const Node * their_node = neigh_nodes[their_side_n];
1206  libmesh_assert(their_node);
1207 
1208  // Do not use the p_level(), if any, that is inherited by the side.
1209  const Real their_value = FEInterface::shape(fe_type,
1210  /*extra_order=*/0,
1211  neigh_side.get(),
1212  their_side_n,
1213  mapped_point);
1214 
1215  // since we may be running this method concurrently
1216  // on multiple threads we need to acquire a lock
1217  // before modifying the shared constraint_row object.
1218  {
1219  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1220 
1221  NodeConstraintRow & constraint_row =
1222  constraints[my_node].first;
1223 
1224  constraint_row.emplace(their_node, their_value);
1225  }
1226  }
1227  }
1228  }
1229  }
1230  }
1231  }
1232 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:597
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:1626
MeshBase & mesh
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< const Node *, Real, std::less< const Node * >, Threads::scalable_allocator< std::pair< const Node *const, Real > > > NodeConstraintRow
A row of the Node constraint mapping.
Definition: dof_map.h:138
FEFamily
defines an enum for finite element families.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
static FEFamily map_fe_type(const Elem &elem)
Definition: fe_map.C:45
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30

◆ compute_proj_constraints()

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

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

Definition at line 1575 of file fe_base.C.

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

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

◆ compute_shape_functions() [1/2]

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

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

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

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

Definition at line 780 of file inf_fe.C.

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

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

◆ compute_shape_functions() [2/2]

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

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 959 of file inf_fe.h.

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

◆ compute_shape_indices() [1/2]

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

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

Definition at line 960 of file inf_fe_static.C.

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

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

◆ compute_shape_indices() [2/2]

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

Definition at line 945 of file inf_fe_static.C.

References libMesh::Elem::type().

950 {
951  // (Temporarily) call version of this function taking an
952  // ElemType. Eventually there should only be one version of this
953  // function that takes an Elem*.
954  compute_shape_indices(fet, inf_elem->type(), i, base_shape, radial_shape);
955 }
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...

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

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

327 {
328  this->calculations_started = true;
329 
330  // If the user forgot to request anything, but we're enabling
331  // deprecated backwards compatibility, then we'll be safe and
332  // calculate everything. If we haven't enable deprecated backwards
333  // compatibility then we'll scream and die.
334 #ifdef LIBMESH_ENABLE_DEPRECATED
335  if (!this->calculate_nothing &&
336  !this->calculate_phi && !this->calculate_dphi &&
337  !this->calculate_dphiref &&
338  !this->calculate_phi_scaled && !this->calculate_dphi_scaled &&
339  !this->calculate_xyz && !this->calculate_jxw &&
340  !this->calculate_map_scaled && !this->calculate_map &&
341 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
342  !this->calculate_d2phi &&
343 #endif
344  !this->calculate_curl_phi && !this->calculate_div_phi)
345  {
346  libmesh_deprecated();
347  this->calculate_phi = this->calculate_dphi = this->calculate_jxw = true;
348  this->calculate_dphiref = true;
349 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
350  this->calculate_d2phi = true;
351 #endif
352  this->calculate_phi_scaled = this->calculate_dphi_scaled = this->calculate_xyz = true;
354  {
355  this->calculate_curl_phi = true;
356  this->calculate_div_phi = true;
357  }
358  }
359 #else //LIBMESH_ENABLE_DEPRECATED
360  // ANSI C does not allow to embed the preprocessor-statement into the assert, so we
361  // make two statements, just different by 'calculate_d2phi'.
362 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
364  this->calculate_phi || this->calculate_dphi ||
365  this->calculate_dphiref ||
367  this->calculate_xyz || this->calculate_jxw ||
368  this->calculate_map_scaled || this->calculate_map ||
369  this->calculate_curl_phi || this->calculate_div_phi);
370 #else
372  this->calculate_phi || this->calculate_dphi ||
373  this->calculate_dphiref ||
375  this->calculate_xyz || this->calculate_jxw ||
376  this->calculate_map_scaled || this->calculate_map ||
377  this->calculate_curl_phi || this->calculate_div_phi);
378 #endif
379 #endif // LIBMESH_ENABLE_DEPRECATED
380 
381  // set further terms necessary to do the requested task
382  if (calculate_jxw)
383  this->calculate_map = true;
384  if (this->calculate_dphi)
385  this->calculate_map = true;
386  if (this->calculate_dphi_scaled)
387  this->calculate_map_scaled = true;
389  // if Cartesian positions were requested but the calculation of map
390  // was not triggered, we'll opt for the 'scaled' variant.
391  this->calculate_map_scaled = true;
392  base_fe->calculate_phi = this->calculate_phi || this->calculate_phi_scaled
393  || this->calculate_dphi || this->calculate_dphi_scaled;
394  base_fe->calculate_dphi = this->calculate_dphi || this->calculate_dphi_scaled;
395  if (this->calculate_map || this->calculate_map_scaled
396  || this->calculate_dphiref)
397  {
398  base_fe->calculate_dphiref = true;
399  base_fe->get_xyz(); // trigger base_fe->fe_map to 'calculate_xyz'
400  base_fe->get_JxW(); // trigger base_fe->fe_map to 'calculate_dxyz'
401  }
402  base_fe->determine_calculations();
403 
404 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
405  if (this->calculate_d2phi)
406  libmesh_not_implemented();
407 #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
408 }
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:681
bool calculate_curl_phi
Should we calculate shape function curls?
Definition: fe_abstract.h:691
FEFamily family
The type of finite element.
Definition: fe_type.h:207
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:969
bool calculations_started
Have calculations with this object already been started? Then all get_* functions should already have...
Definition: fe_abstract.h:645
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:670
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:974
static FEFieldType field_type(const FEType &fe_type)
bool calculate_div_phi
Should we calculate shape function divergences?
Definition: fe_abstract.h:696
bool calculate_xyz
Are we calculating the positions of quadrature points?
Definition: inf_fe.h:985
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:992
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1211
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:979
bool calculate_dphiref
Should we calculate reference shape function gradients?
Definition: fe_abstract.h:701
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:675
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:665
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
bool calculate_nothing
Are we potentially deliberately calculating nothing?
Definition: fe_abstract.h:660

◆ disable_print_counter_info()

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 100 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

◆ edge_reinit()

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

Not implemented yet.

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

Implements libMesh::FEAbstract.

Definition at line 116 of file inf_fe_boundary.C.

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

◆ enable_print_counter_info()

void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

Definition at line 94 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

◆ eval() [1/16]

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

Definition at line 57 of file inf_fe_jacobi_20_00_eval.C.

57 { return jacobi_20_00_eval(n, x); }

◆ eval() [2/16]

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

Definition at line 57 of file inf_fe_jacobi_30_00_eval.C.

57 { return jacobi_30_00_eval(n, x); }

◆ eval() [3/16]

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

Definition at line 58 of file inf_fe_jacobi_20_00_eval.C.

58 { return jacobi_20_00_eval(n, x); }

◆ eval() [4/16]

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

Definition at line 58 of file inf_fe_jacobi_30_00_eval.C.

58 { return jacobi_30_00_eval(n, x); }

◆ eval() [5/16]

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

Definition at line 59 of file inf_fe_jacobi_20_00_eval.C.

59 { return jacobi_20_00_eval(n, x); }

◆ eval() [6/16]

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

Definition at line 59 of file inf_fe_jacobi_30_00_eval.C.

59 { return jacobi_30_00_eval(n, x); }

◆ eval() [7/16]

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

Definition at line 59 of file inf_fe_legendre_eval.C.

59 { return legendre_eval(n, x); }

◆ eval() [8/16]

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

Definition at line 60 of file inf_fe_legendre_eval.C.

60 { return legendre_eval(n, x); }

◆ eval() [9/16]

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

Definition at line 61 of file inf_fe_legendre_eval.C.

61 { return legendre_eval(n, x); }

◆ eval() [10/16]

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

Definition at line 63 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval().

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

◆ eval() [11/16]

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

Definition at line 64 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval().

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

◆ eval() [12/16]

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

Definition at line 65 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval().

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

◆ eval() [13/16]

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

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

◆ eval() [14/16]

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

Definition at line 2607 of file inf_fe_lagrange_eval.C.

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

◆ eval() [15/16]

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

Definition at line 2608 of file inf_fe_lagrange_eval.C.

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

◆ eval() [16/16]

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

Definition at line 2609 of file inf_fe_lagrange_eval.C.

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

◆ eval_deriv() [1/16]

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

Definition at line 63 of file inf_fe_jacobi_20_00_eval.C.

63 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [2/16]

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

Definition at line 63 of file inf_fe_jacobi_30_00_eval.C.

63 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [3/16]

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

Definition at line 64 of file inf_fe_jacobi_20_00_eval.C.

64 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [4/16]

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

Definition at line 64 of file inf_fe_jacobi_30_00_eval.C.

64 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [5/16]

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

Definition at line 65 of file inf_fe_jacobi_20_00_eval.C.

65 { return jacobi_20_00_eval_deriv(n, x); }

◆ eval_deriv() [6/16]

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

Definition at line 65 of file inf_fe_jacobi_30_00_eval.C.

65 { return jacobi_30_00_eval_deriv(n, x); }

◆ eval_deriv() [7/16]

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

Definition at line 65 of file inf_fe_legendre_eval.C.

65 { return legendre_eval_deriv(n, x); }

◆ eval_deriv() [8/16]

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

Definition at line 66 of file inf_fe_legendre_eval.C.

66 { return legendre_eval_deriv(n, x); }

◆ eval_deriv() [9/16]

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

Definition at line 67 of file inf_fe_legendre_eval.C.

67 { return legendre_eval_deriv(n, x); }

◆ eval_deriv() [10/16]

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

Definition at line 69 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval_deriv().

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

◆ eval_deriv() [11/16]

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

Definition at line 70 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval_deriv().

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

◆ eval_deriv() [12/16]

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

Definition at line 71 of file inf_fe_map_eval.C.

References libMesh::InfFEMap::eval_deriv().

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

◆ eval_deriv() [13/16]

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

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

◆ eval_deriv() [14/16]

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

Definition at line 2613 of file inf_fe_lagrange_eval.C.

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

◆ eval_deriv() [15/16]

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

Definition at line 2614 of file inf_fe_lagrange_eval.C.

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

◆ eval_deriv() [16/16]

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

Definition at line 2615 of file inf_fe_lagrange_eval.C.

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

◆ get_continuity()

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

Implements libMesh::FEAbstract.

Definition at line 435 of file inf_fe.h.

References libMesh::C_ZERO.

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

◆ get_curl_phi()

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

Definition at line 252 of file fe_base.h.

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

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

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

References libMesh::FEAbstract::calculate_map.

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

◆ get_d2phi()

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

Definition at line 319 of file fe_base.h.

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

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

◆ get_d2phideta2()

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

Definition at line 403 of file fe_base.h.

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

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

◆ get_d2phidetadzeta()

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

Definition at line 411 of file fe_base.h.

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

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

◆ get_d2phidx2()

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

Definition at line 331 of file fe_base.h.

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

◆ get_d2phidxdy()

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

Definition at line 339 of file fe_base.h.

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

◆ get_d2phidxdz()

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

Definition at line 347 of file fe_base.h.

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

◆ get_d2phidxi2()

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

Definition at line 379 of file fe_base.h.

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

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

◆ get_d2phidxideta()

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

Definition at line 387 of file fe_base.h.

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

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

◆ get_d2phidxidzeta()

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

Definition at line 395 of file fe_base.h.

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

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

◆ get_d2phidy2()

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

Definition at line 355 of file fe_base.h.

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

◆ get_d2phidydz()

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

Definition at line 363 of file fe_base.h.

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

◆ get_d2phidz2()

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

Definition at line 371 of file fe_base.h.

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

◆ get_d2phidzeta2()

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

Definition at line 419 of file fe_base.h.

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

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

◆ get_d2xyzdeta2()

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

Definition at line 668 of file inf_fe.h.

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

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

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

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

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

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

◆ get_dim()

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

Definition at line 250 of file fe_abstract.h.

References libMesh::FEAbstract::dim.

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

◆ get_div_phi()

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

Definition at line 261 of file fe_base.h.

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

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

◆ get_dphase()

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

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

Definition at line 437 of file fe_base.h.

Referenced by assemble_SchroedingerEquation().

438  { return dphase; }
std::vector< OutputGradient > dphase
Used for certain infinite element families: the first derivatives of the phase term in global coordin...
Definition: fe_base.h:753

◆ get_dphi()

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

Definition at line 230 of file fe_base.h.

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

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

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

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

◆ get_dphi_over_decayxR()

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 619 of file inf_fe.h.

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

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

◆ get_dphideta()

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

Definition at line 301 of file fe_base.h.

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

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

◆ get_dphidx()

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

Definition at line 269 of file fe_base.h.

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

◆ get_dphidxi()

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

Definition at line 293 of file fe_base.h.

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

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

◆ get_dphidy()

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

Definition at line 277 of file fe_base.h.

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

◆ get_dphidz()

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

Definition at line 285 of file fe_base.h.

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

◆ get_dphidzeta()

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

Definition at line 309 of file fe_base.h.

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

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

◆ get_dual_coeff()

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

Definition at line 244 of file fe_base.h.

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

◆ get_dual_d2phi()

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

Definition at line 323 of file fe_base.h.

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

◆ get_dual_dphi()

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

Definition at line 234 of file fe_base.h.

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

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

◆ get_dual_phi()

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

Definition at line 211 of file fe_base.h.

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

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

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

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

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

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

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

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

References libMesh::FEAbstract::calculate_map.

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

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

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

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

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

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

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

◆ get_family()

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

Definition at line 526 of file fe_abstract.h.

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

526 { return fe_type.family; }
FEFamily family
The type of finite element.
Definition: fe_type.h:207
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709

◆ get_fe_map() [1/2]

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

◆ get_fe_map() [2/2]

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

Definition at line 534 of file fe_abstract.h.

References libMesh::FEAbstract::_fe_map.

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

◆ get_fe_type()

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

◆ get_info()

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

Gets a string containing the reference information.

Definition at line 47 of file reference_counter.C.

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

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

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (const auto & [name, cd] : _counts)
59  oss << "| " << name << " reference count information:\n"
60  << "| Creations: " << cd.first << '\n'
61  << "| Destructions: " << cd.second << '\n';
62 
63  oss << " ---------------------------------------------------------------------------- \n";
64 
65  return oss.str();
66 
67 #else
68 
69  return "";
70 
71 #endif
72 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
static Counts _counts
Actually holds the data.

◆ get_JxW()

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

Definition at line 579 of file inf_fe.h.

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

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

◆ get_JxWxdecay_sq()

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

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

Reimplemented from libMesh::FEAbstract.

Definition at line 594 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().

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

◆ get_normals()

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

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

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

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

References libMesh::FEAbstract::calculate_nothing.

Referenced by CoupledSystemQoI::init_context(), NavierSystem::init_context(), ElasticitySystem::init_context(), CoupledSystem::init_context(), HeatSystem::init_context(), and Integrate::operator()().

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

◆ get_order()

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

Definition at line 504 of file fe_abstract.h.

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

505  { return static_cast<Order>(fe_type.order + _p_level); }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:732
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:201
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709

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

References libMesh::FEAbstract::_p_level.

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

◆ get_phi()

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

Definition at line 207 of file fe_base.h.

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

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

◆ get_phi_over_decayxR()

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

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

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

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

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

◆ get_refspace_nodes()

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

Definition at line 373 of file fe_abstract.C.

References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::Utility::enum_to_string(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, 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::Real, libMesh::TET10, libMesh::TET14, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, libMesh::TRI7, libMesh::TRISHELL3, and libMesh::Elem::type_to_n_nodes_map.

Referenced by libMesh::LIBMESH_DEFAULT_VECTORIZED_FE().

374 {
375  nodes.resize(Elem::type_to_n_nodes_map[itemType]);
376  switch(itemType)
377  {
378  case NODEELEM:
379  {
380  nodes[0] = Point (0.,0.,0.);
381  return;
382  }
383  case EDGE3:
384  {
385  nodes[2] = Point (0.,0.,0.);
386  libmesh_fallthrough();
387  }
388  case EDGE2:
389  {
390  nodes[0] = Point (-1.,0.,0.);
391  nodes[1] = Point (1.,0.,0.);
392  return;
393  }
394  case EDGE4: // not nested with EDGE3
395  {
396  nodes[0] = Point (-1.,0.,0.);
397  nodes[1] = Point (1.,0.,0.);
398  nodes[2] = Point (-1./3.,0.,0.);
399  nodes[3] - Point (1./3.,0.,0.);
400  return;
401  }
402  case TRI7:
403  {
404  nodes[6] = Point (1./3.,1./3.,0.);
405  libmesh_fallthrough();
406  }
407  case TRI6:
408  {
409  nodes[3] = Point (.5,0.,0.);
410  nodes[4] = Point (.5,.5,0.);
411  nodes[5] = Point (0.,.5,0.);
412  libmesh_fallthrough();
413  }
414  case TRI3:
415  case TRISHELL3:
416  {
417  nodes[0] = Point (0.,0.,0.);
418  nodes[1] = Point (1.,0.,0.);
419  nodes[2] = Point (0.,1.,0.);
420  return;
421  }
422  case QUAD9:
423  {
424  nodes[8] = Point (0.,0.,0.);
425  libmesh_fallthrough();
426  }
427  case QUAD8:
428  case QUADSHELL8:
429  {
430  nodes[4] = Point (0.,-1.,0.);
431  nodes[5] = Point (1.,0.,0.);
432  nodes[6] = Point (0.,1.,0.);
433  nodes[7] = Point (-1.,0.,0.);
434  libmesh_fallthrough();
435  }
436  case QUAD4:
437  case QUADSHELL4:
438  {
439  nodes[0] = Point (-1.,-1.,0.);
440  nodes[1] = Point (1.,-1.,0.);
441  nodes[2] = Point (1.,1.,0.);
442  nodes[3] = Point (-1.,1.,0.);
443  return;
444  }
445  case TET14:
446  {
447  nodes[10] = Point (1/Real(3),1/Real(3),0.);
448  nodes[11] = Point (1/Real(3),0.,1/Real(3));
449  nodes[12] = Point (1/Real(3),1/Real(3),1/Real(3));
450  nodes[13] = Point (0.,1/Real(3),1/Real(3));
451  libmesh_fallthrough();
452  }
453  case TET10:
454  {
455  nodes[4] = Point (.5,0.,0.);
456  nodes[5] = Point (.5,.5,0.);
457  nodes[6] = Point (0.,.5,0.);
458  nodes[7] = Point (0.,0.,.5);
459  nodes[8] = Point (.5,0.,.5);
460  nodes[9] = Point (0.,.5,.5);
461  libmesh_fallthrough();
462  }
463  case TET4:
464  {
465  nodes[0] = Point (0.,0.,0.);
466  nodes[1] = Point (1.,0.,0.);
467  nodes[2] = Point (0.,1.,0.);
468  nodes[3] = Point (0.,0.,1.);
469  return;
470  }
471  case HEX27:
472  {
473  nodes[20] = Point (0.,0.,-1.);
474  nodes[21] = Point (0.,-1.,0.);
475  nodes[22] = Point (1.,0.,0.);
476  nodes[23] = Point (0.,1.,0.);
477  nodes[24] = Point (-1.,0.,0.);
478  nodes[25] = Point (0.,0.,1.);
479  nodes[26] = Point (0.,0.,0.);
480  libmesh_fallthrough();
481  }
482  case HEX20:
483  {
484  nodes[8] = Point (0.,-1.,-1.);
485  nodes[9] = Point (1.,0.,-1.);
486  nodes[10] = Point (0.,1.,-1.);
487  nodes[11] = Point (-1.,0.,-1.);
488  nodes[12] = Point (-1.,-1.,0.);
489  nodes[13] = Point (1.,-1.,0.);
490  nodes[14] = Point (1.,1.,0.);
491  nodes[15] = Point (-1.,1.,0.);
492  nodes[16] = Point (0.,-1.,1.);
493  nodes[17] = Point (1.,0.,1.);
494  nodes[18] = Point (0.,1.,1.);
495  nodes[19] = Point (-1.,0.,1.);
496  libmesh_fallthrough();
497  }
498  case HEX8:
499  {
500  nodes[0] = Point (-1.,-1.,-1.);
501  nodes[1] = Point (1.,-1.,-1.);
502  nodes[2] = Point (1.,1.,-1.);
503  nodes[3] = Point (-1.,1.,-1.);
504  nodes[4] = Point (-1.,-1.,1.);
505  nodes[5] = Point (1.,-1.,1.);
506  nodes[6] = Point (1.,1.,1.);
507  nodes[7] = Point (-1.,1.,1.);
508  return;
509  }
510  case PRISM21:
511  {
512  nodes[20] = Point (1/Real(3),1/Real(3),0);
513  libmesh_fallthrough();
514  }
515  case PRISM20:
516  {
517  nodes[18] = Point (1/Real(3),1/Real(3),-1);
518  nodes[19] = Point (1/Real(3),1/Real(3),1);
519  libmesh_fallthrough();
520  }
521  case PRISM18:
522  {
523  nodes[15] = Point (.5,0.,0.);
524  nodes[16] = Point (.5,.5,0.);
525  nodes[17] = Point (0.,.5,0.);
526  libmesh_fallthrough();
527  }
528  case PRISM15:
529  {
530  nodes[6] = Point (.5,0.,-1.);
531  nodes[7] = Point (.5,.5,-1.);
532  nodes[8] = Point (0.,.5,-1.);
533  nodes[9] = Point (0.,0.,0.);
534  nodes[10] = Point (1.,0.,0.);
535  nodes[11] = Point (0.,1.,0.);
536  nodes[12] = Point (.5,0.,1.);
537  nodes[13] = Point (.5,.5,1.);
538  nodes[14] = Point (0.,.5,1.);
539  libmesh_fallthrough();
540  }
541  case PRISM6:
542  {
543  nodes[0] = Point (0.,0.,-1.);
544  nodes[1] = Point (1.,0.,-1.);
545  nodes[2] = Point (0.,1.,-1.);
546  nodes[3] = Point (0.,0.,1.);
547  nodes[4] = Point (1.,0.,1.);
548  nodes[5] = Point (0.,1.,1.);
549  return;
550  }
551  case PYRAMID18:
552  {
553  // triangle centers
554  nodes[14] = Point (-2/Real(3),0.,1/Real(3));
555  nodes[15] = Point (0.,2/Real(3),1/Real(3));
556  nodes[16] = Point (2/Real(3),0.,1/Real(3));
557  nodes[17] = Point (0.,-2/Real(3),1/Real(3));
558 
559  libmesh_fallthrough();
560  }
561  case PYRAMID14:
562  {
563  // base center
564  nodes[13] = Point (0.,0.,0.);
565 
566  libmesh_fallthrough();
567  }
568  case PYRAMID13:
569  {
570  // base midedge
571  nodes[5] = Point (0.,-1.,0.);
572  nodes[6] = Point (1.,0.,0.);
573  nodes[7] = Point (0.,1.,0.);
574  nodes[8] = Point (-1,0.,0.);
575 
576  // lateral midedge
577  nodes[9] = Point (-.5,-.5,.5);
578  nodes[10] = Point (.5,-.5,.5);
579  nodes[11] = Point (.5,.5,.5);
580  nodes[12] = Point (-.5,.5,.5);
581 
582  libmesh_fallthrough();
583  }
584  case PYRAMID5:
585  {
586  // base corners
587  nodes[0] = Point (-1.,-1.,0.);
588  nodes[1] = Point (1.,-1.,0.);
589  nodes[2] = Point (1.,1.,0.);
590  nodes[3] = Point (-1.,1.,0.);
591  // apex
592  nodes[4] = Point (0.,0.,1.);
593  return;
594  }
595 
596  default:
597  libmesh_error_msg("ERROR: Unknown element type " << Utility::enum_to_string(itemType));
598  }
599 }
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of nodes in the element...
Definition: elem.h:610
std::string enum_to_string(const T e)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ get_Sobolev_dweight()

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 790 of file inf_fe.h.

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

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

◆ get_Sobolev_dweightxR_sq()

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 834 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().

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

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

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

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

◆ get_Sobolev_weightxR_sq()

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

Reimplemented from libMesh::FEGenericBase< OutputType >.

Definition at line 823 of file inf_fe.h.

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

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

◆ get_tangents()

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

Definition at line 799 of file inf_fe.h.

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

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

◆ get_type()

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

Definition at line 488 of file fe_abstract.h.

References libMesh::FEAbstract::elem_type.

488 { return elem_type; }
ElemType elem_type
The element type the current data structures are set up for.
Definition: fe_abstract.h:715

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

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

◆ increment_constructor_count()

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

Increments the construction counter.

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

Definition at line 183 of file reference_counter.h.

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

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

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

◆ increment_destructor_count()

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

Increments the destruction counter.

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

Definition at line 207 of file reference_counter.h.

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

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

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

◆ inf_compute_constraints()

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

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

Definition at line 1243 of file inf_fe_static.C.

References std::abs(), 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().

1247 {
1248 
1249  // only constrain elements in 2,3d.
1250  if (Dim == 1)
1251  return;
1252 
1253  libmesh_assert(child_elem);
1254 
1255  // only constrain active and ancestor elements
1256  if (child_elem->subactive())
1257  return;
1258 
1259  // Before we start to compute anything, lets check if any confinement is needed:
1260  bool need_constraints=false;
1261  for (auto child_neighbor : child_elem->neighbor_ptr_range())
1262  if (child_neighbor->level() < child_elem->level())
1263  {
1264  need_constraints = true;
1265  break;
1266  }
1267  if (!need_constraints)
1268  return;
1269 
1270  // For infinite elements, the computation of constraints is somewhat different
1271  // than for Lagrange elements:
1272  // 1) When an infinite element is refined, only the base element (i.e. side(0) ) is refined.
1273  //
1274  // 2) Due to the tensorial structure of shape functions (base_shape * radial_function),
1275  // it must be ensured that all element DOFs inherit that constraint.
1276  // It is important here to distinguish the (total) DOF from base DOF and radial DOF contributions.
1277  //
1278  // 3) Due to the generality of radial polynomial (of type fe_type.radial_family and with order fe_type.radial_order)
1279  // here basis functions cannot be mapped to nodes: Independent from the radial polynomial,
1280  // infinite elements have one set of nodes at the base (side(0)) and a second set at twice the distance to their origin.
1281  //
1282  // Independent from the polynomial and degree used, the first radial DOF is 1 at the base while all others are 0 there
1283  //
1284  //Constraining of DOFs is only needed when a DOF is nonzero at the elements face shared with a coarser element.
1285  // Thus, the following scheme is used here:
1286  //
1287  // -If the coarser element is the neighbor(0) (i.e. we share only the base), we must constrain
1288  // all DOFs that correspond to the first order radial contribution.
1289  // -if an infinite neighbor is coarser (than 'child_elem'), all those DOFs must be constrained
1290  // whose contribution from the base is non-zero at the interface.
1291  // In this case, we lack a point-assignement between DOFs and nodes, but since there is no refinement in radial direction,
1292  // the radial polynomials coincide on neighboring elements.
1293  // Thus, if one constraines these DOFs at one (arbitrary) point correctly, they match for each point along the radial direction.
1294  // Hence, we constrain them with the same values as those DOFs belonging to the first order polynomial, obtaining consistent
1295  // constraints that mimic constraints that are computed at the support points for each radial polynomial contribution.
1296 
1297  FEType fe_type = dof_map.variable_type(variable_number);
1298 
1300 
1301  std::vector<dof_id_type> child_base_dof_indices, parent_base_dof_indices;
1302  std::vector<dof_id_type> child_elem_dof_indices, parent_elem_dof_indices;
1303 
1304  const Elem * parent_elem = child_elem->parent();
1305 
1306  // This can't happen... Only level-0 elements have nullptr
1307  // parents, and no level-0 elements can be at a higher
1308  // level than their neighbors!
1309  libmesh_assert(parent_elem);
1310 
1311  dof_map.dof_indices (child_elem, child_elem_dof_indices,
1312  variable_number);
1313  dof_map.dof_indices (parent_elem, parent_elem_dof_indices,
1314  variable_number);
1315 
1316  const unsigned int n_total_dofs = child_elem_dof_indices.size();
1317  // fill the elements shape index map: we will have to use it later
1318  // to find the elements dofs that correspond to certain base_elem_dofs.
1319  std::vector<unsigned int> radial_shape_index(n_total_dofs);
1320  std::vector<unsigned int> base_shape_index(n_total_dofs);
1321  // fill the shape index map
1322 #ifdef DEBUG
1323  unsigned int max_base_id=0;
1324  unsigned int max_radial_id=0;
1325 #endif
1326  for (unsigned int n=0; n<n_total_dofs; ++n)
1327  {
1329  child_elem,
1330  n,
1331  base_shape_index[n],
1332  radial_shape_index[n]);
1333 
1334 #ifdef DEBUG
1335  if (base_shape_index[n] > max_base_id)
1336  max_base_id = base_shape_index[n];
1337  if (radial_shape_index[n] > max_radial_id)
1338  max_radial_id = radial_shape_index[n];
1339 #endif
1340  }
1341 
1342 #ifdef DEBUG
1343  libmesh_assert_equal_to( (max_base_id+1)*(max_radial_id+1), n_total_dofs );
1344 #endif
1345 
1346  for (auto s : child_elem->side_index_range())
1347  if (child_elem->neighbor_ptr(s) != nullptr &&
1348  child_elem->neighbor_ptr(s) != remote_elem)
1349  if (child_elem->neighbor_ptr(s)->level() < child_elem->level())
1350  {
1351  // we ALWAYS take the base element for reference:
1352  // - For s=0, we refine all dofs with `radial_shape_index == 0
1353  // - for s>0, we refine all dofs whose corresponding base_shape has its support point shared with neighbor(s)
1354  std::unique_ptr<const Elem> child_base, parent_base;
1355  child_elem->build_side_ptr(child_base, 0);
1356  parent_elem->build_side_ptr(parent_base, 0);
1357 
1358  const unsigned int n_base_dofs =
1359  FEInterface::n_dofs(fe_type, child_base.get());
1360 
1361  // We need global DOF indices for both base and 'full' elements
1362  dof_map.dof_indices (child_base.get(), child_base_dof_indices,
1363  variable_number);
1364  dof_map.dof_indices (parent_base.get(), parent_base_dof_indices,
1365  variable_number);
1366 
1367 
1368  // First we loop over the childs base DOFs (nodes) and check which of them needs constraint
1369  // and which can be skipped.
1370  for (unsigned int child_base_dof=0; child_base_dof != n_base_dofs; ++child_base_dof)
1371  {
1372  libmesh_assert_less (child_base_dof, child_base->n_nodes());
1373 
1374  // Childs global dof index.
1375  const dof_id_type child_base_dof_g = child_base_dof_indices[child_base_dof];
1376 
1377  // Hunt for "constraining against myself" cases before
1378  // we bother creating a constraint row
1379  bool self_constraint = false;
1380  for (unsigned int parent_base_dof=0;
1381  parent_base_dof != n_base_dofs; parent_base_dof++)
1382  {
1383  libmesh_assert_less (parent_base_dof, parent_base->n_nodes());
1384 
1385  // Their global dof index.
1386  const dof_id_type parent_base_dof_g =
1387  parent_base_dof_indices[parent_base_dof];
1388 
1389  if (parent_base_dof_g == child_base_dof_g)
1390  {
1391  self_constraint = true;
1392  break;
1393  }
1394  }
1395 
1396  if (self_constraint)
1397  continue;
1398 
1399  // now we need to constrain all __child_elem__ DOFs whose base corresponds to
1400  // child_base_dof.
1401  // --> loop over all child_elem dofs whose base_shape_index == child_base_dof
1402  unsigned int n_elem_dofs = FEInterface::n_dofs(fe_type, child_elem);
1403  libmesh_assert_equal_to(n_elem_dofs, n_total_dofs);
1404  for(unsigned int child_elem_dof=0; child_elem_dof != n_elem_dofs; ++child_elem_dof)
1405  {
1406  if (base_shape_index[child_elem_dof] != child_base_dof)
1407  continue;
1408 
1409  // independent from the radial description, the first radial DOF is 1 at the base
1410  // while all others start with 0.
1411  // Thus, to confine for the bases neighbor, we only need to refine DOFs that correspond
1412  // to the first radial DOF
1413  if (s==0)
1414  {
1415  if (radial_shape_index[child_elem_dof] > 0)
1416  continue;
1417  }
1418  else
1419  {
1420  // If the neighbor is not the base, we must check now if the support point of the dof
1421  // is actually shared with that neighbor:
1422  if ( !child_elem->neighbor_ptr(s)->contains_point(child_base->point(child_base_dof)) )
1423  continue;
1424  }
1425 
1426 
1427  const dof_id_type child_elem_dof_g = child_elem_dof_indices[child_elem_dof];
1428 
1429  DofConstraintRow * constraint_row;
1430 
1431  // we may be running constraint methods concurrently
1432  // on multiple threads, so we need a lock to
1433  // ensure that this constraint is "ours"
1434  {
1435  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
1436 
1437  if (dof_map.is_constrained_dof(child_elem_dof_g))
1438  continue;
1439 
1440  constraint_row = &(constraints[child_elem_dof_g]);
1441  libmesh_assert(constraint_row->empty());
1442  }
1443 
1444  // The support point of the DOF
1445  const Point & support_point = child_base->point(child_base_dof);
1446 
1447  // Figure out where my (base) node lies on the parents reference element.
1448  const Point mapped_point = FEMap::inverse_map(Dim-1,
1449  parent_base.get(),
1450  support_point);
1451 
1452  // now we need the parents base DOFs, evaluated at the mapped_point for refinement:
1453  for (unsigned int parent_base_dof=0;
1454  parent_base_dof != n_base_dofs; parent_base_dof++)
1455  {
1456 
1457  const Real parent_base_dof_value = FEInterface::shape(Dim-1,
1458  fe_type,
1459  parent_base.get(),
1460  parent_base_dof,
1461  mapped_point);
1462 
1463 
1464  // all parent elements DOFs whose base_index corresponds to parent_base_dof
1465  // must be constrained with the parent_base_dof_value.
1466 
1467  // The value of the radial function does not play a role here:
1468  // 1) only the function with radial_shape_index[] == 0 are 1 at the base,
1469  // the others are 0.
1470  // 2) The radial basis is (usually) not a Lagrange polynomial.
1471  // Thus, constraining according to a support point doesn't work.
1472  // However, they reach '1' at a certain (radial) distance which is the same for parent and child.
1473  for (unsigned int parent_elem_dof=0;
1474  parent_elem_dof != n_elem_dofs; parent_elem_dof++)
1475  {
1476  if (base_shape_index[parent_elem_dof] != parent_base_dof)
1477  continue;
1478 
1479  // only constrain with coinciding radial DOFs.
1480  // Otherwise, we start coupling all DOFs with each other and end up in a mess.
1481  if (radial_shape_index[parent_elem_dof] != radial_shape_index[child_elem_dof])
1482  continue;
1483 
1484  // Their global dof index.
1485  const dof_id_type parent_elem_dof_g =
1486  parent_elem_dof_indices[parent_elem_dof];
1487 
1488  // Only add non-zero and non-identity values
1489  // for Lagrange basis functions. (parent_base is assumed to be of Lagrange-type).
1490  if ((std::abs(parent_base_dof_value) > 1.e-5) &&
1491  (std::abs(parent_base_dof_value) < .999))
1492  {
1493  constraint_row->emplace(parent_elem_dof_g, parent_base_dof_value);
1494  }
1495 #ifdef DEBUG
1496  // Protect for the case u_i = 0.999 u_j,
1497  // in which case i better equal j.
1498  else if (parent_base_dof_value >= .999)
1499  {
1500  libmesh_assert_equal_to (child_base_dof_g, parent_base_dof_indices[parent_base_dof]);
1501  libmesh_assert_equal_to (child_elem_dof_g, parent_elem_dof_g);
1502  }
1503 #endif
1504  }
1505 
1506  }
1507  }
1508 
1509  }
1510  }
1511 }
FEFamily family
The type of finite element.
Definition: fe_type.h:207
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:597
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:1626
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
Definition: type_vector.h:57
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...
std::map< dof_id_type, Real, std::less< dof_id_type >, Threads::scalable_allocator< std::pair< const dof_id_type, Real > > > DofConstraintRow
A row of the Dof constraint matrix.
Definition: dof_map.h:90
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
uint8_t dof_id_type
Definition: id_types.h:67
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:30
const RemoteElem * remote_elem
Definition: remote_elem.C:54

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

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

1200 {
1201  // only constrain elements in 2,3d.
1202  if (Dim == 1)
1203  return;
1204 
1205  libmesh_assert(elem);
1206 
1207  // only constrain active and ancestor elements
1208  if (elem->subactive())
1209  return;
1210 
1211  // for infinite elements, the computation of constraints is somewhat different
1212  // than for Lagrange elements:
1213  // 1) Only the base element (i.e. side(0) ) may be refined.
1214  // Thus, in radial direction no constraints must be considered.
1215  // 2) Due to the tensorial structure of shape functions (base_shape * radial_function),
1216  // it must be ensured that all element DOFs inherit that constraint.
1217  // Consequently, the constraints are computed on the base (baseh_shape) but must
1218  // be applied to all DOFs with the respective base_shape index (i.e. for all radial_functions).
1219  //
1220  // FIXME: In the current form, this function does not work for infinite elements
1221  // because constraining the non-base points requires knowledge of the T_map and T_radial
1222  // parameters; but they are not accessible via the element and may differ between variables.
1223  //
1224  // For the moment being, we just check if this element can be skipped and fail otherwise.
1225 
1226  // if one of the sides needs a constraint, an error is thrown.
1227  // In other cases, we leave the function regularly.
1228  for (auto s : elem->side_index_range())
1229  {
1230  if (elem->neighbor_ptr(s) != nullptr &&
1231  elem->neighbor_ptr(s) != remote_elem)
1232  if (elem->neighbor_ptr(s)->level() < elem->level())
1233  {
1234  libmesh_not_implemented();
1235  }
1236  }
1237 }
libmesh_assert(ctx)
const RemoteElem * remote_elem
Definition: remote_elem.C:54

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

906  { 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 134 of file inf_fe_boundary.C.

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

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

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

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

417 {
418  libmesh_assert(radial_qrule.get() || radial_pts);
419  libmesh_assert(inf_elem);
420 
421  // Start logging the radial shape function initialization
422  LOG_SCOPE("init_radial_shape_functions()", "InfFE");
423 
424  // initialize most of the things related to physical approximation
425  const Order radial_approx_order = fe_type.radial_order;
426  const unsigned int n_radial_approx_shape_functions =
427  InfFERadial::n_dofs(radial_approx_order);
428 
429  const std::size_t n_radial_qp =
430  radial_pts ? radial_pts->size() : radial_qrule->n_points();
431  const std::vector<Point> & radial_qp =
432  radial_pts ? *radial_pts : radial_qrule->get_points();
433 
434  // the radial polynomials (eval)
436  {
437  mode.resize (n_radial_approx_shape_functions);
438  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
439  mode[i].resize (n_radial_qp);
440 
441  // evaluate the mode shapes in radial direction at radial quadrature points
442  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
443  for (std::size_t p=0; p<n_radial_qp; ++p)
444  mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
445  }
446 
448  {
449  dmodedv.resize (n_radial_approx_shape_functions);
450  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
451  dmodedv[i].resize (n_radial_qp);
452 
453  // evaluate the mode shapes in radial direction at radial quadrature points
454  for (unsigned int i=0; i<n_radial_approx_shape_functions; ++i)
455  for (std::size_t p=0; p<n_radial_qp; ++p)
456  dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
457  }
458 
459  // the (1-v)/2 weight.
461  {
462  som.resize (n_radial_qp);
463  // compute scalar values at radial quadrature points
464  for (std::size_t p=0; p<n_radial_qp; ++p)
465  som[p] = InfFERadial::decay (Dim, radial_qp[p](0));
466  }
468  {
469  dsomdv.resize (n_radial_qp);
470  // compute scalar values at radial quadrature points
471  for (std::size_t p=0; p<n_radial_qp; ++p)
472  dsomdv[p] = InfFERadial::decay_deriv (Dim, radial_qp[p](0));
473  }
474 }
std::vector< Real > dsomdv
the first local derivative of the radial decay in local coordinates.
Definition: inf_fe.h:1070
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:670
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:974
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1297
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1196
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:240
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:1076
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1271
static Real eval(Real v, Order o_radial, unsigned int i)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:979
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1065
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:675
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
std::vector< std::vector< Real > > dmodedv
the first local derivative of the radial approximation shapes.
Definition: inf_fe.h:1082

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

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

482 {
483  libmesh_assert(inf_elem);
484 
485  // Start logging the radial shape function initialization
486  LOG_SCOPE("init_shape_functions()", "InfFE");
487 
488  // fast access to some const ints for the radial data
489  const unsigned int n_radial_approx_sf = InfFERadial::n_dofs(fe_type.radial_order);
490  const std::size_t n_radial_qp = radial_qp.size();
491 #ifdef DEBUG
493  libmesh_assert_equal_to(n_radial_approx_sf, mode.size());
495  libmesh_assert_equal_to(som.size(), n_radial_qp);
496 #endif
497 
498 
499  // initialize most of the quantities related to mapping
500 
501  // The element type and order to use in the base map
502  //const Order base_mapping_order = base_elem->default_order();
503 
504  // the number of base shape functions used to construct the map
505  // (Lagrange shape functions are used for mapping in the base)
506  //unsigned int n_base_mapping_shape_functions =
507  // InfFEBase::n_base_mapping_sf(*base_elem,
508  // base_mapping_order);
509 
510  // initialize most of the things related to physical approximation
511  unsigned int n_base_approx_shape_functions;
512  if (Dim > 1)
513  n_base_approx_shape_functions = base_fe->n_shape_functions();
514  else
515  n_base_approx_shape_functions = 1;
516 
517 
518  // update class member field
520  n_radial_approx_sf * n_base_approx_shape_functions;
521 
522 
523  // The number of the base quadrature points.
524  const unsigned int n_base_qp = cast_int<unsigned int>(base_qp.size());
525 
526  // The total number of quadrature points.
527  _n_total_qp = n_radial_qp * n_base_qp;
528 
529 
530  // initialize the node and shape numbering maps
531  {
532  // similar for the shapes: the i-th entry stores
533  // the associated base/radial shape number
536 
537  // fill the shape index map
538  for (unsigned int n=0; n<_n_total_approx_sf; ++n)
539  {
541  inf_elem,
542  n,
545  libmesh_assert_less (_base_shape_index[n], n_base_approx_shape_functions);
546  libmesh_assert_less (_radial_shape_index[n], n_radial_approx_sf);
547  }
548  }
549 
550  // resize the base data fields
551  //dist.resize(n_base_mapping_shape_functions);
552 
553  // resize the total data fields
554 
555  // the phase term varies with xi, eta and zeta(v): store it for _all_ qp
556  //
557  // when computing the phase, we need the base approximations
558  // therefore, initialize the phase here, but evaluate it
559  // in compute_shape_functions().
560  //
561  // the weight, though, is only needed at the radial quadrature points, n_radial_qp.
562  // but for a uniform interface to the protected data fields
563  // the weight data field (which are accessible from the outside) are expanded to _n_total_qp.
565  weight.resize (_n_total_qp);
567  weightxr_sq.resize (_n_total_qp);
569  dweightdv.resize (n_radial_qp);
570  if (calculate_dphi)
571  dweight.resize (_n_total_qp);
573  dweightxr_sq.resize(_n_total_qp);
574 
576  dphase.resize (_n_total_qp);
577 
578  // this vector contains the integration weights for the combined quadrature rule
579  // if no quadrature rules are given, use only ones.
581 
582  // InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
583  // shape and mapping functions, respectively
584  {
586  JxWxdecay.resize(_n_total_qp);
587  if (calculate_jxw)
588  JxW.resize(_n_total_qp);
590  {
591  xyz.resize(_n_total_qp);
601  }
602  if (calculate_map)
603  {
604  dxidx_map.resize(_n_total_qp);
605  dxidy_map.resize(_n_total_qp);
606  dxidz_map.resize(_n_total_qp);
607  detadx_map.resize(_n_total_qp);
608  detady_map.resize(_n_total_qp);
609  detadz_map.resize(_n_total_qp);
610  dzetadx_map.resize(_n_total_qp);
611  dzetady_map.resize(_n_total_qp);
612  dzetadz_map.resize(_n_total_qp);
613  }
614  if (calculate_phi)
615  phi.resize (_n_total_approx_sf);
617  phixr.resize (_n_total_approx_sf);
618  if (calculate_dphi)
619  {
620  dphi.resize (_n_total_approx_sf);
621  dphidx.resize (_n_total_approx_sf);
622  dphidy.resize (_n_total_approx_sf);
623  dphidz.resize (_n_total_approx_sf);
624  }
625 
627  {
628  dphixr.resize (_n_total_approx_sf);
630  }
631 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
632 
633  if (calculate_d2phi)
634  {
635  libmesh_not_implemented();
636  d2phi.resize (_n_total_approx_sf);
637  d2phidx2.resize (_n_total_approx_sf);
638  d2phidxdy.resize (_n_total_approx_sf);
639  d2phidxdz.resize (_n_total_approx_sf);
640  d2phidy2.resize (_n_total_approx_sf);
641  d2phidydz.resize (_n_total_approx_sf);
642  d2phidz2.resize (_n_total_approx_sf);
643  d2phidxi2.resize (_n_total_approx_sf);
644 
645  if (Dim > 1)
646  {
649  }
650 
651  if (Dim > 2)
652  {
656  }
657  }
658 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
659 
661  {
662  dphidxi.resize (_n_total_approx_sf);
663 
664  if (Dim > 1)
666 
667  if (Dim == 3)
669  }
670 
671  }
672 
673  // collect all the for loops, where inner vectors are
674  // resized to the appropriate number of quadrature points
675  {
676  if (calculate_phi)
677  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
678  phi[i].resize (_n_total_qp);
679 
680  if (calculate_dphi)
681  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
682  {
683  dphi[i].resize (_n_total_qp);
684  dphidx[i].resize (_n_total_qp);
685  dphidy[i].resize (_n_total_qp);
686  dphidz[i].resize (_n_total_qp);
687  }
688 
690  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
691  {
692  phixr[i].resize (_n_total_qp);
693  }
695  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
696  {
697  dphixr[i].resize(_n_total_qp);
698  dphixr_sq[i].resize(_n_total_qp);
699  }
700 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
701  if (calculate_d2phi)
702  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
703  {
704  d2phi[i].resize (_n_total_qp);
705  d2phidx2[i].resize (_n_total_qp);
706  d2phidxdy[i].resize (_n_total_qp);
707  d2phidxdz[i].resize (_n_total_qp);
708  d2phidy2[i].resize (_n_total_qp);
709  d2phidydz[i].resize (_n_total_qp);
710  d2phidy2[i].resize (_n_total_qp);
711  d2phidxi2[i].resize (_n_total_qp);
712 
713  if (Dim > 1)
714  {
715  d2phidxideta[i].resize (_n_total_qp);
716  d2phideta2[i].resize (_n_total_qp);
717  }
718  if (Dim > 2)
719  {
720  d2phidxidzeta[i].resize (_n_total_qp);
721  d2phidetadzeta[i].resize (_n_total_qp);
722  d2phidzeta2[i].resize (_n_total_qp);
723  }
724  }
725 #endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
726 
728  for (unsigned int i=0; i<_n_total_approx_sf; ++i)
729  {
730  dphidxi[i].resize (_n_total_qp);
731 
732  if (Dim > 1)
733  dphideta[i].resize (_n_total_qp);
734 
735  if (Dim == 3)
736  dphidzeta[i].resize (_n_total_qp);
737 
738  }
739 
740  }
741  {
742  // (a) compute scalar values at _all_ quadrature points -- for uniform
743  // access from the outside to these fields
744  // (b) form a std::vector<Real> which contains the appropriate weights
745  // of the combined quadrature rule!
746  libmesh_assert_equal_to (radial_qp.size(), n_radial_qp);
747 
748  if (radial_qrule && base_qrule)
749  {
750  const std::vector<Real> & radial_qw = radial_qrule->get_weights();
751  const std::vector<Real> & base_qw = base_qrule->get_weights();
752  libmesh_assert_equal_to (radial_qw.size(), n_radial_qp);
753  libmesh_assert_equal_to (base_qw.size(), n_base_qp);
754 
755  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
756  for (unsigned int bp=0; bp<n_base_qp; ++bp)
757  _total_qrule_weights[bp + rp*n_base_qp] = radial_qw[rp] * base_qw[bp];
758  }
759 
760 
761  for (unsigned int rp=0; rp<n_radial_qp; ++rp)
762  {
764  for (unsigned int bp=0; bp<n_base_qp; ++bp)
765  weight[bp + rp*n_base_qp] = InfFERadial::D(radial_qp[rp](0));
766 
768  for (unsigned int bp=0; bp<n_base_qp; ++bp)
769  weightxr_sq[bp + rp*n_base_qp] = InfFERadial::Dxr_sq(radial_qp[rp](0));
770 
772  dweightdv[rp] = InfFERadial::D_deriv(radial_qp[rp](0));
773  }
774  }
775 }
std::vector< Real > weightxr_sq
Definition: inf_fe.h:1047
std::vector< Real > detadz_map
Definition: inf_fe.h:1093
bool calculate_d2phi
Should we calculate shape function hessians?
Definition: fe_abstract.h:681
std::vector< std::vector< OutputTensor > > d2phi
Shape function second derivative values.
Definition: fe_base.h:674
std::vector< std::vector< OutputShape > > dphidxi
Shape function derivatives in the xi direction.
Definition: fe_base.h:641
std::vector< Real > dxidx_map
Definition: inf_fe.h:1088
bool calculate_map_scaled
Are we calculating scaled mapping functions?
Definition: inf_fe.h:969
std::vector< std::vector< OutputShape > > d2phidxdz
Shape function second derivatives in the x-z direction.
Definition: fe_base.h:720
std::vector< std::vector< OutputShape > > dphidzeta
Shape function derivatives in the zeta direction.
Definition: fe_base.h:651
std::vector< std::vector< OutputShape > > d2phidydz
Shape function second derivatives in the y-z direction.
Definition: fe_base.h:730
bool calculate_phi
Should we calculate shape functions?
Definition: fe_abstract.h:670
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::vector< Real > detadx_map_scaled
Definition: inf_fe.h:1103
bool calculate_phi_scaled
Are we calculating scaled shape functions?
Definition: inf_fe.h:974
std::vector< Real > dzetadz_map
Definition: inf_fe.h:1096
std::vector< Real > dweightdv
the additional radial weight in local coordinates, over all quadrature points.
Definition: inf_fe.h:1054
std::vector< Real > dxidx_map_scaled
Definition: inf_fe.h:1100
std::vector< Real > dzetady_map
Definition: inf_fe.h:1095
std::vector< std::vector< Real > > phixr
Definition: inf_fe.h:1114
std::vector< Real > dxidz_map
Definition: inf_fe.h:1090
static Real Dxr_sq(const Real)
Definition: inf_fe.h:84
std::vector< std::vector< OutputShape > > d2phidxideta
Shape function second derivatives in the xi-eta direction.
Definition: fe_base.h:685
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1196
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:240
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: inf_fe.h:1178
std::vector< Real > dxidy_map_scaled
Definition: inf_fe.h:1101
std::vector< Real > dxidy_map
Definition: inf_fe.h:1089
std::vector< Real > detadx_map
Definition: inf_fe.h:1091
std::vector< Real > weight
Used for certain infinite element families: the additional radial weight in local coordinates...
Definition: fe_base.h:767
std::vector< Real > detady_map_scaled
Definition: inf_fe.h:1104
std::vector< std::vector< OutputShape > > d2phidx2
Shape function second derivatives in the x direction.
Definition: fe_base.h:710
std::vector< std::vector< OutputShape > > dphidy
Shape function derivatives in the y direction.
Definition: fe_base.h:661
std::vector< std::vector< OutputShape > > d2phidy2
Shape function second derivatives in the y direction.
Definition: fe_base.h:725
std::vector< std::vector< Real > > mode
the radial approximation shapes in local coordinates Needed when setting up the overall shape functio...
Definition: inf_fe.h:1076
std::vector< Real > dzetady_map_scaled
Definition: inf_fe.h:1107
std::vector< RealGradient > dweightxr_sq
Definition: inf_fe.h:1056
std::vector< std::vector< RealGradient > > dphixr
Definition: inf_fe.h:1115
std::vector< std::vector< OutputShape > > d2phidetadzeta
Shape function second derivatives in the eta-zeta direction.
Definition: fe_base.h:700
static Real D(const Real v)
Definition: inf_fe.h:82
std::vector< std::vector< OutputShape > > d2phidxidzeta
Shape function second derivatives in the xi-zeta direction.
Definition: fe_base.h:690
std::vector< std::vector< OutputShape > > d2phidxdy
Shape function second derivatives in the x-y direction.
Definition: fe_base.h:715
std::vector< std::vector< OutputShape > > dphidx
Shape function derivatives in the x direction.
Definition: fe_base.h:656
std::vector< Real > detadz_map_scaled
Definition: inf_fe.h:1105
std::vector< Real > JxWxdecay
Definition: inf_fe.h:1118
bool calculate_jxw
Are we calculating the unscaled jacobian? We avoid it if not requested explicitly; this has the worst...
Definition: inf_fe.h:992
std::vector< std::vector< OutputShape > > phi
Shape function values.
Definition: fe_base.h:614
std::vector< std::vector< OutputShape > > d2phideta2
Shape function second derivatives in the eta direction.
Definition: fe_base.h:695
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1211
std::vector< Real > JxW
Definition: inf_fe.h:1119
std::vector< OutputGradient > dphase
Used for certain infinite element families: the first derivatives of the phase term in global coordin...
Definition: fe_base.h:753
libmesh_assert(ctx)
bool calculate_dphi_scaled
Are we calculating scaled shape function gradients?
Definition: inf_fe.h:979
std::vector< std::vector< OutputGradient > > dphi
Shape function derivative values.
Definition: fe_base.h:620
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1172
std::vector< Real > som
the radial decay in local coordinates.
Definition: inf_fe.h:1065
bool calculate_dphi
Should we calculate shape function gradients?
Definition: fe_abstract.h:675
bool calculate_map
Are we calculating mapping functions?
Definition: fe_abstract.h:665
std::vector< Real > dzetadx_map
Definition: inf_fe.h:1094
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1190
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...
std::vector< Real > dxidz_map_scaled
Definition: inf_fe.h:1102
std::vector< unsigned int > _radial_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1154
static Real D_deriv(const Real v)
Definition: inf_fe.h:90
std::vector< std::vector< OutputShape > > d2phidz2
Shape function second derivatives in the z direction.
Definition: fe_base.h:735
std::vector< Point > xyz
Physical quadrature points.
Definition: inf_fe.h:1045
std::vector< std::vector< RealGradient > > dphixr_sq
Definition: inf_fe.h:1116
std::vector< std::vector< OutputShape > > d2phidxi2
Shape function second derivatives in the xi direction.
Definition: fe_base.h:680
std::vector< unsigned int > _base_shape_index
The internal structure of the InfFE – tensor product of base element shapes times radial shapes – h...
Definition: inf_fe.h:1164
std::vector< Real > dzetadz_map_scaled
Definition: inf_fe.h:1108
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
std::vector< Real > detady_map
Definition: inf_fe.h:1092
std::vector< Real > dzetadx_map_scaled
Definition: inf_fe.h:1106
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:1184
std::vector< std::vector< OutputShape > > d2phidzeta2
Shape function second derivatives in the zeta direction.
Definition: fe_base.h:705
std::vector< std::vector< OutputShape > > dphidz
Shape function derivatives in the z direction.
Definition: fe_base.h:666
std::vector< std::vector< OutputShape > > dphideta
Shape function derivatives in the eta direction.
Definition: fe_base.h:646
std::vector< RealGradient > dweight
Used for certain infinite element families: the global derivative of the additional radial weight ...
Definition: fe_base.h:760

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

References libMesh::InfFEMap::inverse_map().

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

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

◆ inverse_map() [2/2]

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

Definition at line 476 of file inf_fe.h.

References libMesh::InfFEMap::inverse_map().

481  {
482  // libmesh_deprecated(); // soon
483  return InfFEMap::inverse_map(Dim, elem, physical_points,
484  reference_points, tolerance, secure);
485  }
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
Definition: inf_fe_map.C:96

◆ is_hierarchic()

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

Implements libMesh::FEAbstract.

Definition at line 442 of file inf_fe.h.

443  { 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 458 of file inf_fe.h.

References libMesh::InfFEMap::map().

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

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

◆ n_dofs() [1/2]

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

Definition at line 66 of file inf_fe_static.C.

References libMesh::InfFEBase::get_elem_type(), 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().

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

◆ n_dofs() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs ( const FEType fet,
const Elem inf_elem 
)
static

Definition at line 83 of file inf_fe_static.C.

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

85 {
86  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
87  // the InfElem. This builds a "lightweight" proxy and so should be
88  // relatively fast.
89  auto base_elem = inf_elem->build_side_ptr(0);
90 
91  if (Dim > 1)
92  return FEInterface::n_dofs(fet, base_elem.get()) *
93  InfFERadial::n_dofs(fet.radial_order);
94  else
95  return InfFERadial::n_dofs(fet.radial_order);
96 }
static unsigned int n_dofs(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:597
static unsigned int n_dofs(const Order o_radial)
Definition: inf_fe.h:113
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1203

◆ n_dofs_at_node() [1/2]

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

Definition at line 101 of file inf_fe_static.C.

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

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

104 {
105  // TODO:
106  // libmesh_deprecated();
107 
108  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
109 
110  unsigned int n_base, n_radial;
111  compute_node_indices(inf_elem_type, n, n_base, n_radial);
112 
113  // libMesh::out << "elem_type=" << inf_elem_type
114  // << ", fet.radial_order=" << fet.radial_order
115  // << ", n=" << n
116  // << ", n_radial=" << n_radial
117  // << ", n_base=" << n_base
118  // << std::endl;
119 
120  if (Dim > 1)
121  return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
122  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
123  else
124  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
125 }
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static void compute_node_indices(const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associ...
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:679

◆ n_dofs_at_node() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node ( const FEType fet,
const Elem inf_elem,
const unsigned int  n 
)
static

Definition at line 130 of file inf_fe_static.C.

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

133 {
134  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
135  // the InfElem. This builds a "lightweight" proxy and so should be
136  // relatively fast.
137  auto base_elem = inf_elem->build_side_ptr(0);
138 
139  unsigned int n_base, n_radial;
140  compute_node_indices(inf_elem->type(), n, n_base, n_radial);
141 
142  if (Dim > 1)
143  return FEInterface::n_dofs_at_node(fet, base_elem.get(), n_base)
144  * InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
145  else
146  return InfFERadial::n_dofs_at_node(fet.radial_order, n_radial);
147 }
static void compute_node_indices(const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associ...
static unsigned int n_dofs_at_node(const Order o_radial, const unsigned int n_onion)
static unsigned int n_dofs_at_node(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int n)
Definition: fe_interface.C:679
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1203

◆ n_dofs_per_elem() [1/2]

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

Definition at line 152 of file inf_fe_static.C.

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

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

154 {
155  // TODO:
156  // libmesh_deprecated();
157 
158  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
159 
160  if (Dim > 1)
161  return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
162  * InfFERadial::n_dofs_per_elem(fet.radial_order);
163  else
164  return InfFERadial::n_dofs_per_elem(fet.radial_order);
165 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:772
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition: inf_fe.h:136

◆ n_dofs_per_elem() [2/2]

template<unsigned int Dim, FEFamily T_radial, InfMapType T_map>
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem ( const FEType fet,
const Elem inf_elem 
)
static

Definition at line 170 of file inf_fe_static.C.

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

172 {
173  // The "base" Elem is a non-infinite Elem corresponding to side 0 of
174  // the InfElem. This builds a "lightweight" proxy and so should be
175  // relatively fast.
176  auto base_elem = inf_elem->build_side_ptr(0);
177 
178  if (Dim > 1)
179  return FEInterface::n_dofs_per_elem(fet, base_elem.get())
180  * InfFERadial::n_dofs_per_elem(fet.radial_order);
181  else
182  return InfFERadial::n_dofs_per_elem(fet.radial_order);
183 }
static unsigned int n_dofs_per_elem(const unsigned int dim, const FEType &fe_t, const ElemType t)
Definition: fe_interface.C:772
static unsigned int n_dofs_per_elem(const Order o_radial)
Definition: inf_fe.h:136
std::unique_ptr< const Elem > base_elem
The "base" (aka non-infinite) element associated with the current infinite element.
Definition: inf_fe.h:1203

◆ n_objects()

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

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

Definition at line 85 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

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

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

◆ n_quadrature_points()

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

Implements libMesh::FEAbstract.

Definition at line 561 of file inf_fe.h.

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

std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1196
unsigned int _n_total_qp
The total number of quadrature points for the current configuration.
Definition: inf_fe.h:1178
libmesh_assert(ctx)

◆ n_shape_functions() [1/3]

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

Definition at line 381 of file inf_fe.h.

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

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

◆ n_shape_functions() [2/3]

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

Definition at line 385 of file inf_fe.h.

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

387  { return n_dofs(fet, inf_elem); }
static unsigned int n_dofs(const FEType &fet, const ElemType inf_elem_type)
Definition: inf_fe_static.C:66

◆ n_shape_functions() [3/3]

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

Implements libMesh::FEAbstract.

Definition at line 553 of file inf_fe.h.

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

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

554  { return _n_total_approx_sf; }
unsigned int _n_total_approx_sf
The number of total approximation shape functions for the current configuration.
Definition: inf_fe.h:1172

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

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

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

192 {
193 #ifdef DEBUG
195  {
196  libMesh::err << "WARNING: nodal_soln(...) does _not_ work for infinite elements." << std::endl
197  << " Will return an empty nodal solution. Use " << std::endl
198  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!" << std::endl;
199  _warned_for_nodal_soln = true;
200  }
201 #endif
202 
203  /*
204  * In the base the infinite element couples to
205  * conventional finite elements. To not destroy
206  * the values there, clear \p nodal_soln. This
207  * indicates to the user of \p nodal_soln to
208  * not use this result.
209  */
210  nodal_soln.clear();
211  libmesh_assert (nodal_soln.empty());
212  return;
213 }
OStreamProxy err
libmesh_assert(ctx)
static bool _warned_for_nodal_soln
static members that are used to issue warning messages only once.
Definition: inf_fe.h:1246
static void nodal_soln(const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
Usually, this method would build the nodal soln from the element soln.

◆ on_reference_element()

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

Definition at line 601 of file fe_abstract.C.

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

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

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

◆ print_d2phi()

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

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

Implements libMesh::FEAbstract.

Definition at line 989 of file fe_base.C.

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

◆ print_dphi()

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

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

Implements libMesh::FEAbstract.

Definition at line 895 of file fe_base.C.

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

◆ print_dual_d2phi()

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

Implements libMesh::FEAbstract.

Definition at line 997 of file fe_base.C.

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

◆ print_dual_dphi()

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

Implements libMesh::FEAbstract.

Definition at line 903 of file fe_base.C.

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

◆ print_dual_phi()

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

Implements libMesh::FEAbstract.

Definition at line 884 of file fe_base.C.

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

◆ print_info() [1/2]

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

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

Definition at line 81 of file reference_counter.C.

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

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

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

◆ print_info() [2/2]

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

Prints all the relevant information about the current element.

Definition at line 818 of file fe_abstract.C.

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

Referenced by libMesh::operator<<().

819 {
820  os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
821  this->print_phi(os);
822 
823  os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
824  this->print_dphi(os);
825 
826  os << "XYZ locations of the quadrature pts." << std::endl;
827  this->print_xyz(os);
828 
829  os << "Values of JxW at the quadrature pts." << std::endl;
830  this->print_JxW(os);
831 }
virtual void print_phi(std::ostream &os) const =0
Prints the value of each shape function at each quadrature point.
virtual void print_dphi(std::ostream &os) const =0
Prints the value of each shape function&#39;s derivative at each quadrature point.
void print_xyz(std::ostream &os) const
Prints the spatial location of each quadrature point (on the physical element).
Definition: fe_abstract.C:812
void print_JxW(std::ostream &os) const
Prints the Jacobian times the weight for each quadrature point.
Definition: fe_abstract.C:805

◆ print_JxW()

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

Prints the Jacobian times the weight for each quadrature point.

Definition at line 805 of file fe_abstract.C.

References libMesh::FEAbstract::_fe_map.

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

806 {
807  this->_fe_map->print_JxW(os);
808 }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:633

◆ print_phi()

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

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

Implements libMesh::FEAbstract.

Definition at line 876 of file fe_base.C.

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

◆ print_xyz()

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

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

Definition at line 812 of file fe_abstract.C.

References libMesh::FEAbstract::_fe_map.

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

813 {
814  this->_fe_map->print_xyz(os);
815 }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:633

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

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

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

◆ reinit() [2/2]

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

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

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

Implements libMesh::FEAbstract.

Definition at line 37 of file inf_fe_boundary.C.

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

42 {
43  if (weights != nullptr)
44  libmesh_not_implemented_msg("ERROR: User-specified weights for infinite elements are not implemented!");
45 
46  if (pts != nullptr)
47  libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements are not implemented!");
48 
49  // We don't do this for 1D elements!
50  libmesh_assert_not_equal_to (Dim, 1);
51 
52  libmesh_assert(inf_elem);
54 
55  // Build the side of interest
56  const std::unique_ptr<const Elem> side(inf_elem->build_side_ptr(s));
57 
58  // set the element type
59  elem_type = inf_elem->type();
60 
61  // eventually initialize radial quadrature rule
62  bool radial_qrule_initialized = false;
63 
64  // if we are working on the base-side, the radial function is constant.
65  // With this, we ensure that at least for base elements we reinitialize all quantities
66  // when we enter for the first time.
67  if (s == 0)
69  else
74  libmesh_not_implemented();
75 
77  {
78  if (s > 0)
79  {
81  radial_qrule->init(EDGE2, inf_elem->p_level());
82  }
83  else
84  {
85  // build a new 0-dimensional quadrature-rule:
87  radial_qrule->init(NODEELEM, 0);
88 
89  //the base_qrule is set up with dim-1, but apparently we need dim, so we replace it:
90  base_qrule=QBase::build(qrule->type(), side->dim(), qrule->get_order());
91 
92  unsigned int side_p_level = inf_elem->p_level();
93  if (inf_elem->neighbor_ptr(s) != nullptr)
94  side_p_level = std::max(side_p_level, inf_elem->neighbor_ptr(s)->p_level());
95  base_qrule->init(side->type(), side_p_level);
96  }
97  radial_qrule_initialized = true;
98  }
99 
100  // Initialize the face shape functions
101  if (this->get_type() != inf_elem->type() ||
102  base_fe->shapes_need_reinit() ||
103  radial_qrule_initialized)
104  this->init_face_shape_functions (qrule->get_points(), side.get());
105 
106  // The reinit() function computes all what we want except for
107  // - normal, tangents: They are not considered
108  // This is done below:
110 }
ElemType get_type() const
Definition: fe_abstract.h:488
std::unique_ptr< QBase > radial_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1196
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
Definition: fe_type.h:240
void init_face_shape_functions(const std::vector< Point > &, const Elem *inf_side)
Initialize all the data fields like weight, phi, etc for the side s.
virtual QuadratureType type() const =0
void compute_face_functions()
std::unique_ptr< FEBase > base_fe
Have a FE<Dim-1,T_base> handy for base approximation.
Definition: inf_fe.h:1211
libmesh_assert(ctx)
Order get_order() const
Definition: quadrature.h:218
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:1221
QBase * qrule
A pointer to the quadrature rule employed.
Definition: fe_abstract.h:737
const std::vector< Point > & get_points() const
Definition: quadrature.h:148
std::unique_ptr< QBase > base_qrule
The quadrature rule for the base element associated with the current infinite element.
Definition: inf_fe.h:1190
static std::unique_ptr< QBase > build(std::string_view name, const unsigned int dim, const Order order=INVALID_ORDER)
Builds a specific quadrature rule based on the name string.
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709
ElemType elem_type
The element type the current data structures are set up for.
Definition: fe_abstract.h:715

◆ reinit_default_dual_shape_coeffs()

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

◆ reinit_dual_shape_coeffs()

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

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

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

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

Definition at line 150 of file fe_abstract.h.

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

◆ request_dphi()

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

request dphi calculations

Implements libMesh::FEAbstract.

Definition at line 238 of file fe_base.h.

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

◆ request_dual_dphi()

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

Implements libMesh::FEAbstract.

Definition at line 241 of file fe_base.h.

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

◆ request_dual_phi()

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

Implements libMesh::FEAbstract.

Definition at line 223 of file fe_base.h.

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

◆ request_phi()

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

request phi calculations

Implements libMesh::FEAbstract.

Definition at line 220 of file fe_base.h.

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

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

◆ set_calculate_default_dual_coeff()

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

set calculate_default_dual_coeff as needed

Definition at line 605 of file fe_abstract.h.

References libMesh::FEAbstract::calculate_default_dual_coeff.

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

◆ set_calculate_dual()

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

set calculate_dual as needed

Definition at line 600 of file fe_abstract.h.

References libMesh::FEAbstract::calculate_dual.

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

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

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

510 { fe_type.order = new_order; }
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:201
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:709

◆ shape() [1/3]

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

Definition at line 223 of file inf_fe_static.C.

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

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

227 {
228  // TODO - if possible, not sure if we can easily fully remove this function.
229  // libmesh_deprecated();
230 
231  libmesh_assert_not_equal_to (Dim, 0);
232 
233 #ifdef DEBUG
234  // this makes only sense when used for mapping
235  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
236  {
237  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
238  << " return the correct trial function! Use " << std::endl
239  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
240  << std::endl;
241  _warned_for_shape = true;
242  }
243 #endif
244 
245  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
246  const Order o_radial (fet.radial_order);
247  const Real v (p(Dim-1));
248 
249  unsigned int i_base, i_radial;
250  compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
251 
252  //TODO:[SP/DD] exp(ikr) is still missing here!
253  // but is it intended? It would be probably somehow nice, but than it would be Number, not Real !
254  // --> thus it would destroy the interface...
255  if (Dim > 1)
256  return FEInterface::shape(Dim-1, fet, base_et, i_base, p)
257  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
258  * InfFERadial::decay(Dim,v);
259  else
260  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
261  * InfFERadial::decay(Dim,v);
262 }
OStreamProxy err
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
static bool _warned_for_shape
Definition: inf_fe.h:1247
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1271
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...

◆ shape() [2/3]

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

Definition at line 270 of file inf_fe_static.C.

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

274 {
275  libmesh_assert(inf_elem);
276  libmesh_assert_not_equal_to (Dim, 0);
277 
278 #ifdef DEBUG
279  // this makes only sense when used for mapping
280  if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
281  {
282  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_" << std::endl
283  << " return the correct trial function! Use " << std::endl
284  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
285  << std::endl;
286  _warned_for_shape = true;
287  }
288 #endif
289 
290  const Order o_radial (fet.radial_order);
291  const Real v (p(Dim-1));
292  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
293 
294  unsigned int i_base, i_radial;
295  compute_shape_indices(fet, inf_elem, i, i_base, i_radial);
296 
297  if (Dim > 1)
298  return FEInterface::shape(fet, base_el.get(), i_base, p)
299  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
300  * InfFERadial::decay(Dim,v);
301  else
302  return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
303  * InfFERadial::decay(Dim,v);
304 }
OStreamProxy err
static bool _warned_for_shape
Definition: inf_fe.h:1247
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
libmesh_assert(ctx)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1271
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...

◆ shape() [3/3]

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

Definition at line 309 of file inf_fe_static.C.

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

314 {
315  if (add_p_level)
316  {
317  FEType tmp_fet=fet;
318  tmp_fet = static_cast<Order>(fet.order + add_p_level * inf_elem->p_level());
319  return InfFE<Dim,T_radial,T_map>::shape(tmp_fet, inf_elem, i, p);
320  }
321  return InfFE<Dim,T_radial,T_map>::shape(fet, inf_elem, i, p);
322 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real shape(const FEType &fet, const ElemType t, const unsigned int i, const Point &p)

◆ shape_deriv() [1/3]

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

Definition at line 373 of file inf_fe_static.C.

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

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

378 {
379  libmesh_assert_not_equal_to (Dim, 0);
380  libmesh_assert_greater (Dim,j);
381 #ifdef DEBUG
382  // this makes only sense when used for mapping
383  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
384  {
385  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
386  << " return the correct trial function gradients! Use " << std::endl
387  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
388  << std::endl;
389  _warned_for_dshape = true;
390  }
391 #endif
392  const Order o_radial (fe_t.radial_order);
393  const Real v (p(Dim-1));
394 
395  std::unique_ptr<const Elem> base_el (inf_elem->build_side_ptr(0));
396 
397  unsigned int i_base, i_radial;
398 
399  if ((-1. > v ) || (v > 1.))
400  {
401  //TODO: This is for debugging. We should never come here.
402  // Therefore we can do very useless things then:
403  i_base=0;
404  }
405  compute_shape_indices(fe_t, inf_elem, i, i_base, i_radial);
406 
407  if (j== Dim -1)
408  {
409  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
410  * InfFERadial::decay(Dim,v)
411  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
412  * InfFERadial::decay_deriv(Dim,v);
413 
414  return FEInterface::shape(fe_t, base_el.get(), i_base, p)*RadialDeriv;
415  }
416  return FEInterface::shape_deriv(fe_t, base_el.get(), i_base, j, p)
417  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
418  * InfFERadial::decay(Dim,v);
419 }
OStreamProxy err
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real shape_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1297
static bool _warned_for_dshape
Definition: inf_fe.h:1248
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1271
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...

◆ shape_deriv() [2/3]

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

Definition at line 607 of file inf_fe_static.C.

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

613 {
614  if (add_p_level)
615  {
616  FEType tmp_fet=fet;
617  tmp_fet = static_cast<Order>(fet.order + add_p_level * inf_elem->p_level());
618  return InfFE<Dim,T_radial,T_map>::shape_deriv(tmp_fet, inf_elem, i, j, p);
619  }
620  return InfFE<Dim,T_radial,T_map>::shape_deriv(fet, inf_elem, i, j, p);
621 }
static Real shape_deriv(const FEType &fet, const Elem *inf_elem, const unsigned int i, const unsigned int j, const Point &p)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40

◆ shape_deriv() [3/3]

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

Definition at line 326 of file inf_fe_static.C.

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

331 {
332  // TODO - if possible, not sure if we can easily fully remove this function.
333  // libmesh_deprecated();
334 
335  libmesh_assert_not_equal_to (Dim, 0);
336  libmesh_assert_greater (Dim,j);
337 #ifdef DEBUG
338  // this makes only sense when used for mapping
339  if ((T_radial != INFINITE_MAP) && !_warned_for_dshape)
340  {
341  libMesh::err << "WARNING: InfFE<Dim,T_radial,T_map>::shape_deriv(...) does _not_" << std::endl
342  << " return the correct trial function gradients! Use " << std::endl
343  << " InfFE<Dim,T_radial,T_map>::compute_data(..) instead!"
344  << std::endl;
345  _warned_for_dshape = true;
346  }
347 #endif
348 
349  const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
350  const Order o_radial (fe_t.radial_order);
351  const Real v (p(Dim-1));
352 
353  unsigned int i_base, i_radial;
354  compute_shape_indices(fe_t, inf_elem_type, i, i_base, i_radial);
355 
356  if (j== Dim -1)
357  {
358  Real RadialDeriv = InfFE<Dim,T_radial,T_map>::eval_deriv(v, o_radial, i_radial)
359  * InfFERadial::decay(Dim,v)
360  + InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
361  * InfFERadial::decay_deriv(Dim, v);
362 
363  return FEInterface::shape(Dim-1, fe_t, base_et, i_base, p)*RadialDeriv;
364  }
365 
366  return FEInterface::shape_deriv(Dim-1, fe_t, base_et, i_base, j, p)
367  * InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
368  * InfFERadial::decay(Dim,v);
369 }
OStreamProxy err
ElemType
Defines an enum for geometric element types.
static ElemType get_elem_type(const ElemType type)
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
static Real shape_deriv(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const unsigned int j, const Point &p)
static Real eval_deriv(Real v, Order o_radial, unsigned int i)
static Real decay_deriv(const unsigned int dim, const Real)
Definition: inf_fe.h:1297
static bool _warned_for_dshape
Definition: inf_fe.h:1248
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static Real decay(const unsigned int dim, const Real v)
Definition: inf_fe.h:1271
static Real eval(Real v, Order o_radial, unsigned int i)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static void compute_shape_indices(const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (...

◆ shapes_need_reinit()

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

Implements libMesh::FEAbstract.

Definition at line 1148 of file inf_fe.C.

1149 {
1150  // We never call this.
1151  libmesh_not_implemented();
1152  return false;
1153 }

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

532  {
533  libmesh_not_implemented();
534  }

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

References libMesh::InfFEBase::build_elem().

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

Friends And Related Function Documentation

◆ InfFE

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

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

Definition at line 1258 of file inf_fe.h.

◆ InfFEMap

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

Definition at line 1260 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 756 of file fe_abstract.h.

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

◆ _base_node_index

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

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

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

Definition at line 1144 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 1164 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 1238 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_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 726 of file fe_abstract.h.

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter = true
staticprotectedinherited

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

Definition at line 143 of file reference_counter.h.

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

◆ _fe_map

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

◆ _fe_trans

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

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

Definition at line 609 of file fe_base.h.

◆ _mutex

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

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 137 of file reference_counter.h.

◆ _n_objects

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

The number of objects.

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

Definition at line 132 of file reference_counter.h.

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

◆ _n_total_approx_sf

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

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

Definition at line 1172 of file inf_fe.h.

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

◆ _n_total_qp

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

The total number of quadrature points for the current configuration.

Definition at line 1178 of file inf_fe.h.

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

◆ _p_level

unsigned int libMesh::FEAbstract::_p_level
protectedinherited

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

Definition at line 732 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 1134 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 1154 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 1184 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 1248 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 1246 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 1247 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 1203 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 1211 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 1190 of file inf_fe.h.

◆ calculate_curl_phi

bool libMesh::FEAbstract::calculate_curl_phi
mutableprotectedinherited

◆ calculate_d2phi [1/2]

bool libMesh::FEAbstract::calculate_d2phi
mutableprotectedinherited

◆ calculate_d2phi [2/2]

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

Definition at line 684 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 655 of file fe_abstract.h.

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

◆ calculate_div_phi

bool libMesh::FEAbstract::calculate_div_phi
mutableprotectedinherited

◆ calculate_dphi

bool libMesh::FEAbstract::calculate_dphi
mutableprotectedinherited

◆ calculate_dphi_scaled

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

◆ calculate_dphiref

bool libMesh::FEAbstract::calculate_dphiref
mutableprotectedinherited

Should we calculate reference shape function gradients?

Definition at line 701 of file fe_abstract.h.

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

◆ calculate_dual

bool libMesh::FEAbstract::calculate_dual
mutableprotectedinherited

◆ calculate_jxw

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

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

Definition at line 992 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 665 of file fe_abstract.h.

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

◆ calculate_map_scaled

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

Are we calculating scaled mapping functions?

Definition at line 969 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 660 of file fe_abstract.h.

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

◆ calculate_phi

bool libMesh::FEAbstract::calculate_phi
mutableprotectedinherited

◆ calculate_phi_scaled

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

Are we calculating scaled shape functions?

Definition at line 974 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 985 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 645 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::InfFE< Dim, T_radial, T_map >::get_detadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_detady(), libMesh::InfFE< Dim, T_radial, T_map >::get_detadz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decay(), libMesh::InfFE< Dim, T_radial, T_map >::get_dphi_over_decayxR(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dual_phi(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidy(), libMesh::InfFE< Dim, T_radial, T_map >::get_dxidz(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadx(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetady(), libMesh::InfFE< Dim, T_radial, T_map >::get_dzetadz(), libMesh::InfFE< Dim, T_radial, T_map >::get_JxW(), libMesh::InfFE< Dim, T_radial, T_map >::get_JxWxdecay_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_normals(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), libMesh::InfFE< Dim, T_radial, T_map >::get_phi_over_decayxR(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_dweightxR_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weight(), libMesh::InfFE< Dim, T_radial, T_map >::get_Sobolev_weightxR_sq(), libMesh::InfFE< Dim, T_radial, T_map >::get_tangents(), and libMesh::InfFE< Dim, T_radial, T_map >::get_xyz().

◆ curl_phi

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

Shape function curl values.

Only defined for vector types.

Definition at line 631 of file fe_base.h.

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

◆ current_fe_type

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

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

This avoids re-initializing the radial part.

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

Definition at line 1221 of file inf_fe.h.

◆ d2phi

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

Shape function second derivative values.

Definition at line 674 of file fe_base.h.

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

◆ d2phideta2

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

Shape function second derivatives in the eta direction.

Definition at line 695 of file fe_base.h.

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

◆ d2phidetadzeta

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

Shape function second derivatives in the eta-zeta direction.

Definition at line 700 of file fe_base.h.

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

◆ d2phidx2

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

Shape function second derivatives in the x direction.

Definition at line 710 of file fe_base.h.

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

◆ d2phidxdy

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

Shape function second derivatives in the x-y direction.

Definition at line 715 of file fe_base.h.

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

◆ d2phidxdz

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

Shape function second derivatives in the x-z direction.

Definition at line 720 of file fe_base.h.

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

◆ d2phidxi2

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

Shape function second derivatives in the xi direction.

Definition at line 680 of file fe_base.h.

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

◆ d2phidxideta

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

Shape function second derivatives in the xi-eta direction.

Definition at line 685 of file fe_base.h.

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

◆ d2phidxidzeta

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

Shape function second derivatives in the xi-zeta direction.

Definition at line 690 of file fe_base.h.

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

◆ d2phidy2

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

Shape function second derivatives in the y direction.

Definition at line 725 of file fe_base.h.

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

◆ d2phidydz

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

Shape function second derivatives in the y-z direction.

Definition at line 730 of file fe_base.h.

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

◆ d2phidz2

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

Shape function second derivatives in the z direction.

Definition at line 735 of file fe_base.h.

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

◆ d2phidzeta2

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

Shape function second derivatives in the zeta direction.

Definition at line 705 of file fe_base.h.

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

◆ detadx_map

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

Definition at line 1091 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 1103 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 1092 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 1104 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 1093 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 1105 of file inf_fe.h.

◆ dim

const unsigned int libMesh::FEAbstract::dim
protectedinherited

The dimensionality of the object.

Definition at line 639 of file fe_abstract.h.

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

◆ div_phi

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

Shape function divergence values.

Only defined for vector types.

Definition at line 636 of file fe_base.h.

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

◆ dmodedv

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

the first local derivative of the radial approximation shapes.

Needed when setting up the overall shape functions.

Definition at line 1082 of file inf_fe.h.

◆ dphase

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

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

Definition at line 753 of file fe_base.h.

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

◆ dphi

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

Shape function derivative values.

Definition at line 620 of file fe_base.h.

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

◆ dphideta

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

Shape function derivatives in the eta direction.

Definition at line 646 of file fe_base.h.

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

◆ dphidx

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

Shape function derivatives in the x direction.

Definition at line 656 of file fe_base.h.

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

◆ dphidxi

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

Shape function derivatives in the xi direction.

Definition at line 641 of file fe_base.h.

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

◆ dphidy

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

Shape function derivatives in the y direction.

Definition at line 661 of file fe_base.h.

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

◆ dphidz

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

Shape function derivatives in the z direction.

Definition at line 666 of file fe_base.h.

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

◆ dphidzeta

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

Shape function derivatives in the zeta direction.

Definition at line 651 of file fe_base.h.

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

◆ dphixr

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

◆ dphixr_sq

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

◆ dsomdv

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

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

Needed when setting up the overall shape functions.

Definition at line 1070 of file inf_fe.h.

◆ dual_coeff

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

Coefficient matrix for the dual basis.

Definition at line 626 of file fe_base.h.

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

◆ dual_d2phi

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

◆ dual_dphi

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

◆ dual_phi

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

◆ dweight

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

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

Definition at line 760 of file fe_base.h.

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

◆ dweightdv

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

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

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

Definition at line 1054 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 1088 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 1100 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 1089 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 1101 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 1090 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 1102 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 1094 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 1106 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 1095 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 1107 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 1096 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 1108 of file inf_fe.h.

◆ elem_type

ElemType libMesh::FEAbstract::elem_type
protectedinherited

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

Definition at line 715 of file fe_abstract.h.

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

◆ 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 1119 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 1118 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 1076 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 1121 of file inf_fe.h.

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

◆ phi

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

Shape function values.

Definition at line 614 of file fe_base.h.

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

◆ phixr

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

◆ qrule

QBase* libMesh::FEAbstract::qrule
protectedinherited

A pointer to the quadrature rule employed.

Definition at line 737 of file fe_abstract.h.

◆ radial_qrule

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

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

Definition at line 1196 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 743 of file fe_abstract.h.

◆ som

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

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

Needed when setting up the overall shape functions.

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

Definition at line 1065 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 1122 of file inf_fe.h.

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

◆ weight

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

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

Definition at line 767 of file fe_base.h.

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

◆ weightxr_sq

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

◆ xyz

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

Physical quadrature points.

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

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