#include <inf_fe.h>
InfFE (const FEType &fet)
~InfFE ()
virtual FEContinuity get_continuity () const
virtual bool is_hierarchic () const
virtual void reinit (const Elem *elem, const std::vector< Point > *const pts)
virtual void reinit (const Elem *elem, const unsigned int side, const Real tolerance=TOLERANCE)
virtual void edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE)
virtual void attach_quadrature_rule (QBase *q)
virtual unsigned int n_shape_functions () const
virtual unsigned int n_quadrature_points () const
const std::vector< Point > & get_xyz () const
const std::vector< std::vector< Real > > & get_phi () const
const std::vector< Real > & get_JxW () const
const std::vector< std::vector< RealGradient > > & get_dphi () const
const std::vector< std::vector< Real > > & get_dphidx () const
const std::vector< std::vector< Real > > & get_dphidy () const
const std::vector< std::vector< Real > > & get_dphidz () const
const std::vector< std::vector< Real > > & get_dphidxi () const
const std::vector< std::vector< Real > > & get_dphideta () const
const std::vector< std::vector< Real > > & get_dphidzeta () const
const std::vector< std::vector< RealTensor > > & get_d2phi () const
const std::vector< std::vector< Real > > & get_d2phidx2 () const
const std::vector< std::vector< Real > > & get_d2phidxdy () const
const std::vector< std::vector< Real > > & get_d2phidxdz () const
const std::vector< std::vector< Real > > & get_d2phidy2 () const
const std::vector< std::vector< Real > > & get_d2phidydz () const
const std::vector< std::vector< Real > > & get_d2phidz2 () const
const std::vector< RealGradient > & get_dxyzdxi () const
const std::vector< RealGradient > & get_dxyzdeta () const
const std::vector< RealGradient > & get_dxyzdzeta () const
const std::vector< RealGradient > & get_d2xyzdxi2 () const
const std::vector< RealGradient > & get_d2xyzdeta2 () const
const std::vector< RealGradient > & get_d2xyzdzeta2 () const
const std::vector< RealGradient > & get_d2xyzdxideta () const
const std::vector< RealGradient > & get_d2xyzdxidzeta () const
const std::vector< RealGradient > & get_d2xyzdetadzeta () const
const std::vector< Real > & get_dxidx () const
const std::vector< Real > & get_dxidy () const
const std::vector< Real > & get_dxidz () const
const std::vector< Real > & get_detadx () const
const std::vector< Real > & get_detady () const
const std::vector< Real > & get_detadz () const
const std::vector< Real > & get_dzetadx () const
const std::vector< Real > & get_dzetady () const
const std::vector< Real > & get_dzetadz () const
const std::vector< RealGradient > & get_dphase () const
const std::vector< Real > & get_Sobolev_weight () const
const std::vector< RealGradient > & get_Sobolev_dweight () const
const std::vector< std::vector< Point > > & get_tangents () const
const std::vector< Point > & get_normals () const
const std::vector< Real > & get_curvatures () const
ElemType get_type () const
unsigned int get_p_level () const
FEType get_fe_type () const
Order get_order () const
FEFamily get_family () const
void print_JxW (std::ostream &os) const
void print_phi (std::ostream &os) const
void print_dphi (std::ostream &os) const
void print_d2phi (std::ostream &os) const
void print_xyz (std::ostream &os) const
void print_info (std::ostream &os) const
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 void compute_data (const FEType &fe_t, const Elem *inf_elem, FEComputeData &data)
static unsigned int n_shape_functions (const FEType &fet, const ElemType t)
static unsigned int n_dofs (const FEType &fet, const ElemType inf_elem_type)
static unsigned int n_dofs_at_node (const FEType &fet, const ElemType inf_elem_type, const unsigned int n)
static unsigned int n_dofs_per_elem (const FEType &fet, const ElemType inf_elem_type)
static void nodal_soln (const FEType &fet, const Elem *elem, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)
static Point inverse_map (const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool interpolated=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 AutoPtr< FEBase > build (const unsigned int dim, const FEType &type)
static AutoPtr< FEBase > build_InfFE (const unsigned int dim, const FEType &type)
static bool on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE)
static void compute_proj_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
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)
static void compute_periodic_constraints (DofConstraints &constraints, DofMap &dof_map, PeriodicBoundaries &boundaries, const MeshBase &mesh, const unsigned int variable_number, const Elem *elem)
static void print_info ()
static std::string get_info ()
static unsigned int n_objects ()
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
void update_base_elem (const Elem *inf_elem)
virtual void init_base_shape_functions (const std::vector< Point > &, const Elem *)
void init_radial_shape_functions (const Elem *inf_elem)
void init_shape_functions (const Elem *inf_elem)
void init_face_shape_functions (const std::vector< Point > &qp, const Elem *side)
void combine_base_radial (const Elem *inf_elem)
virtual void compute_shape_functions (const Elem *)
virtual void compute_map (const std::vector< Real > &qw, const Elem *e)
virtual void compute_affine_map (const std::vector< Real > &qw, const Elem *e)
void compute_single_point_map (const std::vector< Real > &qw, const Elem *e, unsigned int p)
void resize_map_vectors (unsigned int n_qp)
void compute_face_map (const std::vector< Real > &qw, const Elem *side)
void compute_edge_map (const std::vector< Real > &qw, const Elem *side)
Real dxdxi_map (const unsigned int p) const
Real dydxi_map (const unsigned int p) const
Real dzdxi_map (const unsigned int p) const
Real dxdeta_map (const unsigned int p) const
Real dydeta_map (const unsigned int p) const
Real dzdeta_map (const unsigned int p) const
Real dxdzeta_map (const unsigned int p) const
Real dydzeta_map (const unsigned int p) const
Real dzdzeta_map (const unsigned int p) const
void increment_constructor_count (const std::string &name)
void increment_destructor_count (const std::string &name)
static Real eval (const Real v, const Order o_radial, const unsigned int i)
static Real eval_deriv (const Real v, const Order o_radial, const unsigned int i)
static Point map (const Elem *inf_elem, const Point &reference_point)
static void compute_node_indices (const ElemType inf_elem_type, const unsigned int outer_node_index, unsigned int &base_node, unsigned int &radial_node)
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)
static void compute_shape_indices (const FEType &fet, const ElemType inf_elem_type, const unsigned int i, unsigned int &base_shape, unsigned int &radial_shape)
std::vector< Real > dist
std::vector< Real > dweightdv
std::vector< Real > som
std::vector< Real > dsomdv
std::vector< std::vector< Real > > mode
std::vector< std::vector< Real > > dmodedv
std::vector< std::vector< Real > > radial_map
std::vector< std::vector< Real > > dradialdv_map
std::vector< Real > dphasedxi
std::vector< Real > dphasedeta
std::vector< Real > dphasedzeta
std::vector< unsigned int > _radial_node_index
std::vector< unsigned int > _base_node_index
std::vector< unsigned int > _radial_shape_index
std::vector< unsigned int > _base_shape_index
unsigned int _n_total_approx_sf
unsigned int _n_total_qp
std::vector< Real > _total_qrule_weights
QBase * base_qrule
QBase * radial_qrule
Elem * base_elem
FEBase * base_fe
FEType current_fe_type
const unsigned int dim
std::vector< Point > xyz
std::vector< RealGradient > dxyzdxi_map
std::vector< RealGradient > dxyzdeta_map
std::vector< RealGradient > dxyzdzeta_map
std::vector< RealGradient > d2xyzdxi2_map
std::vector< RealGradient > d2xyzdxideta_map
std::vector< RealGradient > d2xyzdeta2_map
std::vector< RealGradient > d2xyzdxidzeta_map
std::vector< RealGradient > d2xyzdetadzeta_map
std::vector< RealGradient > d2xyzdzeta2_map
std::vector< Real > dxidx_map
std::vector< Real > dxidy_map
std::vector< Real > dxidz_map
std::vector< Real > detadx_map
std::vector< Real > detady_map
std::vector< Real > detadz_map
std::vector< Real > dzetadx_map
std::vector< Real > dzetady_map
std::vector< Real > dzetadz_map
std::vector< std::vector< Real > > phi
bool calculations_started
bool calculate_phi
bool calculate_dphi
bool calculate_d2phi
std::vector< std::vector< RealGradient > > dphi
std::vector< std::vector< Real > > dphidxi
std::vector< std::vector< Real > > dphideta
std::vector< std::vector< Real > > dphidzeta
std::vector< std::vector< Real > > dphidx
std::vector< std::vector< Real > > dphidy
std::vector< std::vector< Real > > dphidz
std::vector< std::vector< RealTensor > > d2phi
std::vector< std::vector< Real > > d2phidxi2
std::vector< std::vector< Real > > d2phidxideta
std::vector< std::vector< Real > > d2phidxidzeta
std::vector< std::vector< Real > > d2phideta2
std::vector< std::vector< Real > > d2phidetadzeta
std::vector< std::vector< Real > > d2phidzeta2
std::vector< std::vector< Real > > d2phidx2
std::vector< std::vector< Real > > d2phidxdy
std::vector< std::vector< Real > > d2phidxdz
std::vector< std::vector< Real > > d2phidy2
std::vector< std::vector< Real > > d2phidydz
std::vector< std::vector< Real > > d2phidz2
std::vector< std::vector< Real > > phi_map
std::vector< std::vector< Real > > dphidxi_map
std::vector< std::vector< Real > > dphideta_map
std::vector< std::vector< Real > > dphidzeta_map
std::vector< std::vector< Real > > d2phidxi2_map
std::vector< std::vector< Real > > d2phidxideta_map
std::vector< std::vector< Real > > d2phidxidzeta_map
std::vector< std::vector< Real > > d2phideta2_map
std::vector< std::vector< Real > > d2phidetadzeta_map
std::vector< std::vector< Real > > d2phidzeta2_map
std::vector< std::vector< Real > > psi_map
std::vector< std::vector< Real > > dpsidxi_map
std::vector< std::vector< Real > > dpsideta_map
std::vector< std::vector< Real > > d2psidxi2_map
std::vector< std::vector< Real > > d2psidxideta_map
std::vector< std::vector< Real > > d2psideta2_map
std::vector< RealGradient > dphase
std::vector< RealGradient > dweight
std::vector< Real > weight
std::vector< std::vector< Point > > tangents
std::vector< Point > normals
std::vector< Real > curvatures
std::vector< Real > JxW
const FEType fe_type
ElemType elem_type
unsigned int _p_level
QBase * qrule
bool shapes_on_quadrature
static Counts _counts
static Threads::atomic< unsigned int > _n_objects
static Threads::spin_mutex _mutex
virtual bool shapes_need_reinit () const
static ElemType _compute_node_indices_fast_current_elem_type = INVALID_ELEM
static bool _warned_for_nodal_soln = false
static bool _warned_for_shape = false
class InfFE
std::ostream & operator<< (std::ostream &os, const FEBase &fe)
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:
Date:
Version:
Revision:
Definition at line 75 of file inf_fe.h.
Definition at line 105 of file reference_counter.h.
The same remarks concerning compile-time optimization for FE also hold for InfFE. Use the FEBase::build_InfFE(const unsigned int, const FEType&) method to build specific instantiations of InfFE at run time.
Definition at line 39 of file inf_fe.C.
References InfFE< Dim, T_radial, T_map >::base_fe, FEBase::build(), FEBase::fe_type, FEType::inf_map, FEType::radial_family, and AutoPtr< Tp >::release().
:
FEBase (Dim, fet),
_n_total_approx_sf (0),
_n_total_qp (0),
base_qrule (NULL),
radial_qrule (NULL),
base_elem (NULL),
base_fe (NULL),
// initialize the current_fe_type to all the same
// values as
fet (since the FE families and coordinate
// map type should @e not change), but use an invalid order
// for the radial part (since this is the only order
// that may change!).
// the data structures like
phi etc are not initialized
// through the constructor, but throught reinit()
current_fe_type ( FEType(fet.order,
fet.family,
INVALID_ORDER,
fet.radial_family,
fet.inf_map) )
{
// Sanity checks
libmesh_assert (T_radial == fe_type.radial_family);
libmesh_assert (T_map == fe_type.inf_map);
// build the base_fe object, handle the AutoPtr
if (Dim != 1)
{
AutoPtr<FEBase> ap_fb(FEBase::build(Dim-1, fet));
base_fe = ap_fb.release();
}
}
Definition at line 81 of file inf_fe.C.
{
// delete pointers, if necessary
if (base_qrule != NULL)
{
delete base_qrule;
base_qrule = NULL;
}
if (radial_qrule != NULL)
{
delete radial_qrule;
radial_qrule = NULL;
}
if (base_elem != NULL)
{
delete base_elem;
base_elem = NULL;
}
if (base_fe != NULL)
{
delete base_fe;
base_fe = NULL;
}
}
Implements FEBase.
Definition at line 114 of file inf_fe.C.
References QBase::build(), QBase::get_dim(), QBase::get_order(), AutoPtr< Tp >::release(), and QBase::type().
{
libmesh_assert (q != NULL);
libmesh_assert (base_fe != NULL);
const Order base_int_order = q->get_order();
const Order radial_int_order = static_cast<Order>(2 * (static_cast<unsigned int>(fe_type.radial_order) + 1) +2);
const unsigned int qrule_dim = q->get_dim();
if (Dim != 1)
{
// build a Dim-1 quadrature rule of the type that we received
AutoPtr<QBase> apq( QBase::build(q->type(), qrule_dim-1, base_int_order) );
base_qrule = apq.release();
base_fe->attach_quadrature_rule(base_qrule);
}
// in radial direction, always use Gauss quadrature
radial_qrule = new QGauss(1, radial_int_order);
// currently not used. But maybe helpful to store the QBase*
// with which we initialized our own quadrature rules
qrule = q;
}
Definition at line 43 of file fe_base.C.
References libMeshEnums::BERNSTEIN, libMeshEnums::CLOUGH, FEType::family, libMeshEnums::HERMITE, libMeshEnums::HIERARCHIC, libMeshEnums::LAGRANGE, libMeshEnums::MONOMIAL, libMeshEnums::SCALAR, libMeshEnums::SZABAB, and libMeshEnums::XYZ.
Referenced by ExactSolution::_compute_error(), UniformRefinementEstimator::_estimate_error(), System::calculate_norm(), FEBase::coarsened_dof_values(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), FEMContext::FEMContext(), MeshFunction::gradient(), MeshFunction::hessian(), InfFE< Dim, T_radial, T_map >::InfFE(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), System::ProjectVector::operator()(), PatchRecoveryErrorEstimator::EstimateError::operator()(), InfFE< Dim, T_radial, T_map >::reinit(), HPCoarsenTest::select_refinement(), DofMap::use_coupled_neighbor_dofs(), and Elem::volume().
{
// The stupid AutoPtr<FEBase> ap(); return ap;
// construct is required to satisfy IBM's xlC
switch (dim)
{
// 0D
case 0:
{
switch (fet.family)
{
case CLOUGH:
{
AutoPtr<FEBase> ap(new FE<0,CLOUGH>(fet));
return ap;
}
case HERMITE:
{
AutoPtr<FEBase> ap(new FE<0,HERMITE>(fet));
return ap;
}
case LAGRANGE:
{
AutoPtr<FEBase> ap(new FE<0,LAGRANGE>(fet));
return ap;
}
case HIERARCHIC:
{
AutoPtr<FEBase> ap(new FE<0,HIERARCHIC>(fet));
return ap;
}
case MONOMIAL:
{
AutoPtr<FEBase> ap(new FE<0,MONOMIAL>(fet));
return ap;
}
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
{
AutoPtr<FEBase> ap(new FE<0,SZABAB>(fet));
return ap;
}
case BERNSTEIN:
{
AutoPtr<FEBase> ap(new FE<0,BERNSTEIN>(fet));
return ap;
}
#endif
case XYZ:
{
AutoPtr<FEBase> ap(new FEXYZ<0>(fet));
return ap;
}
case SCALAR:
{
AutoPtr<FEBase> ap(new FEScalar<0>(fet));
return ap;
}
default:
std::cout << 'ERROR: Bad FEType.family= ' << fet.family << std::endl;
libmesh_error();
}
}
// 1D
case 1:
{
switch (fet.family)
{
case CLOUGH:
{
AutoPtr<FEBase> ap(new FE<1,CLOUGH>(fet));
return ap;
}
case HERMITE:
{
AutoPtr<FEBase> ap(new FE<1,HERMITE>(fet));
return ap;
}
case LAGRANGE:
{
AutoPtr<FEBase> ap(new FE<1,LAGRANGE>(fet));
return ap;
}
case HIERARCHIC:
{
AutoPtr<FEBase> ap(new FE<1,HIERARCHIC>(fet));
return ap;
}
case MONOMIAL:
{
AutoPtr<FEBase> ap(new FE<1,MONOMIAL>(fet));
return ap;
}
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
{
AutoPtr<FEBase> ap(new FE<1,SZABAB>(fet));
return ap;
}
case BERNSTEIN:
{
AutoPtr<FEBase> ap(new FE<1,BERNSTEIN>(fet));
return ap;
}
#endif
case XYZ:
{
AutoPtr<FEBase> ap(new FEXYZ<1>(fet));
return ap;
}
case SCALAR:
{
AutoPtr<FEBase> ap(new FEScalar<1>(fet));
return ap;
}
default:
std::cout << 'ERROR: Bad FEType.family= ' << fet.family << std::endl;
libmesh_error();
}
}
// 2D
case 2:
{
switch (fet.family)
{
case CLOUGH:
{
AutoPtr<FEBase> ap(new FE<2,CLOUGH>(fet));
return ap;
}
case HERMITE:
{
AutoPtr<FEBase> ap(new FE<2,HERMITE>(fet));
return ap;
}
case LAGRANGE:
{
AutoPtr<FEBase> ap(new FE<2,LAGRANGE>(fet));
return ap;
}
case HIERARCHIC:
{
AutoPtr<FEBase> ap(new FE<2,HIERARCHIC>(fet));
return ap;
}
case MONOMIAL:
{
AutoPtr<FEBase> ap(new FE<2,MONOMIAL>(fet));
return ap;
}
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
{
AutoPtr<FEBase> ap(new FE<2,SZABAB>(fet));
return ap;
}
case BERNSTEIN:
{
AutoPtr<FEBase> ap(new FE<2,BERNSTEIN>(fet));
return ap;
}
#endif
case XYZ:
{
AutoPtr<FEBase> ap(new FEXYZ<2>(fet));
return ap;
}
case SCALAR:
{
AutoPtr<FEBase> ap(new FEScalar<2>(fet));
return ap;
}
default:
std::cout << 'ERROR: Bad FEType.family= ' << fet.family << std::endl;
libmesh_error();
}
}
// 3D
case 3:
{
switch (fet.family)
{
case CLOUGH:
{
std::cout << 'ERROR: Clough-Tocher elements currently only support 1D and 2D' <<
std::endl;
libmesh_error();
}
case HERMITE:
{
AutoPtr<FEBase> ap(new FE<3,HERMITE>(fet));
return ap;
}
case LAGRANGE:
{
AutoPtr<FEBase> ap(new FE<3,LAGRANGE>(fet));
return ap;
}
case HIERARCHIC:
{
AutoPtr<FEBase> ap(new FE<3,HIERARCHIC>(fet));
return ap;
}
case MONOMIAL:
{
AutoPtr<FEBase> ap(new FE<3,MONOMIAL>(fet));
return ap;
}
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
{
AutoPtr<FEBase> ap(new FE<3,SZABAB>(fet));
return ap;
}
case BERNSTEIN:
{
AutoPtr<FEBase> ap(new FE<3,BERNSTEIN>(fet));
return ap;
}
#endif
case XYZ:
{
AutoPtr<FEBase> ap(new FEXYZ<3>(fet));
return ap;
}
case SCALAR:
{
AutoPtr<FEBase> ap(new FEScalar<3>(fet));
return ap;
}
default:
std::cout << 'ERROR: Bad FEType.family= ' << fet.family << std::endl;
libmesh_error();
}
}
default:
libmesh_error();
}
libmesh_error();
AutoPtr<FEBase> ap(NULL);
return ap;
}
Definition at line 339 of file fe_base.C.
References libMeshEnums::CARTESIAN, FEType::inf_map, libMeshEnums::INFINITE_MAP, libMeshEnums::JACOBI_20_00, libMeshEnums::JACOBI_30_00, libMeshEnums::LAGRANGE, libMeshEnums::LEGENDRE, and FEType::radial_family.
{
// The stupid AutoPtr<FEBase> ap(); return ap;
// construct is required to satisfy IBM's xlC
switch (dim)
{
// 1D
case 1:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
{
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with FEFamily = ' << fet.radial_family << std::endl;
libmesh_error();
}
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<1,JACOBI_20_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<1,JACOBI_30_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<1,LEGENDRE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<1,LAGRANGE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
default:
std::cerr << 'ERROR: Bad FEType.radial_family= ' << fet.radial_family << std::endl;
libmesh_error();
}
}
// 2D
case 2:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
{
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with FEFamily = ' << fet.radial_family << std::endl;
libmesh_error();
}
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<2,JACOBI_20_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<2,JACOBI_30_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<2,LEGENDRE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<2,LAGRANGE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
default:
std::cerr << 'ERROR: Bad FEType.radial_family= ' << fet.radial_family << std::endl;
libmesh_error();
}
}
// 3D
case 3:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
{
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with FEFamily = ' << fet.radial_family << std::endl;
libmesh_error();
}
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<3,JACOBI_20_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<3,JACOBI_30_00,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<3,LEGENDRE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
{
AutoPtr<FEBase> ap(new InfFE<3,LAGRANGE,CARTESIAN>(fet));
return ap;
}
default:
std::cerr << 'ERROR: Don't build an infinite element ' << std::endl
<< ' with InfMapType = ' << fet.inf_map << std::endl;
libmesh_error();
}
}
default:
std::cerr << 'ERROR: Bad FEType.radial_family= ' << fet.radial_family << std::endl;
libmesh_error();
}
}
default:
libmesh_error();
}
libmesh_error();
AutoPtr<FEBase> ap(NULL);
return ap;
}
Definition at line 1118 of file fe_base.C.
References TypeVector< T >::add_scaled(), FEBase::build(), libMeshEnums::C_ONE, Elem::child(), DenseMatrix< T >::cholesky_solve(), FEType::default_quadrature_rule(), Elem::dim(), FEBase::dim, libMeshEnums::DISCONTINUOUS, DofMap::dof_indices(), FEInterface::dofs_on_edge(), FEInterface::dofs_on_side(), FEBase::elem_type, FEBase::fe_type, FEInterface::inverse_map(), Elem::is_child_on_edge(), Elem::is_child_on_side(), Elem::is_vertex(), FEBase::JxW, Elem::max_descendant_p_level(), Elem::n_children(), FEInterface::n_dofs(), FEInterface::n_dofs_at_node(), Elem::n_edges(), Elem::n_nodes(), MeshTools::n_nodes(), QBase::n_points(), Elem::n_sides(), DofMap::old_dof_indices(), FEType::order, Elem::p_level(), FEBase::qrule, DenseMatrix< T >::resize(), DenseVector< T >::resize(), Elem::type(), DofMap::variable_type(), libMesh::zero, DenseMatrix< T >::zero(), and DenseVector< T >::zero().
Referenced by JumpErrorEstimator::estimate_error(), ExactErrorEstimator::estimate_error(), and System::ProjectVector::operator()().
{
// Side/edge DOF indices
std::vector<unsigned int> new_side_dofs, old_side_dofs;
// FIXME: what about 2D shells in 3D space?
unsigned int dim = elem->dim();
// We use local FE objects for now
// FIXME: we should use more, external objects instead for efficiency
const FEType& base_fe_type = dof_map.variable_type(var);
AutoPtr<FEBase> fe (FEBase::build(dim, base_fe_type));
AutoPtr<FEBase> fe_coarse (FEBase::build(dim, base_fe_type));
AutoPtr<QBase> qrule (base_fe_type.default_quadrature_rule(dim));
AutoPtr<QBase> qedgerule (base_fe_type.default_quadrature_rule(1));
AutoPtr<QBase> qsiderule (base_fe_type.default_quadrature_rule(dim-1));
std::vector<Point> coarse_qpoints;
// The values of the shape functions at the quadrature
// points
const std::vector<std::vector<Real> >& phi_values =
fe->get_phi();
const std::vector<std::vector<Real> >& phi_coarse =
fe_coarse->get_phi();
// The gradients of the shape functions at the quadrature
// points on the child element.
const std::vector<std::vector<RealGradient> > *dphi_values =
NULL;
const std::vector<std::vector<RealGradient> > *dphi_coarse =
NULL;
const FEContinuity cont = fe->get_continuity();
if (cont == C_ONE)
{
const std::vector<std::vector<RealGradient> >&
ref_dphi_values = fe->get_dphi();
dphi_values = &ref_dphi_values;
const std::vector<std::vector<RealGradient> >&
ref_dphi_coarse = fe_coarse->get_dphi();
dphi_coarse = &ref_dphi_coarse;
}
// The Jacobian * quadrature weight at the quadrature points
const std::vector<Real>& JxW =
fe->get_JxW();
// The XYZ locations of the quadrature points on the
// child element
const std::vector<Point>& xyz_values =
fe->get_xyz();
FEType fe_type = base_fe_type, temp_fe_type;
const ElemType elem_type = elem->type();
fe_type.order = static_cast<Order>(fe_type.order +
elem->max_descendant_p_level());
// Number of nodes on parent element
const unsigned int n_nodes = elem->n_nodes();
// Number of dofs on parent element
const unsigned int new_n_dofs =
FEInterface::n_dofs(dim, fe_type, elem_type);
// Fixed vs. free DoFs on edge/face projections
std::vector<char> dof_is_fixed(new_n_dofs, false); // bools
std::vector<int> free_dof(new_n_dofs, 0);
DenseMatrix<Real> Ke;
DenseVector<Number> Fe;
Ue.resize(new_n_dofs); Ue.zero();
// When coarsening, in general, we need a series of
// projections to ensure a unique and continuous
// solution. We start by interpolating nodes, then
// hold those fixed and project edges, then
// hold those fixed and project faces, then
// hold those fixed and project interiors
// Copy node values first
{
std::vector<unsigned int> node_dof_indices;
if (use_old_dof_indices)
dof_map.old_dof_indices (elem, node_dof_indices, var);
else
dof_map.dof_indices (elem, node_dof_indices, var);
unsigned int current_dof = 0;
for (unsigned int n=0; n!= n_nodes; ++n)
{
// FIXME: this should go through the DofMap,
// not duplicate dof_indices code badly!
const unsigned int my_nc =
FEInterface::n_dofs_at_node (dim, fe_type,
elem_type, n);
if (!elem->is_vertex(n))
{
current_dof += my_nc;
continue;
}
temp_fe_type = base_fe_type;
// We're assuming here that child n shares vertex n,
// which is wrong on non-simplices right now
// ... but this code isn't necessary except on elements
// where p refinement creates more vertex dofs; we have
// no such elements yet.
/*
if (elem->child(n)->p_level() < elem->p_level())
{
temp_fe_type.order =
static_cast<Order>(temp_fe_type.order +
elem->child(n)->p_level());
}
*/
const unsigned int nc =
FEInterface::n_dofs_at_node (dim, temp_fe_type,
elem_type, n);
for (unsigned int i=0; i!= nc; ++i)
{
Ue(current_dof) =
old_vector(node_dof_indices[current_dof]);
dof_is_fixed[current_dof] = true;
current_dof++;
}
}
}
// In 3D, project any edge values next
if (dim > 2 && cont != DISCONTINUOUS)
for (unsigned int e=0; e != elem->n_edges(); ++e)
{
FEInterface::dofs_on_edge(elem, dim, fe_type,
e, new_side_dofs);
// Some edge dofs are on nodes and already
// fixed, others are free to calculate
unsigned int free_dofs = 0;
for (unsigned int i=0; i !=
new_side_dofs.size(); ++i)
if (!dof_is_fixed[new_side_dofs[i]])
free_dof[free_dofs++] = i;
Ke.resize (free_dofs, free_dofs); Ke.zero();
Fe.resize (free_dofs); Fe.zero();
// The new edge coefficients
DenseVector<Number> Uedge(free_dofs);
// Add projection terms from each child sharing
// this edge
for (unsigned int c=0; c != elem->n_children();
++c)
{
if (!elem->is_child_on_edge(c,e))
continue;
Elem *child = elem->child(c);
std::vector<unsigned int> child_dof_indices;
if (use_old_dof_indices)
dof_map.old_dof_indices (child,
child_dof_indices, var);
else
dof_map.dof_indices (child,
child_dof_indices, var);
const unsigned int child_n_dofs = child_dof_indices.size();
temp_fe_type = base_fe_type;
temp_fe_type.order =
static_cast<Order>(temp_fe_type.order +
child->p_level());
FEInterface::dofs_on_edge(child, dim,
temp_fe_type, e, old_side_dofs);
// Initialize both child and parent FE data
// on the child's edge
fe->attach_quadrature_rule (qedgerule.get());
fe->edge_reinit (child, e);
const unsigned int n_qp = qedgerule->n_points();
FEInterface::inverse_map (dim, fe_type, elem,
xyz_values, coarse_qpoints);
fe_coarse->reinit(elem, &coarse_qpoints);
// Loop over the quadrature points
for (unsigned int qp=0; qp<n_qp; qp++)
{
// solution value at the quadrature point
Number fineval = libMesh::zero;
// solution grad at the quadrature point
Gradient finegrad;
// Sum the solution values * the DOF
// values at the quadrature point to
// get the solution value and gradient.
for (unsigned int i=0; i<child_n_dofs;
i++)
{
fineval +=
(old_vector(child_dof_indices[i])*
phi_values[i][qp]);
if (cont == C_ONE)
finegrad.add_scaled((*dphi_values)[i][qp],
old_vector(child_dof_indices[i]));
}
// Form edge projection matrix
for (unsigned int sidei=0, freei=0;
sidei != new_side_dofs.size();
++sidei)
{
unsigned int i = new_side_dofs[sidei];
// fixed DoFs aren't test functions
if (dof_is_fixed[i])
continue;
for (unsigned int sidej=0, freej=0;
sidej != new_side_dofs.size();
++sidej)
{
unsigned int j =
new_side_dofs[sidej];
if (dof_is_fixed[j])
Fe(freei) -=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp] *
Ue(j);
else
Ke(freei,freej) +=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp]) *
JxW[qp] *
Ue(j);
else
Ke(freei,freej) +=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp])
* JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += phi_coarse[i][qp] *
fineval * JxW[qp];
if (cont == C_ONE)
Fe(freei) +=
(finegrad * (*dphi_coarse)[i][qp]) * JxW[qp];
freei++;
}
}
}
Ke.cholesky_solve(Fe, Uedge);
// Transfer new edge solutions to element
for (unsigned int i=0; i != free_dofs; ++i)
{
Number &ui = Ue(new_side_dofs[free_dof[i]]);
libmesh_assert(std::abs(ui) < TOLERANCE ||
std::abs(ui - Uedge(i)) < TOLERANCE);
ui = Uedge(i);
dof_is_fixed[new_side_dofs[free_dof[i]]] =
true;
}
}
// Project any side values (edges in 2D, faces in 3D)
if (dim > 1 && cont != DISCONTINUOUS)
for (unsigned int s=0; s != elem->n_sides(); ++s)
{
FEInterface::dofs_on_side(elem, dim, fe_type,
s, new_side_dofs);
// Some side dofs are on nodes/edges and already
// fixed, others are free to calculate
unsigned int free_dofs = 0;
for (unsigned int i=0; i !=
new_side_dofs.size(); ++i)
if (!dof_is_fixed[new_side_dofs[i]])
free_dof[free_dofs++] = i;
Ke.resize (free_dofs, free_dofs); Ke.zero();
Fe.resize (free_dofs); Fe.zero();
// The new side coefficients
DenseVector<Number> Uside(free_dofs);
// Add projection terms from each child sharing
// this side
for (unsigned int c=0; c != elem->n_children();
++c)
{
if (!elem->is_child_on_side(c,s))
continue;
Elem *child = elem->child(c);
std::vector<unsigned int> child_dof_indices;
if (use_old_dof_indices)
dof_map.old_dof_indices (child,
child_dof_indices, var);
else
dof_map.dof_indices (child,
child_dof_indices, var);
const unsigned int child_n_dofs = child_dof_indices.size();
temp_fe_type = base_fe_type;
temp_fe_type.order =
static_cast<Order>(temp_fe_type.order +
child->p_level());
FEInterface::dofs_on_side(child, dim,
temp_fe_type, s, old_side_dofs);
// Initialize both child and parent FE data
// on the child's side
fe->attach_quadrature_rule (qsiderule.get());
fe->reinit (child, s);
const unsigned int n_qp = qsiderule->n_points();
FEInterface::inverse_map (dim, fe_type, elem,
xyz_values, coarse_qpoints);
fe_coarse->reinit(elem, &coarse_qpoints);
// Loop over the quadrature points
for (unsigned int qp=0; qp<n_qp; qp++)
{
// solution value at the quadrature point
Number fineval = libMesh::zero;
// solution grad at the quadrature point
Gradient finegrad;
// Sum the solution values * the DOF
// values at the quadrature point to
// get the solution value and gradient.
for (unsigned int i=0; i<child_n_dofs;
i++)
{
fineval +=
(old_vector(child_dof_indices[i])*
phi_values[i][qp]);
if (cont == C_ONE)
finegrad.add_scaled((*dphi_values)[i][qp],
old_vector(child_dof_indices[i]));
}
// Form side projection matrix
for (unsigned int sidei=0, freei=0;
sidei != new_side_dofs.size();
++sidei)
{
unsigned int i = new_side_dofs[sidei];
// fixed DoFs aren't test functions
if (dof_is_fixed[i])
continue;
for (unsigned int sidej=0, freej=0;
sidej != new_side_dofs.size();
++sidej)
{
unsigned int j =
new_side_dofs[sidej];
if (dof_is_fixed[j])
Fe(freei) -=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp] *
Ue(j);
else
Ke(freei,freej) +=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp]) *
JxW[qp] *
Ue(j);
else
Ke(freei,freej) +=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp])
* JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += (fineval * phi_coarse[i][qp]) * JxW[qp];
if (cont == C_ONE)
Fe(freei) +=
(finegrad * (*dphi_coarse)[i][qp]) * JxW[qp];
freei++;
}
}
}
Ke.cholesky_solve(Fe, Uside);
// Transfer new side solutions to element
for (unsigned int i=0; i != free_dofs; ++i)
{
Number &ui = Ue(new_side_dofs[free_dof[i]]);
libmesh_assert(std::abs(ui) < TOLERANCE ||
std::abs(ui - Uside(i)) < TOLERANCE);
ui = Uside(i);
dof_is_fixed[new_side_dofs[free_dof[i]]] =
true;
}
}
// Project the interior values, finally
// Some interior dofs are on nodes/edges/sides and
// already fixed, others are free to calculate
unsigned int free_dofs = 0;
for (unsigned int i=0; i != new_n_dofs; ++i)
if (!dof_is_fixed[i])
free_dof[free_dofs++] = i;
Ke.resize (free_dofs, free_dofs); Ke.zero();
Fe.resize (free_dofs); Fe.zero();
// The new interior coefficients
DenseVector<Number> Uint(free_dofs);
// Add projection terms from each child
for (unsigned int c=0; c != elem->n_children(); ++c)
{
Elem *child = elem->child(c);
std::vector<unsigned int> child_dof_indices;
if (use_old_dof_indices)
dof_map.old_dof_indices (child,
child_dof_indices, var);
else
dof_map.dof_indices (child,
child_dof_indices, var);
const unsigned int child_n_dofs = child_dof_indices.size();
// Initialize both child and parent FE data
// on the child's quadrature points
fe->attach_quadrature_rule (qrule.get());
fe->reinit (child);
const unsigned int n_qp = qrule->n_points();
FEInterface::inverse_map (dim, fe_type, elem,
xyz_values, coarse_qpoints);
fe_coarse->reinit(elem, &coarse_qpoints);
// Loop over the quadrature points
for (unsigned int qp=0; qp<n_qp; qp++)
{
// solution value at the quadrature point
Number fineval = libMesh::zero;
// solution grad at the quadrature point
Gradient finegrad;
// Sum the solution values * the DOF
// values at the quadrature point to
// get the solution value and gradient.
for (unsigned int i=0; i<child_n_dofs; i++)
{
fineval +=
(old_vector(child_dof_indices[i])*
phi_values[i][qp]);
if (cont == C_ONE)
finegrad.add_scaled((*dphi_values)[i][qp],
old_vector(child_dof_indices[i]));
}
// Form interior projection matrix
for (unsigned int i=0, freei=0;
i != new_n_dofs; ++i)
{
// fixed DoFs aren't test functions
if (dof_is_fixed[i])
continue;
for (unsigned int j=0, freej=0; j !=
new_n_dofs; ++j)
{
if (dof_is_fixed[j])
Fe(freei) -=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp] *
Ue(j);
else
Ke(freei,freej) +=
phi_coarse[i][qp] *
phi_coarse[j][qp] * JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
((*dphi_coarse)[i][qp] *
(*dphi_coarse)[j][qp]) * JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += phi_coarse[i][qp] * fineval *
JxW[qp];
if (cont == C_ONE)
Fe(freei) += (finegrad * (*dphi_coarse)[i][qp]) * JxW[qp];
freei++;
}
}
}
Ke.cholesky_solve(Fe, Uint);
// Transfer new interior solutions to element
for (unsigned int i=0; i != free_dofs; ++i)
{
Number &ui = Ue(free_dof[i]);
libmesh_assert(std::abs(ui) < TOLERANCE ||
std::abs(ui - Uint(i)) < TOLERANCE);
ui = Uint(i);
dof_is_fixed[free_dof[i]] = true;
}
// Make sure every DoF got reached!
for (unsigned int i=0; i != new_n_dofs; ++i)
libmesh_assert(dof_is_fixed[i]);
}
Start logging the combination of radial and base parts
Start logging the combination of radial and base parts
Definition at line 701 of file inf_fe.C.
References Elem::origin(), and Elem::type().
{
libmesh_assert (inf_elem != NULL);
// at least check whether the base element type is correct.
// otherwise this version of computing dist would give problems
libmesh_assert (base_elem->type() == Base::get_elem_type(inf_elem->type()));
START_LOG('combine_base_radial()', 'InfFE');
// zero the phase, since it is to be summed up
std::fill (dphasedxi.begin(), dphasedxi.end(), 0.);
std::fill (dphasedeta.begin(), dphasedeta.end(), 0.);
std::fill (dphasedzeta.begin(), dphasedzeta.end(), 0.);
const unsigned int n_base_mapping_sf = dist.size();
const Point origin = inf_elem->origin();
// for each new infinite element, compute the radial distances
for (unsigned int n=0; n<n_base_mapping_sf; n++)
dist[n] = Point(base_elem->point(n) - origin).size();
switch (Dim)
{
//------------------------------------------------------------
// 1D
case 1:
{
std::cout << 'ERROR: Not implemented.' << std::endl;
libmesh_error();
break;
}
//------------------------------------------------------------
// 2D
case 2:
{
std::cout << 'ERROR: Not implemented.' << std::endl;
libmesh_error();
break;
}
//------------------------------------------------------------
// 3D
case 3:
{
// fast access to the approximation and mapping shapes of base_fe
const std::vector<std::vector<Real> >& S = base_fe->phi;
const std::vector<std::vector<Real> >& Ss = base_fe->dphidxi;
const std::vector<std::vector<Real> >& St = base_fe->dphideta;
const std::vector<std::vector<Real> >& S_map = base_fe->phi_map;
const std::vector<std::vector<Real> >& Ss_map = base_fe->dphidxi_map;
const std::vector<std::vector<Real> >& St_map = base_fe->dphideta_map;
const unsigned int n_radial_qp = radial_qrule->n_points();
const unsigned int n_base_qp = base_qrule-> n_points();
const unsigned int n_total_mapping_sf = radial_map.size() * n_base_mapping_sf;
const unsigned int n_total_approx_sf = Radial::n_dofs(fe_type.radial_order) * base_fe->n_shape_functions();
// compute the phase term derivatives
{
unsigned int tp=0;
for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qp's
for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qp's
{
// sum over all base shapes, to get the average distance
for (unsigned int i=0; i<n_base_mapping_sf; i++)
{
dphasedxi[tp] += Ss_map[i][bp] * dist[i] * radial_map [1][rp];
dphasedeta[tp] += St_map[i][bp] * dist[i] * radial_map [1][rp];
dphasedzeta[tp] += S_map [i][bp] * dist[i] * dradialdv_map[1][rp];
}
tp++;
} // loop radial and base qp's
}
libmesh_assert (phi.size() == n_total_approx_sf);
libmesh_assert (dphidxi.size() == n_total_approx_sf);
libmesh_assert (dphideta.size() == n_total_approx_sf);
libmesh_assert (dphidzeta.size() == n_total_approx_sf);
// compute the overall approximation shape functions,
// pick the appropriate radial and base shapes through using
// _base_shape_index and _radial_shape_index
for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qp's
for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qp's
for (unsigned int ti=0; ti<n_total_approx_sf; ti++) // over _all_ approx_sf
{
// let the index vectors take care of selecting the appropriate base/radial shape
const unsigned int bi = _base_shape_index [ti];
const unsigned int ri = _radial_shape_index[ti];
phi [ti][bp+rp*n_base_qp] = S [bi][bp] * mode[ri][rp] * som[rp];
dphidxi [ti][bp+rp*n_base_qp] = Ss[bi][bp] * mode[ri][rp] * som[rp];
dphideta [ti][bp+rp*n_base_qp] = St[bi][bp] * mode[ri][rp] * som[rp];
dphidzeta[ti][bp+rp*n_base_qp] = S [bi][bp]
* (dmodedv[ri][rp] * som[rp] + mode[ri][rp] * dsomdv[rp]);
}
libmesh_assert (phi_map.size() == n_total_mapping_sf);
libmesh_assert (dphidxi_map.size() == n_total_mapping_sf);
libmesh_assert (dphideta_map.size() == n_total_mapping_sf);
libmesh_assert (dphidzeta_map.size() == n_total_mapping_sf);
// compute the overall mapping functions,
// pick the appropriate radial and base entries through using
// _base_node_index and _radial_node_index
for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qp's
for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qp's
for (unsigned int ti=0; ti<n_total_mapping_sf; ti++) // over all mapping shapes
{
// let the index vectors take care of selecting the appropriate base/radial mapping shape
const unsigned int bi = _base_node_index [ti];
const unsigned int ri = _radial_node_index[ti];
phi_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * radial_map [ri][rp];
dphidxi_map [ti][bp+rp*n_base_qp] = Ss_map[bi][bp] * radial_map [ri][rp];
dphideta_map [ti][bp+rp*n_base_qp] = St_map[bi][bp] * radial_map [ri][rp];
dphidzeta_map[ti][bp+rp*n_base_qp] = S_map [bi][bp] * dradialdv_map[ri][rp];
}
break;
}
default:
libmesh_error();
}
STOP_LOG('combine_base_radial()', 'InfFE');
}
Definition at line 410 of file fe_map.C.
References FEBase::compute_single_point_map(), FEBase::d2xyzdeta2_map, FEBase::d2xyzdetadzeta_map, FEBase::d2xyzdxi2_map, FEBase::d2xyzdxideta_map, FEBase::d2xyzdxidzeta_map, FEBase::d2xyzdzeta2_map, FEBase::detadx_map, FEBase::detady_map, FEBase::detadz_map, FEBase::dim, FEBase::dxidx_map, FEBase::dxidy_map, FEBase::dxidz_map, FEBase::dxyzdeta_map, FEBase::dxyzdxi_map, FEBase::dxyzdzeta_map, FEBase::dzetadx_map, FEBase::dzetady_map, FEBase::dzetadz_map, FEBase::JxW, FEBase::phi_map, Elem::point(), FEBase::resize_map_vectors(), and FEBase::xyz.
Referenced by FEBase::compute_map().
{
// Start logging the map computation.
START_LOG('compute_affine_map()', 'FE');
libmesh_assert (elem != NULL);
const unsigned int n_qp = qw.size();
// Resize the vectors to hold data at the quadrature points
this->resize_map_vectors(n_qp);
// Compute map at quadrature point 0
this->compute_single_point_map(qw, elem, 0);
// Compute xyz at all other quadrature points
for (unsigned int p=1; p<n_qp; p++)
{
xyz[p].zero();
for (unsigned int i=0; i<phi_map.size(); i++) // sum over the nodes
xyz[p].add_scaled (elem->point(i), phi_map[i][p] );
}
// Copy other map data from quadrature point 0
for (unsigned int p=1; p<n_qp; p++) // for each extra quadrature point
{
dxyzdxi_map[p] = dxyzdxi_map[0];
dxidx_map[p] = dxidx_map[0];
dxidy_map[p] = dxidy_map[0];
dxidz_map[p] = dxidz_map[0];
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
// The map should be affine, so second derivatives are zero
d2xyzdxi2_map[p] = 0.;
#endif
if (this->dim > 1)
{
dxyzdeta_map[p] = dxyzdeta_map[0];
detadx_map[p] = detadx_map[0];
detady_map[p] = detady_map[0];
detadz_map[p] = detadz_map[0];
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxideta_map[p] = 0.;
d2xyzdeta2_map[p] = 0.;
#endif
if (this->dim > 2)
{
dxyzdzeta_map[p] = dxyzdzeta_map[0];
dzetadx_map[p] = dzetadx_map[0];
dzetady_map[p] = dzetady_map[0];
dzetadz_map[p] = dzetadz_map[0];
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxidzeta_map[p] = 0.;
d2xyzdetadzeta_map[p] = 0.;
d2xyzdzeta2_map[p] = 0.;
#endif
}
}
JxW[p] = JxW[0] / qw[0] * qw[p];
}
STOP_LOG('compute_affine_map()', 'FE');
}
Definition at line 238 of file inf_fe_static.C.
References Elem::build_side(), InfFE< Dim, T_radial, T_map >::compute_shape_indices(), InfFE< Dim, T_radial, T_map >::Radial::decay(), InfFE< Dim, T_radial, T_map >::eval(), FEComputeData::frequency, libMeshEnums::INFEDGE2, InfFE< Dim, T_radial, T_map >::Radial::mapping_order(), InfFE< Dim, T_radial, T_map >::n_dofs(), Elem::origin(), FEComputeData::p, FEComputeData::phase, libMesh::pi, Elem::point(), FEType::radial_order, FEInterface::shape(), FEComputeData::shape, FE< Dim, T >::shape(), FEComputeData::speed, and Elem::type().
{
libmesh_assert (inf_elem != NULL);
libmesh_assert (Dim != 0);
const Order o_radial (fet.radial_order);
const Order radial_mapping_order (Radial::mapping_order());
const Point& p (data.p);
const Real v (p(Dim-1));
AutoPtr<Elem> base_el (inf_elem->build_side(0));
/*
* compute
interpolated_dist containing the mapping-interpolated
* distance of the base point to the origin. This is the same
* for all shape functions. Set
interpolated_dist to 0, it
* is added to.
*/
Real interpolated_dist = 0.;
switch (Dim)
{
case 1:
{
libmesh_assert (inf_elem->type() == INFEDGE2);
interpolated_dist = Point(inf_elem->point(0) - inf_elem->point(1)).size();
break;
}
case 2:
{
const unsigned int n_base_nodes = base_el->n_nodes();
const Point origin = inf_elem->origin();
const Order base_mapping_order (base_el->default_order());
const ElemType base_mapping_elem_type (base_el->type());
// interpolate the base nodes' distances
for (unsigned int n=0; n<n_base_nodes; n++)
interpolated_dist += Point(base_el->point(n) - origin).size()
* FE<1,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
break;
}
case 3:
{
const unsigned int n_base_nodes = base_el->n_nodes();
const Point origin = inf_elem->origin();
const Order base_mapping_order (base_el->default_order());
const ElemType base_mapping_elem_type (base_el->type());
// interpolate the base nodes' distances
for (unsigned int n=0; n<n_base_nodes; n++)
interpolated_dist += Point(base_el->point(n) - origin).size()
* FE<2,LAGRANGE>::shape (base_mapping_elem_type, base_mapping_order, n, p);
break;
}
#ifdef DEBUG
default:
libmesh_error();
#endif
}
#ifdef LIBMESH_USE_COMPLEX_NUMBERS
// assumption on time-harmonic behavior
const short int sign (-1);
// the wave number
const Real wavenumber = 2. * libMesh::pi * data.frequency / data.speed;
// the exponent for time-harmonic behavior
const Real exponent = sign /* +1. or -1. */
* wavenumber /* k */
* interpolated_dist /* together with next line: */
* InfFE<Dim,INFINITE_MAP,T_map>::eval(v, radial_mapping_order, 1); /* phase(s,t,v) */
const Number time_harmonic = Number(cos(exponent), sin(exponent)); /* e^(sign*i*k*phase(s,t,v)) */
/*
* compute
shape for all dof in the element
*/
if (Dim > 1)
{
const unsigned int n_dof = n_dofs (fet, inf_elem->type());
data.shape.resize(n_dof);
for (unsigned int i=0; i<n_dof; i++)
{
// compute base and radial shape indices
unsigned int i_base, i_radial;
compute_shape_indices(fet, inf_elem->type(), i, i_base, i_radial);
data.shape[i] = (InfFE<Dim,T_radial,T_map>::Radial::decay(v) /* (1.-v)/2. in 3D */
* FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p) /* S_n(s,t) */
* InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)) /* L_n(v) */
* time_harmonic; /* e^(sign*i*k*phase(s,t,v) */
}
}
else
{
std::cerr << 'compute_data() for 1-dimensional InfFE not implemented.' << std::endl;
libmesh_error();
}
#else
const Real speed = data.speed;
/*
* This is quite weird: the phase is actually
* a measure how @e advanced the pressure is that
* we compute. In other words: the further away
* the node
data.p is, the further we look into
* the future...
*/
data.phase = interpolated_dist /* phase(s,t,v)/c */
* InfFE<Dim,INFINITE_MAP,T_map>::eval(v, radial_mapping_order, 1) / speed;
if (Dim > 1)
{
const unsigned int n_dof = n_dofs (fet, inf_elem->type());
data.shape.resize(n_dof);
for (unsigned int i=0; i<n_dof; i++)
{
// compute base and radial shape indices
unsigned int i_base, i_radial;
compute_shape_indices(fet, inf_elem->type(), i, i_base, i_radial);
data.shape[i] = InfFE<Dim,T_radial,T_map>::Radial::decay(v) /* (1.-v)/2. in 3D */
* FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p) /* S_n(s,t) */
* InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial); /* L_n(v) */
}
}
else
{
std::cerr << 'compute_data() for 1-dimensional InfFE not implemented.' << std::endl;
libmesh_error();
}
#endif
}
Definition at line 623 of file fe_boundary.C.
References FEBase::compute_face_map(), FEBase::curvatures, FEBase::d2psidxi2_map, FEBase::d2xyzdeta2_map, FEBase::d2xyzdxi2_map, FEBase::d2xyzdxideta_map, FEBase::dim, FEBase::dpsidxi_map, FEBase::dxdxi_map(), FEBase::dxyzdeta_map, FEBase::dxyzdxi_map, FEBase::dydxi_map(), FEBase::dzdxi_map(), FEBase::JxW, FEBase::normals, Elem::point(), FEBase::psi_map, FEBase::tangents, and FEBase::xyz.
Referenced by FE< Dim, T >::edge_reinit().
{
libmesh_assert (edge != NULL);
if (dim == 2)
{
// A 2D finite element living in either 2D or 3D space.
// The edges here are the sides of the element, so the
// (misnamed) compute_face_map function does what we want
FEBase::compute_face_map(qw, edge);
return;
}
libmesh_assert (dim == 3); // 1D is unnecessary and currently unsupported
START_LOG('compute_edge_map()', 'FE');
// The number of quadrature points.
const unsigned int n_qp = qw.size();
// Resize the vectors to hold data at the quadrature points
xyz.resize(n_qp);
dxyzdxi_map.resize(n_qp);
dxyzdeta_map.resize(n_qp);
d2xyzdxi2_map.resize(n_qp);
d2xyzdxideta_map.resize(n_qp);
d2xyzdeta2_map.resize(n_qp);
tangents.resize(n_qp);
normals.resize(n_qp);
curvatures.resize(n_qp);
JxW.resize(n_qp);
// Clear the entities that will be summed
for (unsigned int p=0; p<n_qp; p++)
{
tangents[p].resize(1);
xyz[p].zero();
dxyzdxi_map[p].zero();
dxyzdeta_map[p].zero();
d2xyzdxi2_map[p].zero();
d2xyzdxideta_map[p].zero();
d2xyzdeta2_map[p].zero();
}
// compute x, dxdxi at the quadrature points
for (unsigned int i=0; i<psi_map.size(); i++) // sum over the nodes
{
const Point& edge_point = edge->point(i);
for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
{
xyz[p].add_scaled (edge_point, psi_map[i][p]);
dxyzdxi_map[p].add_scaled (edge_point, dpsidxi_map[i][p]);
d2xyzdxi2_map[p].add_scaled (edge_point, d2psidxi2_map[i][p]);
}
}
// Compute the tangents at the quadrature point
// FIXME: normals (plural!) and curvatures are uncalculated
for (unsigned int p=0; p<n_qp; p++)
{
const Point n = dxyzdxi_map[p].cross(dxyzdeta_map[p]);
tangents[p][0] = dxyzdxi_map[p].unit();
// compute the jacobian at the quadrature points
const Real jac = std::sqrt(dxdxi_map(p)*dxdxi_map(p) +
dydxi_map(p)*dydxi_map(p) +
dzdxi_map(p)*dzdxi_map(p));
libmesh_assert (jac > 0.);
JxW[p] = jac*qw[p];
}
STOP_LOG('compute_edge_map()', 'FE');
}
Definition at line 345 of file fe_boundary.C.
References TypeVector< T >::cross(), FEBase::curvatures, FEBase::d2psideta2_map, FEBase::d2psidxi2_map, FEBase::d2psidxideta_map, FEBase::d2xyzdeta2_map, FEBase::d2xyzdxi2_map, FEBase::d2xyzdxideta_map, FEBase::dim, FEBase::dpsideta_map, FEBase::dpsidxi_map, FEBase::dxdeta_map(), FEBase::dxdxi_map(), FEBase::dxyzdeta_map, FEBase::dxyzdxi_map, FEBase::dydeta_map(), FEBase::dydxi_map(), FEBase::dzdeta_map(), FEBase::dzdxi_map(), InfFE< Dim, T_radial, T_map >::inverse_map(), FEBase::JxW, Elem::node(), FEBase::normals, Elem::parent(), Elem::point(), FEBase::psi_map, FEBase::tangents, TypeVector< T >::unit(), and FEBase::xyz.
Referenced by FEBase::compute_edge_map(), InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
{
libmesh_assert (side != NULL);
START_LOG('compute_face_map()', 'FE');
// The number of quadrature points.
const unsigned int n_qp = qw.size();
switch (dim)
{
case 1:
{
// A 1D finite element, currently assumed to be in 1D space
// This means the boundary is a '0D finite element', a
// NODEELEM.
// Resize the vectors to hold data at the quadrature points
{
xyz.resize(n_qp);
normals.resize(n_qp);
JxW.resize(n_qp);
}
// If we have no quadrature points, there's nothing else to do
if (!n_qp)
break;
// We need to look back at the full edge to figure out the normal
// vector
const Elem *elem = side->parent();
libmesh_assert (elem);
if (side->node(0) == elem->node(0))
normals[0] = Point(-1.);
else
{
libmesh_assert (side->node(0) == elem->node(1));
normals[0] = Point(1.);
}
// Calculate x at the point
libmesh_assert (psi_map.size() == 1);
// In the unlikely event we have multiple quadrature
// points, they'll be in the same place
for (unsigned int p=0; p<n_qp; p++)
{
xyz[p].zero();
xyz[p].add_scaled (side->point(0), psi_map[0][p]);
normals[p] = normals[0];
JxW[p] = 1.0*qw[p];
}
// done computing the map
break;
}
case 2:
{
// A 2D finite element living in either 2D or 3D space.
// This means the boundary is a 1D finite element, i.e.
// and EDGE2 or EDGE3.
// Resize the vectors to hold data at the quadrature points
{
xyz.resize(n_qp);
dxyzdxi_map.resize(n_qp);
d2xyzdxi2_map.resize(n_qp);
tangents.resize(n_qp);
normals.resize(n_qp);
curvatures.resize(n_qp);
JxW.resize(n_qp);
}
// Clear the entities that will be summed
// Compute the tangent & normal at the quadrature point
for (unsigned int p=0; p<n_qp; p++)
{
tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
xyz[p].zero();
dxyzdxi_map[p].zero();
d2xyzdxi2_map[p].zero();
}
// compute x, dxdxi at the quadrature points
for (unsigned int i=0; i<psi_map.size(); i++) // sum over the nodes
{
const Point& side_point = side->point(i);
for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
{
xyz[p].add_scaled (side_point, psi_map[i][p]);
dxyzdxi_map[p].add_scaled (side_point, dpsidxi_map[i][p]);
d2xyzdxi2_map[p].add_scaled(side_point, d2psidxi2_map[i][p]);
}
}
// Compute the tangent & normal at the quadrature point
for (unsigned int p=0; p<n_qp; p++)
{
// The first tangent comes from just the edge's Jacobian
tangents[p][0] = dxyzdxi_map[p].unit();
#if LIBMESH_DIM == 2
// For a 2D element living in 2D, the normal is given directly
// from the entries in the edge Jacobian.
normals[p] = (Point(dxyzdxi_map[p](1), -dxyzdxi_map[p](0), 0.)).unit();
#elif LIBMESH_DIM == 3
// For a 2D element living in 3D, there is a second tangent.
// For the second tangent, we need to refer to the full
// element's (not just the edge's) Jacobian.
const Elem *elem = side->parent();
libmesh_assert (elem != NULL);
// Inverse map xyz[p] to a reference point on the parent...
Point reference_point = FE<2,LAGRANGE>::inverse_map(elem, xyz[p]);
// Get dxyz/dxi and dxyz/deta from the parent map.
Point dx_dxi = FE<2,LAGRANGE>::map_xi (elem, reference_point);
Point dx_deta = FE<2,LAGRANGE>::map_eta(elem, reference_point);
// The second tangent vector is formed by crossing these vectors.
tangents[p][1] = dx_dxi.cross(dx_deta).unit();
// Finally, the normal in this case is given by crossing these
// two tangents.
normals[p] = tangents[p][0].cross(tangents[p][1]).unit();
#endif
// The curvature is computed via the familiar Frenet formula:
// curvature = [d^2(x) / d (xi)^2] dot [normal]
// For a reference, see:
// F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill, p. 310
//
// Note: The sign convention here is different from the
// 3D case. Concave-upward curves (smiles) have a positive
// curvature. Concave-downward curves (frowns) have a
// negative curvature. Be sure to take that into account!
const Real numerator = d2xyzdxi2_map[p] * normals[p];
const Real denominator = dxyzdxi_map[p].size_sq();
libmesh_assert (denominator != 0);
curvatures[p] = numerator / denominator;
}
// compute the jacobian at the quadrature points
for (unsigned int p=0; p<n_qp; p++)
{
const Real jac = dxyzdxi_map[p].size();
libmesh_assert (jac > 0.);
JxW[p] = jac*qw[p];
}
// done computing the map
break;
}
case 3:
{
// A 3D finite element living in 3D space.
// Resize the vectors to hold data at the quadrature points
{
xyz.resize(n_qp);
dxyzdxi_map.resize(n_qp);
dxyzdeta_map.resize(n_qp);
d2xyzdxi2_map.resize(n_qp);
d2xyzdxideta_map.resize(n_qp);
d2xyzdeta2_map.resize(n_qp);
tangents.resize(n_qp);
normals.resize(n_qp);
curvatures.resize(n_qp);
JxW.resize(n_qp);
}
// Clear the entities that will be summed
for (unsigned int p=0; p<n_qp; p++)
{
tangents[p].resize(LIBMESH_DIM-1); // 1 Tangent in 2D, 2 in 3D
xyz[p].zero();
dxyzdxi_map[p].zero();
dxyzdeta_map[p].zero();
d2xyzdxi2_map[p].zero();
d2xyzdxideta_map[p].zero();
d2xyzdeta2_map[p].zero();
}
// compute x, dxdxi at the quadrature points
for (unsigned int i=0; i<psi_map.size(); i++) // sum over the nodes
{
const Point& side_point = side->point(i);
for (unsigned int p=0; p<n_qp; p++) // for each quadrature point...
{
xyz[p].add_scaled (side_point, psi_map[i][p]);
dxyzdxi_map[p].add_scaled (side_point, dpsidxi_map[i][p]);
dxyzdeta_map[p].add_scaled(side_point, dpsideta_map[i][p]);
d2xyzdxi2_map[p].add_scaled (side_point, d2psidxi2_map[i][p]);
d2xyzdxideta_map[p].add_scaled(side_point, d2psidxideta_map[i][p]);
d2xyzdeta2_map[p].add_scaled (side_point, d2psideta2_map[i][p]);
}
}
// Compute the tangents, normal, and curvature at the quadrature point
for (unsigned int p=0; p<n_qp; p++)
{
const Point n = dxyzdxi_map[p].cross(dxyzdeta_map[p]);
normals[p] = n.unit();
tangents[p][0] = dxyzdxi_map[p].unit();
tangents[p][1] = n.cross(dxyzdxi_map[p]).unit();
// Compute curvature using the typical nomenclature
// of the first and second fundamental forms.
// For reference, see:
// 1) http://mathworld.wolfram.com/MeanCurvature.html
// (note -- they are using inward normal)
// 2) F.S. Merritt, Mathematics Manual, 1962, McGraw-Hill
const Real L = -d2xyzdxi2_map[p] * normals[p];
const Real M = -d2xyzdxideta_map[p] * normals[p];
const Real N = -d2xyzdeta2_map[p] * normals[p];
const Real E = dxyzdxi_map[p].size_sq();
const Real F = dxyzdxi_map[p] * dxyzdeta_map[p];
const Real G = dxyzdeta_map[p].size_sq();
const Real numerator = E*N -2.*F*M + G*L;
const Real denominator = E*G - F*F;
libmesh_assert (denominator != 0.);
curvatures[p] = 0.5*numerator/denominator;
}
// compute the jacobian at the quadrature points, see
// http://sp81.msi.umn.edu:999/fluent/fidap/help/theory/thtoc.htm
for (unsigned int p=0; p<n_qp; p++)
{
const Real g11 = (dxdxi_map(p)*dxdxi_map(p) +
dydxi_map(p)*dydxi_map(p) +
dzdxi_map(p)*dzdxi_map(p));
const Real g12 = (dxdxi_map(p)*dxdeta_map(p) +
dydxi_map(p)*dydeta_map(p) +
dzdxi_map(p)*dzdeta_map(p));
const Real g21 = g12;
const Real g22 = (dxdeta_map(p)*dxdeta_map(p) +
dydeta_map(p)*dydeta_map(p) +
dzdeta_map(p)*dzdeta_map(p));
const Real jac = std::sqrt(g11*g22 - g12*g21);
libmesh_assert (jac > 0.);
JxW[p] = jac*qw[p];
}
// done computing the map
break;
}
default:
libmesh_error();
}
STOP_LOG('compute_face_map()', 'FE');
}
Definition at line 476 of file fe_map.C.
References FEBase::calculate_d2phi, FEBase::compute_affine_map(), FEBase::compute_single_point_map(), Elem::has_affine_map(), and FEBase::resize_map_vectors().
{
if (elem->has_affine_map())
{
compute_affine_map(qw, elem);
return;
}
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
static bool curvy_second_derivative_warning = false;
if (calculate_d2phi && !curvy_second_derivative_warning)
{
std::cerr << 'WARNING: Second derivatives are not currently '
<< 'correctly calculated on non-affine elements!'
<< std::endl;
curvy_second_derivative_warning = true;
}
#endif
// Start logging the map computation.
START_LOG('compute_map()', 'FE');
libmesh_assert (elem != NULL);
const unsigned int n_qp = qw.size();
// Resize the vectors to hold data at the quadrature points
this->resize_map_vectors(n_qp);
// Compute map at all quadrature points
for (unsigned int p=0; p!=n_qp; p++)
this->compute_single_point_map(qw, elem, p);
// Stop logging the map computation.
STOP_LOG('compute_map()', 'FE');
}
Definition at line 391 of file inf_fe_static.C.
References libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, and libMeshEnums::INFQUAD6.
Referenced by InfFE< Dim, T_radial, T_map >::compute_node_indices_fast(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and InfFE< Dim, T_radial, T_map >::n_dofs_at_node().
{
switch (inf_elem_type)
{
case INFEDGE2:
{
libmesh_assert (outer_node_index < 2);
base_node = 0;
radial_node = outer_node_index;
return;
}
// linear base approximation, easy to determine
case INFQUAD4:
{
libmesh_assert (outer_node_index < 4);
base_node = outer_node_index % 2;
radial_node = outer_node_index / 2;
return;
}
case INFPRISM6:
{
libmesh_assert (outer_node_index < 6);
base_node = outer_node_index % 3;
radial_node = outer_node_index / 3;
return;
}
case INFHEX8:
{
libmesh_assert (outer_node_index < 8);
base_node = outer_node_index % 4;
radial_node = outer_node_index / 4;
return;
}
// higher order base approximation, more work necessary
case INFQUAD6:
{
switch (outer_node_index)
{
case 0:
case 1:
{
radial_node = 0;
base_node = outer_node_index;
return;
}
case 2:
case 3:
{
radial_node = 1;
base_node = outer_node_index-2;
return;
}
case 4:
{
radial_node = 0;
base_node = 2;
return;
}
case 5:
{
radial_node = 1;
base_node = 2;
return;
}
default:
{
libmesh_error();
return;
}
}
}
case INFHEX16:
case INFHEX18:
{
switch (outer_node_index)
{
case 0:
case 1:
case 2:
case 3:
{
radial_node = 0;
base_node = outer_node_index;
return;
}
case 4:
case 5:
case 6:
case 7:
{
radial_node = 1;
base_node = outer_node_index-4;
return;
}
case 8:
case 9:
case 10:
case 11:
{
radial_node = 0;
base_node = outer_node_index-4;
return;
}
case 12:
case 13:
case 14:
case 15:
{
radial_node = 1;
base_node = outer_node_index-8;
return;
}
case 16:
{
libmesh_assert (inf_elem_type == INFHEX18);
radial_node = 0;
base_node = 8;
return;
}
case 17:
{
libmesh_assert (inf_elem_type == INFHEX18);
radial_node = 1;
base_node = 8;
return;
}
default:
{
libmesh_error();
return;
}
}
}
case INFPRISM12:
{
switch (outer_node_index)
{
case 0:
case 1:
case 2:
{
radial_node = 0;
base_node = outer_node_index;
return;
}
case 3:
case 4:
case 5:
{
radial_node = 1;
base_node = outer_node_index-3;
return;
}
case 6:
case 7:
case 8:
{
radial_node = 0;
base_node = outer_node_index-3;
return;
}
case 9:
case 10:
case 11:
{
radial_node = 1;
base_node = outer_node_index-6;
return;
}
default:
{
libmesh_error();
return;
}
}
}
default:
{
std::cerr << 'ERROR: Bad infinite element type=' << inf_elem_type
<< ', node=' << outer_node_index << std::endl;
libmesh_error();
return;
}
}
}
Definition at line 612 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::_compute_node_indices_fast_current_elem_type, InfFE< Dim, T_radial, T_map >::compute_node_indices(), libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::INVALID_ELEM, libMesh::invalid_uint, and MeshTools::n_nodes().
{
libmesh_assert (inf_elem_type != INVALID_ELEM);
static std::vector<unsigned int> _static_base_node_index;
static std::vector<unsigned int> _static_radial_node_index;
/*
* fast counterpart to compute_node_indices(), uses local static buffers
* to store the index maps. The class member
*
_compute_node_indices_fast_current_elem_type remembers
* the current element type.
*
* Note that there exist non-static members storing the
* same data. However, you never know what element type
* is currently used by the
InfFE object, and what
* request is currently directed to the static
InfFE
* members (which use
compute_node_indices_fast()).
* So separate these.
*
* check whether the work for this elemtype has already
* been done. If so, use this index. Otherwise, refresh
* the buffer to this element type.
*/
if (inf_elem_type==_compute_node_indices_fast_current_elem_type)
{
base_node = _static_base_node_index [outer_node_index];
radial_node = _static_radial_node_index[outer_node_index];
return;
}
else
{
// store the map for _all_ nodes for this element type
_compute_node_indices_fast_current_elem_type = inf_elem_type;
unsigned int n_nodes = libMesh::invalid_uint;
switch (inf_elem_type)
{
case INFEDGE2:
{
n_nodes = 2;
break;
}
case INFQUAD4:
{
n_nodes = 4;
break;
}
case INFQUAD6:
{
n_nodes = 6;
break;
}
case INFHEX8:
{
n_nodes = 8;
break;
}
case INFHEX16:
{
n_nodes = 16;
break;
}
case INFHEX18:
{
n_nodes = 18;
break;
}
case INFPRISM6:
{
n_nodes = 6;
break;
}
case INFPRISM12:
{
n_nodes = 12;
break;
}
default:
{
std::cerr << 'ERROR: Bad infinite element type=' << inf_elem_type
<< ', node=' << outer_node_index << std::endl;
libmesh_error();
break;
}
}
_static_base_node_index.resize (n_nodes);
_static_radial_node_index.resize(n_nodes);
for (unsigned int n=0; n<n_nodes; n++)
compute_node_indices (inf_elem_type,
n,
_static_base_node_index [outer_node_index],
_static_radial_node_index[outer_node_index]);
// and return for the specified node
base_node = _static_base_node_index [outer_node_index];
radial_node = _static_radial_node_index[outer_node_index];
return;
}
}
Definition at line 1900 of file fe_base.C.
References Elem::active(), PeriodicBoundaries::boundary(), MeshBase::boundary_info, FEBase::build(), libMeshEnums::C_ONE, libMeshEnums::C_ZERO, DenseMatrix< T >::cholesky_solve(), DofMap::constrain_p_dofs(), FEType::default_quadrature_order(), Elem::dim(), libMeshEnums::DISCONTINUOUS, DofMap::dof_indices(), FEInterface::dofs_on_side(), FEBase::dphi, DofObject::invalid_id, libMesh::invalid_uint, FEInterface::inverse_map(), DofMap::is_constrained_dof(), FEBase::JxW, Elem::level(), std::min(), Elem::min_p_level_by_neighbor(), Elem::n_sides(), PeriodicBoundaries::neighbor(), Elem::neighbor(), Elem::p_level(), PeriodicBoundary::pairedboundary, FEBase::phi, DenseVector< T >::resize(), DenseMatrix< T >::resize(), Threads::spin_mtx, PeriodicBoundary::translation_vector, and DofMap::variable_type().
{
// Only bother if we truly have periodic boundaries
if (boundaries.empty())
return;
libmesh_assert (elem != NULL);
// Only constrain active elements with this method
if (!elem->active())
return;
const unsigned int Dim = elem->dim();
const FEType& base_fe_type = dof_map.variable_type(variable_number);
// Construct FE objects for this element and its pseudo-neighbors.
AutoPtr<FEBase> my_fe (FEBase::build(Dim, base_fe_type));
const FEContinuity cont = my_fe->get_continuity();
// We don't need to constrain discontinuous elements
if (cont == DISCONTINUOUS)
return;
libmesh_assert (cont == C_ZERO || cont == C_ONE);
AutoPtr<FEBase> neigh_fe (FEBase::build(Dim, base_fe_type));
QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
my_fe->attach_quadrature_rule (&my_qface);
std::vector<Point> neigh_qface;
const std::vector<Real>& JxW = my_fe->get_JxW();
const std::vector<Point>& q_point = my_fe->get_xyz();
const std::vector<std::vector<Real> >& phi = my_fe->get_phi();
const std::vector<std::vector<Real> >& neigh_phi =
neigh_fe->get_phi();
const std::vector<Point> *face_normals = NULL;
const std::vector<std::vector<RealGradient> > *dphi = NULL;
const std::vector<std::vector<RealGradient> > *neigh_dphi = NULL;
std::vector<unsigned int> my_dof_indices, neigh_dof_indices;
std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
if (cont != C_ZERO)
{
const std::vector<Point>& ref_face_normals =
my_fe->get_normals();
face_normals = &ref_face_normals;
const std::vector<std::vector<RealGradient> >& ref_dphi =
my_fe->get_dphi();
dphi = &ref_dphi;
const std::vector<std::vector<RealGradient> >& ref_neigh_dphi =
neigh_fe->get_dphi();
neigh_dphi = &ref_neigh_dphi;
}
DenseMatrix<Real> Ke;
DenseVector<Real> Fe;
std::vector<DenseVector<Real> > Ue;
// Look at the element faces. Check to see if we need to
// build constraints.
for (unsigned int s=0; s<elem->n_sides(); s++)
{
if (elem->neighbor(s))
continue;
unsigned int boundary_id = mesh.boundary_info->boundary_id(elem, s);
PeriodicBoundary *periodic = boundaries.boundary(boundary_id);
if (periodic)
{
// Get pointers to the element's neighbor.
const Elem* neigh = boundaries.neighbor(boundary_id, mesh, elem, s);
// h refinement constraints:
// constrain dofs shared between
// this element and ones as coarse
// as or coarser than this element.
if (neigh->level() <= elem->level())
{
unsigned int s_neigh =
mesh.boundary_info->side_with_boundary_id (neigh, periodic->pairedboundary);
libmesh_assert(s_neigh != libMesh::invalid_uint);
#ifdef LIBMESH_ENABLE_AMR
// Find the minimum p level; we build the h constraint
// matrix with this and then constrain away all higher p
// DoFs.
libmesh_assert(neigh->active());
const unsigned int min_p_level =
std::min(elem->p_level(), neigh->p_level());
// we may need to make the FE objects reinit with the
// minimum shared p_level
// FIXME - I hate using const_cast<> and avoiding
// accessor functions; there's got to be a
// better way to do this!
const unsigned int old_elem_level = elem->p_level();
if (old_elem_level != min_p_level)
(const_cast<Elem *>(elem))->hack_p_level(min_p_level);
const unsigned int old_neigh_level = neigh->p_level();
if (old_neigh_level != min_p_level)
(const_cast<Elem *>(neigh))->hack_p_level(min_p_level);
#endif // #ifdef LIBMESH_ENABLE_AMR
my_fe->reinit(elem, s);
dof_map.dof_indices (elem, my_dof_indices,
variable_number);
dof_map.dof_indices (neigh, neigh_dof_indices,
variable_number);
const unsigned int n_qp = my_qface.n_points();
// Translate the quadrature points over to the
// neighbor's boundary
std::vector<Point> neigh_point = q_point;
for (unsigned int i=0; i != neigh_point.size(); ++i)
neigh_point[i] += periodic->translation_vector;
FEInterface::inverse_map (Dim, base_fe_type, neigh,
neigh_point, neigh_qface);
neigh_fe->reinit(neigh, &neigh_qface);
// We're only concerned with DOFs whose values (and/or first
// derivatives for C1 elements) are supported on side nodes
FEInterface::dofs_on_side(elem, Dim, base_fe_type, s, my_side_dofs);
FEInterface::dofs_on_side(neigh, Dim, base_fe_type, s_neigh, neigh_side_dofs);
// We're done with functions that examine Elem::p_level(),
// so let's unhack those levels
#ifdef LIBMESH_ENABLE_AMR
if (elem->p_level() != old_elem_level)
(const_cast<Elem *>(elem))->hack_p_level(old_elem_level);
if (neigh->p_level() != old_neigh_level)
(const_cast<Elem *>(neigh))->hack_p_level(old_neigh_level);
#endif // #ifdef LIBMESH_ENABLE_AMR
const unsigned int n_side_dofs = my_side_dofs.size();
libmesh_assert(n_side_dofs == neigh_side_dofs.size());
Ke.resize (n_side_dofs, n_side_dofs);
Ue.resize(n_side_dofs);
// Form the projection matrix, (inner product of fine basis
// functions against fine test functions)
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = my_side_dofs[is];
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
for (unsigned int qp = 0; qp != n_qp; ++qp)
{
Ke(is,js) += JxW[qp] * (phi[i][qp] * phi[j][qp]);
if (cont != C_ZERO)
Ke(is,js) += JxW[qp] * (((*dphi)[i][qp] *
(*face_normals)[qp]) *
((*dphi)[j][qp] *
(*face_normals)[qp]));
}
}
}
// Form the right hand sides, (inner product of coarse basis
// functions against fine test functions)
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
Fe.resize (n_side_dofs);
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
for (unsigned int qp = 0; qp != n_qp; ++qp)
{
Fe(js) += JxW[qp] * (neigh_phi[i][qp] *
phi[j][qp]);
if (cont != C_ZERO)
Fe(js) += JxW[qp] * (((*neigh_dphi)[i][qp] *
(*face_normals)[qp]) *
((*dphi)[j][qp] *
(*face_normals)[qp]));
}
}
Ke.cholesky_solve(Fe, Ue[is]);
}
// Make sure we're not adding recursive constraints
// due to the redundancy in the way we add periodic
// boundary constraints
std::vector<bool> recursive_constraint(n_side_dofs, false);
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const unsigned int their_dof_g = neigh_dof_indices[i];
libmesh_assert(their_dof_g != DofObject::invalid_id);
if (!dof_map.is_constrained_dof(their_dof_g))
continue;
DofConstraintRow& their_constraint_row =
constraints[their_dof_g];
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
const unsigned int my_dof_g = my_dof_indices[j];
libmesh_assert(my_dof_g != DofObject::invalid_id);
if (their_constraint_row.count(my_dof_g))
recursive_constraint[js] = true;
}
}
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const unsigned int their_dof_g = neigh_dof_indices[i];
libmesh_assert(their_dof_g != DofObject::invalid_id);
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
if (recursive_constraint[js])
continue;
const unsigned int j = my_side_dofs[js];
const unsigned int my_dof_g = my_dof_indices[j];
libmesh_assert(my_dof_g != DofObject::invalid_id);
if (dof_map.is_constrained_dof(my_dof_g))
continue;
const Real their_dof_value = Ue[is](js);
if (their_dof_g == my_dof_g)
{
libmesh_assert(std::abs(their_dof_value-1.) < 1.e-5);
for (unsigned int k = 0; k != n_side_dofs; ++k)
libmesh_assert(k == is || std::abs(Ue[k](js)) < 1.e-5);
continue;
}
if (std::abs(their_dof_value) < 1.e-5)
continue;
// since we may be running this method concurretly
// on multiple threads we need to acquire a lock
// before modifying the shared constraint_row object.
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
DofConstraintRow& constraint_row =
constraints[my_dof_g];
constraint_row.insert(std::make_pair(their_dof_g,
their_dof_value));
}
}
}
}
// p refinement constraints:
// constrain dofs shared between
// active elements and neighbors with
// lower polynomial degrees
#ifdef LIBMESH_ENABLE_AMR
const unsigned int min_p_level =
neigh->min_p_level_by_neighbor(elem, elem->p_level());
if (min_p_level < elem->p_level())
{
// Adaptive p refinement of non-hierarchic bases will
// require more coding
libmesh_assert(my_fe->is_hierarchic());
dof_map.constrain_p_dofs(variable_number, elem,
s, min_p_level);
}
#endif // #ifdef LIBMESH_ENABLE_AMR
}
}
}
Definition at line 1659 of file fe_base.C.
References Elem::active(), FEBase::build(), libMeshEnums::C_ONE, libMeshEnums::C_ZERO, DenseMatrix< T >::cholesky_solve(), DofMap::constrain_p_dofs(), FEType::default_quadrature_order(), Elem::dim(), libMeshEnums::DISCONTINUOUS, DofMap::dof_indices(), FEInterface::dofs_on_side(), FEBase::dphi, DofObject::invalid_id, FEInterface::inverse_map(), FEBase::JxW, Elem::level(), std::min(), Elem::min_p_level_by_neighbor(), Elem::n_nodes(), Elem::n_sides(), Elem::neighbor(), Elem::p_level(), FEBase::phi, DenseVector< T >::resize(), DenseMatrix< T >::resize(), Threads::spin_mtx, DofMap::variable_type(), and Elem::which_neighbor_am_i().
Referenced by FE< Dim, T >::compute_constraints().
{
libmesh_assert (elem != NULL);
const unsigned int Dim = elem->dim();
// Only constrain elements in 2,3D.
if (Dim == 1)
return;
// Only constrain active elements with this method
if (!elem->active())
return;
const FEType& base_fe_type = dof_map.variable_type(variable_number);
// Construct FE objects for this element and its neighbors.
AutoPtr<FEBase> my_fe (FEBase::build(Dim, base_fe_type));
const FEContinuity cont = my_fe->get_continuity();
// We don't need to constrain discontinuous elements
if (cont == DISCONTINUOUS)
return;
libmesh_assert (cont == C_ZERO || cont == C_ONE);
AutoPtr<FEBase> neigh_fe (FEBase::build(Dim, base_fe_type));
QGauss my_qface(Dim-1, base_fe_type.default_quadrature_order());
my_fe->attach_quadrature_rule (&my_qface);
std::vector<Point> neigh_qface;
const std::vector<Real>& JxW = my_fe->get_JxW();
const std::vector<Point>& q_point = my_fe->get_xyz();
const std::vector<std::vector<Real> >& phi = my_fe->get_phi();
const std::vector<std::vector<Real> >& neigh_phi =
neigh_fe->get_phi();
const std::vector<Point> *face_normals = NULL;
const std::vector<std::vector<RealGradient> > *dphi = NULL;
const std::vector<std::vector<RealGradient> > *neigh_dphi = NULL;
std::vector<unsigned int> my_dof_indices, neigh_dof_indices;
std::vector<unsigned int> my_side_dofs, neigh_side_dofs;
if (cont != C_ZERO)
{
const std::vector<Point>& ref_face_normals =
my_fe->get_normals();
face_normals = &ref_face_normals;
const std::vector<std::vector<RealGradient> >& ref_dphi =
my_fe->get_dphi();
dphi = &ref_dphi;
const std::vector<std::vector<RealGradient> >& ref_neigh_dphi =
neigh_fe->get_dphi();
neigh_dphi = &ref_neigh_dphi;
}
DenseMatrix<Real> Ke;
DenseVector<Real> Fe;
std::vector<DenseVector<Real> > Ue;
// Look at the element faces. Check to see if we need to
// build constraints.
for (unsigned int s=0; s<elem->n_sides(); s++)
if (elem->neighbor(s) != NULL)
{
// Get pointers to the element's neighbor.
const Elem* neigh = elem->neighbor(s);
// h refinement constraints:
// constrain dofs shared between
// this element and ones coarser
// than this element.
if (neigh->level() < elem->level())
{
unsigned int s_neigh = neigh->which_neighbor_am_i(elem);
libmesh_assert (s_neigh < neigh->n_neighbors());
// Find the minimum p level; we build the h constraint
// matrix with this and then constrain away all higher p
// DoFs.
libmesh_assert(neigh->active());
const unsigned int min_p_level =
std::min(elem->p_level(), neigh->p_level());
// we may need to make the FE objects reinit with the
// minimum shared p_level
// FIXME - I hate using const_cast<> and avoiding
// accessor functions; there's got to be a
// better way to do this!
const unsigned int old_elem_level = elem->p_level();
if (old_elem_level != min_p_level)
(const_cast<Elem *>(elem))->hack_p_level(min_p_level);
const unsigned int old_neigh_level = neigh->p_level();
if (old_neigh_level != min_p_level)
(const_cast<Elem *>(neigh))->hack_p_level(min_p_level);
my_fe->reinit(elem, s);
// This function gets called element-by-element, so there
// will be a lot of memory allocation going on. We can
// at least minimize this for the case of the dof indices
// by efficiently preallocating the requisite storage.
// n_nodes is not necessarily n_dofs, but it is better
// than nothing!
my_dof_indices.reserve (elem->n_nodes());
neigh_dof_indices.reserve (neigh->n_nodes());
dof_map.dof_indices (elem, my_dof_indices,
variable_number);
dof_map.dof_indices (neigh, neigh_dof_indices,
variable_number);
const unsigned int n_qp = my_qface.n_points();
FEInterface::inverse_map (Dim, base_fe_type, neigh,
q_point, neigh_qface);
neigh_fe->reinit(neigh, &neigh_qface);
// We're only concerned with DOFs whose values (and/or first
// derivatives for C1 elements) are supported on side nodes
FEInterface::dofs_on_side(elem, Dim, base_fe_type, s, my_side_dofs);
FEInterface::dofs_on_side(neigh, Dim, base_fe_type, s_neigh, neigh_side_dofs);
// We're done with functions that examine Elem::p_level(),
// so let's unhack those levels
if (elem->p_level() != old_elem_level)
(const_cast<Elem *>(elem))->hack_p_level(old_elem_level);
if (neigh->p_level() != old_neigh_level)
(const_cast<Elem *>(neigh))->hack_p_level(old_neigh_level);
const unsigned int n_side_dofs = my_side_dofs.size();
libmesh_assert(n_side_dofs == neigh_side_dofs.size());
Ke.resize (n_side_dofs, n_side_dofs);
Ue.resize(n_side_dofs);
// Form the projection matrix, (inner product of fine basis
// functions against fine test functions)
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = my_side_dofs[is];
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
for (unsigned int qp = 0; qp != n_qp; ++qp)
{
Ke(is,js) += JxW[qp] * (phi[i][qp] * phi[j][qp]);
if (cont != C_ZERO)
Ke(is,js) += JxW[qp] * (((*dphi)[i][qp] *
(*face_normals)[qp]) *
((*dphi)[j][qp] *
(*face_normals)[qp]));
}
}
}
// Form the right hand sides, (inner product of coarse basis
// functions against fine test functions)
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
Fe.resize (n_side_dofs);
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
for (unsigned int qp = 0; qp != n_qp; ++qp)
{
Fe(js) += JxW[qp] * (neigh_phi[i][qp] *
phi[j][qp]);
if (cont != C_ZERO)
Fe(js) += JxW[qp] * (((*neigh_dphi)[i][qp] *
(*face_normals)[qp]) *
((*dphi)[j][qp] *
(*face_normals)[qp]));
}
}
Ke.cholesky_solve(Fe, Ue[is]);
}
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const unsigned int their_dof_g = neigh_dof_indices[i];
libmesh_assert(their_dof_g != DofObject::invalid_id);
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
const unsigned int my_dof_g = my_dof_indices[j];
libmesh_assert(my_dof_g != DofObject::invalid_id);
const Real their_dof_value = Ue[is](js);
if (their_dof_g == my_dof_g)
{
libmesh_assert(std::abs(their_dof_value-1.) < 1.e-5);
for (unsigned int k = 0; k != n_side_dofs; ++k)
libmesh_assert(k == is || std::abs(Ue[k](js)) < 1.e-5);
continue;
}
if (std::abs(their_dof_value) < 1.e-5)
continue;
// since we may be running this method concurretly
// on multiple threads we need to acquire a lock
// before modifying the shared constraint_row object.
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
DofConstraintRow& constraint_row =
constraints[my_dof_g];
constraint_row.insert(std::make_pair(their_dof_g,
their_dof_value));
}
}
}
}
// p refinement constraints:
// constrain dofs shared between
// active elements and neighbors with
// lower polynomial degrees
const unsigned int min_p_level =
neigh->min_p_level_by_neighbor(elem, elem->p_level());
if (min_p_level < elem->p_level())
{
// Adaptive p refinement of non-hierarchic bases will
// require more coding
libmesh_assert(my_fe->is_hierarchic());
dof_map.constrain_p_dofs(variable_number, elem,
s, min_p_level);
}
}
}
Reimplemented from FEBase.
Definition at line 864 of file inf_fe.C.
{
libmesh_assert (radial_qrule != NULL);
// Start logging the overall computation of shape functions
START_LOG('compute_shape_functions()', 'InfFE');
const unsigned int n_total_qp = _n_total_qp;
//-------------------------------------------------------------------------
// Compute the shape function values (and derivatives)
// at the Quadrature points. Note that the actual values
// have already been computed via init_shape_functions
// Compute the value of the derivative shape function i at quadrature point p
switch (dim)
{
case 1:
{
std::cout << 'ERROR: Not implemented.' << std::endl;
libmesh_error();
break;
}
case 2:
{
std::cout << 'ERROR: Not implemented.' << std::endl;
libmesh_error();
break;
}
case 3:
{
// These are _all_ shape functions of this infinite element
for (unsigned int i=0; i<phi.size(); i++)
for (unsigned int p=0; p<n_total_qp; p++)
{
// dphi/dx = (dphi/dxi)*(dxi/dx) + (dphi/deta)*(deta/dx) + (dphi/dzeta)*(dzeta/dx);
dphi[i][p](0) =
dphidx[i][p] = (dphidxi[i][p]*dxidx_map[p] +
dphideta[i][p]*detadx_map[p] +
dphidzeta[i][p]*dzetadx_map[p]);
// dphi/dy = (dphi/dxi)*(dxi/dy) + (dphi/deta)*(deta/dy) + (dphi/dzeta)*(dzeta/dy);
dphi[i][p](1) =
dphidy[i][p] = (dphidxi[i][p]*dxidy_map[p] +
dphideta[i][p]*detady_map[p] +
dphidzeta[i][p]*dzetady_map[p]);
// dphi/dz = (dphi/dxi)*(dxi/dz) + (dphi/deta)*(deta/dz) + (dphi/dzeta)*(dzeta/dz);
dphi[i][p](2) =
dphidz[i][p] = (dphidxi[i][p]*dxidz_map[p] +
dphideta[i][p]*detadz_map[p] +
dphidzeta[i][p]*dzetadz_map[p]);
}
// This is the derivative of the phase term of this infinite element
for (unsigned int p=0; p<n_total_qp; p++)
{
// the derivative of the phase term
dphase[p](0) = (dphasedxi[p] * dxidx_map[p] +
dphasedeta[p] * detadx_map[p] +
dphasedzeta[p] * dzetadx_map[p]);
dphase[p](1) = (dphasedxi[p] * dxidy_map[p] +
dphasedeta[p] * detady_map[p] +
dphasedzeta[p] * dzetady_map[p]);
dphase[p](2) = (dphasedxi[p] * dxidz_map[p] +
dphasedeta[p] * detadz_map[p] +
dphasedzeta[p] * dzetadz_map[p]);
// the derivative of the radial weight - varies only in radial direction,
// therefore dweightdxi = dweightdeta = 0.
dweight[p](0) = dweightdv[p] * dzetadx_map[p];
dweight[p](1) = dweightdv[p] * dzetady_map[p];
dweight[p](2) = dweightdv[p] * dzetadz_map[p];
}
break;
}
default:
{
libmesh_error();
}
}
// Stop logging the overall computation of shape functions
STOP_LOG('compute_shape_functions()', 'InfFE');
}
Definition at line 726 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::Base::get_elem_type(), libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMesh::invalid_uint, InfFE< Dim, T_radial, T_map >::n_dofs(), FEInterface::n_dofs_at_node(), FEInterface::n_dofs_per_elem(), and FEType::radial_order.
Referenced by InfFE< Dim, T_radial, T_map >::compute_data(), and InfFE< Dim, T_radial, T_map >::shape().
{
/*
* An example is provided: the numbers in comments refer to
* a fictitious InfHex18. The numbers are chosen as exemplary
* values. There is currently no base approximation that
* requires this many dof's at nodes, sides, faces and in the element.
*
* the order of the shape functions is heavily related with the
* order the dofs are assigned in
DofMap::distributed_dofs().
* Due to the infinite elements with higher-order base approximation,
* some more effort is necessary.
*
* numbering scheme:
* 1. all vertices in the base, assign node->n_comp() dofs to each vertex
* 2. all vertices further out: innermost loop: radial shapes,
* then the base approximation shapes
* 3. all side nodes in the base, assign node->n_comp() dofs to each side node
* 4. all side nodes further out: innermost loop: radial shapes,
* then the base approximation shapes
* 5. (all) face nodes in the base, assign node->n_comp() dofs to each face node
* 6. (all) face nodes further out: innermost loop: radial shapes,
* then the base approximation shapes
* 7. element-associated dof in the base
* 8. element-associated dof further out
*/
const unsigned int radial_order = static_cast<unsigned int>(fet.radial_order); // 4
const unsigned int radial_order_p_one = radial_order+1; // 5
const ElemType base_elem_type (Base::get_elem_type(inf_elem_type)); // QUAD9
// assume that the number of dof is the same for all vertices
unsigned int n_base_vertices = libMesh::invalid_uint; // 4
const unsigned int n_base_vertex_dof = FEInterface::n_dofs_at_node (Dim-1, fet, base_elem_type, 0);// 2
unsigned int n_base_side_nodes = libMesh::invalid_uint; // 4
unsigned int n_base_side_dof = libMesh::invalid_uint; // 3
unsigned int n_base_face_nodes = libMesh::invalid_uint; // 1
unsigned int n_base_face_dof = libMesh::invalid_uint; // 5
const unsigned int n_base_elem_dof = FEInterface::n_dofs_per_elem (Dim-1, fet, base_elem_type);// 9
switch (inf_elem_type)
{
case INFEDGE2:
{
n_base_vertices = 1;
n_base_side_nodes = 0;
n_base_face_nodes = 0;
n_base_side_dof = 0;
n_base_face_dof = 0;
break;
}
case INFQUAD4:
{
n_base_vertices = 2;
n_base_side_nodes = 0;
n_base_face_nodes = 0;
n_base_side_dof = 0;
n_base_face_dof = 0;
break;
}
case INFQUAD6:
{
n_base_vertices = 2;
n_base_side_nodes = 1;
n_base_face_nodes = 0;
n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
n_base_face_dof = 0;
break;
}
case INFHEX8:
{
n_base_vertices = 4;
n_base_side_nodes = 0;
n_base_face_nodes = 0;
n_base_side_dof = 0;
n_base_face_dof = 0;
break;
}
case INFHEX16:
{
n_base_vertices = 4;
n_base_side_nodes = 4;
n_base_face_nodes = 0;
n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
n_base_face_dof = 0;
break;
}
case INFHEX18:
{
n_base_vertices = 4;
n_base_side_nodes = 4;
n_base_face_nodes = 1;
n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
n_base_face_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, 8);
break;
}
case INFPRISM6:
{
n_base_vertices = 3;
n_base_side_nodes = 0;
n_base_face_nodes = 0;
n_base_side_dof = 0;
n_base_face_dof = 0;
break;
}
case INFPRISM12:
{
n_base_vertices = 3;
n_base_side_nodes = 3;
n_base_face_nodes = 0;
n_base_side_dof = FEInterface::n_dofs_at_node (Dim-1, fet,base_elem_type, n_base_vertices);
n_base_face_dof = 0;
break;
}
default:
libmesh_error();
}
{
// these are the limits describing the intervals where the shape function lies
const unsigned int n_dof_at_base_vertices = n_base_vertices*n_base_vertex_dof; // 8
const unsigned int n_dof_at_all_vertices = n_dof_at_base_vertices*radial_order_p_one; // 40
const unsigned int n_dof_at_base_sides = n_base_side_nodes*n_base_side_dof; // 12
const unsigned int n_dof_at_all_sides = n_dof_at_base_sides*radial_order_p_one; // 60
const unsigned int n_dof_at_base_face = n_base_face_nodes*n_base_face_dof; // 5
const unsigned int n_dof_at_all_faces = n_dof_at_base_face*radial_order_p_one; // 25
// start locating the shape function
if (i < n_dof_at_base_vertices) // range of i: 0..7
{
// belongs to vertex in the base
radial_shape = 0;
base_shape = i;
}
else if (i < n_dof_at_all_vertices) // range of i: 8..39
{
/* belongs to vertex in the outer shell
*
* subtract the number of dof already counted,
* so that i_offset contains only the offset for the base
*/
const unsigned int i_offset = i - n_dof_at_base_vertices; // 0..31
// first the radial dof are counted, then the base dof
radial_shape = (i_offset % radial_order) + 1;
base_shape = i_offset / radial_order;
}
else if (i < n_dof_at_all_vertices+n_dof_at_base_sides) // range of i: 40..51
{
// belongs to base, is a side node
radial_shape = 0;
base_shape = i - radial_order * n_dof_at_base_vertices; // 8..19
}
else if (i < n_dof_at_all_vertices+n_dof_at_all_sides) // range of i: 52..99
{
// belongs to side node in the outer shell
const unsigned int i_offset = i - (n_dof_at_all_vertices
+ n_dof_at_base_sides); // 0..47
radial_shape = (i_offset % radial_order) + 1;
base_shape = (i_offset / radial_order) + n_dof_at_base_vertices;
}
else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_base_face) // range of i: 100..104
{
// belongs to the node in the base face
radial_shape = 0;
base_shape = i - radial_order*(n_dof_at_base_vertices
+ n_dof_at_base_sides); // 20..24
}
else if (i < n_dof_at_all_vertices+n_dof_at_all_sides+n_dof_at_all_faces) // range of i: 105..124
{
// belongs to the node in the outer face
const unsigned int i_offset = i - (n_dof_at_all_vertices
+ n_dof_at_all_sides
+ n_dof_at_base_face); // 0..19
radial_shape = (i_offset % radial_order) + 1;
base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides;
}
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
{
// belongs to the base and is an element associated shape
radial_shape = 0;
base_shape = i - (n_dof_at_all_vertices
+ n_dof_at_all_sides
+ n_dof_at_all_faces); // 0..8
}
else // range of i: 134..169
{
libmesh_assert (i < n_dofs(fet, inf_elem_type));
// belongs to the outer shell and is an element associated shape
const unsigned int i_offset = i - (n_dof_at_all_vertices
+ n_dof_at_all_sides
+ n_dof_at_all_faces
+ n_base_elem_dof); // 0..19
radial_shape = (i_offset % radial_order) + 1;
base_shape = (i_offset / radial_order) + n_dof_at_base_vertices + n_dof_at_base_sides + n_dof_at_base_face;
}
}
return;
}
Definition at line 35 of file fe_map.C.
References FEBase::d2phideta2_map, FEBase::d2phidetadzeta_map, FEBase::d2phidxi2_map, FEBase::d2phidxideta_map, FEBase::d2phidxidzeta_map, FEBase::d2phidzeta2_map, FEBase::d2xyzdeta2_map, FEBase::d2xyzdetadzeta_map, FEBase::d2xyzdxi2_map, FEBase::d2xyzdxideta_map, FEBase::d2xyzdxidzeta_map, FEBase::d2xyzdzeta2_map, FEBase::detadx_map, FEBase::detady_map, FEBase::detadz_map, FEBase::dim, FEBase::dphideta_map, FEBase::dphidxi_map, FEBase::dphidzeta_map, FEBase::dxdeta_map(), FEBase::dxdxi_map(), FEBase::dxdzeta_map(), FEBase::dxidx_map, FEBase::dxidy_map, FEBase::dxidz_map, FEBase::dxyzdeta_map, FEBase::dxyzdxi_map, FEBase::dxyzdzeta_map, FEBase::dydeta_map(), FEBase::dydxi_map(), FEBase::dydzeta_map(), FEBase::dzdeta_map(), FEBase::dzdxi_map(), FEBase::dzdzeta_map(), FEBase::dzetadx_map, FEBase::dzetady_map, FEBase::dzetadz_map, DofObject::id(), FEBase::JxW, FEBase::phi_map, Elem::point(), and FEBase::xyz.
Referenced by FEBase::compute_affine_map(), and FEBase::compute_map().
{
libmesh_assert (elem != NULL);
switch (this->dim)
{
//--------------------------------------------------------------------
// 1D
case 1:
{
// Clear the entities that will be summed
xyz[p].zero();
dxyzdxi_map[p].zero();
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].zero();
#endif
// compute x, dx, d2x at the quadrature point
for (unsigned int i=0; i<phi_map.size(); i++) // sum over the nodes
{
// Reference to the point, helps eliminate
// exessive temporaries in the inner loop
const Point& elem_point = elem->point(i);
xyz[p].add_scaled (elem_point, phi_map[i][p] );
dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p]);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].add_scaled(elem_point, d2phidxi2_map[i][p]);
#endif
}
// Compute the jacobian
//
// 1D elements can live in 2D or 3D space.
// The transformation matrix from local->global
// coordinates is
//
// T = | dx/dxi |
// | dy/dxi |
// | dz/dxi |
//
// The generalized determinant of T (from the
// so-called 'normal' eqns.) is
// jac = 'det(T)' = sqrt(det(T'T))
//
// where T'= transpose of T, so
//
// jac = sqrt( (dx/dxi)^2 + (dy/dxi)^2 + (dz/dxi)^2 )
const Real jac = dxyzdxi_map[p].size();
if (jac <= 0.)
{
std::cerr << 'ERROR: negative Jacobian: '
<< jac
<< ' in element '
<< elem->id()
<< std::endl;
libmesh_error();
}
// The inverse Jacobian entries also come from the
// generalized inverse of T (see also the 2D element
// living in 3D code).
const Real jacm2 = 1./jac/jac;
dxidx_map[p] = jacm2*dxdxi_map(p);
dxidy_map[p] = jacm2*dydxi_map(p);
dxidz_map[p] = jacm2*dzdxi_map(p);
JxW[p] = jac*qw[p];
// done computing the map
break;
}
//--------------------------------------------------------------------
// 2D
case 2:
{
//------------------------------------------------------------------
// Compute the (x,y) values at the quadrature points,
// the Jacobian at the quadrature points
xyz[p].zero();
dxyzdxi_map[p].zero();
dxyzdeta_map[p].zero();
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].zero();
d2xyzdxideta_map[p].zero();
d2xyzdeta2_map[p].zero();
#endif
// compute (x,y) at the quadrature points, derivatives once
for (unsigned int i=0; i<phi_map.size(); i++) // sum over the nodes
{
// Reference to the point, helps eliminate
// exessive temporaries in the inner loop
const Point& elem_point = elem->point(i);
xyz[p].add_scaled (elem_point, phi_map[i][p] );
dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p] );
dxyzdeta_map[p].add_scaled (elem_point, dphideta_map[i][p]);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].add_scaled (elem_point, d2phidxi2_map[i][p]);
d2xyzdxideta_map[p].add_scaled (elem_point, d2phidxideta_map[i][p]);
d2xyzdeta2_map[p].add_scaled (elem_point, d2phideta2_map[i][p]);
#endif
}
// compute the jacobian once
const Real dx_dxi = dxdxi_map(p), dx_deta = dxdeta_map(p),
dy_dxi = dydxi_map(p), dy_deta = dydeta_map(p),
dz_dxi = dzdxi_map(p), dz_deta = dzdeta_map(p);
#if LIBMESH_DIM == 2
// Compute the Jacobian. This assumes the 2D face
// lives in 2D space
//
// Symbolically, the matrix determinant is
//
// | dx/dxi dx/deta |
// jac = | dy/dxi dy/deta |
//
// jac = dx/dxi*dy/deta - dx/deta*dy/dxi
const Real jac = (dx_dxi*dy_deta - dx_deta*dy_dxi);
if (jac <= 0.)
{
std::cerr << 'ERROR: negative Jacobian: '
<< jac
<< ' in element '
<< elem->id()
<< std::endl;
libmesh_error();
}
JxW[p] = jac*qw[p];
// Compute the shape function derivatives wrt x,y at the
// quadrature points
const Real inv_jac = 1./jac;
dxidx_map[p] = dy_deta*inv_jac; //dxi/dx = (1/J)*dy/deta
dxidy_map[p] = -dx_deta*inv_jac; //dxi/dy = -(1/J)*dx/deta
detadx_map[p] = -dy_dxi* inv_jac; //deta/dx = -(1/J)*dy/dxi
detady_map[p] = dx_dxi* inv_jac; //deta/dy = (1/J)*dx/dxi
dxidz_map[p] = detadz_map[p] = 0.;
#else
// Compute the Jacobian. This assumes a 2D face in
// 3D space.
//
// The transformation matrix T from local to global
// coordinates is
//
// | dx/dxi dx/deta |
// T = | dy/dxi dy/deta |
// | dz/dxi dz/deta |
// note det(T' T) = det(T')det(T) = det(T)det(T)
// so det(T) = std::sqrt(det(T' T))
//
//----------------------------------------------
// Notes:
//
// dX = R dXi -> R'dX = R'R dXi
// (R^-1)dX = dXi [(R'R)^-1 R']dX = dXi
//
// so R^-1 = (R'R)^-1 R'
//
// and R^-1 R = (R'R)^-1 R'R = I.
//
const Real g11 = (dx_dxi*dx_dxi +
dy_dxi*dy_dxi +
dz_dxi*dz_dxi);
const Real g12 = (dx_dxi*dx_deta +
dy_dxi*dy_deta +
dz_dxi*dz_deta);
const Real g21 = g12;
const Real g22 = (dx_deta*dx_deta +
dy_deta*dy_deta +
dz_deta*dz_deta);
const Real det = (g11*g22 - g12*g21);
if (det <= 0.)
{
std::cerr << 'ERROR: negative Jacobian! '
<< ' in element '
<< elem->id()
<< std::endl;
libmesh_error();
}
const Real inv_det = 1./det;
const Real jac = std::sqrt(det);
JxW[p] = jac*qw[p];
const Real g11inv = g22*inv_det;
const Real g12inv = -g12*inv_det;
const Real g21inv = -g21*inv_det;
const Real g22inv = g11*inv_det;
dxidx_map[p] = g11inv*dx_dxi + g12inv*dx_deta;
dxidy_map[p] = g11inv*dy_dxi + g12inv*dy_deta;
dxidz_map[p] = g11inv*dz_dxi + g12inv*dz_deta;
detadx_map[p] = g21inv*dx_dxi + g22inv*dx_deta;
detady_map[p] = g21inv*dy_dxi + g22inv*dy_deta;
detadz_map[p] = g21inv*dz_dxi + g22inv*dz_deta;
#endif
// done computing the map
break;
}
//--------------------------------------------------------------------
// 3D
case 3:
{
//------------------------------------------------------------------
// Compute the (x,y,z) values at the quadrature points,
// the Jacobian at the quadrature point
// Clear the entities that will be summed
xyz[p].zero ();
dxyzdxi_map[p].zero ();
dxyzdeta_map[p].zero ();
dxyzdzeta_map[p].zero ();
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].zero();
d2xyzdxideta_map[p].zero();
d2xyzdxidzeta_map[p].zero();
d2xyzdeta2_map[p].zero();
d2xyzdetadzeta_map[p].zero();
d2xyzdzeta2_map[p].zero();
#endif
// compute (x,y,z) at the quadrature points,
// dxdxi, dydxi, dzdxi,
// dxdeta, dydeta, dzdeta,
// dxdzeta, dydzeta, dzdzeta all once
for (unsigned int i=0; i<phi_map.size(); i++) // sum over the nodes
{
// Reference to the point, helps eliminate
// exessive temporaries in the inner loop
const Point& elem_point = elem->point(i);
xyz[p].add_scaled (elem_point, phi_map[i][p] );
dxyzdxi_map[p].add_scaled (elem_point, dphidxi_map[i][p] );
dxyzdeta_map[p].add_scaled (elem_point, dphideta_map[i][p] );
dxyzdzeta_map[p].add_scaled (elem_point, dphidzeta_map[i][p]);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map[p].add_scaled (elem_point,
d2phidxi2_map[i][p]);
d2xyzdxideta_map[p].add_scaled (elem_point,
d2phidxideta_map[i][p]);
d2xyzdxidzeta_map[p].add_scaled (elem_point,
d2phidxidzeta_map[i][p]);
d2xyzdeta2_map[p].add_scaled (elem_point,
d2phideta2_map[i][p]);
d2xyzdetadzeta_map[p].add_scaled (elem_point,
d2phidetadzeta_map[i][p]);
d2xyzdzeta2_map[p].add_scaled (elem_point,
d2phidzeta2_map[i][p]);
#endif
}
// compute the jacobian
const Real
dx_dxi = dxdxi_map(p), dy_dxi = dydxi_map(p), dz_dxi = dzdxi_map(p),
dx_deta = dxdeta_map(p), dy_deta = dydeta_map(p), dz_deta = dzdeta_map(p),
dx_dzeta = dxdzeta_map(p), dy_dzeta = dydzeta_map(p), dz_dzeta = dzdzeta_map(p);
// Symbolically, the matrix determinant is
//
// | dx/dxi dy/dxi dz/dxi |
// jac = | dx/deta dy/deta dz/deta |
// | dx/dzeta dy/dzeta dz/dzeta |
//
// jac = dx/dxi*(dy/deta*dz/dzeta - dz/deta*dy/dzeta) +
// dy/dxi*(dz/deta*dx/dzeta - dx/deta*dz/dzeta) +
// dz/dxi*(dx/deta*dy/dzeta - dy/deta*dx/dzeta)
const Real jac = (dx_dxi*(dy_deta*dz_dzeta - dz_deta*dy_dzeta) +
dy_dxi*(dz_deta*dx_dzeta - dx_deta*dz_dzeta) +
dz_dxi*(dx_deta*dy_dzeta - dy_deta*dx_dzeta));
if (jac <= 0.)
{
std::cerr << 'ERROR: negative Jacobian: '
<< jac
<< ' in element '
<< elem->id()
<< std::endl;
libmesh_error();
}
JxW[p] = jac*qw[p];
// Compute the shape function derivatives wrt x,y at the
// quadrature points
const Real inv_jac = 1./jac;
dxidx_map[p] = (dy_deta*dz_dzeta - dz_deta*dy_dzeta)*inv_jac;
dxidy_map[p] = (dz_deta*dx_dzeta - dx_deta*dz_dzeta)*inv_jac;
dxidz_map[p] = (dx_deta*dy_dzeta - dy_deta*dx_dzeta)*inv_jac;
detadx_map[p] = (dz_dxi*dy_dzeta - dy_dxi*dz_dzeta )*inv_jac;
detady_map[p] = (dx_dxi*dz_dzeta - dz_dxi*dx_dzeta )*inv_jac;
detadz_map[p] = (dy_dxi*dx_dzeta - dx_dxi*dy_dzeta )*inv_jac;
dzetadx_map[p] = (dy_dxi*dz_deta - dz_dxi*dy_deta )*inv_jac;
dzetady_map[p] = (dz_dxi*dx_deta - dx_dxi*dz_deta )*inv_jac;
dzetadz_map[p] = (dx_dxi*dy_deta - dy_dxi*dx_deta )*inv_jac;
// done computing the map
break;
}
default:
libmesh_error();
}
}
Definition at line 740 of file fe_base.h.
References FEBase::dxyzdeta_map.
Referenced by FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdeta_map[p](0); }
Definition at line 719 of file fe_base.h.
References FEBase::dxyzdxi_map.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdxi_map[p](0); }
Definition at line 761 of file fe_base.h.
References FEBase::dxyzdzeta_map.
Referenced by FEBase::compute_single_point_map().
{ return dxyzdzeta_map[p](0); }
Definition at line 747 of file fe_base.h.
References FEBase::dxyzdeta_map.
Referenced by FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdeta_map[p](1); }
Definition at line 726 of file fe_base.h.
References FEBase::dxyzdxi_map.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdxi_map[p](1); }
Definition at line 768 of file fe_base.h.
References FEBase::dxyzdzeta_map.
Referenced by FEBase::compute_single_point_map().
{ return dxyzdzeta_map[p](1); }
Definition at line 754 of file fe_base.h.
References FEBase::dxyzdeta_map.
Referenced by FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdeta_map[p](2); }
Definition at line 733 of file fe_base.h.
References FEBase::dxyzdxi_map.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::compute_single_point_map().
{ return dxyzdxi_map[p](2); }
Definition at line 775 of file fe_base.h.
References FEBase::dxyzdzeta_map.
Referenced by FEBase::compute_single_point_map().
{ return dxyzdzeta_map[p](2); }
Implements FEBase.
Definition at line 99 of file inf_fe_boundary.C.
{
// We don't do this for 1D elements!
//libmesh_assert (Dim != 1);
std::cerr << 'ERROR: Edge conditions for infinite elements '
<< 'not implemented!' << std::endl;
libmesh_error();
}
Specialized for T_radial=INFINITE_MAP, this function returns the value of the $ i^{th} $ mapping shape function in radial direction evaluated at v. 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.
Definition at line 29 of file inf_fe_jacobi_20_00_eval.C.
Referenced by InfFE< Dim, T_radial, T_map >::compute_data(), InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), InfFE< Dim, T_radial, T_map >::inverse_map(), and InfFE< Dim, T_radial, T_map >::shape().
{
libmesh_assert (-1.-1.e-5 <= v && v < 1.);
switch (i)
{
case 0:
return 1.;
case 1:
return 2.+2.*v;
case 2:
return -1.25+(2.5+3.75*v)*v;
case 3:
return .25+(-1.5+(5.25+7.*v)*v)*v;
case 4:
return -.875+(-3.5+(-5.25+(10.5+13.125*v)*v)*v)*v;
case 5:
return 1.625+(1.25+(-11.25+(-15.+(20.625+24.75*v)*v)*v)*v)*v;
case 6:
return -1.078125+(4.21875+(6.328125+(-30.9375+(-38.671875+(40.21875+46.921875*v)*v)*v)*v)*v)*v;
case 7:
return .453125+(-1.09375+(18.046875+(24.0625+(-78.203125+(-93.84375+(78.203125+89.375*v)*v)*v)*v)*v)*v)*v;
case 8:
return -.9453125+(-4.8125+(-7.21875+(62.5625+(78.203125+(-187.6875+(-218.96875+(151.9375+170.9296875*v)*v)*v)*v)*v)*v)*v)*v;
case 9:
return 1.4921875+(.984375+(-25.59375+(-34.125+(191.953125+(230.34375+(-435.09375+(-497.25+(295.2421875+328.046875*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 10:
return -1.041015625+(5.33203125+(7.998046875+(-106.640625+(-133.30078125+(543.8671875+(634.51171875+(-984.140625+(-1107.158203125+(574.08203125+631.490234375*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 11:
return .548828125+(-.90234375+(33.837890625+(45.1171875+(-383.49609375+(-460.1953125+(1457.28515625+(1665.46875+(-2185.927734375+(-2428.80859375+(1117.251953125+1218.8203125*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 12:
return -.9677734375+(-5.80078125+(-8.701171875+(164.35546875+(205.4443359375+(-1249.1015625+(-1457.28515625+(3747.3046875+(4215.7177734375+(-4788.22265625+(-5267.044921875+(2176.46484375+2357.8369140625*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 13:
return 1.418945312499432+(.837890625+(-42.732421875+(-56.9765625+(676.5966796875+(811.9160156249999+(-3788.94140625+(-4330.21875+(9337.0341796875+(10374.482421875+(-10374.482421875+(-11317.6171875+(4244.1064453125+4570.576171875*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 14:
return -1.02618408203125+(6.2318115234375+(9.34771728515625+(-236.808837890625+(-296.0110473632813+(2486.492797851563+(2900.908264160156+(-10893.20654296875+(-12254.85736083984+(22694.18029785156+(24963.59832763672+(-22281.55883789063+(-24138.35540771484+(8284.169311523438+8875.895690917969*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 15:
return .60723876953125+(-.7855224609375+(52.23724365234375+(69.649658203125+(-1096.982116699219+(-1316.378540039063+(8410.196228027344+(9611.65283203125+(-30036.41510009766+(-33373.79455566406+(54065.54718017578+(58980.59692382813+(-47512.14752197266+(-51166.92810058594+(16185.45684814453+17264.4873046875*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 16:
return -.978179931640625+(-6.63330078125+(-9.949951171875+(325.03173828125+(406.2896728515625+(-4485.43798828125+(-5233.010986328125+(26699.03564453125+(30036.41510009766+(-80097.10693359375+(-88106.81762695313+(126699.0600585938+(137257.3150634766+(-100709.5092773438+(-107903.0456542969+(31651.56005859375+33629.78256225586*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 17:
return 1.370941162109141+(.74188232421875+(-62.31811523437499+(-83.0908203125+(1672.202758789063+(2006.643310546875+(-16722.02758789063+(-19110.888671875+(80624.06158447266+(89582.29064941406+(-207830.9143066406+(-226724.6337890625+(292852.6519775391+(315379.7790527344+(-212398.6267089844+(-226558.53515625+(61949.5994567871+65593.69354248047*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 18:
return -1.018547058106322+(7.010787963867187+(10.51618194580078+(-429.9949951171874+(-537.4937438964844+(7524.91241455078+(8779.064483642578+(-58049.32434082031+(-65305.48988342284+(233809.7785949707+(257190.7564544677+(-527134.7735595703+(-571062.6713562012+(669055.6741333008+(716845.3651428223+(-446037.1160888671+(-473914.4358444213+(121348.3330535889+128089.9071121216*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
default:
std::cerr << 'bad index i = ' << i << std::endl;
libmesh_error();
}
// we never end up here.
return 0.;
}
Definition at line 108 of file inf_fe_jacobi_20_00_eval.C.
Referenced by InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), and InfFE< Dim, T_radial, T_map >::inverse_map().
{
libmesh_assert (-1.-1.e-5 <= v && v < 1.);
switch (i)
{
case 0:
return 0.;
case 1:
return 2.;
case 2:
return 7.5*v+2.5;
case 3:
return -1.5+(10.5+21.*v)*v;
case 4:
return -3.5+(-10.5+(31.5+52.5*v)*v)*v;
case 5:
return 1.25+(-22.5+(-45.+(82.5+123.75*v)*v)*v)*v;
case 6:
return 4.21875+(12.65625+(-92.8125+(-154.6875+(201.09375+281.53125*v)*v)*v)*v)*v;
case 7:
return -1.09375+(36.09375+(72.1875+(-312.8125+(-469.21875+(469.21875+625.625*v)*v)*v)*v)*v)*v;
case 8:
return -4.8125+(-14.4375+(187.6875+(312.8125+(-938.4375+(-1313.8125+(1063.5625+1367.4375*v)*v)*v)*v)*v)*v)*v;
case 9:
return .984375+(-51.1875+(-102.375+(767.8125+(1151.71875+(-2610.5625+(-3480.75+(2361.9375+2952.421875*v)*v)*v)*v)*v)*v)*v)*v;
case 10:
return 5.33203125+(15.99609375+(-319.921875+(-533.203125+(2719.3359375+(3807.0703125+(-6888.984375+(-8857.265625+(5166.73828125+6314.90234375*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 11:
return -.90234375+(67.67578125+(135.3515625+(-1533.984375+(-2300.9765625+(8743.7109375+(11658.28125+(-17487.421875+(-21859.27734375+(11172.51953125+13407.0234375*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 12:
return -5.80078125+(-17.40234375+(493.06640625+(821.77734375+(-6245.5078125+(-8743.7109375+(26231.1328125+(33725.7421875+(-43094.00390625+(-52670.44921875+(23941.11328125+28294.04296875*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 13:
return .837890625+(-85.46484375+(-170.9296875+(2706.38671875+(4059.580078124999+(-22733.6484375+(-30311.53125+(74696.2734375+(93370.341796875+(-103744.82421875+(-124493.7890625+(50929.27734375+59417.490234375*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 14:
return 6.2318115234375+(18.6954345703125+(-710.426513671875+(-1184.044189453125+(12432.46398925781+(17405.44958496094+(-76252.44580078125+(-98038.85888671875+(204247.6226806641+(249635.9832763672+(-245097.1472167969+(-289660.2648925781+(107694.2010498047+124262.5396728516*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 15:
return -.7855224609375+(104.4744873046875+(208.948974609375+(-4387.928466796875+(-6581.892700195313+(50461.17736816406+(67281.56982421875+(-240291.3208007813+(-300364.1510009766+(540655.4718017578+(648786.5661621094+(-570145.7702636719+(-665170.0653076172+(226596.3958740234+258967.3095703125*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 16:
return -6.63330078125+(-19.89990234375+(975.09521484375+(1625.15869140625+(-22427.18994140625+(-31398.06591796875+(186893.2495117188+(240291.3208007813+(-720873.9624023438+(-881068.1762695313+(1393689.660644531+(1647087.780761719+(-1309223.620605469+(-1510642.639160156+(474773.4008789063+538076.5209960938*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 17:
return .74188232421875+(-124.63623046875+(-249.2724609375+(6688.81103515625+(10033.21655273437+(-100332.1655273438+(-133776.220703125+(644992.4926757813+(806240.6158447266+(-2078309.143066406+(-2493970.971679688+(3514231.823730469+(4099937.127685547+(-2973580.773925781+(-3398378.02734375+(991193.5913085936+1115092.790222168*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
case 18:
return 7.010787963867187+(21.03236389160156+(-1289.984985351562+(-2149.974975585938+(37624.5620727539+(52674.38690185547+(-406345.2703857421+(-522443.9190673828+(2104288.007354736+(2571907.564544677+(-5798482.509155273+(-6852752.056274414+(8697723.76373291+(10035835.11199951+(-6690556.741333007+(-7582630.973510741+(2062921.66191101+2305618.328018188*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v)*v;
default:
std::cerr << 'bad index i = ' << i << std::endl;
libmesh_error();
}
// we never end up here.
return 0.;
}
Implements FEBase.
Definition at line 339 of file inf_fe.h.
References libMeshEnums::C_ZERO.
{ return C_ZERO; } // FIXME - is this true??
Definition at line 539 of file fe_base.h.
References FEBase::curvatures.
{ return curvatures;}
Definition at line 300 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phi.
Referenced by ExactErrorEstimator::find_squared_element_error().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phi; }
Definition at line 308 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidx2.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidx2; }
Definition at line 316 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidxdy.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidxdy; }
Definition at line 324 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidxdz.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidxdz; }
Definition at line 332 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidy2.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidy2; }
Definition at line 340 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidydz.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidydz; }
Definition at line 348 of file fe_base.h.
References FEBase::calculate_d2phi, FEBase::calculations_started, and FEBase::d2phidz2.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = true; return d2phidz2; }
Definition at line 384 of file fe_base.h.
References FEBase::d2xyzdeta2_map.
{ return d2xyzdeta2_map; }
Definition at line 414 of file fe_base.h.
References FEBase::d2xyzdetadzeta_map.
{ return d2xyzdetadzeta_map; }
Definition at line 378 of file fe_base.h.
References FEBase::d2xyzdxi2_map.
{ return d2xyzdxi2_map; }
Definition at line 400 of file fe_base.h.
References FEBase::d2xyzdxideta_map.
{ return d2xyzdxideta_map; }
Definition at line 408 of file fe_base.h.
References FEBase::d2xyzdxidzeta_map.
{ return d2xyzdxidzeta_map; }
Definition at line 392 of file fe_base.h.
References FEBase::d2xyzdzeta2_map.
{ return d2xyzdzeta2_map; }
Definition at line 444 of file fe_base.h.
References FEBase::detadx_map.
{ return detadx_map; }
Definition at line 451 of file fe_base.h.
References FEBase::detady_map.
{ return detady_map; }
Definition at line 458 of file fe_base.h.
References FEBase::detadz_map.
{ return detadz_map; }
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 returns correct element matrices for a mesh using both finite and infinite elements.
Definition at line 494 of file fe_base.h.
References FEBase::dphase.
{ return dphase; }
Definition at line 242 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphi.
Referenced by ExactErrorEstimator::find_squared_element_error().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphi; }
Definition at line 282 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphideta.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphideta; }
Definition at line 250 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphidx.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphidx; }
Definition at line 274 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphidxi.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphidxi; }
Definition at line 258 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphidy.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphidy; }
Definition at line 266 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphidz.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphidz; }
Definition at line 290 of file fe_base.h.
References FEBase::calculate_dphi, FEBase::calculations_started, and FEBase::dphidzeta.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = true; return dphidzeta; }
Definition at line 423 of file fe_base.h.
References FEBase::dxidx_map.
{ return dxidx_map; }
Definition at line 430 of file fe_base.h.
References FEBase::dxidy_map.
{ return dxidy_map; }
Definition at line 437 of file fe_base.h.
References FEBase::dxidz_map.
{ return dxidz_map; }
Definition at line 365 of file fe_base.h.
References FEBase::dxyzdeta_map.
{ return dxyzdeta_map; }
Definition at line 358 of file fe_base.h.
References FEBase::dxyzdxi_map.
{ return dxyzdxi_map; }
Definition at line 372 of file fe_base.h.
References FEBase::dxyzdzeta_map.
{ return dxyzdzeta_map; }
Definition at line 465 of file fe_base.h.
References FEBase::dzetadx_map.
{ return dzetadx_map; }
Definition at line 472 of file fe_base.h.
References FEBase::dzetady_map.
{ return dzetady_map; }
Definition at line 479 of file fe_base.h.
References FEBase::dzetadz_map.
{ return dzetadz_map; }
Definition at line 598 of file fe_base.h.
References FEType::family, and FEBase::fe_type.
{ return fe_type.family; }
Definition at line 577 of file fe_base.h.
References FEBase::fe_type.
{ return fe_type; }
Definition at line 45 of file reference_counter.C.
References ReferenceCounter::_counts, and Quality::name().
Referenced by ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream out;
out << '
<< ' ----------------------------------------------------------------------------
<< '| Reference count information |
<< ' ---------------------------------------------------------------------------- ;
for (Counts::iterator it = _counts.begin();
it != _counts.end(); ++it)
{
const std::string name(it->first);
const unsigned int creations = it->second.first;
const unsigned int destructions = it->second.second;
out << '| ' << name << ' reference count information:
<< '| Creations: ' << creations << '
<< '| Destructions: ' << destructions << ';
}
out << ' ---------------------------------------------------------------------------- ;
return out.str();
#else
return '';
#endif
}
Definition at line 235 of file fe_base.h.
References FEBase::JxW.
Referenced by ExactErrorEstimator::find_squared_element_error().
{ return JxW; }
Definition at line 533 of file fe_base.h.
References FEBase::normals.
{ return normals; }
Definition at line 582 of file fe_base.h.
References FEBase::_p_level, FEBase::fe_type, and FEType::order.
{ return static_cast<Order>(fe_type.order + _p_level); }
Definition at line 572 of file fe_base.h.
References FEBase::_p_level.
Referenced by REINIT_ERROR().
{ return _p_level; }
Definition at line 227 of file fe_base.h.
References FEBase::calculate_phi, FEBase::calculations_started, and FEBase::phi.
Referenced by ExactErrorEstimator::find_squared_element_error().
{ libmesh_assert(!calculations_started || calculate_phi);
calculate_phi = true; return phi; }
Definition at line 518 of file fe_base.h.
References FEBase::dweight.
{ return dweight; }
In case of the general finite element class FE this field is initialized to all ones, so that the variational formulation for an infinite element returns correct element matrices for a mesh using both finite and infinite elements.
Definition at line 510 of file fe_base.h.
References FEBase::weight.
{ return weight; }
Definition at line 527 of file fe_base.h.
References FEBase::tangents.
{ return tangents; }
Definition at line 566 of file fe_base.h.
References FEBase::elem_type.
Referenced by FE< Dim, T >::edge_reinit(), InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
{ return elem_type; }
Definition at line 220 of file fe_base.h.
References FEBase::xyz.
Referenced by ExactErrorEstimator::find_squared_element_error().
{ return xyz; }
Definition at line 149 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.first++;
}
Definition at line 167 of file reference_counter.h.
References ReferenceCounter::_counts, Quality::name(), and Threads::spin_mtx.
Referenced by ReferenceCountedObject< Value >::~ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.second++;
}
Implements FEBase.
Definition at line 501 of file inf_fe.h.
{ libmesh_error(); }
Definition at line 115 of file inf_fe_boundary.C.
References InfFE< Dim, T_radial, T_map >::_base_node_index, InfFE< Dim, T_radial, T_map >::_radial_node_index, InfFE< Dim, T_radial, T_map >::_total_qrule_weights, FEBase::attach_quadrature_rule(), InfFE< Dim, T_radial, T_map >::base_elem, InfFE< Dim, T_radial, T_map >::base_fe, InfFE< Dim, T_radial, T_map >::base_qrule, FEBase::build(), InfFE< Dim, T_radial, T_map >::compute_node_indices(), FEBase::d2psideta2_map, FEBase::d2psidxi2_map, FEBase::d2psidxideta_map, Elem::default_order(), FEBase::dphidxi_map, FEBase::dpsideta_map, FEBase::dpsidxi_map, InfFE< Dim, T_radial, T_map >::dradialdv_map, FEBase::fe_type, QBase::get_points(), QBase::get_weights(), QBase::init(), FEBase::init_base_shape_functions(), InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), InfFE< Dim, T_radial, T_map >::Base::n_base_mapping_sf(), QBase::n_points(), Elem::p_level(), FEBase::phi_map, FEBase::psi_map, FEBase::qrule, InfFE< Dim, T_radial, T_map >::radial_map, InfFE< Dim, T_radial, T_map >::radial_qrule, AutoPtr< Tp >::release(), InfFE< Dim, T_radial, T_map >::som, Elem::type(), and InfFE< Dim, T_radial, T_map >::update_base_elem().
Referenced by InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
{
libmesh_assert (inf_side != NULL);
// Currently, this makes only sense in 3-D!
libmesh_assert (Dim == 3);
// Initialiize the radial shape functions
this->init_radial_shape_functions(inf_side);
// Initialize the base shape functions
this->update_base_elem(inf_side);
// Initialize the base quadratur rule
base_qrule->init(base_elem->type(), inf_side->p_level());
// base_fe still corresponds to the (dim-1)-dimensional base of the InfFE object,
// so update the fe_base.
{
libmesh_assert (Dim == 3);
AutoPtr<FEBase> ap_fb(FEBase::build(Dim-2, this->fe_type));
if (base_fe != NULL)
delete base_fe;
base_fe = ap_fb.release();
base_fe->attach_quadrature_rule(base_qrule);
}
// initialize the shape functions on the base
base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
base_elem);
// the number of quadratur points
const unsigned int n_radial_qp = som.size();
const unsigned int n_base_qp = base_qrule->n_points();
const unsigned int n_total_qp = n_radial_qp * n_base_qp;
// the quadratur weigths
_total_qrule_weights.resize(n_total_qp);
// now inite the shapes for boundary work
{
// The element type and order to use in the base map
const Order base_mapping_order ( base_elem->default_order() );
const ElemType base_mapping_elem_type ( base_elem->type() );
// the number of mapping shape functions
// (Lagrange shape functions are used for mapping in the base)
const unsigned int n_radial_mapping_sf = radial_map.size();
const unsigned int n_base_mapping_shape_functions = Base::n_base_mapping_sf(base_mapping_elem_type,
base_mapping_order);
const unsigned int n_total_mapping_shape_functions =
n_radial_mapping_sf * n_base_mapping_shape_functions;
// initialize the node and shape numbering maps
{
_radial_node_index.resize (n_total_mapping_shape_functions);
_base_node_index.resize (n_total_mapping_shape_functions);
const ElemType inf_face_elem_type (inf_side->type());
// fill the node index map
for (unsigned int n=0; n<n_total_mapping_shape_functions; n++)
{
compute_node_indices (inf_face_elem_type,
n,
_base_node_index[n],
_radial_node_index[n]);
libmesh_assert (_base_node_index[n] < n_base_mapping_shape_functions);
libmesh_assert (_radial_node_index[n] < n_radial_mapping_sf);
}
}
// rezise map data fields
{
psi_map.resize (n_total_mapping_shape_functions);
dpsidxi_map.resize (n_total_mapping_shape_functions);
d2psidxi2_map.resize (n_total_mapping_shape_functions);
// if (Dim == 3)
{
dpsideta_map.resize (n_total_mapping_shape_functions);
d2psidxideta_map.resize (n_total_mapping_shape_functions);
d2psideta2_map.resize (n_total_mapping_shape_functions);
}
for (unsigned int i=0; i<n_total_mapping_shape_functions; i++)
{
psi_map[i].resize (n_total_qp);
dpsidxi_map[i].resize (n_total_qp);
d2psidxi2_map[i].resize (n_total_qp);
// if (Dim == 3)
{
dpsideta_map[i].resize (n_total_qp);
d2psidxideta_map[i].resize (n_total_qp);
d2psideta2_map[i].resize (n_total_qp);
}
}
}
// compute shape maps
{
const std::vector<std::vector<Real> >& S_map = base_fe->phi_map;
const std::vector<std::vector<Real> >& Ss_map = base_fe->dphidxi_map;
for (unsigned int rp=0; rp<n_radial_qp; rp++) // over radial qp's
for (unsigned int bp=0; bp<n_base_qp; bp++) // over base qp's
for (unsigned int ti=0; ti<n_total_mapping_shape_functions; ti++) // over all mapping shapes
{
// let the index vectors take care of selecting the appropriate base/radial mapping shape
const unsigned int bi = _base_node_index [ti];
const unsigned int ri = _radial_node_index[ti];
psi_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * radial_map [ri][rp];
dpsidxi_map [ti][bp+rp*n_base_qp] = Ss_map[bi][bp] * radial_map [ri][rp];
dpsideta_map [ti][bp+rp*n_base_qp] = S_map [bi][bp] * dradialdv_map[ri][rp];
// second derivatives are not implemented for infinite elements
// d2psidxi2_map [ti][bp+rp*n_base_qp] = 0.;
// d2psidxideta_map [ti][bp+rp*n_base_qp] = 0.;
// d2psideta2_map [ti][bp+rp*n_base_qp] = 0.;
}
}
}
// quadrature rule weights
{
const std::vector<Real>& radial_qw = radial_qrule->get_weights();
const std::vector<Real>& base_qw = base_qrule->get_weights();
libmesh_assert (radial_qw.size() == n_radial_qp);
libmesh_assert (base_qw.size() == n_base_qp);
for (unsigned int rp=0; rp<n_radial_qp; rp++)
for (unsigned int bp=0; bp<n_base_qp; bp++)
{
_total_qrule_weights[ bp+rp*n_base_qp ] = radial_qw[rp] * base_qw[bp];
}
}
}
Start logging the radial shape function initialization
Stop logging the radial shape function initialization
Definition at line 284 of file inf_fe.C.
References InfFE< Dim, T_radial, T_map >::eval(), and InfFE< Dim, T_radial, T_map >::eval_deriv().
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
{
libmesh_assert (radial_qrule != NULL);
libmesh_assert (inf_elem != NULL);
START_LOG('init_radial_shape_functions()', 'InfFE');
// -----------------------------------------------------------------
// initialize most of the things related to mapping
// The order to use in the radial map (currently independent of the element type)
const Order radial_mapping_order (Radial::mapping_order());
const unsigned int n_radial_mapping_shape_functions (Radial::n_dofs(radial_mapping_order));
// -----------------------------------------------------------------
// initialize most of the things related to physical approximation
const Order radial_approx_order (fe_type.radial_order);
const unsigned int n_radial_approx_shape_functions (Radial::n_dofs(radial_approx_order));
const unsigned int n_radial_qp = radial_qrule->n_points();
const std::vector<Point>& radial_qp = radial_qrule->get_points();
// -----------------------------------------------------------------
// resize the radial data fields
mode.resize (n_radial_approx_shape_functions); // the radial polynomials (eval)
dmodedv.resize (n_radial_approx_shape_functions);
som.resize (n_radial_qp); // the (1-v)/2 weight
dsomdv.resize (n_radial_qp);
radial_map.resize (n_radial_mapping_shape_functions); // the radial map
dradialdv_map.resize (n_radial_mapping_shape_functions);
for (unsigned int i=0; i<n_radial_mapping_shape_functions; i++)
{
radial_map[i].resize (n_radial_qp);
dradialdv_map[i].resize (n_radial_qp);
}
for (unsigned int i=0; i<n_radial_approx_shape_functions; i++)
{
mode[i].resize (n_radial_qp);
dmodedv[i].resize (n_radial_qp);
}
// compute scalar values at radial quadrature points
for (unsigned int p=0; p<n_radial_qp; p++)
{
som[p] = Radial::decay (radial_qp[p](0));
dsomdv[p] = Radial::decay_deriv (radial_qp[p](0));
}
// evaluate the mode shapes in radial direction at radial quadrature points
for (unsigned int i=0; i<n_radial_approx_shape_functions; i++)
for (unsigned int p=0; p<n_radial_qp; p++)
{
mode[i][p] = InfFE<Dim,T_radial,T_map>::eval (radial_qp[p](0), radial_approx_order, i);
dmodedv[i][p] = InfFE<Dim,T_radial,T_map>::eval_deriv (radial_qp[p](0), radial_approx_order, i);
}
// evaluate the mapping functions in radial direction at radial quadrature points
for (unsigned int i=0; i<n_radial_mapping_shape_functions; i++)
for (unsigned int p=0; p<n_radial_qp; p++)
{
radial_map[i][p] = InfFE<Dim,INFINITE_MAP,T_map>::eval (radial_qp[p](0), radial_mapping_order, i);
dradialdv_map[i][p] = InfFE<Dim,INFINITE_MAP,T_map>::eval_deriv (radial_qp[p](0), radial_mapping_order, i);
}
STOP_LOG('init_radial_shape_functions()', 'InfFE');
}
Stop logging the radial shape function initialization
Definition at line 380 of file inf_fe.C.
References Elem::type(), and MeshTools::weight().
{
libmesh_assert (inf_elem != NULL);
// Start logging the radial shape function initialization
START_LOG('init_shape_functions()', 'InfFE');
// -----------------------------------------------------------------
// fast access to some const int's for the radial data
const unsigned int n_radial_mapping_sf = radial_map.size();
const unsigned int n_radial_approx_sf = mode.size();
const unsigned int n_radial_qp = som.size();
// -----------------------------------------------------------------
// initialize most of the things related to mapping
// The element type and order to use in the base map
const Order base_mapping_order ( base_elem->default_order() );
const ElemType base_mapping_elem_type ( base_elem->type() );
// the number of base shape functions used to construct the map
// (Lagrange shape functions are used for mapping in the base)
unsigned int n_base_mapping_shape_functions = Base::n_base_mapping_sf(base_mapping_elem_type,
base_mapping_order);
const unsigned int n_total_mapping_shape_functions =
n_radial_mapping_sf * n_base_mapping_shape_functions;
// -----------------------------------------------------------------
// initialize most of the things related to physical approximation
unsigned int n_base_approx_shape_functions;
if (Dim > 1)
n_base_approx_shape_functions = base_fe->n_shape_functions();
else
n_base_approx_shape_functions = 1;
const unsigned int n_total_approx_shape_functions =
n_radial_approx_sf * n_base_approx_shape_functions;
// update class member field
_n_total_approx_sf = n_total_approx_shape_functions;
// The number of the base quadrature points.
const unsigned int n_base_qp = base_qrule->n_points();
// The total number of quadrature points.
const unsigned int n_total_qp = n_radial_qp * n_base_qp;
// update class member field
_n_total_qp = n_total_qp;
// -----------------------------------------------------------------
// initialize the node and shape numbering maps
{
// these vectors work as follows: the i-th entry stores
// the associated base/radial node number
_radial_node_index.resize (n_total_mapping_shape_functions);
_base_node_index.resize (n_total_mapping_shape_functions);
// similar for the shapes: the i-th entry stores
// the associated base/radial shape number
_radial_shape_index.resize (n_total_approx_shape_functions);
_base_shape_index.resize (n_total_approx_shape_functions);
const ElemType inf_elem_type (inf_elem->type());
// fill the node index map
for (unsigned int n=0; n<n_total_mapping_shape_functions; n++)
{
compute_node_indices (inf_elem_type,
n,
_base_node_index[n],
_radial_node_index[n]);
libmesh_assert (_base_node_index[n] < n_base_mapping_shape_functions);
libmesh_assert (_radial_node_index[n] < n_radial_mapping_sf);
}
// fill the shape index map
for (unsigned int n=0; n<n_total_approx_shape_functions; n++)
{
compute_shape_indices (this->fe_type,
inf_elem_type,
n,
_base_shape_index[n],
_radial_shape_index[n]);
libmesh_assert (_base_shape_index[n] < n_base_approx_shape_functions);
libmesh_assert (_radial_shape_index[n] < n_radial_approx_sf);
}
}
// -----------------------------------------------------------------
// resize the base data fields
dist.resize(n_base_mapping_shape_functions);
// -----------------------------------------------------------------
// resize the total data fields
// the phase term varies with xi, eta and zeta(v): store it for _all_ qp
//
// when computing the phase, we need the base approximations
// therefore, initialize the phase here, but evaluate it
// in combine_base_radial().
//
// the weight, though, is only needed at the radial quadrature points, n_radial_qp.
// but for a uniform interface to the protected data fields
// the weight data field (which are accessible from the outside) are expanded to n_total_qp.
weight.resize (n_total_qp);
dweightdv.resize (n_total_qp);
dweight.resize (n_total_qp);
dphase.resize (n_total_qp);
dphasedxi.resize (n_total_qp);
dphasedeta.resize (n_total_qp);
dphasedzeta.resize (n_total_qp);
// this vector contains the integration weights for the combined quadrature rule
_total_qrule_weights.resize(n_total_qp);
// -----------------------------------------------------------------
// InfFE's data fields phi, dphi, dphidx, phi_map etc hold the _total_
// shape and mapping functions, respectively
{
phi.resize (n_total_approx_shape_functions);
dphi.resize (n_total_approx_shape_functions);
dphidx.resize (n_total_approx_shape_functions);
dphidy.resize (n_total_approx_shape_functions);
dphidz.resize (n_total_approx_shape_functions);
dphidxi.resize (n_total_approx_shape_functions);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
static bool warning_given = false;
if (!warning_given)
std::cerr << 'Second derivatives for Infinite elements'
<< ' are not yet implemented!'
<< std::endl;
d2phi.resize (n_total_approx_shape_functions);
d2phidx2.resize (n_total_approx_shape_functions);
d2phidxdy.resize (n_total_approx_shape_functions);
d2phidxdz.resize (n_total_approx_shape_functions);
d2phidy2.resize (n_total_approx_shape_functions);
d2phidydz.resize (n_total_approx_shape_functions);
d2phidz2.resize (n_total_approx_shape_functions);
d2phidxi2.resize (n_total_approx_shape_functions);
if (Dim > 1)
{
d2phidxideta.resize (n_total_approx_shape_functions);
d2phideta2.resize (n_total_approx_shape_functions);
}
if (Dim > 2)
{
d2phidetadzeta.resize (n_total_approx_shape_functions);
d2phidxidzeta.resize (n_total_approx_shape_functions);
d2phidzeta2.resize (n_total_approx_shape_functions);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (Dim > 1)
dphideta.resize (n_total_approx_shape_functions);
if (Dim == 3)
dphidzeta.resize (n_total_approx_shape_functions);
phi_map.resize (n_total_mapping_shape_functions);
dphidxi_map.resize (n_total_mapping_shape_functions);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2phidxi2_map.resize (n_total_mapping_shape_functions);
if (Dim > 1)
{
d2phidxideta_map.resize (n_total_mapping_shape_functions);
d2phideta2_map.resize (n_total_mapping_shape_functions);
}
if (Dim == 3)
{
d2phidxidzeta_map.resize (n_total_mapping_shape_functions);
d2phidetadzeta_map.resize (n_total_mapping_shape_functions);
d2phidzeta2_map.resize (n_total_mapping_shape_functions);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (Dim > 1)
dphideta_map.resize (n_total_mapping_shape_functions);
if (Dim == 3)
dphidzeta_map.resize (n_total_mapping_shape_functions);
}
// -----------------------------------------------------------------
// collect all the for loops, where inner vectors are
// resized to the appropriate number of quadrature points
{
for (unsigned int i=0; i<n_total_approx_shape_functions; i++)
{
phi[i].resize (n_total_qp);
dphi[i].resize (n_total_qp);
dphidx[i].resize (n_total_qp);
dphidy[i].resize (n_total_qp);
dphidz[i].resize (n_total_qp);
dphidxi[i].resize (n_total_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2phi[i].resize (n_total_qp);
d2phidx2[i].resize (n_total_qp);
d2phidxdy[i].resize (n_total_qp);
d2phidxdz[i].resize (n_total_qp);
d2phidy2[i].resize (n_total_qp);
d2phidydz[i].resize (n_total_qp);
d2phidy2[i].resize (n_total_qp);
d2phidxi2[i].resize (n_total_qp);
if (Dim > 1)
{
d2phidxideta[i].resize (n_total_qp);
d2phideta2[i].resize (n_total_qp);
}
if (Dim > 2)
{
d2phidxidzeta[i].resize (n_total_qp);
d2phidetadzeta[i].resize (n_total_qp);
d2phidzeta2[i].resize (n_total_qp);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (Dim > 1)
dphideta[i].resize (n_total_qp);
if (Dim == 3)
dphidzeta[i].resize (n_total_qp);
}
for (unsigned int i=0; i<n_total_mapping_shape_functions; i++)
{
phi_map[i].resize (n_total_qp);
dphidxi_map[i].resize (n_total_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2phidxi2_map[i].resize (n_total_qp);
if (Dim > 1)
{
d2phidxideta_map[i].resize (n_total_qp);
d2phideta2_map[i].resize (n_total_qp);
}
if (Dim > 2)
{
d2phidxidzeta_map[i].resize (n_total_qp);
d2phidetadzeta_map[i].resize (n_total_qp);
d2phidzeta2_map[i].resize (n_total_qp);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (Dim > 1)
dphideta_map[i].resize (n_total_qp);
if (Dim == 3)
dphidzeta_map[i].resize (n_total_qp);
}
}
{
// -----------------------------------------------------------------
// (a) compute scalar values at _all_ quadrature points -- for uniform
// access from the outside to these fields
// (b) form a std::vector<Real> which contains the appropriate weights
// of the combined quadrature rule!
const std::vector<Point>& radial_qp = radial_qrule->get_points();
libmesh_assert (radial_qp.size() == n_radial_qp);
const std::vector<Real>& radial_qw = radial_qrule->get_weights();
const std::vector<Real>& base_qw = base_qrule->get_weights();
libmesh_assert (radial_qw.size() == n_radial_qp);
libmesh_assert (base_qw.size() == n_base_qp);
for (unsigned int rp=0; rp<n_radial_qp; rp++)
for (unsigned int bp=0; bp<n_base_qp; bp++)
{
weight [ bp+rp*n_base_qp ] = Radial::D (radial_qp[rp](0));
dweightdv[ bp+rp*n_base_qp ] = Radial::D_deriv (radial_qp[rp](0));
_total_qrule_weights[ bp+rp*n_base_qp ] = radial_qw[rp] * base_qw[bp];
}
}
STOP_LOG('init_shape_functions()', 'InfFE');
}
The number of iterations in the map inversion process.
Newton iteration loop.
Definition at line 88 of file inf_fe_map.C.
References TypeVector< T >::add(), TypeVector< T >::add_scaled(), InfFE< Dim, T_radial, T_map >::base_elem, InfFE< Dim, T_radial, T_map >::Base::build_elem(), InfFE< Dim, T_radial, T_map >::eval(), InfFE< Dim, T_radial, T_map >::eval_deriv(), AutoPtr< Tp >::get(), libMeshEnums::INFHEX8, libMeshEnums::INFPRISM6, FE< Dim, T >::map(), FE< Dim, T >::map_eta(), FE< Dim, T >::map_xi(), InfFE< Dim, T_radial, T_map >::Radial::mapping_order(), InfFE< Dim, T_radial, T_map >::Base::n_base_mapping_sf(), Elem::origin(), Elem::point(), FE< Dim, T >::shape(), TypeVector< T >::size(), and Elem::type().
Referenced by FEBase::compute_face_map(), FE< Dim, T >::edge_reinit(), InfFE< Dim, T_radial, T_map >::reinit(), REINIT_ERROR(), and JumpErrorEstimator::reinit_sides().
{
libmesh_assert (inf_elem != NULL);
libmesh_assert (tolerance >= 0.);
// Start logging the map inversion.
START_LOG('inverse_map()', 'InfFE');
// 1.)
// build a base element to do the map inversion in the base face
AutoPtr<Elem> base_elem (Base::build_elem (inf_elem));
const Order base_mapping_order (base_elem->default_order());
const ElemType base_mapping_elem_type (base_elem->type());
const unsigned int n_base_mapping_sf = Base::n_base_mapping_sf (base_mapping_elem_type,
base_mapping_order);
const ElemType inf_elem_type = inf_elem->type();
if (inf_elem_type != INFHEX8 &&
inf_elem_type != INFPRISM6)
{
std::cerr << 'ERROR: InfFE::inverse_map is currently implemented only for
<< ' infinite elments of type InfHex8 and InfPrism6.' << std::endl;
libmesh_error();
}
// 2.)
// just like in FE<Dim-1,LAGRANGE>::inverse_map(): compute
// the local coordinates, but only in the base element.
// The radial part can then be computed directly later on.
// How much did the point on the reference
// element change by in this Newton step?
Real inverse_map_error = 0.;
// The point on the reference element. This is
// the 'initial guess' for Newton's method. The
// centroid seems like a good idea, but computing
// it is a little more intensive than, say taking
// the zero point.
//
// Convergence should be insensitive of this choice
// for 'good' elements.
Point p; // the zero point. No computation required
// Now find the intersection of a plane represented by the base
// element nodes and the line given by the origin of the infinite
// element and the physical point.
Point intersection;
// the origin of the infinite lement
const Point o = inf_elem->origin();
switch (Dim)
{
// unnecessary for 1D
case 1:
{
break;
}
case 2:
{
std::cerr << 'ERROR: InfFE::inverse_map is not yet implemented'
<< ' in 2d' << std::endl;
libmesh_error();
break;
}
case 3:
{
// references to the nodal points of the base element
const Point& p0 = base_elem->point(0);
const Point& p1 = base_elem->point(1);
const Point& p2 = base_elem->point(2);
// a reference to the physical point
const Point& fp = physical_point;
// The intersection of the plane and the line is given by
// can be computed solving a linear 3x3 system
// a*({p1}-{p0})+b*({p2}-{p0})-c*({fp}-{o})={fp}-{p0}.
const Real c_factor = -(p1(0)*fp(1)*p0(2)-p1(0)*fp(2)*p0(1)
+fp(0)*p1(2)*p0(1)-p0(0)*fp(1)*p1(2)
+p0(0)*fp(2)*p1(1)+p2(0)*fp(2)*p0(1)
-p2(0)*fp(1)*p0(2)-fp(0)*p2(2)*p0(1)
+fp(0)*p0(2)*p2(1)+p0(0)*fp(1)*p2(2)
-p0(0)*fp(2)*p2(1)-fp(0)*p0(2)*p1(1)
+p0(2)*p2(0)*p1(1)-p0(1)*p2(0)*p1(2)
-fp(0)*p1(2)*p2(1)+p2(1)*p0(0)*p1(2)
-p2(0)*fp(2)*p1(1)-p1(0)*fp(1)*p2(2)
+p2(2)*p1(0)*p0(1)+p1(0)*fp(2)*p2(1)
-p0(2)*p1(0)*p2(1)-p2(2)*p0(0)*p1(1)
+fp(0)*p2(2)*p1(1)+p2(0)*fp(1)*p1(2))/
(fp(0)*p1(2)*p0(1)-p1(0)*fp(2)*p0(1)
+p1(0)*fp(1)*p0(2)-p1(0)*o(1)*p0(2)
+o(0)*p2(2)*p0(1)-p0(0)*fp(2)*p2(1)
+p1(0)*o(1)*p2(2)+fp(0)*p0(2)*p2(1)
-fp(0)*p1(2)*p2(1)-p0(0)*o(1)*p2(2)
+p0(0)*fp(1)*p2(2)-o(0)*p0(2)*p2(1)
+o(0)*p1(2)*p2(1)-p2(0)*fp(2)*p1(1)
+fp(0)*p2(2)*p1(1)-p2(0)*fp(1)*p0(2)
-o(2)*p0(0)*p1(1)-fp(0)*p0(2)*p1(1)
+p0(0)*o(1)*p1(2)+p0(0)*fp(2)*p1(1)
-p0(0)*fp(1)*p1(2)-o(0)*p1(2)*p0(1)
-p2(0)*o(1)*p1(2)-o(2)*p2(0)*p0(1)
-o(2)*p1(0)*p2(1)+o(2)*p0(0)*p2(1)
-fp(0)*p2(2)*p0(1)+o(2)*p2(0)*p1(1)
+p2(0)*o(1)*p0(2)+p2(0)*fp(1)*p1(2)
+p2(0)*fp(2)*p0(1)-p1(0)*fp(1)*p2(2)
+p1(0)*fp(2)*p2(1)-o(0)*p2(2)*p1(1)
+o(2)*p1(0)*p0(1)+o(0)*p0(2)*p1(1));
// Compute the intersection with
// {intersection} = {fp} + c*({fp}-{o}).
intersection.add_scaled(fp,1.+c_factor);
intersection.add_scaled(o,-c_factor);
break;
}
}
unsigned int cnt = 0;
do
{
// Increment in current iterate
p, will be computed.
// Automatically initialized to all zero. Note that
// in 3D, actually only the first two entries are
// filled by the inverse map, and in 2D only the first.
Point dp;
// The form of the map and how we invert it depends
// on the dimension that we are in.
switch (Dim)
{
//------------------------------------------------------------------
// 1D infinite element - no map inversion necessary
case 1:
{
break;
}
//------------------------------------------------------------------
// 2D infinite element - 1D map inversion
//
// In this iteration scheme only search for the local coordinate
// in xi direction. Once xi is determined, the radial coordinate eta is
// uniquely determined, and there is no need to iterate in that direction.
case 2:
{
// Where our current iterate
p maps to.
const Point physical_guess = FE<1,LAGRANGE>::map (base_elem.get(), p);
// How far our current iterate is from the actual point.
const Point delta = physical_point - physical_guess;
const Point dxi = FE<1,LAGRANGE>::map_xi (base_elem.get(), p);
// For details on Newton's method see fe_map.C
const Real G = dxi*dxi;
if (secure)
libmesh_assert (G > 0.);
const Real Ginv = 1./G;
const Real dxidelta = dxi*delta;
// compute only the first coordinate
dp(0) = Ginv*dxidelta;
break;
}
//------------------------------------------------------------------
// 3D infinite element - 2D map inversion
//
// In this iteration scheme only search for the local coordinates
// in xi and eta direction. Once xi, eta are determined, the radial
// coordinate zeta may directly computed.
case 3:
{
// Where our current iterate
p maps to.
const Point physical_guess = FE<2,LAGRANGE>::map (base_elem.get(), p);
// How far our current iterate is from the actual point.
// const Point delta = physical_point - physical_guess;
const Point delta = intersection - physical_guess;
const Point dxi = FE<2,LAGRANGE>::map_xi (base_elem.get(), p);
const Point deta = FE<2,LAGRANGE>::map_eta (base_elem.get(), p);
// For details on Newton's method see fe_map.C
const Real
G11 = dxi*dxi, G12 = dxi*deta,
G21 = dxi*deta, G22 = deta*deta;
const Real det = (G11*G22 - G12*G21);
if (secure)
{
libmesh_assert (det > 0.);
libmesh_assert (std::abs(det) > 1.e-10);
}
const Real inv_det = 1./det;
const Real
Ginv11 = G22*inv_det,
Ginv12 = -G12*inv_det,
Ginv21 = -G21*inv_det,
Ginv22 = G11*inv_det;
const Real dxidelta = dxi*delta;
const Real detadelta = deta*delta;
// compute only the first two coordinates.
dp(0) = (Ginv11*dxidelta + Ginv12*detadelta);
dp(1) = (Ginv21*dxidelta + Ginv22*detadelta);
break;
}
// Some other dimension?
default:
libmesh_error();
} // end switch(Dim), dp now computed
// determine the error in computing the local coordinates
// in the base: ||P_n+1 - P_n||
inverse_map_error = dp.size();
// P_n+1 = P_n + dp
p.add (dp);
// Increment the iteration count.
cnt++;
// Watch for divergence of Newton's
// method.
if (cnt > 10)
{
if (secure || !secure)
{
libmesh_here();
{
std::cerr << 'WARNING: Newton scheme has not converged in '
<< cnt << ' iterations:
<< ' physical_point='
<< physical_point
<< ' dp='
<< dp
<< ' p='
<< p
<< ' error=' << inverse_map_error
<< std::endl;
}
}
if (cnt > 20)
{
std::cerr << 'ERROR: Newton scheme FAILED to converge in '
<< cnt << ' iterations!' << std::endl;
libmesh_error();
}
// else
// {
// break;
// }
}
}
while (inverse_map_error > tolerance);
// 4.
//
// Now that we have the local coordinates in the base,
// compute the interpolated radial distance a(s,t)
a_interpolated
if (interpolated)
switch (Dim)
{
case 1:
{
Real a_interpolated = Point( inf_elem->point(0)
- inf_elem->point(n_base_mapping_sf) ).size();
p(0) = 1. - 2*a_interpolated/physical_point(0);
#ifdef DEBUG
// the radial distance should always be >= -1.
if (p(0)+1 < tolerance)
{
libmesh_here();
std::cerr << 'WARNING: radial distance p(0) is '
<< p(0)
<< std::endl;
}
#endif
break;
}
case 2:
{
Real a_interpolated = 0.;
// the distance between the origin and the physical point
const Real fp_o_dist = Point(o-physical_point).size();
for (unsigned int i=0; i<n_base_mapping_sf; i++)
{
// the radial distance of the i-th base mapping point
const Real dist_i = Point( inf_elem->point(i)
- inf_elem->point(i+n_base_mapping_sf) ).size();
// weight with the corresponding shape function
a_interpolated += dist_i * FE<1,LAGRANGE>::shape(base_mapping_elem_type,
base_mapping_order,
i,
p);
}
p(1) = 1. - 2*a_interpolated/fp_o_dist;
#ifdef DEBUG
// the radial distance should always be >= -1.
// if (p(1)+1 < tolerance)
// {
// libmesh_here();
// std::cerr << 'WARNING: radial distance p(1) is '
// << p(1)
// << std::endl;
// }
#endif
break;
}
case 3:
{
Real a_interpolated = 0.;
// the distance between the origin and the physical point
const Real fp_o_dist = Point(o-physical_point).size();
for (unsigned int i=0; i<n_base_mapping_sf; i++)
{
// the radial distance of the i-th base mapping point
const Real dist_i = Point( inf_elem->point(i)
- inf_elem->point(i+n_base_mapping_sf) ).size();
// weight with the corresponding shape function
a_interpolated += dist_i * FE<2,LAGRANGE>::shape(base_mapping_elem_type,
base_mapping_order,
i,
p);
}
p(2) = 1. - 2*a_interpolated/fp_o_dist;
#ifdef DEBUG
// the radial distance should always be >= -1.
// if (p(2)+1 < tolerance)
// {
// libmesh_here();
// std::cerr << 'WARNING: radial distance p(2) is '
// << p(2)
// << std::endl;
// }
#endif
break;
}
default:
libmesh_error();
} // end switch(Dim), p fully computed, including radial part
// if we do not want the interpolated distance, then
// use newton iteration to get the actual distance
else
{
// distance from the physical point to the ifem origin
const Real fp_o_dist = Point(o-physical_point).size();
// the distance from the intersection on the
// base to the origin
const Real a_dist = intersection.size();
// element coordinate in radial direction
// here our first guess is 0.
Real v = 0.;
// the order of the radial mapping
const Order radial_mapping_order (Radial::mapping_order());
unsigned int cnt = 0;
inverse_map_error = 0.;
// Newton iteration in 1-D
do
{
// the mapping in radial direction
// note that we only have two mapping functions in
// radial direction
const Real r = a_dist * InfFE<Dim,INFINITE_MAP,T_map>::eval (v, radial_mapping_order, 0)
+ 2. * a_dist * InfFE<Dim,INFINITE_MAP,T_map>::eval (v, radial_mapping_order, 1);
const Real dr = a_dist * InfFE<Dim,INFINITE_MAP,T_map>::eval_deriv (v, radial_mapping_order, 0)
+ 2. * a_dist * InfFE<Dim,INFINITE_MAP,T_map>::eval_deriv (v, radial_mapping_order, 1);
const Real G = dr*dr;
const Real Ginv = 1./G;
const Real delta = fp_o_dist - r;
const Real drdelta = dr*delta;
Real dp = Ginv*drdelta;
// update the radial coordinate
v += dp;
// note that v should be smaller than 1,
// since radial mapping function tends to infinity
if (v >= 1.)
v = .9999;
inverse_map_error = std::fabs(dp);
// increment iteration count
cnt ++;
if (cnt > 20)
{
std::cerr << 'ERROR: 1D Newton scheme FAILED to converge'
<< std::endl;
libmesh_error();
}
}
while (inverse_map_error > tolerance);
switch (Dim)
{
case 1:
{
p(0) = v;
break;
}
case 2:
{
p(1) = v;
break;
}
case 3:
{
p(2) = v;
break;
}
default:
libmesh_error();
}
}
// If we are in debug mode do a sanity check. Make sure
// the point
p on the reference element actually does
// map to the point
physical_point within a tolerance.
#ifdef DEBUG
/*
const Point check = InfFE<Dim,T_radial,T_map>::map (inf_elem, p);
const Point diff = physical_point - check;
if (diff.size() > tolerance)
{
libmesh_here();
std::cerr << 'WARNING: diff is '
<< diff.size()
<< std::endl;
}
*/
#endif
// Stop logging the map inversion.
STOP_LOG('inverse_map()', 'InfFE');
return p;
}
Definition at line 636 of file inf_fe_map.C.
References TypeVector< T >::size().
{
// The number of points to find the
// inverse map of
const unsigned int n_points = physical_points.size();
// Resize the vector to hold the points
// on the reference element
reference_points.resize(n_points);
// Find the coordinates on the reference
// element of each point in physical space
for (unsigned int p=0; p<n_points; p++)
reference_points[p] =
InfFE<Dim,T_radial,T_map>::inverse_map (elem, physical_points[p], tolerance, secure, false);
}
Implements FEBase.
Definition at line 346 of file inf_fe.h.
{ return false; } // FIXME - Inf FEs don't handle p elevation yet
Definition at line 39 of file inf_fe_map.C.
References TypeVector< T >::add_scaled(), InfFE< Dim, T_radial, T_map >::base_elem, InfFE< Dim, T_radial, T_map >::Base::build_elem(), AutoPtr< Tp >::get(), FE< Dim, T >::map(), InfFE< Dim, T_radial, T_map >::Radial::mapping_order(), Elem::origin(), and Elem::point().
{
libmesh_assert (inf_elem != NULL);
libmesh_assert (Dim != 0);
AutoPtr<Elem> base_elem (Base::build_elem (inf_elem));
const Order radial_mapping_order (Radial::mapping_order());
const Real v (reference_point(Dim-1));
// map in the base face
Point base_point;
switch (Dim)
{
case 1:
base_point = inf_elem->point(0);
break;
case 2:
base_point = FE<1,LAGRANGE>::map (base_elem.get(), reference_point);
break;
case 3:
base_point = FE<2,LAGRANGE>::map (base_elem.get(), reference_point);
break;
#ifdef DEBUG
default:
libmesh_error();
#endif
}
// map in the outer node face not necessary. Simply
// compute the outer_point = base_point + (base_point-origin)
const Point outer_point (base_point * 2. - inf_elem->origin());
Point p;
// there are only two mapping shapes in radial direction
p.add_scaled (base_point, InfFE<Dim,INFINITE_MAP,T_map>::eval (v, radial_mapping_order, 0));
p.add_scaled (outer_point, InfFE<Dim,INFINITE_MAP,T_map>::eval (v, radial_mapping_order, 1));
return p;
}
Definition at line 54 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::Base::get_elem_type(), InfFE< Dim, T_radial, T_map >::Radial::n_dofs(), FEInterface::n_dofs(), and FEType::radial_order.
Referenced by InfFE< Dim, T_radial, T_map >::compute_data(), InfFE< Dim, T_radial, T_map >::compute_shape_indices(), and InfFE< Dim, T_radial, T_map >::n_shape_functions().
{
const ElemType base_et (Base::get_elem_type(inf_elem_type));
if (Dim > 1)
return FEInterface::n_dofs(Dim-1, fet, base_et) * Radial::n_dofs(fet.radial_order);
else
return Radial::n_dofs(fet.radial_order);
}
Definition at line 71 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::compute_node_indices(), InfFE< Dim, T_radial, T_map >::Base::get_elem_type(), InfFE< Dim, T_radial, T_map >::Radial::n_dofs_at_node(), FEInterface::n_dofs_at_node(), and FEType::radial_order.
{
const ElemType base_et (Base::get_elem_type(inf_elem_type));
unsigned int n_base, n_radial;
compute_node_indices(inf_elem_type, n, n_base, n_radial);
// std::cout << 'elem_type=' << inf_elem_type
// << ', fet.radial_order=' << fet.radial_order
// << ', n=' << n
// << ', n_radial=' << n_radial
// << ', n_base=' << n_base
// << std::endl;
if (Dim > 1)
return FEInterface::n_dofs_at_node(Dim-1, fet, base_et, n_base)
* Radial::n_dofs_at_node(fet.radial_order, n_radial);
else
return Radial::n_dofs_at_node(fet.radial_order, n_radial);
}
Definition at line 100 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::Base::get_elem_type(), InfFE< Dim, T_radial, T_map >::Radial::n_dofs_per_elem(), FEInterface::n_dofs_per_elem(), and FEType::radial_order.
{
const ElemType base_et (Base::get_elem_type(inf_elem_type));
if (Dim > 1)
return FEInterface::n_dofs_per_elem(Dim-1, fet, base_et)
* Radial::n_dofs_per_elem(fet.radial_order);
else
return Radial::n_dofs_per_elem(fet.radial_order);
}
Definition at line 76 of file reference_counter.h.
References ReferenceCounter::_n_objects.
Referenced by System::read_serialized_blocked_dof_objects(), and System::write_serialized_blocked_dof_objects().
{ return _n_objects; }
Implements FEBase.
Definition at line 450 of file inf_fe.h.
References InfFE< Dim, T_radial, T_map >::_n_total_qp, and InfFE< Dim, T_radial, T_map >::radial_qrule.
{ libmesh_assert (radial_qrule != NULL); return _n_total_qp; }
Definition at line 309 of file inf_fe.h.
References InfFE< Dim, T_radial, T_map >::n_dofs().
{ return n_dofs(fet, t); }
Implements FEBase.
Definition at line 442 of file inf_fe.h.
References InfFE< Dim, T_radial, T_map >::_n_total_approx_sf.
Referenced by InfFE< Dim, T_radial, T_map >::Base::n_base_mapping_sf().
{ return _n_total_approx_sf; }
Definition at line 118 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::_warned_for_nodal_soln.
{
#ifdef DEBUG
if (!_warned_for_nodal_soln)
{
std::cerr << 'WARNING: nodal_soln(...) does _not_ work for infinite elements.' << std::endl
<< ' Will return an empty nodal solution. Use ' << std::endl
<< ' InfFE<Dim,T_radial,T_map>::compute_data(..) instead!' << std::endl;
_warned_for_nodal_soln = true;
}
#endif
/*
* In the base the infinite element couples to
* conventional finite elements. To not destroy
* the values there, clear
nodal_soln. This
* indicates to the user of
nodal_soln to
* not use this result.
*/
nodal_soln.clear();
libmesh_assert (nodal_soln.begin() == nodal_soln.end());
return;
}
References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM6, libMeshEnums::PRISM15, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.
{
libmesh_assert (eps >= 0.);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
switch (t)
{
case EDGE2:
case EDGE3:
case EDGE4:
{
// The reference 1D element is [-1,1].
if ((xi >= -1.-eps) &&
(xi <= 1.+eps))
return true;
return false;
}
case TRI3:
case TRI6:
{
// The reference triangle is isocoles
// and is bound by xi=0, eta=0, and xi+eta=1.
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
((xi + eta) <= 1.+eps))
return true;
return false;
}
case QUAD4:
case QUAD8:
case QUAD9:
{
// The reference quadrilateral element is [-1,1]^2.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps))
return true;
return false;
}
case TET4:
case TET10:
{
// The reference tetrahedral is isocoles
// and is bound by xi=0, eta=0, zeta=0,
// and xi+eta+zeta=1.
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= 0.-eps) &&
((xi + eta + zeta) <= 1.+eps))
return true;
return false;
}
case HEX8:
case HEX20:
case HEX27:
{
/*
if ((xi >= -1.) &&
(xi <= 1.) &&
(eta >= -1.) &&
(eta <= 1.) &&
(zeta >= -1.) &&
(zeta <= 1.))
return true;
*/
// The reference hexahedral element is [-1,1]^3.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps))
{
// std::cout << 'Strange Point:;
// p.print();
return true;
}
return false;
}
case PRISM6:
case PRISM15:
case PRISM18:
{
// Figure this one out...
// inside the reference triange with zeta in [-1,1]
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps) &&
((xi + eta) <= 1.+eps))
return true;
return false;
}
case PYRAMID5:
{
std::cerr << 'BEN: Implement this you lazy bastard!'
<< std::endl;
libmesh_error();
return false;
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
case INFHEX8:
{
// The reference infhex8 is a [-1,1]^3.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps))
{
return true;
}
return false;
}
case INFPRISM6:
{
// inside the reference triange with zeta in [-1,1]
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps) &&
((xi + eta) <= 1.+eps))
{
return true;
}
return false;
}
#endif
default:
std::cerr << 'ERROR: Unknown element type ' << t << std::endl;
libmesh_error();
}
// If we get here then the point is _not_ in the
// reference element. Better return false.
return false;
}
Definition at line 1069 of file fe_base.C.
References FEBase::d2phi, and FEBase::dphi.
{
for (unsigned int i=0; i<dphi.size(); ++i)
for (unsigned int j=0; j<dphi[i].size(); ++j)
os << ' d2phi[' << i << '][' << j << ']=' << d2phi[i][j];
}
Definition at line 1057 of file fe_base.C.
References FEBase::dphi.
Referenced by FEBase::print_info().
{
for (unsigned int i=0; i<dphi.size(); ++i)
for (unsigned int j=0; j<dphi[i].size(); ++j)
os << ' dphi[' << i << '][' << j << ']=' << dphi[i][j];
}
Definition at line 1090 of file fe_base.C.
References FEBase::print_dphi(), FEBase::print_JxW(), FEBase::print_phi(), and FEBase::print_xyz().
Referenced by operator<<().
{
os << 'Shape functions at the Gauss pts.' << std::endl;
this->print_phi(os);
os << 'Shape function gradients at the Gauss pts.' << std::endl;
this->print_dphi(os);
os << 'XYZ locations of the Gauss pts.' << std::endl;
this->print_xyz(os);
os << 'Values of JxW at the Gauss pts.' << std::endl;
this->print_JxW(os);
}
Definition at line 83 of file reference_counter.C.
References ReferenceCounter::get_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::cout << ReferenceCounter::get_info();
#endif
}
Definition at line 1038 of file fe_base.C.
References FEBase::JxW.
Referenced by FEBase::print_info().
{
for (unsigned int i=0; i<JxW.size(); ++i)
os << JxW[i] << std::endl;
}
Definition at line 1047 of file fe_base.C.
References FEBase::phi.
Referenced by FEBase::print_info().
{
for (unsigned int i=0; i<phi.size(); ++i)
for (unsigned int j=0; j<phi[i].size(); ++j)
os << ' phi[' << i << '][' << j << ']=' << phi[i][j] << std::endl;
}
Definition at line 1081 of file fe_base.C.
References FEBase::xyz.
Referenced by FEBase::print_info().
{
for (unsigned int i=0; i<xyz.size(); ++i)
os << xyz[i];
}
Implements FEBase.
Definition at line 157 of file inf_fe.C.
References FEBase::build(), libMeshEnums::EDGE2, AutoPtr< Tp >::release(), and Elem::type().
Referenced by FE< Dim, T >::edge_reinit(), InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
{
libmesh_assert (base_fe != NULL);
libmesh_assert (base_fe->qrule != NULL);
libmesh_assert (base_fe->qrule == base_qrule);
libmesh_assert (radial_qrule != NULL);
libmesh_assert (inf_elem != NULL);
if (pts == NULL)
{
bool init_shape_functions_required = false;
// -----------------------------------------------------------------
// init the radial data fields only when the radial order changes
if (current_fe_type.radial_order != fe_type.radial_order)
{
current_fe_type.radial_order = fe_type.radial_order;
// Watch out: this call to QBase->init() only works for
// current_fe_type = const! To allow variable Order,
// the init() of QBase has to be modified...
radial_qrule->init(EDGE2);
// initialize the radial shape functions
this->init_radial_shape_functions(inf_elem);
init_shape_functions_required=true;
}
bool update_base_elem_required=true;
// -----------------------------------------------------------------
// update the type in accordance to the current cell
// and reinit if the cell type has changed or (as in
// the case of the hierarchics) the shape functions
// depend on the particular element and need a reinit
if ( ( Dim != 1) &&
( (this->get_type() != inf_elem->type()) ||
(base_fe->shapes_need_reinit()) ) )
{
// store the new element type, update base_elem
// here. Through
update_base_elem_required,
// remember whether it has to be updated (see below).
elem_type = inf_elem->type();
this->update_base_elem(inf_elem);
update_base_elem_required=false;
// initialize the base quadrature rule for the new element
base_qrule->init(base_elem->type());
// initialize the shape functions in the base
base_fe->init_base_shape_functions(base_fe->qrule->get_points(),
base_elem);
init_shape_functions_required=true;
}
// when either the radial or base part change,
// we have to init the whole fields
if (init_shape_functions_required)
this->init_shape_functions (inf_elem);
// computing the distance only works when we have the current
// base_elem stored. This happens when fe_type is const,
// the inf_elem->type remains the same. Then we have to
// update the base elem _here_.
if (update_base_elem_required)
this->update_base_elem(inf_elem);
// compute dist (depends on geometry, therefore has to be updated for
// each and every new element), throw radial and base part together
this->combine_base_radial (inf_elem);
this->compute_map (_total_qrule_weights, inf_elem);
// Compute the shape functions and the derivatives
// at all quadrature points.
this->compute_shape_functions (inf_elem);
}
else // if pts != NULL
{
// update the elem_type
elem_type = inf_elem->type();
// init radial shapes
this->init_radial_shape_functions(inf_elem);
// update the base
this->update_base_elem(inf_elem);
// the finite element on the ifem base
{
AutoPtr<FEBase> ap_fb(FEBase::build(Dim-1, this->fe_type));
if (base_fe != NULL)
delete base_fe;
base_fe = ap_fb.release();
}
// inite base shapes
base_fe->init_base_shape_functions(*pts,
base_elem);
this->init_shape_functions (inf_elem);
// combine the base and radial shapes
this->combine_base_radial (inf_elem);
// dummy weights
std::vector<Real> dummy_weights (pts->size(), 1.);
this->compute_map (dummy_weights, inf_elem);
// finally compute the ifem shapes
this->compute_shape_functions (inf_elem);
}
}
Implements FEBase.
Definition at line 39 of file inf_fe_boundary.C.
References InfFE< Dim, T_radial, T_map >::_total_qrule_weights, InfFE< Dim, T_radial, T_map >::base_fe, Elem::build_side(), FEBase::compute_face_map(), InfFE< Dim, T_radial, T_map >::current_fe_type, libMeshEnums::EDGE2, FEBase::elem_type, FEBase::fe_type, QBase::get_points(), FEBase::get_type(), QBase::init(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), InfFE< Dim, T_radial, T_map >::inverse_map(), FEBase::JxW, Elem::p_level(), FEBase::qrule, FEType::radial_order, InfFE< Dim, T_radial, T_map >::radial_qrule, InfFE< Dim, T_radial, T_map >::reinit(), FEBase::shapes_need_reinit(), Elem::type(), and FEBase::xyz.
{
// We don't do this for 1D elements!
libmesh_assert (Dim != 1);
libmesh_assert (inf_elem != NULL);
libmesh_assert (qrule != NULL);
// Don't do this for the base
libmesh_assert (s != 0);
// Build the side of interest
const AutoPtr<Elem> side(inf_elem->build_side(s));
// set the element type
elem_type = inf_elem->type();
// eventually initialize radial quadrature rule
bool radial_qrule_initialized = false;
if (current_fe_type.radial_order != fe_type.radial_order)
{
current_fe_type.radial_order = fe_type.radial_order;
radial_qrule->init(EDGE2, inf_elem->p_level());
radial_qrule_initialized = true;
}
// Initialize the face shape functions
if (this->get_type() != inf_elem->type() ||
base_fe->shapes_need_reinit() ||
radial_qrule_initialized)
this->init_face_shape_functions (qrule->get_points(), side.get());
// compute the face map
this->compute_face_map (_total_qrule_weights, side.get());
// make a copy of the Jacobian for integration
const std::vector<Real> JxW_int(JxW);
// Find where the integration points are located on the
// full element.
std::vector<Point> qp; this->inverse_map (inf_elem, xyz, qp, tolerance);
// compute the shape function and derivative values
// at the points qp
this->reinit (inf_elem, &qp);
// copy back old data
JxW = JxW_int;
}
Definition at line 372 of file fe_map.C.
References FEBase::d2xyzdeta2_map, FEBase::d2xyzdetadzeta_map, FEBase::d2xyzdxi2_map, FEBase::d2xyzdxideta_map, FEBase::d2xyzdxidzeta_map, FEBase::d2xyzdzeta2_map, FEBase::detadx_map, FEBase::detady_map, FEBase::detadz_map, FEBase::dim, FEBase::dxidx_map, FEBase::dxidy_map, FEBase::dxidz_map, FEBase::dxyzdeta_map, FEBase::dxyzdxi_map, FEBase::dxyzdzeta_map, FEBase::dzetadx_map, FEBase::dzetady_map, FEBase::dzetadz_map, FEBase::JxW, and FEBase::xyz.
Referenced by FEBase::compute_affine_map(), and FEBase::compute_map().
{
// Resize the vectors to hold data at the quadrature points
xyz.resize(n_qp);
dxyzdxi_map.resize(n_qp);
dxidx_map.resize(n_qp);
dxidy_map.resize(n_qp); // 1D element may live in 2D ...
dxidz_map.resize(n_qp); // ... or 3D
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxi2_map.resize(n_qp);
#endif
if (this->dim > 1)
{
dxyzdeta_map.resize(n_qp);
detadx_map.resize(n_qp);
detady_map.resize(n_qp);
detadz_map.resize(n_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxideta_map.resize(n_qp);
d2xyzdeta2_map.resize(n_qp);
#endif
if (this->dim > 2)
{
dxyzdzeta_map.resize (n_qp);
dzetadx_map.resize (n_qp);
dzetady_map.resize (n_qp);
dzetadz_map.resize (n_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
d2xyzdxidzeta_map.resize(n_qp);
d2xyzdetadzeta_map.resize(n_qp);
d2xyzdzeta2_map.resize(n_qp);
#endif
}
}
JxW.resize(n_qp);
}
Definition at line 153 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::_warned_for_shape, InfFE< Dim, T_radial, T_map >::compute_shape_indices(), InfFE< Dim, T_radial, T_map >::Radial::decay(), InfFE< Dim, T_radial, T_map >::eval(), InfFE< Dim, T_radial, T_map >::Base::get_elem_type(), libMeshEnums::INFINITE_MAP, FEType::radial_order, and FEInterface::shape().
Referenced by FE< Dim, T >::shape().
{
libmesh_assert (Dim != 0);
#ifdef DEBUG
// this makes only sense when used for mapping
if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
{
std::cerr << 'WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_' << std::endl
<< ' return the correct trial function! Use ' << std::endl
<< ' InfFE<Dim,T_radial,T_map>::compute_data(..) instead!'
<< std::endl;
_warned_for_shape = true;
}
#endif
const ElemType base_et (Base::get_elem_type(inf_elem_type));
const Order o_radial (fet.radial_order);
const Real v (p(Dim-1));
unsigned int i_base, i_radial;
compute_shape_indices(fet, inf_elem_type, i, i_base, i_radial);
//TODO:[SP/DD] exp(ikr) is still missing here!
if (Dim > 1)
return FEInterface::shape(Dim-1, fet, base_et, i_base, p)
* InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
* InfFE<Dim,T_radial,T_map>::Radial::decay(v);
else
return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
* InfFE<Dim,T_radial,T_map>::Radial::decay(v);
}
Definition at line 195 of file inf_fe_static.C.
References InfFE< Dim, T_radial, T_map >::_warned_for_shape, Elem::build_side(), InfFE< Dim, T_radial, T_map >::compute_shape_indices(), InfFE< Dim, T_radial, T_map >::Radial::decay(), InfFE< Dim, T_radial, T_map >::eval(), libMeshEnums::INFINITE_MAP, FEType::radial_order, FEInterface::shape(), and Elem::type().
{
libmesh_assert (inf_elem != NULL);
libmesh_assert (Dim != 0);
#ifdef DEBUG
// this makes only sense when used for mapping
if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
{
std::cerr << 'WARNING: InfFE<Dim,T_radial,T_map>::shape(...) does _not_' << std::endl
<< ' return the correct trial function! Use ' << std::endl
<< ' InfFE<Dim,T_radial,T_map>::compute_data(..) instead!'
<< std::endl;
_warned_for_shape = true;
}
#endif
const Order o_radial (fet.radial_order);
const Real v (p(Dim-1));
AutoPtr<Elem> base_el (inf_elem->build_side(0));
unsigned int i_base, i_radial;
compute_shape_indices(fet, inf_elem->type(), i, i_base, i_radial);
if (Dim > 1)
return FEInterface::shape(Dim-1, fet, base_el.get(), i_base, p)
* InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
* InfFE<Dim,T_radial,T_map>::Radial::decay(v);
else
return InfFE<Dim,T_radial,T_map>::eval(v, o_radial, i_radial)
* InfFE<Dim,T_radial,T_map>::Radial::decay(v);
}
Implements FEBase.
Definition at line 973 of file inf_fe.C.
Referenced by FE< Dim, T >::edge_reinit(), and REINIT_ERROR().
{
return false;
}
Definition at line 144 of file inf_fe.C.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
{
if (base_elem != NULL)
delete base_elem;
base_elem = Base::build_elem(inf_elem);
}
Reimplemented from FEBase.
Definition at line 809 of file inf_fe.h.
Definition at line 1108 of file fe_base.C.
{
fe.print_info(os);
return os;
}
Definition at line 694 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 714 of file inf_fe.h.
Definition at line 790 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::compute_node_indices_fast().
Definition at line 110 of file reference_counter.h.
Referenced by ReferenceCounter::get_info(), ReferenceCounter::increment_constructor_count(), and ReferenceCounter::increment_destructor_count().
Definition at line 123 of file reference_counter.h.
Definition at line 118 of file reference_counter.h.
Referenced by ReferenceCounter::n_objects(), ReferenceCounter::ReferenceCounter(), and ReferenceCounter::~ReferenceCounter().
Definition at line 726 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::n_shape_functions().
Definition at line 732 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::n_quadrature_points().
Definition at line 1215 of file fe_base.h.
Referenced by FEBase::get_order(), FEBase::get_p_level(), and REINIT_ERROR().
Definition at line 684 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 704 of file inf_fe.h.
Definition at line 738 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and InfFE< Dim, T_radial, T_map >::reinit().
Definition at line 798 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::nodal_soln().
Definition at line 799 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::shape().
Definition at line 756 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), InfFE< Dim, T_radial, T_map >::inverse_map(), and InfFE< Dim, T_radial, T_map >::map().
Definition at line 764 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::InfFE(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and InfFE< Dim, T_radial, T_map >::reinit().
Definition at line 744 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 936 of file fe_base.h.
Referenced by FEBase::compute_map(), FEBase::compute_shape_functions(), FEBase::get_d2phi(), FEBase::get_d2phidx2(), FEBase::get_d2phidxdy(), FEBase::get_d2phidxdz(), FEBase::get_d2phidy2(), FEBase::get_d2phidydz(), and FEBase::get_d2phidz2().
Definition at line 931 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), FEBase::get_dphi(), FEBase::get_dphideta(), FEBase::get_dphidx(), FEBase::get_dphidxi(), FEBase::get_dphidy(), FEBase::get_dphidz(), and FEBase::get_dphidzeta().
Definition at line 926 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_phi().
Definition at line 921 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), FEBase::get_d2phi(), FEBase::get_d2phidx2(), FEBase::get_d2phidxdy(), FEBase::get_d2phidxdz(), FEBase::get_d2phidy2(), FEBase::get_d2phidydz(), FEBase::get_d2phidz2(), FEBase::get_dphi(), FEBase::get_dphideta(), FEBase::get_dphidx(), FEBase::get_dphidxi(), FEBase::get_dphidy(), FEBase::get_dphidz(), FEBase::get_dphidzeta(), and FEBase::get_phi().
Definition at line 773 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::reinit().
Definition at line 1192 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::get_curvatures().
Definition at line 979 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), FEBase::get_d2phi(), and FEBase::print_d2phi().
Definition at line 999 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1086 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 1004 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1091 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 1014 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidx2().
Definition at line 1019 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidxdy().
Definition at line 1024 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidxdz().
Definition at line 984 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1071 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 989 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1076 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 994 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1081 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 1029 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidy2().
Definition at line 1034 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidydz().
Definition at line 1039 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_d2phidz2().
Definition at line 1009 of file fe_base.h.
Referenced by FEBase::compute_shape_functions().
Definition at line 1096 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 1140 of file fe_base.h.
Referenced by FEBase::compute_face_map(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 1126 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), FE< Dim, T >::init_edge_shape_functions(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 1133 of file fe_base.h.
Referenced by FEBase::compute_face_map(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 827 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdeta2(), and FEBase::resize_map_vectors().
Definition at line 841 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdetadzeta(), and FEBase::resize_map_vectors().
Definition at line 815 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdxi2(), and FEBase::resize_map_vectors().
Definition at line 821 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdxideta(), and FEBase::resize_map_vectors().
Definition at line 835 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdxidzeta(), and FEBase::resize_map_vectors().
Definition at line 847 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_single_point_map(), FEBase::get_d2xyzdzeta2(), and FEBase::resize_map_vectors().
Definition at line 876 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_detadx(), and FEBase::resize_map_vectors().
Definition at line 882 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_detady(), and FEBase::resize_map_vectors().
Definition at line 888 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_detadz(), and FEBase::resize_map_vectors().
Definition at line 784 of file fe_base.h.
Referenced by JumpErrorEstimator::coarse_n_flux_faces_increment(), FEBase::coarsened_dof_values(), FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), JumpErrorEstimator::estimate_error(), and FEBase::resize_map_vectors().
Definition at line 603 of file inf_fe.h.
Definition at line 636 of file inf_fe.h.
Definition at line 1156 of file fe_base.h.
Referenced by FEBase::get_dphase().
Definition at line 661 of file inf_fe.h.
Definition at line 654 of file inf_fe.h.
Definition at line 668 of file inf_fe.h.
Definition at line 941 of file fe_base.h.
Referenced by FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), FEBase::compute_shape_functions(), FEBase::get_dphi(), FEBase::print_d2phi(), and FEBase::print_dphi().
Definition at line 951 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphideta().
Definition at line 1059 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 961 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphidx().
Definition at line 946 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphidxi().
Definition at line 1054 of file fe_base.h.
Referenced by FEBase::compute_single_point_map(), and InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 966 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphidy().
Definition at line 971 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphidz().
Definition at line 956 of file fe_base.h.
Referenced by FEBase::compute_shape_functions(), and FEBase::get_dphidzeta().
Definition at line 1064 of file fe_base.h.
Referenced by FEBase::compute_single_point_map().
Definition at line 1119 of file fe_base.h.
Referenced by FEBase::compute_face_map(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 1113 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), FE< Dim, T >::init_edge_shape_functions(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 647 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 624 of file inf_fe.h.
Definition at line 1163 of file fe_base.h.
Referenced by FEBase::get_Sobolev_dweight().
Definition at line 611 of file inf_fe.h.
Definition at line 855 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dxidx(), and FEBase::resize_map_vectors().
Definition at line 861 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dxidy(), and FEBase::resize_map_vectors().
Definition at line 867 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dxidz(), and FEBase::resize_map_vectors().
Definition at line 803 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FEBase::dxdeta_map(), FEBase::dydeta_map(), FEBase::dzdeta_map(), FEBase::get_dxyzdeta(), and FEBase::resize_map_vectors().
Definition at line 797 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FEBase::dxdxi_map(), FEBase::dydxi_map(), FEBase::dzdxi_map(), FEBase::get_dxyzdxi(), and FEBase::resize_map_vectors().
Definition at line 809 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_single_point_map(), FEBase::dxdzeta_map(), FEBase::dydzeta_map(), FEBase::dzdzeta_map(), FEBase::get_dxyzdzeta(), and FEBase::resize_map_vectors().
Definition at line 898 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dzetadx(), and FEBase::resize_map_vectors().
Definition at line 904 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dzetady(), and FEBase::resize_map_vectors().
Definition at line 910 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_shape_functions(), FEBase::compute_single_point_map(), FEBase::get_dzetadz(), and FEBase::resize_map_vectors().
Definition at line 1209 of file fe_base.h.
Referenced by FEBase::coarsened_dof_values(), FE< Dim, T >::edge_reinit(), FEBase::get_type(), InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
Definition at line 1203 of file fe_base.h.
Referenced by FEBase::coarsened_dof_values(), JumpErrorEstimator::estimate_error(), FE< Dim, T >::FE(), FEBase::get_family(), FEBase::get_fe_type(), FEBase::get_order(), InfFE< Dim, T_radial, T_map >::InfFE(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and InfFE< Dim, T_radial, T_map >::reinit().
Definition at line 1197 of file fe_base.h.
Referenced by FEBase::coarsened_dof_values(), FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), FEBase::compute_single_point_map(), FE< Dim, T >::edge_reinit(), FEBase::get_JxW(), FEBase::print_JxW(), InfFE< Dim, T_radial, T_map >::reinit(), REINIT_ERROR(), and FEBase::resize_map_vectors().
Definition at line 630 of file inf_fe.h.
Definition at line 1185 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::get_normals().
Definition at line 915 of file fe_base.h.
Referenced by FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), FEBase::get_phi(), and FEBase::print_phi().
Definition at line 1049 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_single_point_map(), and InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 1107 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), FE< Dim, T >::init_edge_shape_functions(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), and FE< Dim, T >::init_face_shape_functions().
Definition at line 1220 of file fe_base.h.
Referenced by FEBase::coarsened_dof_values(), FE< Dim, T >::edge_reinit(), JumpErrorEstimator::estimate_error(), InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), InfFE< Dim, T_radial, T_map >::reinit(), and REINIT_ERROR().
Definition at line 641 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 750 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), InfFE< Dim, T_radial, T_map >::n_quadrature_points(), and InfFE< Dim, T_radial, T_map >::reinit().
Definition at line 1226 of file fe_base.h.
Definition at line 619 of file inf_fe.h.
Referenced by InfFE< Dim, T_radial, T_map >::init_face_shape_functions().
Definition at line 1180 of file fe_base.h.
Referenced by FEBase::compute_edge_map(), FEBase::compute_face_map(), and FEBase::get_tangents().
Definition at line 1170 of file fe_base.h.
Referenced by FEBase::get_Sobolev_weight().
Definition at line 789 of file fe_base.h.
Referenced by FEBase::compute_affine_map(), FEBase::compute_edge_map(), FEBase::compute_face_map(), FEBase::compute_single_point_map(), FE< Dim, T >::edge_reinit(), FEBase::get_xyz(), FEBase::print_xyz(), InfFE< Dim, T_radial, T_map >::reinit(), REINIT_ERROR(), and FEBase::resize_map_vectors().
Generated automatically by Doxygen for libMesh from the source code.