$extrastylesheet
#include <inf_fe.h>

Classes | |
| class | Base |
| class | Radial |
Public Types | |
| typedef OutputType | OutputShape |
| typedef TensorTools::IncrementRank < OutputShape >::type | OutputGradient |
| typedef TensorTools::IncrementRank < OutputGradient >::type | OutputTensor |
| typedef TensorTools::DecrementRank < OutputShape >::type | OutputDivergence |
| typedef TensorTools::MakeNumber < OutputShape >::type | OutputNumber |
| typedef TensorTools::IncrementRank < OutputNumber >::type | OutputNumberGradient |
| typedef TensorTools::IncrementRank < OutputNumberGradient >::type | OutputNumberTensor |
| typedef TensorTools::DecrementRank < OutputNumber >::type | OutputNumberDivergence |
Public Member Functions | |
| InfFE (const FEType &fet) | |
| ~InfFE () | |
| virtual FEContinuity | get_continuity () const |
| virtual bool | is_hierarchic () const |
| virtual void | reinit (const Elem *elem, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | reinit (const Elem *elem, const unsigned int side, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | side_map (const Elem *, const Elem *, const unsigned int, const std::vector< Point > &, std::vector< Point > &) |
| virtual void | attach_quadrature_rule (QBase *q) |
| virtual unsigned int | n_shape_functions () const |
| virtual unsigned int | n_quadrature_points () const |
| template<> | |
| UniquePtr< FEGenericBase < RealGradient > > | build (const unsigned int dim, const FEType &fet) |
| template<> | |
| UniquePtr< FEGenericBase< Real > > | build_InfFE (const unsigned int dim, const FEType &fet) |
| template<> | |
| UniquePtr< FEGenericBase < RealGradient > > | build_InfFE (const unsigned int, const FEType &) |
| const std::vector< std::vector < OutputShape > > & | get_phi () const |
| const std::vector< std::vector < OutputGradient > > & | get_dphi () const |
| const std::vector< std::vector < OutputShape > > & | get_curl_phi () const |
| const std::vector< std::vector < OutputDivergence > > & | get_div_phi () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidx () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidy () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidz () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidxi () const |
| const std::vector< std::vector < OutputShape > > & | get_dphideta () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidzeta () const |
| const std::vector< std::vector < OutputTensor > > & | get_d2phi () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidx2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxdy () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxdz () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidy2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidydz () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidz2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxi2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxideta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxidzeta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phideta2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidetadzeta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidzeta2 () const |
| const std::vector < OutputGradient > & | get_dphase () const |
| const std::vector< Real > & | get_Sobolev_weight () const |
| const std::vector< RealGradient > & | get_Sobolev_dweight () const |
| void | print_phi (std::ostream &os) const |
| void | print_dphi (std::ostream &os) const |
| void | print_d2phi (std::ostream &os) const |
| const std::vector< Point > & | get_xyz () const |
| const std::vector< Real > & | get_JxW () 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< 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 |
| const FEMap & | get_fe_map () const |
| void | print_JxW (std::ostream &os) const |
| void | print_xyz (std::ostream &os) const |
| void | print_info (std::ostream &os) const |
Static Public Member Functions | |
| static Real | shape (const FEType &fet, const ElemType t, const unsigned int i, const Point &p) |
| static Real | shape (const FEType &fet, const Elem *elem, const unsigned int i, const Point &p) |
| static 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 UniquePtr< FEGenericBase > | build (const unsigned int dim, const FEType &type) |
| template<> | |
| UniquePtr< FEGenericBase< Real > > | build (const unsigned int dim, const FEType &fet) |
| static UniquePtr< FEGenericBase > | build_InfFE (const unsigned int dim, const FEType &type) |
| 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, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem) |
| static bool | on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE) |
| static void | get_refspace_nodes (const ElemType t, std::vector< Point > &nodes) |
| static void | compute_node_constraints (NodeConstraints &constraints, const Elem *elem) |
| static void | compute_periodic_node_constraints (NodeConstraints &constraints, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const Elem *elem) |
| static void | print_info (std::ostream &out=libMesh::out) |
| static std::string | get_info () |
| static unsigned int | n_objects () |
| static void | enable_print_counter_info () |
| static void | disable_print_counter_info () |
Protected Types | |
| typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Protected Member Functions | |
| 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 *, const std::vector< Point > &) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order o, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| template<> | |
| Real | eval_deriv (Real v, Order, unsigned i) |
| void | increment_constructor_count (const std::string &name) |
| void | increment_destructor_count (const std::string &name) |
Static Protected Member Functions | |
| static Real | eval (Real v, Order o_radial, unsigned int i) |
| static Real | eval_deriv (Real v, Order o_radial, unsigned int i) |
| static 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) |
Protected Attributes | |
| 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 |
| UniquePtr < FETransformationBase < OutputType > > | _fe_trans |
| std::vector< std::vector < OutputShape > > | phi |
| std::vector< std::vector < OutputGradient > > | dphi |
| std::vector< std::vector < OutputShape > > | curl_phi |
| std::vector< std::vector < OutputDivergence > > | div_phi |
| std::vector< std::vector < OutputShape > > | dphidxi |
| std::vector< std::vector < OutputShape > > | dphideta |
| std::vector< std::vector < OutputShape > > | dphidzeta |
| std::vector< std::vector < OutputShape > > | dphidx |
| std::vector< std::vector < OutputShape > > | dphidy |
| std::vector< std::vector < OutputShape > > | dphidz |
| std::vector< std::vector < OutputTensor > > | d2phi |
| std::vector< std::vector < OutputShape > > | d2phidxi2 |
| std::vector< std::vector < OutputShape > > | d2phidxideta |
| std::vector< std::vector < OutputShape > > | d2phidxidzeta |
| std::vector< std::vector < OutputShape > > | d2phideta2 |
| std::vector< std::vector < OutputShape > > | d2phidetadzeta |
| std::vector< std::vector < OutputShape > > | d2phidzeta2 |
| std::vector< std::vector < OutputShape > > | d2phidx2 |
| std::vector< std::vector < OutputShape > > | d2phidxdy |
| std::vector< std::vector < OutputShape > > | d2phidxdz |
| std::vector< std::vector < OutputShape > > | d2phidy2 |
| std::vector< std::vector < OutputShape > > | d2phidydz |
| std::vector< std::vector < OutputShape > > | d2phidz2 |
| std::vector< OutputGradient > | dphase |
| std::vector< RealGradient > | dweight |
| std::vector< Real > | weight |
| UniquePtr< FEMap > | _fe_map |
| const unsigned int | dim |
| bool | calculations_started |
| bool | calculate_phi |
| bool | calculate_dphi |
| bool | calculate_d2phi |
| bool | calculate_curl_phi |
| bool | calculate_div_phi |
| bool | calculate_dphiref |
| const FEType | fe_type |
| ElemType | elem_type |
| unsigned int | _p_level |
| QBase * | qrule |
| bool | shapes_on_quadrature |
Static Protected Attributes | |
| static Counts | _counts |
| static Threads::atomic < unsigned int > | _n_objects |
| static Threads::spin_mutex | _mutex |
| static bool | _enable_print_counter = true |
Private Member Functions | |
| virtual bool | shapes_need_reinit () const |
Static Private Attributes | |
| static ElemType | _compute_node_indices_fast_current_elem_type = INVALID_ELEM |
| static bool | _warned_for_nodal_soln = false |
| static bool | _warned_for_shape = false |
Friends | |
| class | InfFE |
| std::ostream & | operator<< (std::ostream &os, const FEAbstract &fe) |
A specific instatiation of the FEBase class. This class is templated, and specific template instantiations will result in different Infinite Element families, similar to the FE class. InfFE builds a FE<Dim-1,T_base>, and most of the requests related to the base are handed over to this object. All methods related to the radial part are collected in the nested class Radial. Similarly, most of the static methods concerning base approximation are contained in Base.
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.
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts [protected, inherited] |
Data structure to log the information. The log is identified by the class name.
Definition at line 113 of file reference_counter.h.
typedef TensorTools::DecrementRank<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputDivergence [inherited] |
typedef TensorTools::IncrementRank<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputGradient [inherited] |
typedef TensorTools::MakeNumber<OutputShape>::type libMesh::FEGenericBase< OutputType >::OutputNumber [inherited] |
typedef TensorTools::DecrementRank<OutputNumber>::type libMesh::FEGenericBase< OutputType >::OutputNumberDivergence [inherited] |
typedef TensorTools::IncrementRank<OutputNumber>::type libMesh::FEGenericBase< OutputType >::OutputNumberGradient [inherited] |
typedef TensorTools::IncrementRank<OutputNumberGradient>::type libMesh::FEGenericBase< OutputType >::OutputNumberTensor [inherited] |
typedef OutputType libMesh::FEGenericBase< OutputType >::OutputShape [inherited] |
Convenient typedefs for gradients of output, hessians of output, and potentially-complex-valued versions of same.
Reimplemented in libMesh::FE< Dim, T >, libMesh::FE< 2, SUBDIVISION >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, SCALAR >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, CLOUGH >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, XYZ >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, L2_HIERARCHIC >, and libMesh::FE< Dim, LAGRANGE_VEC >.
typedef TensorTools::IncrementRank<OutputGradient>::type libMesh::FEGenericBase< OutputType >::OutputTensor [inherited] |
| libMesh::InfFE< Dim, T_radial, T_map >::InfFE | ( | const FEType & | fet | ) | [explicit] |
Constructor. Initializes some data structures. Builds a FE<Dim-1,T_base> object to handle approximation in the base, so that there is no need to template InfFE<Dim,T_radial,T_map> also with respect to the base approximation T_base.
The same remarks concerning compile-time optimization for FE also hold for InfFE. Use the FEBase::build_InfFE(const unsigned int, const FEType&) method to build specific instantiations of InfFE at run time.
Definition at line 40 of file inf_fe.C.
References libMesh::InfFE< Dim, T_radial, T_map >::base_fe, libMesh::FEGenericBase< OutputType >::build(), libMesh::FEAbstract::fe_type, libMesh::FEType::inf_map, and libMesh::FEType::radial_family.
: 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 \p 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 \p 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_equal_to (T_radial, fe_type.radial_family); libmesh_assert_equal_to (T_map, fe_type.inf_map); // build the base_fe object, handle the UniquePtr if (Dim != 1) { UniquePtr<FEBase> ap_fb(FEBase::build(Dim-1, fet)); base_fe = ap_fb.release(); } }
| libMesh::InfFE< Dim, T_radial, T_map >::~InfFE | ( | ) |
Desctructor. Clean up.
Definition at line 82 of file inf_fe.C.
{
// delete pointers, if necessary
delete base_qrule;
base_qrule = NULL;
delete radial_qrule;
radial_qrule = NULL;
delete base_elem;
base_elem = NULL;
delete base_fe;
base_fe = NULL;
}
| void libMesh::InfFE< Dim, T_radial, T_map >::attach_quadrature_rule | ( | QBase * | q | ) | [virtual] |
The use of quadrature rules with the InfFE class is somewhat different from the approach of the FE class. While the FE class requires an appropriately initialized quadrature rule object, and simply uses it, the InfFE class requires only the quadrature rule object of the current FE class. From this QBase*, it determines the necessary data, and builds two appropriate quadrature classes, one for radial, and another for base integration, using the convenient QBase::build() method.
Implements libMesh::FEAbstract.
Definition at line 103 of file inf_fe.C.
References libMesh::QBase::build(), libMesh::QBase::get_dim(), libMesh::QBase::get_order(), libMesh::libmesh_assert(), and libMesh::QBase::type().
{
libmesh_assert(q);
libmesh_assert(base_fe);
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
UniquePtr<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;
}
| static UniquePtr<FEGenericBase> libMesh::FEGenericBase< OutputType >::build | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [static, inherited] |
Builds a specific finite element type. A UniquePtr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.
The build call will fail if the OutputType of this class is not compatible with the output required for the requested type
Reimplemented from libMesh::FEAbstract.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::System::calculate_norm(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::MeshFunction::gradient(), libMesh::MeshFunction::hessian(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), libMesh::InfFE< Dim, T_radial, T_map >::init_face_shape_functions(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::ProjectSolution::operator()(), libMesh::BoundaryProjectSolution::operator()(), libMesh::System::point_gradient(), libMesh::System::point_hessian(), libMesh::System::point_value(), libMesh::InfFE< Dim, T_radial, T_map >::reinit(), libMesh::HPCoarsenTest::select_refinement(), and libMesh::Elem::volume().
| UniquePtr< FEGenericBase< Real > > libMesh::FEGenericBase< Real >::build | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [static, inherited] |
Builds a specific finite element type. A UniquePtr<FEAbstract> is returned to prevent a memory leak. This way the user need not remember to delete the object.
Reimplemented from libMesh::FEAbstract.
Definition at line 184 of file fe_base.C.
References libMesh::BERNSTEIN, libMesh::CLOUGH, libMesh::FEType::family, libMesh::HERMITE, libMesh::HIERARCHIC, libMesh::L2_HIERARCHIC, libMesh::L2_LAGRANGE, libMesh::LAGRANGE, libMesh::MONOMIAL, libMesh::SCALAR, libMesh::SUBDIVISION, libMesh::SZABAB, and libMesh::XYZ.
{
switch (dim)
{
// 0D
case 0:
{
switch (fet.family)
{
case CLOUGH:
return UniquePtr<FEBase>(new FE<0,CLOUGH>(fet));
case HERMITE:
return UniquePtr<FEBase>(new FE<0,HERMITE>(fet));
case LAGRANGE:
return UniquePtr<FEBase>(new FE<0,LAGRANGE>(fet));
case L2_LAGRANGE:
return UniquePtr<FEBase>(new FE<0,L2_LAGRANGE>(fet));
case HIERARCHIC:
return UniquePtr<FEBase>(new FE<0,HIERARCHIC>(fet));
case L2_HIERARCHIC:
return UniquePtr<FEBase>(new FE<0,L2_HIERARCHIC>(fet));
case MONOMIAL:
return UniquePtr<FEBase>(new FE<0,MONOMIAL>(fet));
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
return UniquePtr<FEBase>(new FE<0,SZABAB>(fet));
case BERNSTEIN:
return UniquePtr<FEBase>(new FE<0,BERNSTEIN>(fet));
#endif
case XYZ:
return UniquePtr<FEBase>(new FEXYZ<0>(fet));
case SCALAR:
return UniquePtr<FEBase>(new FEScalar<0>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
// 1D
case 1:
{
switch (fet.family)
{
case CLOUGH:
return UniquePtr<FEBase>(new FE<1,CLOUGH>(fet));
case HERMITE:
return UniquePtr<FEBase>(new FE<1,HERMITE>(fet));
case LAGRANGE:
return UniquePtr<FEBase>(new FE<1,LAGRANGE>(fet));
case L2_LAGRANGE:
return UniquePtr<FEBase>(new FE<1,L2_LAGRANGE>(fet));
case HIERARCHIC:
return UniquePtr<FEBase>(new FE<1,HIERARCHIC>(fet));
case L2_HIERARCHIC:
return UniquePtr<FEBase>(new FE<1,L2_HIERARCHIC>(fet));
case MONOMIAL:
return UniquePtr<FEBase>(new FE<1,MONOMIAL>(fet));
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
return UniquePtr<FEBase>(new FE<1,SZABAB>(fet));
case BERNSTEIN:
return UniquePtr<FEBase>(new FE<1,BERNSTEIN>(fet));
#endif
case XYZ:
return UniquePtr<FEBase>(new FEXYZ<1>(fet));
case SCALAR:
return UniquePtr<FEBase>(new FEScalar<1>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
// 2D
case 2:
{
switch (fet.family)
{
case CLOUGH:
return UniquePtr<FEBase>(new FE<2,CLOUGH>(fet));
case HERMITE:
return UniquePtr<FEBase>(new FE<2,HERMITE>(fet));
case LAGRANGE:
return UniquePtr<FEBase>(new FE<2,LAGRANGE>(fet));
case L2_LAGRANGE:
return UniquePtr<FEBase>(new FE<2,L2_LAGRANGE>(fet));
case HIERARCHIC:
return UniquePtr<FEBase>(new FE<2,HIERARCHIC>(fet));
case L2_HIERARCHIC:
return UniquePtr<FEBase>(new FE<2,L2_HIERARCHIC>(fet));
case MONOMIAL:
return UniquePtr<FEBase>(new FE<2,MONOMIAL>(fet));
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
return UniquePtr<FEBase>(new FE<2,SZABAB>(fet));
case BERNSTEIN:
return UniquePtr<FEBase>(new FE<2,BERNSTEIN>(fet));
#endif
case XYZ:
return UniquePtr<FEBase>(new FEXYZ<2>(fet));
case SCALAR:
return UniquePtr<FEBase>(new FEScalar<2>(fet));
case SUBDIVISION:
return UniquePtr<FEBase>(new FESubdivision(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
// 3D
case 3:
{
switch (fet.family)
{
case CLOUGH:
libmesh_error_msg("ERROR: Clough-Tocher elements currently only support 1D and 2D");
case HERMITE:
return UniquePtr<FEBase>(new FE<3,HERMITE>(fet));
case LAGRANGE:
return UniquePtr<FEBase>(new FE<3,LAGRANGE>(fet));
case L2_LAGRANGE:
return UniquePtr<FEBase>(new FE<3,L2_LAGRANGE>(fet));
case HIERARCHIC:
return UniquePtr<FEBase>(new FE<3,HIERARCHIC>(fet));
case L2_HIERARCHIC:
return UniquePtr<FEBase>(new FE<3,L2_HIERARCHIC>(fet));
case MONOMIAL:
return UniquePtr<FEBase>(new FE<3,MONOMIAL>(fet));
#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
case SZABAB:
return UniquePtr<FEBase>(new FE<3,SZABAB>(fet));
case BERNSTEIN:
return UniquePtr<FEBase>(new FE<3,BERNSTEIN>(fet));
#endif
case XYZ:
return UniquePtr<FEBase>(new FEXYZ<3>(fet));
case SCALAR:
return UniquePtr<FEBase>(new FEScalar<3>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
default:
libmesh_error_msg("Invalid dimension dim = " << dim);
}
libmesh_error_msg("We'll never get here!");
return UniquePtr<FEBase>();
}
| UniquePtr< FEGenericBase< RealGradient > > libMesh::FEGenericBase< RealGradient >::build | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [inherited] |
Builds a specific finite element type. A UniquePtr<FEAbstract> is returned to prevent a memory leak. This way the user need not remember to delete the object.
Reimplemented from libMesh::FEAbstract.
Definition at line 385 of file fe_base.C.
References libMesh::FEType::family, libMesh::LAGRANGE_VEC, and libMesh::NEDELEC_ONE.
{
switch (dim)
{
// 0D
case 0:
{
switch (fet.family)
{
case LAGRANGE_VEC:
return UniquePtr<FEVectorBase>(new FELagrangeVec<0>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
case 1:
{
switch (fet.family)
{
case LAGRANGE_VEC:
return UniquePtr<FEVectorBase>(new FELagrangeVec<1>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
case 2:
{
switch (fet.family)
{
case LAGRANGE_VEC:
return UniquePtr<FEVectorBase>(new FELagrangeVec<2>(fet));
case NEDELEC_ONE:
return UniquePtr<FEVectorBase>(new FENedelecOne<2>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
case 3:
{
switch (fet.family)
{
case LAGRANGE_VEC:
return UniquePtr<FEVectorBase>(new FELagrangeVec<3>(fet));
case NEDELEC_ONE:
return UniquePtr<FEVectorBase>(new FENedelecOne<3>(fet));
default:
libmesh_error_msg("ERROR: Bad FEType.family= " << fet.family);
}
}
default:
libmesh_error_msg("Invalid dimension dim = " << dim);
} // switch(dim)
libmesh_error_msg("We'll never get here!");
return UniquePtr<FEVectorBase>();
}
| static UniquePtr<FEGenericBase> libMesh::FEGenericBase< OutputType >::build_InfFE | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [static, inherited] |
Builds a specific infinite element type. A UniquePtr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.
The build call will fail if the OutputShape of this class is not compatible with the output required for the requested type
| UniquePtr< FEGenericBase< Real > > libMesh::FEGenericBase< Real >::build_InfFE | ( | const unsigned int | dim, |
| const FEType & | fet | ||
| ) | [inherited] |
Definition at line 461 of file fe_base.C.
References libMesh::CARTESIAN, libMesh::FEType::inf_map, libMesh::INFINITE_MAP, libMesh::JACOBI_20_00, libMesh::JACOBI_30_00, libMesh::LAGRANGE, libMesh::LEGENDRE, and libMesh::FEType::radial_family.
{
switch (dim)
{
// 1D
case 1:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << fet.radial_family);
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<1,JACOBI_20_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<1,JACOBI_30_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<1,LEGENDRE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<1,LAGRANGE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Can't build an infinite element with InfMapType = " << fet.inf_map);
}
}
default:
libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
}
}
// 2D
case 2:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
libmesh_error_msg("ERROR: Can't build an infinite element with FEFamily = " << fet.radial_family);
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<2,JACOBI_20_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<2,JACOBI_30_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<2,LEGENDRE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<2,LAGRANGE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
default:
libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
}
}
// 3D
case 3:
{
switch (fet.radial_family)
{
case INFINITE_MAP:
libmesh_error_msg("ERROR: Don't build an infinite element with FEFamily = " << fet.radial_family);
case JACOBI_20_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<3,JACOBI_20_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case JACOBI_30_00:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<3,JACOBI_30_00,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LEGENDRE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<3,LEGENDRE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
case LAGRANGE:
{
switch (fet.inf_map)
{
case CARTESIAN:
return UniquePtr<FEBase>(new InfFE<3,LAGRANGE,CARTESIAN>(fet));
default:
libmesh_error_msg("ERROR: Don't build an infinite element with InfMapType = " << fet.inf_map);
}
}
default:
libmesh_error_msg("ERROR: Bad FEType.radial_family= " << fet.radial_family);
}
}
default:
libmesh_error_msg("Invalid dimension dim = " << dim);
}
libmesh_error_msg("We'll never get here!");
return UniquePtr<FEBase>();
}
| UniquePtr< FEGenericBase< RealGradient > > libMesh::FEGenericBase< RealGradient >::build_InfFE | ( | const unsigned int | , |
| const FEType & | |||
| ) | [inherited] |
| void libMesh::FEGenericBase< OutputType >::coarsened_dof_values | ( | const NumericVector< Number > & | global_vector, |
| const DofMap & | dof_map, | ||
| const Elem * | coarse_elem, | ||
| DenseVector< Number > & | coarse_dofs, | ||
| const unsigned int | var, | ||
| const bool | use_old_dof_indices = false |
||
| ) | [static, inherited] |
Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children.
Definition at line 787 of file fe_base.C.
References std::abs(), libMesh::C_ONE, libMesh::Elem::child(), libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::FEType::default_quadrature_rule(), libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::FEInterface::dofs_on_edge(), libMesh::FEInterface::dofs_on_side(), libMesh::TensorTools::inner_product(), libMesh::FEInterface::inverse_map(), libMesh::Elem::is_child_on_edge(), libMesh::Elem::is_child_on_side(), libMesh::Elem::is_vertex(), libMesh::libmesh_assert(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::n_children(), libMesh::FEInterface::n_dofs(), libMesh::FEInterface::n_dofs_at_node(), libMesh::Elem::n_edges(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::DofMap::old_dof_indices(), libMesh::FEType::order, libMesh::Elem::p_level(), libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::TOLERANCE, libMesh::Elem::type(), libMesh::DofMap::variable_type(), libMesh::DenseMatrix< T >::zero(), libMesh::DenseVector< T >::zero(), and libMesh::zero.
Referenced by libMesh::JumpErrorEstimator::estimate_error(), and libMesh::ExactErrorEstimator::estimate_error().
{
// Side/edge local 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);
UniquePtr<FEGenericBase<OutputShape> > fe
(FEGenericBase<OutputShape>::build(dim, base_fe_type));
UniquePtr<FEGenericBase<OutputShape> > fe_coarse
(FEGenericBase<OutputShape>::build(dim, base_fe_type));
UniquePtr<QBase> qrule (base_fe_type.default_quadrature_rule(dim));
UniquePtr<QBase> qedgerule (base_fe_type.default_quadrature_rule(1));
UniquePtr<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<OutputShape> >& phi_values =
fe->get_phi();
const std::vector<std::vector<OutputShape> >& 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<OutputGradient> > *dphi_values =
NULL;
const std::vector<std::vector<OutputGradient> > *dphi_coarse =
NULL;
const FEContinuity cont = fe->get_continuity();
if (cont == C_ONE)
{
const std::vector<std::vector<OutputGradient> >&
ref_dphi_values = fe->get_dphi();
dphi_values = &ref_dphi_values;
const std::vector<std::vector<OutputGradient> >&
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<dof_id_type> 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<dof_id_type> 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 =
cast_int<unsigned int>
(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
OutputNumber fineval = libMesh::zero;
// solution grad at the quadrature point
OutputNumberGradient 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 += (*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) -=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp],
fineval) * JxW[qp];
if (cont == C_ONE)
Fe(freei) +=
TensorTools::inner_product(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<dof_id_type> 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 =
cast_int<unsigned int>
(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
OutputNumber fineval = libMesh::zero;
// solution grad at the quadrature point
OutputNumberGradient 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 += (*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) -=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += TensorTools::inner_product(fineval, phi_coarse[i][qp]) * JxW[qp];
if (cont == C_ONE)
Fe(freei) +=
TensorTools::inner_product(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<dof_id_type> 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 =
cast_int<unsigned int>
(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
OutputNumber fineval = libMesh::zero;
// solution grad at the quadrature point
OutputNumberGradient 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 += (*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) -=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product(phi_coarse[i][qp],
phi_coarse[j][qp]) *
JxW[qp];
if (cont == C_ONE)
{
if (dof_is_fixed[j])
Fe(freei) -=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp] * Ue(j);
else
Ke(freei,freej) +=
TensorTools::inner_product((*dphi_coarse)[i][qp],
(*dphi_coarse)[j][qp]) *
JxW[qp];
}
if (!dof_is_fixed[j])
freej++;
}
Fe(freei) += TensorTools::inner_product(phi_coarse[i][qp], fineval) *
JxW[qp];
if (cont == C_ONE)
Fe(freei) += TensorTools::inner_product(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);
// We should be fixing all dofs by now; no need to keep track of
// that unless we're debugging
#ifndef NDEBUG
dof_is_fixed[free_dof[i]] = true;
#endif
}
#ifndef NDEBUG
// Make sure every DoF got reached!
for (unsigned int i=0; i != new_n_dofs; ++i)
libmesh_assert(dof_is_fixed[i]);
#endif
}
| void libMesh::InfFE< Dim, T_radial, T_map >::combine_base_radial | ( | const Elem * | inf_elem | ) | [protected] |
Combines the shape functions, which were formed in init_shape_functions(Elem*), with geometric data. Has to be called every time the geometric configuration changes. Afterwards, the fields are ready to be used to compute global derivatives, the jacobian etc, see FEAbstract::compute_map().
Start logging the combination of radial and base parts
Start logging the combination of radial and base parts
Definition at line 728 of file inf_fe.C.
References libMesh::libmesh_assert(), libMesh::Elem::origin(), libMesh::START_LOG(), and libMesh::Elem::type().
{
libmesh_assert(inf_elem);
// at least check whether the base element type is correct.
// otherwise this version of computing dist would give problems
libmesh_assert_equal_to (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 =
cast_int<unsigned int>(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:
{
libmesh_not_implemented();
break;
}
//------------------------------------------------------------
// 2D
case 2:
{
libmesh_not_implemented();
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->get_fe_map()).get_phi_map();
const std::vector<std::vector<Real> >& Ss_map = (base_fe->get_fe_map()).get_dphidxi_map();
const std::vector<std::vector<Real> >& St_map = (base_fe->get_fe_map()).get_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 =
cast_int<unsigned int>(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_equal_to (phi.size(), n_total_approx_sf);
libmesh_assert_equal_to (dphidxi.size(), n_total_approx_sf);
libmesh_assert_equal_to (dphideta.size(), n_total_approx_sf);
libmesh_assert_equal_to (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]);
}
std::vector<std::vector<Real> >& phi_map = this->_fe_map->get_phi_map();
std::vector<std::vector<Real> >& dphidxi_map = this->_fe_map->get_dphidxi_map();
std::vector<std::vector<Real> >& dphideta_map = this->_fe_map->get_dphideta_map();
std::vector<std::vector<Real> >& dphidzeta_map = this->_fe_map->get_dphidzeta_map();
libmesh_assert_equal_to (phi_map.size(), n_total_mapping_sf);
libmesh_assert_equal_to (dphidxi_map.size(), n_total_mapping_sf);
libmesh_assert_equal_to (dphideta_map.size(), n_total_mapping_sf);
libmesh_assert_equal_to (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_msg("Unsupported Dim = " << Dim);
}
STOP_LOG("combine_base_radial()", "InfFE");
}
| void libMesh::InfFE< Dim, T_radial, T_map >::compute_data | ( | const FEType & | fe_t, |
| const Elem * | inf_elem, | ||
| FEComputeData & | data | ||
| ) | [static] |
Generalized version of shape(), takes an Elem*. The data contains both input and output parameters. For frequency domain simulations, the complex-valued shape is returned. In time domain both the computed shape, and the phase is returned. Note that the phase (proportional to the distance of the Point data.p from the envelope) is actually a measure how far into the future the results are. Pretty weird, hm!?
Definition at line 239 of file inf_fe_static.C.
References libMesh::Elem::build_side(), libMesh::InfFE< Dim, T_radial, T_map >::Radial::decay(), libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::FEComputeData::frequency, libMesh::INFEDGE2, libMesh::libmesh_assert(), libMesh::Elem::origin(), libMesh::FEComputeData::p, libMesh::FEComputeData::phase, libMesh::pi, libMesh::Elem::point(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FEComputeData::shape, libMesh::FE< Dim, T >::shape(), libMesh::FEInterface::shape(), libMesh::FEComputeData::speed, and libMesh::Elem::type().
{
libmesh_assert(inf_elem);
libmesh_assert_not_equal_to (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));
UniquePtr<Elem> base_el (inf_elem->build_side(0));
/*
* compute \p interpolated_dist containing the mapping-interpolated
* distance of the base point to the origin. This is the same
* for all shape functions. Set \p interpolated_dist to 0, it
* is added to.
*/
Real interpolated_dist = 0.;
switch (Dim)
{
case 1:
{
libmesh_assert_equal_to (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;
}
default:
libmesh_error_msg("Unknown Dim = " << Dim);
}
#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 \p 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
libmesh_error_msg("compute_data() for 1-dimensional InfFE not implemented.");
#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 \p 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
libmesh_error_msg("compute_data() for 1-dimensional InfFE not implemented.");
#endif
}
| void libMesh::FEAbstract::compute_node_constraints | ( | NodeConstraints & | constraints, |
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry
Definition at line 788 of file fe_abstract.C.
References std::abs(), libMesh::Elem::build_side(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::FEInterface::inverse_map(), libMesh::LAGRANGE, libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEInterface::n_dofs(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::Real, libMesh::remote_elem, libMesh::FEInterface::shape(), libMesh::Threads::spin_mtx, and libMesh::Elem::subactive().
{
libmesh_assert(elem);
const unsigned int Dim = elem->dim();
// Only constrain elements in 2,3D.
if (Dim == 1)
return;
// Only constrain active and ancestor elements
if (elem->subactive())
return;
// We currently always use LAGRANGE mappings for geometry
const FEType fe_type(elem->default_order(), LAGRANGE);
std::vector<const Node*> my_nodes, parent_nodes;
// 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 &&
elem->neighbor(s) != remote_elem)
if (elem->neighbor(s)->level() < elem->level()) // constrain dofs shared between
{ // this element and ones coarser
// than this element.
// Get pointers to the elements of interest and its parent.
const Elem* parent = elem->parent();
// This can't happen... Only level-0 elements have NULL
// parents, and no level-0 elements can be at a higher
// level than their neighbors!
libmesh_assert(parent);
const UniquePtr<Elem> my_side (elem->build_side(s));
const UniquePtr<Elem> parent_side (parent->build_side(s));
const unsigned int n_side_nodes = my_side->n_nodes();
my_nodes.clear();
my_nodes.reserve (n_side_nodes);
parent_nodes.clear();
parent_nodes.reserve (n_side_nodes);
for (unsigned int n=0; n != n_side_nodes; ++n)
my_nodes.push_back(my_side->get_node(n));
for (unsigned int n=0; n != n_side_nodes; ++n)
parent_nodes.push_back(parent_side->get_node(n));
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* my_node = my_nodes[my_side_n];
// The support point of the DOF
const Point& support_point = *my_node;
// Figure out where my node lies on their reference element.
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
parent_side.get(),
support_point);
// Compute the parent's side shape function values.
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, parent_side->type()));
const Node* their_node = parent_nodes[their_side_n];
libmesh_assert(their_node);
const Real their_value = FEInterface::shape(Dim-1,
fe_type,
parent_side->type(),
their_side_n,
mapped_point);
const Real their_mag = std::abs(their_value);
#ifdef DEBUG
// Protect for the case u_i ~= u_j,
// in which case i better equal j.
if (their_mag > 0.999)
{
libmesh_assert_equal_to (my_node, their_node);
libmesh_assert_less (std::abs(their_value - 1.), 0.001);
}
else
#endif
// To make nodal constraints useful for constructing
// sparsity patterns faster, we need to get EVERY
// POSSIBLE constraint coupling identified, even if
// there is no coupling in the isoparametric
// Lagrange case.
if (their_mag < 1.e-5)
{
// since we may be running this method concurrently
// 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);
// A reference to the constraint row.
NodeConstraintRow& constraint_row = constraints[my_node].first;
constraint_row.insert(std::make_pair (their_node,
0.));
}
// To get nodal coordinate constraints right, only
// add non-zero and non-identity values for Lagrange
// basis functions.
else // (1.e-5 <= their_mag <= .999)
{
// since we may be running this method concurrently
// 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);
// A reference to the constraint row.
NodeConstraintRow& constraint_row = constraints[my_node].first;
constraint_row.insert(std::make_pair (their_node,
their_value));
}
}
}
}
}
| void libMesh::InfFE< Dim, T_radial, T_map >::compute_node_indices | ( | const ElemType | inf_elem_type, |
| const unsigned int | outer_node_index, | ||
| unsigned int & | base_node, | ||
| unsigned int & | radial_node | ||
| ) | [static, protected] |
Computes the indices in the base base_node and in radial direction radial_node (either 0 or 1) associated to the node outer_node_index of an infinite element of type inf_elem_type.
Definition at line 385 of file inf_fe_static.C.
References libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, and libMesh::INFQUAD6.
{
switch (inf_elem_type)
{
case INFEDGE2:
{
libmesh_assert_less (outer_node_index, 2);
base_node = 0;
radial_node = outer_node_index;
return;
}
// linear base approximation, easy to determine
case INFQUAD4:
{
libmesh_assert_less (outer_node_index, 4);
base_node = outer_node_index % 2;
radial_node = outer_node_index / 2;
return;
}
case INFPRISM6:
{
libmesh_assert_less (outer_node_index, 6);
base_node = outer_node_index % 3;
radial_node = outer_node_index / 3;
return;
}
case INFHEX8:
{
libmesh_assert_less (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_msg("Unrecognized outer_node_index = " << outer_node_index);
}
}
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_equal_to (inf_elem_type, INFHEX18);
radial_node = 0;
base_node = 8;
return;
}
case 17:
{
libmesh_assert_equal_to (inf_elem_type, INFHEX18);
radial_node = 1;
base_node = 8;
return;
}
default:
libmesh_error_msg("Unrecognized outer_node_index = " << outer_node_index);
}
}
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_msg("Unrecognized outer_node_index = " << outer_node_index);
}
}
default:
libmesh_error_msg("ERROR: Bad infinite element type=" << inf_elem_type << ", node=" << outer_node_index);
}
}
| void libMesh::InfFE< Dim, T_radial, T_map >::compute_node_indices_fast | ( | const ElemType | inf_elem_type, |
| const unsigned int | outer_node_index, | ||
| unsigned int & | base_node, | ||
| unsigned int & | radial_node | ||
| ) | [static, protected] |
Does the same as compute_node_indices(), but stores the maps for the current element type. Provided the infinite element type changes seldom, this is probably faster than using compute_node_indices () alone. This is possible since the number of nodes is not likely to change.
Definition at line 592 of file inf_fe_static.C.
References libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, libMesh::INFQUAD6, libMesh::INVALID_ELEM, libMesh::invalid_uint, and n_nodes.
{
libmesh_assert_not_equal_to (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
* \p _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 \p InfFE object, and what
* request is currently directed to the static \p InfFE
* members (which use \p 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:
libmesh_error_msg("ERROR: Bad infinite element type=" << inf_elem_type << ", node=" << outer_node_index);
}
_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;
}
}
| void libMesh::FEGenericBase< OutputType >::compute_periodic_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const PeriodicBoundaries & | boundaries, | ||
| const MeshBase & | mesh, | ||
| const PointLocatorBase * | point_locator, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the constraint matrix contributions (for meshes with periodic boundary conditions) corresponding to variable number var_number, using generic projections.
Definition at line 1628 of file fe_base.C.
References std::abs(), libMesh::TypeVector< T >::absolute_fuzzy_equals(), libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::BoundaryInfo::boundary_ids(), libMesh::C_ONE, libMesh::C_ZERO, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::DofMap::constrain_p_dofs(), libMesh::FEType::default_quadrature_order(), libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::DofObject::dof_number(), libMesh::FEInterface::dofs_on_side(), libMesh::MeshBase::get_boundary_info(), libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::Elem::get_node(), libMesh::Elem::hmin(), libMesh::DofObject::id(), libMesh::TensorTools::inner_product(), libMesh::DofObject::invalid_id, libMesh::invalid_uint, libMesh::FEInterface::inverse_map(), libMesh::DofMap::is_constrained_dof(), libMesh::Elem::is_edge(), libMesh::Elem::is_face(), libMesh::PeriodicBoundaryBase::is_my_variable(), libMesh::Elem::is_node_on_edge(), libMesh::Elem::is_node_on_side(), libMesh::Elem::is_vertex(), libMesh::Elem::level(), libMesh::libmesh_assert(), std::min(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::DofObject::n_comp(), libMesh::Elem::n_edges(), libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor(), libMesh::Elem::p_level(), libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::BoundaryInfo::side_with_boundary_id(), libMesh::Threads::spin_mtx, libMesh::swap(), libMesh::DofMap::sys_number(), libMesh::TOLERANCE, and libMesh::DofMap::variable_type().
{
// Only bother if we truly have periodic boundaries
if (boundaries.empty())
return;
libmesh_assert(elem);
// Only constrain active elements with this method
if (!elem->active())
return;
const unsigned int Dim = elem->dim();
// We need sys_number and variable_number for DofObject methods
// later
const unsigned int sys_number = dof_map.sys_number();
const FEType& base_fe_type = dof_map.variable_type(variable_number);
// Construct FE objects for this element and its pseudo-neighbors.
UniquePtr<FEGenericBase<OutputShape> > my_fe
(FEGenericBase<OutputShape>::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);
// We'll use element size to generate relative tolerances later
const Real primary_hmin = elem->hmin();
UniquePtr<FEGenericBase<OutputShape> > neigh_fe
(FEGenericBase<OutputShape>::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<OutputShape> >& phi = my_fe->get_phi();
const std::vector<std::vector<OutputShape> >& neigh_phi =
neigh_fe->get_phi();
const std::vector<Point> *face_normals = NULL;
const std::vector<std::vector<OutputGradient> > *dphi = NULL;
const std::vector<std::vector<OutputGradient> > *neigh_dphi = NULL;
std::vector<dof_id_type> 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<OutputGradient> >& ref_dphi =
my_fe->get_dphi();
dphi = &ref_dphi;
const std::vector<std::vector<OutputGradient> >& 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 short int s=0; s<elem->n_sides(); s++)
{
if (elem->neighbor(s))
continue;
const std::vector<boundary_id_type>& bc_ids =
mesh.get_boundary_info().boundary_ids (elem, s);
for (std::vector<boundary_id_type>::const_iterator id_it=bc_ids.begin(); id_it!=bc_ids.end(); ++id_it)
{
const boundary_id_type boundary_id = *id_it;
const PeriodicBoundaryBase *periodic = boundaries.boundary(boundary_id);
if (periodic && periodic->is_my_variable(variable_number))
{
libmesh_assert(point_locator);
// Get pointers to the element's neighbor.
const Elem* neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s);
if (neigh == NULL)
libmesh_error_msg("PeriodicBoundaries point locator object returned NULL!");
// periodic (and possibly 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.get_boundary_info().side_with_boundary_id(neigh, periodic->pairedboundary);
libmesh_assert_not_equal_to (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
// We can do a projection with a single integration,
// due to the assumption of nested finite element
// subspaces.
// FIXME: it might be more efficient to do nodes,
// then edges, then side, to reduce the size of the
// Cholesky factorization(s)
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.size());
for (unsigned int i=0; i != neigh_point.size(); ++i)
neigh_point[i] = periodic->get_corresponding_pos(q_point[i]);
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 =
cast_int<unsigned int>
(my_side_dofs.size());
libmesh_assert_equal_to (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] *
TensorTools::inner_product(phi[i][qp],
phi[j][qp]);
if (cont != C_ZERO)
Ke(is,js) += JxW[qp] *
TensorTools::inner_product((*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] *
TensorTools::inner_product(neigh_phi[i][qp],
phi[j][qp]);
if (cont != C_ZERO)
Fe(js) += JxW[qp] *
TensorTools::inner_product((*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
//
// In order for this to work while threaded or on
// distributed meshes, we need a rigorous way to
// avoid recursive constraints. Here it is:
//
// For vertex DoFs, if there is a "prior" element
// (i.e. a coarser element or an equally refined
// element with a lower id) on this boundary which
// contains the vertex point, then we will avoid
// generating constraints; the prior element (or
// something prior to it) may do so. If we are the
// most prior (or "primary") element on this
// boundary sharing this point, then we look at the
// boundary periodic to us, we find the primary
// element there, and if that primary is coarser or
// equal-but-lower-id, then our vertex dofs are
// constrained in terms of that element.
//
// For edge DoFs, if there is a coarser element
// on this boundary sharing this edge, then we will
// avoid generating constraints (we will be
// constrained indirectly via AMR constraints
// connecting us to the coarser element's DoFs). If
// we are the coarsest element sharing this edge,
// then we generate constraints if and only if we
// are finer than the coarsest element on the
// boundary periodic to us sharing the corresponding
// periodic edge, or if we are at equal level but
// our edge nodes have higher ids than the periodic
// edge nodes (sorted from highest to lowest, then
// compared lexicographically)
//
// For face DoFs, we generate constraints if we are
// finer than our periodic neighbor, or if we are at
// equal level but our element id is higher than its
// element id.
//
// If the primary neighbor is also the current elem
// (a 1-element-thick mesh) then we choose which
// vertex dofs to constrain via lexicographic
// ordering on point locations
// FIXME: This code doesn't yet properly handle
// cases where multiple different periodic BCs
// intersect.
std::set<dof_id_type> my_constrained_dofs;
for (unsigned int n = 0; n != elem->n_nodes(); ++n)
{
if (!elem->is_node_on_side(n,s))
continue;
const Node* my_node = elem->get_node(n);
if (elem->is_vertex(n))
{
// Find all boundary ids that include this
// point and have periodic boundary
// conditions for this variable
std::set<boundary_id_type> point_bcids;
for (unsigned int new_s = 0; new_s !=
elem->n_sides(); ++new_s)
{
if (!elem->is_node_on_side(n,new_s))
continue;
const std::vector<boundary_id_type> new_bc_ids =
mesh.get_boundary_info().boundary_ids (elem, s);
for (std::vector<boundary_id_type>::const_iterator
new_id_it=new_bc_ids.begin(); new_id_it!=new_bc_ids.end(); ++new_id_it)
{
const boundary_id_type new_boundary_id = *new_id_it;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
if (new_periodic && new_periodic->is_my_variable(variable_number))
{
point_bcids.insert(new_boundary_id);
}
}
}
// See if this vertex has point neighbors to
// defer to
if (primary_boundary_point_neighbor
(elem, *my_node, mesh.get_boundary_info(), point_bcids)
!= elem)
continue;
// Find the complementary boundary id set
std::set<boundary_id_type> point_pairedids;
for (std::set<boundary_id_type>::const_iterator i =
point_bcids.begin(); i != point_bcids.end(); ++i)
{
const boundary_id_type new_boundary_id = *i;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
point_pairedids.insert(new_periodic->pairedboundary);
}
// What do we want to constrain against?
const Elem* primary_elem = NULL;
const Elem* main_neigh = NULL;
Point main_pt = *my_node,
primary_pt = *my_node;
for (std::set<boundary_id_type>::const_iterator i =
point_bcids.begin(); i != point_bcids.end(); ++i)
{
// Find the corresponding periodic point and
// its primary neighbor
const boundary_id_type new_boundary_id = *i;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
const Point neigh_pt =
new_periodic->get_corresponding_pos(*my_node);
// If the point is getting constrained
// to itself by this PBC then we don't
// generate any constraints
if (neigh_pt.absolute_fuzzy_equals
(*my_node, primary_hmin*TOLERANCE))
continue;
// Otherwise we'll have a constraint in
// one direction or another
if (!primary_elem)
primary_elem = elem;
const Elem *primary_neigh =
primary_boundary_point_neighbor(neigh, neigh_pt,
mesh.get_boundary_info(),
point_pairedids);
libmesh_assert(primary_neigh);
if (new_boundary_id == boundary_id)
{
main_neigh = primary_neigh;
main_pt = neigh_pt;
}
// Finer elements will get constrained in
// terms of coarser neighbors, not the
// other way around
if ((primary_neigh->level() > primary_elem->level()) ||
// For equal-level elements, the one with
// higher id gets constrained in terms of
// the one with lower id
(primary_neigh->level() == primary_elem->level() &&
primary_neigh->id() > primary_elem->id()) ||
// On a one-element-thick mesh, we compare
// points to see what side gets constrained
(primary_neigh == primary_elem &&
(neigh_pt > primary_pt)))
continue;
primary_elem = primary_neigh;
primary_pt = neigh_pt;
}
if (!primary_elem ||
primary_elem != main_neigh ||
primary_pt != main_pt)
continue;
}
else if (elem->is_edge(n))
{
// Find which edge we're on
unsigned int e=0;
for (; e != elem->n_edges(); ++e)
{
if (elem->is_node_on_edge(n,e))
break;
}
libmesh_assert_less (e, elem->n_edges());
// Find the edge end nodes
Node *e1 = NULL,
*e2 = NULL;
for (unsigned int nn = 0; nn != elem->n_nodes(); ++nn)
{
if (nn == n)
continue;
if (elem->is_node_on_edge(nn, e))
{
if (e1 == NULL)
{
e1 = elem->get_node(nn);
}
else
{
e2 = elem->get_node(nn);
break;
}
}
}
libmesh_assert (e1 && e2);
// Find all boundary ids that include this
// edge and have periodic boundary
// conditions for this variable
std::set<boundary_id_type> edge_bcids;
for (unsigned int new_s = 0; new_s !=
elem->n_sides(); ++new_s)
{
if (!elem->is_node_on_side(n,new_s))
continue;
const std::vector<boundary_id_type>& new_bc_ids =
mesh.get_boundary_info().boundary_ids (elem, s);
for (std::vector<boundary_id_type>::const_iterator
new_id_it=new_bc_ids.begin(); new_id_it!=new_bc_ids.end(); ++new_id_it)
{
const boundary_id_type new_boundary_id = *new_id_it;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
if (new_periodic && new_periodic->is_my_variable(variable_number))
{
edge_bcids.insert(new_boundary_id);
}
}
}
// See if this edge has neighbors to defer to
if (primary_boundary_edge_neighbor
(elem, *e1, *e2, mesh.get_boundary_info(), edge_bcids)
!= elem)
continue;
// Find the complementary boundary id set
std::set<boundary_id_type> edge_pairedids;
for (std::set<boundary_id_type>::const_iterator i =
edge_bcids.begin(); i != edge_bcids.end(); ++i)
{
const boundary_id_type new_boundary_id = *i;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
edge_pairedids.insert(new_periodic->pairedboundary);
}
// What do we want to constrain against?
const Elem* primary_elem = NULL;
const Elem* main_neigh = NULL;
Point main_pt1 = *e1,
main_pt2 = *e2,
primary_pt1 = *e1,
primary_pt2 = *e2;
for (std::set<boundary_id_type>::const_iterator i =
edge_bcids.begin(); i != edge_bcids.end(); ++i)
{
// Find the corresponding periodic edge and
// its primary neighbor
const boundary_id_type new_boundary_id = *i;
const PeriodicBoundaryBase *new_periodic = boundaries.boundary(new_boundary_id);
Point neigh_pt1 = new_periodic->get_corresponding_pos(*e1),
neigh_pt2 = new_periodic->get_corresponding_pos(*e2);
// If the edge is getting constrained
// to itself by this PBC then we don't
// generate any constraints
if (neigh_pt1.absolute_fuzzy_equals
(*e1, primary_hmin*TOLERANCE) &&
neigh_pt2.absolute_fuzzy_equals
(*e2, primary_hmin*TOLERANCE))
continue;
// Otherwise we'll have a constraint in
// one direction or another
if (!primary_elem)
primary_elem = elem;
const Elem *primary_neigh = primary_boundary_edge_neighbor
(neigh, neigh_pt1, neigh_pt2,
mesh.get_boundary_info(), edge_pairedids);
libmesh_assert(primary_neigh);
if (new_boundary_id == boundary_id)
{
main_neigh = primary_neigh;
main_pt1 = neigh_pt1;
main_pt2 = neigh_pt2;
}
// If we have a one-element thick mesh,
// we'll need to sort our points to get a
// consistent ordering rule
//
// Use >= in this test to make sure that,
// for angular constraints, no node gets
// constrained to itself.
if (primary_neigh == primary_elem)
{
if (primary_pt1 > primary_pt2)
std::swap(primary_pt1, primary_pt2);
if (neigh_pt1 > neigh_pt2)
std::swap(neigh_pt1, neigh_pt2);
if (neigh_pt2 >= primary_pt2)
continue;
}
// Otherwise:
// Finer elements will get constrained in
// terms of coarser ones, not the other way
// around
if ((primary_neigh->level() > primary_elem->level()) ||
// For equal-level elements, the one with
// higher id gets constrained in terms of
// the one with lower id
(primary_neigh->level() == primary_elem->level() &&
primary_neigh->id() > primary_elem->id()))
continue;
primary_elem = primary_neigh;
primary_pt1 = neigh_pt1;
primary_pt2 = neigh_pt2;
}
if (!primary_elem ||
primary_elem != main_neigh ||
primary_pt1 != main_pt1 ||
primary_pt2 != main_pt2)
continue;
}
else if (elem->is_face(n))
{
// If we have a one-element thick mesh,
// use the ordering of the face node and its
// periodic counterpart to determine what
// gets constrained
if (neigh == elem)
{
const Point neigh_pt =
periodic->get_corresponding_pos(*my_node);
if (neigh_pt > *my_node)
continue;
}
// Otherwise:
// Finer elements will get constrained in
// terms of coarser ones, not the other way
// around
if ((neigh->level() > elem->level()) ||
// For equal-level elements, the one with
// higher id gets constrained in terms of
// the one with lower id
(neigh->level() == elem->level() &&
neigh->id() > elem->id()))
continue;
}
// If we made it here without hitting a continue
// statement, then we're at a node whose dofs
// should be constrained by this element's
// calculations.
const unsigned int n_comp =
my_node->n_comp(sys_number, variable_number);
for (unsigned int i=0; i != n_comp; ++i)
my_constrained_dofs.insert
(my_node->dof_number
(sys_number, variable_number, i));
}
// FIXME: old code for disambiguating periodic BCs:
// this is not threadsafe nor safe to run on a
// non-serialized mesh.
/*
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 dof_id_type their_dof_g = neigh_dof_indices[i];
libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (!dof_map.is_constrained_dof(their_dof_g))
continue;
}
DofConstraintRow& their_constraint_row =
constraints[their_dof_g].first;
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
const dof_id_type my_dof_g = my_dof_indices[j];
libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
if (their_constraint_row.count(my_dof_g))
recursive_constraint[js] = true;
}
}
*/
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
// FIXME: old code path
// if (recursive_constraint[js])
// continue;
const unsigned int j = my_side_dofs[js];
const dof_id_type my_dof_g = my_dof_indices[j];
libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
// FIXME: new code path
if (!my_constrained_dofs.count(my_dof_g))
continue;
DofConstraintRow* constraint_row;
// we may be running constraint methods concurretly
// on multiple threads, so we need a lock to
// ensure that this constraint is "ours"
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (dof_map.is_constrained_dof(my_dof_g))
continue;
constraint_row = &(constraints[my_dof_g]);
libmesh_assert(constraint_row->empty());
}
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const dof_id_type their_dof_g = neigh_dof_indices[i];
libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
// Periodic constraints should never be
// self-constraints
// libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
const Real their_dof_value = Ue[is](js);
if (their_dof_g == my_dof_g)
{
libmesh_assert_less (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) < 10*TOLERANCE)
continue;
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
}
}
}
}
| void libMesh::FEAbstract::compute_periodic_node_constraints | ( | NodeConstraints & | constraints, |
| const PeriodicBoundaries & | boundaries, | ||
| const MeshBase & | mesh, | ||
| const PointLocatorBase * | point_locator, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the node position constraint equation contributions (for meshes with periodic boundary conditions)
Definition at line 931 of file fe_abstract.C.
References libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::BoundaryInfo::boundary_ids(), libMesh::Elem::build_side(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::MeshBase::get_boundary_info(), libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::invalid_uint, libMesh::FEInterface::inverse_map(), libMesh::LAGRANGE, libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEInterface::n_dofs(), libMesh::Elem::n_sides(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor(), libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::Real, libMesh::FEInterface::shape(), libMesh::BoundaryInfo::side_with_boundary_id(), and libMesh::Threads::spin_mtx.
{
// Only bother if we truly have periodic boundaries
if (boundaries.empty())
return;
libmesh_assert(elem);
// Only constrain active elements with this method
if (!elem->active())
return;
const unsigned int Dim = elem->dim();
// We currently always use LAGRANGE mappings for geometry
const FEType fe_type(elem->default_order(), LAGRANGE);
std::vector<const Node*> my_nodes, neigh_nodes;
// Look at the element faces. Check to see if we need to
// build constraints.
for (unsigned short int s=0; s<elem->n_sides(); s++)
{
if (elem->neighbor(s))
continue;
const std::vector<boundary_id_type>& bc_ids =
mesh.get_boundary_info().boundary_ids (elem, s);
for (std::vector<boundary_id_type>::const_iterator id_it=bc_ids.begin(); id_it!=bc_ids.end(); ++id_it)
{
const boundary_id_type boundary_id = *id_it;
const PeriodicBoundaryBase *periodic = boundaries.boundary(boundary_id);
if (periodic)
{
libmesh_assert(point_locator);
// Get pointers to the element's neighbor.
const Elem* neigh = boundaries.neighbor(boundary_id, *point_locator, 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.get_boundary_info().side_with_boundary_id(neigh, periodic->pairedboundary);
libmesh_assert_not_equal_to (s_neigh, libMesh::invalid_uint);
#ifdef LIBMESH_ENABLE_AMR
libmesh_assert(neigh->active());
#endif // #ifdef LIBMESH_ENABLE_AMR
const UniquePtr<Elem> my_side (elem->build_side(s));
const UniquePtr<Elem> neigh_side (neigh->build_side(s_neigh));
const unsigned int n_side_nodes = my_side->n_nodes();
my_nodes.clear();
my_nodes.reserve (n_side_nodes);
neigh_nodes.clear();
neigh_nodes.reserve (n_side_nodes);
for (unsigned int n=0; n != n_side_nodes; ++n)
my_nodes.push_back(my_side->get_node(n));
for (unsigned int n=0; n != n_side_nodes; ++n)
neigh_nodes.push_back(neigh_side->get_node(n));
// Make sure we're not adding recursive constraints
// due to the redundancy in the way we add periodic
// boundary constraints, or adding constraints to
// nodes that already have AMR constraints
std::vector<bool> skip_constraint(n_side_nodes, false);
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* my_node = my_nodes[my_side_n];
// Figure out where my node lies on their reference element.
const Point neigh_point = periodic->get_corresponding_pos(*my_node);
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
neigh_side.get(),
neigh_point);
// If we've already got a constraint on this
// node, then the periodic constraint is
// redundant
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (constraints.count(my_node))
{
skip_constraint[my_side_n] = true;
continue;
}
}
// Compute the neighbors's side shape function values.
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
const Node* their_node = neigh_nodes[their_side_n];
// If there's a constraint on an opposing node,
// we need to see if it's constrained by
// *our side* making any periodic constraint
// on us recursive
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (!constraints.count(their_node))
continue;
const NodeConstraintRow& their_constraint_row =
constraints[their_node].first;
for (unsigned int orig_side_n=0;
orig_side_n < n_side_nodes;
orig_side_n++)
{
libmesh_assert_less (orig_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* orig_node = my_nodes[orig_side_n];
if (their_constraint_row.count(orig_node))
skip_constraint[orig_side_n] = true;
}
}
}
}
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
if (skip_constraint[my_side_n])
continue;
const Node* my_node = my_nodes[my_side_n];
// Figure out where my node lies on their reference element.
const Point neigh_point = periodic->get_corresponding_pos(*my_node);
// Figure out where my node lies on their reference element.
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
neigh_side.get(),
neigh_point);
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
const Node* their_node = neigh_nodes[their_side_n];
libmesh_assert(their_node);
const Real their_value = FEInterface::shape(Dim-1,
fe_type,
neigh_side->type(),
their_side_n,
mapped_point);
// since we may be running this method concurrently
// 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);
NodeConstraintRow& constraint_row =
constraints[my_node].first;
constraint_row.insert(std::make_pair(their_node,
their_value));
}
}
}
}
}
}
}
}
| void libMesh::FEGenericBase< OutputType >::compute_proj_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number, using generic projections.
Definition at line 1346 of file fe_base.C.
References std::abs(), libMesh::Elem::active(), libMesh::C_ONE, libMesh::C_ZERO, libMesh::DenseMatrix< T >::cholesky_solve(), libMesh::DofMap::constrain_p_dofs(), libMesh::FEType::default_quadrature_order(), libMesh::Elem::dim(), libMesh::DISCONTINUOUS, libMesh::DofMap::dof_indices(), libMesh::FEInterface::dofs_on_side(), libMesh::TensorTools::inner_product(), libMesh::DofObject::invalid_id, libMesh::FEInterface::inverse_map(), libMesh::DofMap::is_constrained_dof(), libMesh::Elem::level(), libMesh::libmesh_assert(), std::min(), libMesh::Elem::min_p_level_by_neighbor(), libMesh::Elem::n_neighbors(), libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::p_level(), libMesh::Real, libMesh::DenseVector< T >::resize(), libMesh::DenseMatrix< T >::resize(), libMesh::Threads::spin_mtx, libMesh::TOLERANCE, libMesh::DofMap::variable_type(), and libMesh::Elem::which_neighbor_am_i().
Referenced by libMesh::FE< Dim, T >::compute_constraints().
{
libmesh_assert(elem);
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.
UniquePtr<FEGenericBase<OutputShape> > my_fe
(FEGenericBase<OutputShape>::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);
UniquePtr<FEGenericBase<OutputShape> > neigh_fe
(FEGenericBase<OutputShape>::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<OutputShape> >& phi = my_fe->get_phi();
const std::vector<std::vector<OutputShape> >& neigh_phi =
neigh_fe->get_phi();
const std::vector<Point> *face_normals = NULL;
const std::vector<std::vector<OutputGradient> > *dphi = NULL;
const std::vector<std::vector<OutputGradient> > *neigh_dphi = NULL;
std::vector<dof_id_type> 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<OutputGradient> >& ref_dphi =
my_fe->get_dphi();
dphi = &ref_dphi;
const std::vector<std::vector<OutputGradient> >& 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_less (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 =
cast_int<unsigned int>(my_side_dofs.size());
libmesh_assert_equal_to (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] * TensorTools::inner_product(phi[i][qp], phi[j][qp]);
if (cont != C_ZERO)
Ke(is,js) += JxW[qp] *
TensorTools::inner_product((*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] *
TensorTools::inner_product(neigh_phi[i][qp],
phi[j][qp]);
if (cont != C_ZERO)
Fe(js) += JxW[qp] *
TensorTools::inner_product((*neigh_dphi)[i][qp] *
(*face_normals)[qp],
(*dphi)[j][qp] *
(*face_normals)[qp]);
}
}
Ke.cholesky_solve(Fe, Ue[is]);
}
for (unsigned int js = 0; js != n_side_dofs; ++js)
{
const unsigned int j = my_side_dofs[js];
const dof_id_type my_dof_g = my_dof_indices[j];
libmesh_assert_not_equal_to (my_dof_g, DofObject::invalid_id);
// Hunt for "constraining against myself" cases before
// we bother creating a constraint row
bool self_constraint = false;
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const dof_id_type their_dof_g = neigh_dof_indices[i];
libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
if (their_dof_g == my_dof_g)
{
#ifndef NDEBUG
const Real their_dof_value = Ue[is](js);
libmesh_assert_less (std::abs(their_dof_value-1.),
10*TOLERANCE);
for (unsigned int k = 0; k != n_side_dofs; ++k)
libmesh_assert(k == is ||
std::abs(Ue[k](js)) <
10*TOLERANCE);
#endif
self_constraint = true;
break;
}
}
if (self_constraint)
continue;
DofConstraintRow* constraint_row;
// we may be running constraint methods concurrently
// on multiple threads, so we need a lock to
// ensure that this constraint is "ours"
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (dof_map.is_constrained_dof(my_dof_g))
continue;
constraint_row = &(constraints[my_dof_g]);
libmesh_assert(constraint_row->empty());
}
for (unsigned int is = 0; is != n_side_dofs; ++is)
{
const unsigned int i = neigh_side_dofs[is];
const dof_id_type their_dof_g = neigh_dof_indices[i];
libmesh_assert_not_equal_to (their_dof_g, DofObject::invalid_id);
libmesh_assert_not_equal_to (their_dof_g, my_dof_g);
const Real their_dof_value = Ue[is](js);
if (std::abs(their_dof_value) < 10*TOLERANCE)
continue;
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);
}
}
}
| void libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions | ( | const Elem * | , |
| const std::vector< Point > & | |||
| ) | [protected, virtual] |
After having updated the jacobian and the transformation from local to global coordinates in FEAbstract::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx/y/z, dphasedx/y/z, dweight. This method should barely be re-defined in derived classes, but still should be usable for children. Therefore, keep it protected. Overloaded method from the FEBase version.
Reimplemented from libMesh::FEGenericBase< OutputType >.
Definition at line 890 of file inf_fe.C.
References libMesh::libmesh_assert(), and libMesh::START_LOG().
{
libmesh_assert(radial_qrule);
// 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:
{
libmesh_not_implemented();
break;
}
case 2:
{
libmesh_not_implemented();
break;
}
case 3:
{
const std::vector<Real>& dxidx_map = this->_fe_map->get_dxidx();
const std::vector<Real>& dxidy_map = this->_fe_map->get_dxidy();
const std::vector<Real>& dxidz_map = this->_fe_map->get_dxidz();
const std::vector<Real>& detadx_map = this->_fe_map->get_detadx();
const std::vector<Real>& detady_map = this->_fe_map->get_detady();
const std::vector<Real>& detadz_map = this->_fe_map->get_detadz();
const std::vector<Real>& dzetadx_map = this->_fe_map->get_dzetadx();
const std::vector<Real>& dzetady_map = this->_fe_map->get_dzetady();
const std::vector<Real>& dzetadz_map = this->_fe_map->get_dzetadz();
// 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_msg("Unsupported dim = " << dim);
}
// Stop logging the overall computation of shape functions
STOP_LOG("compute_shape_functions()", "InfFE");
}
| void libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_indices | ( | const FEType & | fet, |
| const ElemType | inf_elem_type, | ||
| const unsigned int | i, | ||
| unsigned int & | base_shape, | ||
| unsigned int & | radial_shape | ||
| ) | [static, protected] |
Computes the indices of shape functions in the base base_shape and in radial direction radial_shape (0 in the base,
further out) associated to the shape with global index i of an infinite element of type inf_elem_type.
Definition at line 701 of file inf_fe_static.C.
References libMesh::INFEDGE2, libMesh::INFHEX16, libMesh::INFHEX18, libMesh::INFHEX8, libMesh::INFPRISM12, libMesh::INFPRISM6, libMesh::INFQUAD4, libMesh::INFQUAD6, libMesh::invalid_uint, libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_per_elem(), and libMesh::FEType::radial_order.
{
/*
* 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 \p 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_msg("Unrecognized inf_elem_type = " << inf_elem_type);
}
{
// 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_less (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;
}
| void libMesh::ReferenceCounter::disable_print_counter_info | ( | ) | [static, inherited] |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
Referenced by libMesh::LibMeshInit::LibMeshInit().
{
_enable_print_counter = false;
return;
}
| void libMesh::InfFE< Dim, T_radial, T_base >::edge_reinit | ( | const Elem * | elem, |
| const unsigned int | edge, | ||
| const Real | tolerance = TOLERANCE, |
||
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
Not implemented yet. Reinitializes all the physical element-dependent data based on the edge of an infinite element.
Implements libMesh::FEAbstract.
Definition at line 109 of file inf_fe_boundary.C.
{
// We don't do this for 1D elements!
//libmesh_assert_not_equal_to (Dim, 1);
libmesh_not_implemented_msg("ERROR: Edge conditions for infinite elements not implemented!");
if (pts != NULL)
libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements not implemented!");
}
| void libMesh::ReferenceCounter::enable_print_counter_info | ( | ) | [static, inherited] |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
{
_enable_print_counter = true;
return;
}
| Real libMesh::InfFE< 1, INFINITE_MAP, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 75 of file inf_fe_map_eval.C.
{ return infinite_map_eval(v, i); }
| Real libMesh::InfFE< 2, INFINITE_MAP, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 76 of file inf_fe_map_eval.C.
{ return infinite_map_eval(v, i); }
| Real libMesh::InfFE< 3, INFINITE_MAP, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 77 of file inf_fe_map_eval.C.
{ return infinite_map_eval(v, i); }
| Real libMesh::InfFE< 1, LEGENDRE, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 316 of file inf_fe_legendre_eval.C.
{ return legendre_eval(v, i); }
| Real libMesh::InfFE< 2, LEGENDRE, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 317 of file inf_fe_legendre_eval.C.
{ return legendre_eval(v, i); }
| Real libMesh::InfFE< 3, LEGENDRE, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 318 of file inf_fe_legendre_eval.C.
{ return legendre_eval(v, i); }
| Real libMesh::InfFE< 1, JACOBI_30_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 463 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval(v, i); }
| Real libMesh::InfFE< 2, JACOBI_30_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 464 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval(v, i); }
| Real libMesh::InfFE< 3, JACOBI_30_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 465 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval(v, i); }
| Real libMesh::InfFE< 1, JACOBI_20_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 468 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval(v, i); }
| Real libMesh::InfFE< 2, JACOBI_20_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 469 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval(v, i); }
| Real libMesh::InfFE< 3, JACOBI_20_00, CARTESIAN >::eval | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 470 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval(v, i); }
| static Real libMesh::InfFE< Dim, T_radial, T_map >::eval | ( | Real | v, |
| Order | o_radial, | ||
| unsigned int | i | ||
| ) | [static, protected] |
polynomial evaluated at v. This method provides the approximation in radial direction for the overall shape functions, which is defined in InfFE::shape(). This method is allowed to be static, since it is independent of dimension and base_family. It is templated, though, w.r.t. to radial FEFamily.Specialized for T_radial=INFINITE_MAP, this function returns the value of the
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.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), and libMesh::InfFE< Dim, T_radial, T_map >::shape().
| Real libMesh::InfFE< 1, LAGRANGE, CARTESIAN >::eval | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2613 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval(v, o, i); }
| Real libMesh::InfFE< 2, LAGRANGE, CARTESIAN >::eval | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2614 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval(v, o, i); }
| Real libMesh::InfFE< 3, LAGRANGE, CARTESIAN >::eval | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2615 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval(v, o, i); }
| Real libMesh::InfFE< 1, INFINITE_MAP, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 81 of file inf_fe_map_eval.C.
{ return infinite_map_eval_deriv(v, i); }
| Real libMesh::InfFE< 2, INFINITE_MAP, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 82 of file inf_fe_map_eval.C.
{ return infinite_map_eval_deriv(v, i); }
| Real libMesh::InfFE< 3, INFINITE_MAP, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 83 of file inf_fe_map_eval.C.
{ return infinite_map_eval_deriv(v, i); }
| Real libMesh::InfFE< 1, LEGENDRE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 322 of file inf_fe_legendre_eval.C.
{ return legendre_eval_deriv(v, i); }
| Real libMesh::InfFE< 2, LEGENDRE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 323 of file inf_fe_legendre_eval.C.
{ return legendre_eval_deriv(v, i); }
| Real libMesh::InfFE< 3, LEGENDRE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 324 of file inf_fe_legendre_eval.C.
{ return legendre_eval_deriv(v, i); }
| Real libMesh::InfFE< 1, JACOBI_30_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 469 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval_deriv(v, i); }
| Real libMesh::InfFE< 2, JACOBI_30_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 470 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval_deriv(v, i); }
| Real libMesh::InfFE< 3, JACOBI_30_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 471 of file inf_fe_jacobi_30_00_eval.C.
{ return jacobi_30_00_eval_deriv(v, i); }
| Real libMesh::InfFE< 1, JACOBI_20_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 474 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval_deriv(v, i); }
| Real libMesh::InfFE< 2, JACOBI_20_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 475 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval_deriv(v, i); }
| Real libMesh::InfFE< 3, JACOBI_20_00, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | , | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 476 of file inf_fe_jacobi_20_00_eval.C.
{ return jacobi_20_00_eval_deriv(v, i); }
| static Real libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv | ( | Real | v, |
| Order | o_radial, | ||
| unsigned int | i | ||
| ) | [static, protected] |
polynomial at coordinate v. See eval for details. Referenced by libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions(), and libMesh::InfFE< Dim, T_radial, T_map >::inverse_map().
| Real libMesh::InfFE< 1, LAGRANGE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2619 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval_deriv(v, o, i); }
| Real libMesh::InfFE< 2, LAGRANGE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2620 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval_deriv(v, o, i); }
| Real libMesh::InfFE< 3, LAGRANGE, CARTESIAN >::eval_deriv | ( | Real | v, |
| Order | o, | ||
| unsigned | i | ||
| ) | [protected] |
Definition at line 2621 of file inf_fe_lagrange_eval.C.
{ return lagrange_eval_deriv(v, o, i); }
| virtual FEContinuity libMesh::InfFE< Dim, T_radial, T_map >::get_continuity | ( | ) | const [inline, virtual] |
Implements libMesh::FEAbstract.
Definition at line 340 of file inf_fe.h.
References libMesh::C_ZERO.
{ return C_ZERO; } // FIXME - is this true??
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_curl_phi | ( | ) | const [inline, inherited] |
Definition at line 226 of file fe_base.h.
Referenced by libMesh::ExactSolution::_compute_error(), and libMesh::FEMContext::interior_curl().
{ libmesh_assert(!calculations_started || calculate_curl_phi);
calculate_curl_phi = calculate_dphiref = true; return curl_phi; }
| const std::vector<Real>& libMesh::FEAbstract::get_curvatures | ( | ) | const [inline, inherited] |
Definition at line 380 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_curvatures();}
| const std::vector<std::vector<OutputTensor> >& libMesh::FEGenericBase< OutputType >::get_d2phi | ( | ) | const [inline, inherited] |
Definition at line 292 of file fe_base.h.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_side_hessian(), libMesh::FEMContext::interior_hessians(), libMesh::FEMContext::side_hessian(), libMesh::FEMContext::side_hessians(), and libMesh::FEMContext::some_interior_hessian().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phideta2 | ( | ) | const [inline, inherited] |
Definition at line 372 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phideta2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidetadzeta | ( | ) | const [inline, inherited] |
Definition at line 380 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidetadzeta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidx2 | ( | ) | const [inline, inherited] |
Definition at line 300 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidx2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxdy | ( | ) | const [inline, inherited] |
Definition at line 308 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxdy; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxdz | ( | ) | const [inline, inherited] |
Definition at line 316 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxdz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxi2 | ( | ) | const [inline, inherited] |
Definition at line 348 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxi2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxideta | ( | ) | const [inline, inherited] |
Definition at line 356 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxideta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidxidzeta | ( | ) | const [inline, inherited] |
Definition at line 364 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxidzeta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidy2 | ( | ) | const [inline, inherited] |
Definition at line 324 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidy2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidydz | ( | ) | const [inline, inherited] |
Definition at line 332 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidydz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidz2 | ( | ) | const [inline, inherited] |
Definition at line 340 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidz2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_d2phidzeta2 | ( | ) | const [inline, inherited] |
Definition at line 388 of file fe_base.h.
Referenced by libMesh::H1FETransformation< OutputShape >::map_d2phi().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidzeta2; }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdeta2 | ( | ) | const [inline, inherited] |
Definition at line 267 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdeta2(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdetadzeta | ( | ) | const [inline, inherited] |
Definition at line 297 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdetadzeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxi2 | ( | ) | const [inline, inherited] |
Definition at line 261 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxi2(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxideta | ( | ) | const [inline, inherited] |
Definition at line 283 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxideta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxidzeta | ( | ) | const [inline, inherited] |
Definition at line 291 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxidzeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdzeta2 | ( | ) | const [inline, inherited] |
Definition at line 275 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdzeta2(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detadx | ( | ) | const [inline, inherited] |
Definition at line 327 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detadx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detady | ( | ) | const [inline, inherited] |
Definition at line 334 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detady(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detadz | ( | ) | const [inline, inherited] |
Definition at line 341 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detadz(); }
| const std::vector<std::vector<OutputDivergence> >& libMesh::FEGenericBase< OutputType >::get_div_phi | ( | ) | const [inline, inherited] |
Definition at line 234 of file fe_base.h.
Referenced by libMesh::ExactSolution::_compute_error(), and libMesh::FEMContext::interior_div().
{ libmesh_assert(!calculations_started || calculate_div_phi);
calculate_div_phi = calculate_dphiref = true; return div_phi; }
| const std::vector<OutputGradient>& libMesh::FEGenericBase< OutputType >::get_dphase | ( | ) | const [inline, inherited] |
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 406 of file fe_base.h.
{ return dphase; }
| const std::vector<std::vector<OutputGradient> >& libMesh::FEGenericBase< OutputType >::get_dphi | ( | ) | const [inline, inherited] |
Definition at line 218 of file fe_base.h.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_side_gradient(), libMesh::FEMContext::interior_gradients(), libMesh::ProjectFEMSolution::operator()(), libMesh::FEMContext::side_gradient(), libMesh::FEMContext::side_gradients(), and libMesh::FEMContext::some_interior_gradient().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphideta | ( | ) | const [inline, inherited] |
Definition at line 274 of file fe_base.h.
Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphideta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidx | ( | ) | const [inline, inherited] |
Definition at line 242 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidx; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidxi | ( | ) | const [inline, inherited] |
Definition at line 266 of file fe_base.h.
Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphidxi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidy | ( | ) | const [inline, inherited] |
Definition at line 250 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidy; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidz | ( | ) | const [inline, inherited] |
Definition at line 258 of file fe_base.h.
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_dphidzeta | ( | ) | const [inline, inherited] |
Definition at line 282 of file fe_base.h.
Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_div(), and libMesh::H1FETransformation< OutputShape >::map_dphi().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphidzeta; }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidx | ( | ) | const [inline, inherited] |
Definition at line 306 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidy | ( | ) | const [inline, inherited] |
Definition at line 313 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidy(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidz | ( | ) | const [inline, inherited] |
Definition at line 320 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidz(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdeta | ( | ) | const [inline, inherited] |
Definition at line 248 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxyzdeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdxi | ( | ) | const [inline, inherited] |
Definition at line 241 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxyzdxi(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdzeta | ( | ) | const [inline, inherited] |
Definition at line 255 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return _fe_map->get_dxyzdzeta(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetadx | ( | ) | const [inline, inherited] |
Definition at line 348 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetadx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetady | ( | ) | const [inline, inherited] |
Definition at line 355 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetady(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetadz | ( | ) | const [inline, inherited] |
Definition at line 362 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetadz(); }
| FEFamily libMesh::FEAbstract::get_family | ( | ) | const [inline, inherited] |
Definition at line 439 of file fe_abstract.h.
References libMesh::FEType::family, and libMesh::FEAbstract::fe_type.
Referenced by libMesh::FE< Dim, T >::FE().
| const FEMap& libMesh::FEAbstract::get_fe_map | ( | ) | const [inline, inherited] |
Definition at line 444 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().
{ return *_fe_map.get(); }
| FEType libMesh::FEAbstract::get_fe_type | ( | ) | const [inline, inherited] |
Definition at line 418 of file fe_abstract.h.
References libMesh::FEAbstract::fe_type.
Referenced by libMesh::FEMContext::build_new_fe(), libMesh::H1FETransformation< OutputShape >::map_phi(), libMesh::HCurlFETransformation< OutputShape >::map_phi(), and libMesh::ProjectFEMSolution::operator()().
{ return fe_type; }
| std::string libMesh::ReferenceCounter::get_info | ( | ) | [static, inherited] |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream oss;
oss << '\n'
<< " ---------------------------------------------------------------------------- \n"
<< "| Reference count information |\n"
<< " ---------------------------------------------------------------------------- \n";
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;
oss << "| " << name << " reference count information:\n"
<< "| Creations: " << creations << '\n'
<< "| Destructions: " << destructions << '\n';
}
oss << " ---------------------------------------------------------------------------- \n";
return oss.str();
#else
return "";
#endif
}
| const std::vector<Real>& libMesh::FEAbstract::get_JxW | ( | ) | const [inline, inherited] |
Definition at line 234 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMSystem::init_context(), and libMesh::ProjectFEMSolution::operator()().
{ return this->_fe_map->get_JxW(); }
| const std::vector<Point>& libMesh::FEAbstract::get_normals | ( | ) | const [inline, inherited] |
Definition at line 374 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_normals(); }
| Order libMesh::FEAbstract::get_order | ( | ) | const [inline, inherited] |
Definition at line 423 of file fe_abstract.h.
References libMesh::FEAbstract::_p_level, libMesh::FEAbstract::fe_type, and libMesh::FEType::order.
| unsigned int libMesh::FEAbstract::get_p_level | ( | ) | const [inline, inherited] |
Definition at line 413 of file fe_abstract.h.
References libMesh::FEAbstract::_p_level.
{ return _p_level; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< OutputType >::get_phi | ( | ) | const [inline, inherited] |
Definition at line 210 of file fe_base.h.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMContext::fixed_side_value(), libMesh::FEMSystem::init_context(), libMesh::ParsedFEMFunction< Output >::init_context(), libMesh::FEMContext::interior_values(), libMesh::ProjectFEMSolution::operator()(), libMesh::FEMContext::side_value(), libMesh::FEMContext::side_values(), libMesh::FEMContext::some_interior_value(), and libMesh::FEMContext::some_side_value().
{ libmesh_assert(!calculations_started || calculate_phi);
calculate_phi = true; return phi; }
| void libMesh::FEAbstract::get_refspace_nodes | ( | const ElemType | t, |
| std::vector< Point > & | nodes | ||
| ) | [static, inherited] |
returns the reference space nodes coordinates given the element type
Definition at line 259 of file fe_abstract.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::TET10, libMesh::TET4, libMesh::TRI3, and libMesh::TRI6.
{
switch(itemType)
{
case EDGE2:
{
nodes.resize(2);
nodes[0] = Point (-1.,0.,0.);
nodes[1] = Point (1.,0.,0.);
return;
}
case EDGE3:
{
nodes.resize(3);
nodes[0] = Point (-1.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,0.,0.);
return;
}
case TRI3:
{
nodes.resize(3);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
return;
}
case TRI6:
{
nodes.resize(6);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (.5,0.,0.);
nodes[4] = Point (.5,.5,0.);
nodes[5] = Point (0.,.5,0.);
return;
}
case QUAD4:
{
nodes.resize(4);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
return;
}
case QUAD8:
{
nodes.resize(8);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,-1.,0.);
nodes[5] = Point (1.,0.,0.);
nodes[6] = Point (0.,1.,0.);
nodes[7] = Point (-1.,0.,0.);
return;
}
case QUAD9:
{
nodes.resize(9);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,-1.,0.);
nodes[5] = Point (1.,0.,0.);
nodes[6] = Point (0.,1.,0.);
nodes[7] = Point (-1.,0.,0.);
nodes[8] = Point (0.,0.,0.);
return;
}
case TET4:
{
nodes.resize(4);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (0.,0.,1.);
return;
}
case TET10:
{
nodes.resize(10);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (.5,0.,0.);
nodes[5] = Point (.5,.5,0.);
nodes[6] = Point (0.,.5,0.);
nodes[7] = Point (0.,0.,.5);
nodes[8] = Point (.5,0.,.5);
nodes[9] = Point (0.,.5,.5);
return;
}
case HEX8:
{
nodes.resize(8);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
return;
}
case HEX20:
{
nodes.resize(20);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
nodes[8] = Point (0.,-1.,-1.);
nodes[9] = Point (1.,0.,-1.);
nodes[10] = Point (0.,1.,-1.);
nodes[11] = Point (-1.,0.,-1.);
nodes[12] = Point (-1.,-1.,0.);
nodes[13] = Point (1.,-1.,0.);
nodes[14] = Point (1.,1.,0.);
nodes[15] = Point (-1.,1.,0.);
nodes[16] = Point (0.,-1.,1.);
nodes[17] = Point (1.,0.,1.);
nodes[18] = Point (0.,1.,1.);
nodes[19] = Point (-1.,0.,1.);
return;
}
case HEX27:
{
nodes.resize(27);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
nodes[8] = Point (0.,-1.,-1.);
nodes[9] = Point (1.,0.,-1.);
nodes[10] = Point (0.,1.,-1.);
nodes[11] = Point (-1.,0.,-1.);
nodes[12] = Point (-1.,-1.,0.);
nodes[13] = Point (1.,-1.,0.);
nodes[14] = Point (1.,1.,0.);
nodes[15] = Point (-1.,1.,0.);
nodes[16] = Point (0.,-1.,1.);
nodes[17] = Point (1.,0.,1.);
nodes[18] = Point (0.,1.,1.);
nodes[19] = Point (-1.,0.,1.);
nodes[20] = Point (0.,0.,-1.);
nodes[21] = Point (0.,-1.,0.);
nodes[22] = Point (1.,0.,0.);
nodes[23] = Point (0.,1.,0.);
nodes[24] = Point (-1.,0.,0.);
nodes[25] = Point (0.,0.,1.);
nodes[26] = Point (0.,0.,0.);
return;
}
case PRISM6:
{
nodes.resize(6);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
return;
}
case PRISM15:
{
nodes.resize(15);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
nodes[6] = Point (.5,0.,-1.);
nodes[7] = Point (.5,.5,-1.);
nodes[8] = Point (0.,.5,-1.);
nodes[9] = Point (0.,0.,0.);
nodes[10] = Point (1.,0.,0.);
nodes[11] = Point (0.,1.,0.);
nodes[12] = Point (.5,0.,1.);
nodes[13] = Point (.5,.5,1.);
nodes[14] = Point (0.,.5,1.);
return;
}
case PRISM18:
{
nodes.resize(18);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
nodes[6] = Point (.5,0.,-1.);
nodes[7] = Point (.5,.5,-1.);
nodes[8] = Point (0.,.5,-1.);
nodes[9] = Point (0.,0.,0.);
nodes[10] = Point (1.,0.,0.);
nodes[11] = Point (0.,1.,0.);
nodes[12] = Point (.5,0.,1.);
nodes[13] = Point (.5,.5,1.);
nodes[14] = Point (0.,.5,1.);
nodes[15] = Point (.5,0.,0.);
nodes[16] = Point (.5,.5,0.);
nodes[17] = Point (0.,.5,0.);
return;
}
case PYRAMID5:
{
nodes.resize(5);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,0.,1.);
return;
}
case PYRAMID13:
{
nodes.resize(13);
// base corners
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
// apex
nodes[4] = Point (0.,0.,1.);
// base midedge
nodes[5] = Point (0.,-1.,0.);
nodes[6] = Point (1.,0.,0.);
nodes[7] = Point (0.,1.,0.);
nodes[8] = Point (-1,0.,0.);
// lateral midedge
nodes[9] = Point (-.5,-.5,.5);
nodes[10] = Point (.5,-.5,.5);
nodes[11] = Point (.5,.5,.5);
nodes[12] = Point (-.5,.5,.5);
return;
}
case PYRAMID14:
{
nodes.resize(14);
// base corners
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
// apex
nodes[4] = Point (0.,0.,1.);
// base midedge
nodes[5] = Point (0.,-1.,0.);
nodes[6] = Point (1.,0.,0.);
nodes[7] = Point (0.,1.,0.);
nodes[8] = Point (-1,0.,0.);
// lateral midedge
nodes[9] = Point (-.5,-.5,.5);
nodes[10] = Point (.5,-.5,.5);
nodes[11] = Point (.5,.5,.5);
nodes[12] = Point (-.5,.5,.5);
// base center
nodes[13] = Point (0.,0.,0.);
return;
}
default:
libmesh_error_msg("ERROR: Unknown element type " << itemType);
}
}
| const std::vector<RealGradient>& libMesh::FEGenericBase< OutputType >::get_Sobolev_dweight | ( | ) | const [inline, inherited] |
get_Sobolev_weight() for details. In case of FE initialized to all zero. Definition at line 430 of file fe_base.h.
{ return dweight; }
| const std::vector<Real>& libMesh::FEGenericBase< OutputType >::get_Sobolev_weight | ( | ) | const [inline, inherited] |
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 422 of file fe_base.h.
{ return weight; }
| const std::vector<std::vector<Point> >& libMesh::FEAbstract::get_tangents | ( | ) | const [inline, inherited] |
Definition at line 368 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_tangents(); }
| ElemType libMesh::FEAbstract::get_type | ( | ) | const [inline, inherited] |
Definition at line 407 of file fe_abstract.h.
References libMesh::FEAbstract::elem_type.
{ return elem_type; }
| const std::vector<Point>& libMesh::FEAbstract::get_xyz | ( | ) | const [inline, inherited] |
xyz spatial locations of the quadrature points on the element. Definition at line 227 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), and libMesh::ProjectFEMSolution::operator()().
{ return this->_fe_map->get_xyz(); }
| void libMesh::ReferenceCounter::increment_constructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 163 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.first++;
}
| void libMesh::ReferenceCounter::increment_destructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 176 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.second++;
}
| virtual void libMesh::InfFE< Dim, T_radial, T_map >::init_base_shape_functions | ( | const std::vector< Point > & | , |
| const Elem * | |||
| ) | [inline, protected, virtual] |
Do not use this derived member in InfFE<Dim,T_radial,T_map>.
Implements libMesh::FEGenericBase< OutputType >.
Definition at line 520 of file inf_fe.h.
{ libmesh_not_implemented(); }
| void libMesh::InfFE< Dim, T_radial, T_base >::init_face_shape_functions | ( | const std::vector< Point > & | qp, |
| const Elem * | side | ||
| ) | [protected] |
Not implemented yet. Initialize all the data fields like weight, phi, etc for the side s.
Definition at line 127 of file inf_fe_boundary.C.
References libMesh::FEGenericBase< OutputType >::build(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), and libMesh::Elem::type().
{
libmesh_assert(inf_side);
// Currently, this makes only sense in 3-D!
libmesh_assert_equal_to (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_equal_to (Dim, 3);
UniquePtr<FEBase> ap_fb(FEBase::build(Dim-2, this->fe_type));
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 quadrature points
const unsigned int n_radial_qp =
cast_int<unsigned int>(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 =
cast_int<unsigned int>(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_less (_base_node_index[n], n_base_mapping_shape_functions);
libmesh_assert_less (_radial_node_index[n], n_radial_mapping_sf);
}
}
// rezise map data fields
{
std::vector<std::vector<Real> >& psi_map = this->_fe_map->get_psi();
std::vector<std::vector<Real> >& dpsidxi_map = this->_fe_map->get_dpsidxi();
std::vector<std::vector<Real> >& d2psidxi2_map = this->_fe_map->get_d2psidxi2();
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)
{
std::vector<std::vector<Real> >& dpsideta_map = this->_fe_map->get_dpsideta();
std::vector<std::vector<Real> >& d2psidxideta_map = this->_fe_map->get_d2psidxideta();
std::vector<std::vector<Real> >& d2psideta2_map = this->_fe_map->get_d2psideta2();
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)
{
std::vector<std::vector<Real> >& dpsideta_map = this->_fe_map->get_dpsideta();
std::vector<std::vector<Real> >& d2psidxideta_map = this->_fe_map->get_d2psidxideta();
std::vector<std::vector<Real> >& d2psideta2_map = this->_fe_map->get_d2psideta2();
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->get_fe_map()).get_phi_map();
const std::vector<std::vector<Real> >& Ss_map = (base_fe->get_fe_map()).get_dphidxi_map();
std::vector<std::vector<Real> >& psi_map = this->_fe_map->get_psi();
std::vector<std::vector<Real> >& dpsidxi_map = this->_fe_map->get_dpsidxi();
std::vector<std::vector<Real> >& dpsideta_map = this->_fe_map->get_dpsideta();
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_equal_to (radial_qw.size(), n_radial_qp);
libmesh_assert_equal_to (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];
}
}
}
| void libMesh::InfFE< Dim, T_radial, T_map >::init_radial_shape_functions | ( | const Elem * | inf_elem | ) | [protected] |
Some of the member data only depend on the radial part of the infinite element. The parts that only change when the radial order changes, are initialized here.
Start logging the radial shape function initialization
Stop logging the radial shape function initialization
Definition at line 280 of file inf_fe.C.
References libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::libmesh_assert(), and libMesh::START_LOG().
{
libmesh_assert(radial_qrule);
libmesh_assert(inf_elem);
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");
}
| void libMesh::InfFE< Dim, T_radial, T_map >::init_shape_functions | ( | const Elem * | inf_elem | ) | [protected] |
Initialize all the data fields like weight, mode, phi, dphidxi, dphideta, dphidzeta, etc. for the current element. This method prepares the data related to the base part, and some of the combined fields.
Stop logging the radial shape function initialization
Definition at line 376 of file inf_fe.C.
References libMesh::err, libMesh::libmesh_assert(), libMesh::START_LOG(), libMesh::Elem::type(), and libMesh::MeshTools::weight().
{
libmesh_assert(inf_elem);
// 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 =
cast_int<unsigned int>(radial_map.size());
const unsigned int n_radial_approx_sf =
cast_int<unsigned int>(mode.size());
const unsigned int n_radial_qp =
cast_int<unsigned int>(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_less (_base_node_index[n], n_base_mapping_shape_functions);
libmesh_assert_less (_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_less (_base_shape_index[n], n_base_approx_shape_functions);
libmesh_assert_less (_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
libmesh_do_once(libMesh::err << "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);
std::vector<std::vector<Real> >& phi_map = this->_fe_map->get_phi_map();
std::vector<std::vector<Real> >& dphidxi_map = this->_fe_map->get_dphidxi_map();
phi_map.resize (n_total_mapping_shape_functions);
dphidxi_map.resize (n_total_mapping_shape_functions);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
std::vector<std::vector<Real> >& d2phidxi2_map = this->_fe_map->get_d2phidxi2_map();
d2phidxi2_map.resize (n_total_mapping_shape_functions);
if (Dim > 1)
{
std::vector<std::vector<Real> >& d2phidxideta_map = this->_fe_map->get_d2phidxideta_map();
std::vector<std::vector<Real> >& d2phideta2_map = this->_fe_map->get_d2phideta2_map();
d2phidxideta_map.resize (n_total_mapping_shape_functions);
d2phideta2_map.resize (n_total_mapping_shape_functions);
}
if (Dim == 3)
{
std::vector<std::vector<Real> >& d2phidxidzeta_map = this->_fe_map->get_d2phidxidzeta_map();
std::vector<std::vector<Real> >& d2phidetadzeta_map = this->_fe_map->get_d2phidetadzeta_map();
std::vector<std::vector<Real> >& d2phidzeta2_map = this->_fe_map->get_d2phidzeta2_map();
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)
{
std::vector<std::vector<Real> >& dphideta_map = this->_fe_map->get_dphideta_map();
dphideta_map.resize (n_total_mapping_shape_functions);
}
if (Dim == 3)
{
std::vector<std::vector<Real> >& dphidzeta_map = this->_fe_map->get_dphidzeta_map();
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++)
{
std::vector<std::vector<Real> >& phi_map = this->_fe_map->get_phi_map();
std::vector<std::vector<Real> >& dphidxi_map = this->_fe_map->get_dphidxi_map();
phi_map[i].resize (n_total_qp);
dphidxi_map[i].resize (n_total_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
std::vector<std::vector<Real> >& d2phidxi2_map = this->_fe_map->get_d2phidxi2_map();
d2phidxi2_map[i].resize (n_total_qp);
if (Dim > 1)
{
std::vector<std::vector<Real> >& d2phidxideta_map = this->_fe_map->get_d2phidxideta_map();
std::vector<std::vector<Real> >& d2phideta2_map = this->_fe_map->get_d2phideta2_map();
d2phidxideta_map[i].resize (n_total_qp);
d2phideta2_map[i].resize (n_total_qp);
}
if (Dim > 2)
{
std::vector<std::vector<Real> >& d2phidxidzeta_map = this->_fe_map->get_d2phidxidzeta_map();
std::vector<std::vector<Real> >& d2phidetadzeta_map = this->_fe_map->get_d2phidetadzeta_map();
std::vector<std::vector<Real> >& d2phidzeta2_map = this->_fe_map->get_d2phidzeta2_map();
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)
{
std::vector<std::vector<Real> >& dphideta_map = this->_fe_map->get_dphideta_map();
dphideta_map[i].resize (n_total_qp);
}
if (Dim == 3)
{
std::vector<std::vector<Real> >& dphidzeta_map = this->_fe_map->get_dphidzeta_map();
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_equal_to (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_equal_to (radial_qw.size(), n_radial_qp);
libmesh_assert_equal_to (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");
}
| Point libMesh::InfFE< Dim, T_radial, T_map >::inverse_map | ( | const Elem * | elem, |
| const Point & | p, | ||
| const Real | tolerance = TOLERANCE, |
||
| const bool | secure = true, |
||
| const bool | interpolated = true |
||
| ) | [static] |
p located in physical space. First, the location in the base face is computed. This requires inverting the (possibly nonlinear) transformation map in the base, so it is not trivial. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence
, and the iteration is terminated when
. Once the base face point is determined, the radial local coordinate is directly evaluated. If interpolated is true, the interpolated distance from the base element to the infinite element origin is used for the map in radial direction. The number of iterations in the map inversion process.
Newton iteration loop.
Definition at line 89 of file inf_fe_map.C.
References std::abs(), libMesh::TypeVector< T >::add(), libMesh::TypeVector< T >::add_scaled(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::InfFE< Dim, T_radial, T_map >::eval_deriv(), libMesh::INFHEX8, libMesh::INFPRISM6, libMesh::libmesh_assert(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::Elem::origin(), libMesh::Elem::point(), libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::TypeVector< T >::size(), libMesh::START_LOG(), and libMesh::Elem::type().
{
libmesh_assert(inf_elem);
libmesh_assert_greater_equal (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
UniquePtr<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)
libmesh_error_msg("ERROR: InfFE::inverse_map is currently implemented only for \ninfinite elments of type InfHex8 and InfPrism6.");
// 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:
libmesh_error_msg("ERROR: InfFE::inverse_map is not yet implemented in 2d");
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;
}
default:
libmesh_error_msg("Invalid dim = " << Dim);
}
unsigned int cnt = 0;
do
{
// Increment in current iterate \p 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 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_greater (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 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_greater (det, 0.);
libmesh_assert_greater (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_msg("Unknown Dim = " << Dim);
} // 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();
{
libMesh::err << "WARNING: Newton scheme has not converged in "
<< cnt << " iterations:\n"
<< " physical_point="
<< physical_point
<< " dp="
<< dp
<< " p="
<< p
<< " error=" << inverse_map_error
<< std::endl;
}
}
if (cnt > 20)
libmesh_error_msg("ERROR: Newton scheme FAILED to converge in " << cnt << " iterations!");
// 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) \p 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();
libMesh::err << "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();
// libMesh::err << "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();
// libMesh::err << "WARNING: radial distance p(2) is "
// << p(2)
// << std::endl;
// }
#endif
break;
}
default:
libmesh_error_msg("Unknown Dim = " << Dim);
} // 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 cnt2 = 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
cnt2 ++;
if (cnt2 > 20)
libmesh_error_msg("ERROR: 1D Newton scheme FAILED to converge");
}
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_msg("Unknown Dim = " << Dim);
}
}
// If we are in debug mode do a sanity check. Make sure
// the point \p p on the reference element actually does
// map to the point \p 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();
libMesh::err << "WARNING: diff is "
<< diff.size()
<< std::endl;
}
*/
#endif
// Stop logging the map inversion.
STOP_LOG("inverse_map()", "InfFE");
return p;
}
| void libMesh::InfFE< Dim, T_radial, T_map >::inverse_map | ( | const Elem * | elem, |
| const std::vector< Point > & | physical_points, | ||
| std::vector< Point > & | reference_points, | ||
| const Real | tolerance = TOLERANCE, |
||
| const bool | secure = true |
||
| ) | [static] |
Takes a number points in physical space (in the physical_points vector) and finds their location on the reference element for the input element elem. The values on the reference element are returned in the vector reference_points
Definition at line 621 of file inf_fe_map.C.
References libMesh::TypeVector< T >::size().
{
// The number of points to find the
// inverse map of
const std::size_t 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);
}
| virtual bool libMesh::InfFE< Dim, T_radial, T_map >::is_hierarchic | ( | ) | const [inline, virtual] |
Implements libMesh::FEAbstract.
Definition at line 347 of file inf_fe.h.
{ return false; } // FIXME - Inf FEs don't handle p elevation yet
| Point libMesh::InfFE< Dim, T_radial, T_map >::map | ( | const Elem * | inf_elem, |
| const Point & | reference_point | ||
| ) | [static, protected] |
p located on the reference element. Definition at line 40 of file inf_fe_map.C.
References libMesh::TypeVector< T >::add_scaled(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::map(), libMesh::Elem::origin(), libMesh::Elem::point(), and libMesh::Real.
{
libmesh_assert(inf_elem);
libmesh_assert_not_equal_to (Dim, 0);
UniquePtr<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_msg("Unknown Dim = " << Dim);
#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;
}
| unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs | ( | const FEType & | fet, |
| const ElemType | inf_elem_type | ||
| ) | [static] |
o_radial+1 modes in radial direction, and FE<Dim-1,T>::n_dofs(...) in the base. Definition at line 55 of file inf_fe_static.C.
References libMesh::FEInterface::n_dofs(), and libMesh::FEType::radial_order.
Referenced by libMesh::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);
}
| unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_at_node | ( | const FEType & | fet, |
| const ElemType | inf_elem_type, | ||
| const unsigned int | n | ||
| ) | [static] |
n (not dof!) for an element of type t and order o. Definition at line 72 of file inf_fe_static.C.
References libMesh::FEInterface::n_dofs_at_node(), and libMesh::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);
// libMesh::out << "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);
}
| unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_dofs_per_elem | ( | const FEType & | fet, |
| const ElemType | inf_elem_type | ||
| ) | [static] |
Definition at line 101 of file inf_fe_static.C.
References libMesh::FEInterface::n_dofs_per_elem(), and libMesh::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);
}
| static unsigned int libMesh::ReferenceCounter::n_objects | ( | ) | [inline, static, inherited] |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 79 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
{ return _n_objects; }
| virtual unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points | ( | ) | const [inline, virtual] |
for loop in your simulation for matrix assembly of the current element. Implements libMesh::FEAbstract.
Definition at line 469 of file inf_fe.h.
References libMesh::InfFE< Dim, T_radial, T_map >::_n_total_qp, libMesh::libmesh_assert(), and libMesh::InfFE< Dim, T_radial, T_map >::radial_qrule.
{ libmesh_assert(radial_qrule); return _n_total_qp; }
| static unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions | ( | const FEType & | fet, |
| const ElemType | t | ||
| ) | [inline, static] |
t and approximation order o. Definition at line 310 of file inf_fe.h.
References libMesh::InfFE< Dim, T_radial, T_map >::n_dofs().
{ return n_dofs(fet, t); }
| virtual unsigned int libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions | ( | ) | const [inline, virtual] |
Implements libMesh::FEAbstract.
Definition at line 461 of file inf_fe.h.
References libMesh::InfFE< Dim, T_radial, T_map >::_n_total_approx_sf.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::Base::n_base_mapping_sf().
{ return _n_total_approx_sf; }
| void libMesh::InfFE< Dim, T_radial, T_map >::nodal_soln | ( | const FEType & | fet, |
| const Elem * | elem, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) | [static] |
Usually, this method would build the nodal soln from the element soln. But infinite elements require additional simulation-specific data to compute physically correct results. Use compute_data() to compute results. For compatibility an empty vector is returned.
Definition at line 119 of file inf_fe_static.C.
References libMesh::err, and libMesh::libmesh_assert().
{
#ifdef DEBUG
if (!_warned_for_nodal_soln)
{
libMesh::err << "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 \p nodal_soln. This
* indicates to the user of \p nodal_soln to
* not use this result.
*/
nodal_soln.clear();
libmesh_assert (nodal_soln.empty());
return;
}
| bool libMesh::FEAbstract::on_reference_element | ( | const Point & | p, |
| const ElemType | t, | ||
| const Real | eps = TOLERANCE |
||
| ) | [static, inherited] |
eps can be specified to indicate a tolerance. For example,
becomes
. Definition at line 554 of file fe_abstract.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::INFHEX8, libMesh::INFPRISM6, libMesh::NODEELEM, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::TET10, libMesh::TET4, libMesh::TRI3, and libMesh::TRI6.
Referenced by libMesh::FE< Dim, T >::inverse_map().
{
libmesh_assert_greater_equal (eps, 0.);
const Real xi = p(0);
#if LIBMESH_DIM > 1
const Real eta = p(1);
#else
const Real eta = 0.;
#endif
#if LIBMESH_DIM > 2
const Real zeta = p(2);
#else
const Real zeta = 0.;
#endif
switch (t)
{
case NODEELEM:
{
return (!xi && !eta && !zeta);
}
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))
{
// libMesh::out << "Strange Point:\n";
// 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:
case PYRAMID13:
case PYRAMID14:
{
// Check that the point is on the same side of all the faces
// by testing whether:
//
// n_i.(x - x_i) <= 0
//
// for each i, where:
// n_i is the outward normal of face i,
// x_i is a point on face i.
if ((-eta - 1. + zeta <= 0.+eps) &&
( xi - 1. + zeta <= 0.+eps) &&
( eta - 1. + zeta <= 0.+eps) &&
( -xi - 1. + zeta <= 0.+eps) &&
( zeta >= 0.-eps))
return true;
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:
libmesh_error_msg("ERROR: Unknown element type " << t);
}
// If we get here then the point is _not_ in the
// reference element. Better return false.
return false;
}
| void libMesh::FEGenericBase< OutputType >::print_d2phi | ( | std::ostream & | os | ) | const [virtual, inherited] |
Prints the value of each shape function's second derivatives at each quadrature point.
Implements libMesh::FEAbstract.
| void libMesh::FEGenericBase< OutputType >::print_dphi | ( | std::ostream & | os | ) | const [virtual, inherited] |
Prints the value of each shape function's derivative at each quadrature point.
Implements libMesh::FEAbstract.
| void libMesh::ReferenceCounter::print_info | ( | std::ostream & | out = libMesh::out | ) | [static, inherited] |
Prints the reference information, by default to libMesh::out.
Definition at line 88 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
{
if( _enable_print_counter ) out_stream << ReferenceCounter::get_info();
}
| void libMesh::FEAbstract::print_info | ( | std::ostream & | os | ) | const [inherited] |
Prints all the relevant information about the current element.
Definition at line 761 of file fe_abstract.C.
References libMesh::FEAbstract::print_dphi(), libMesh::FEAbstract::print_JxW(), libMesh::FEAbstract::print_phi(), and libMesh::FEAbstract::print_xyz().
Referenced by libMesh::operator<<().
{
os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
this->print_phi(os);
os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
this->print_dphi(os);
os << "XYZ locations of the quadrature pts." << std::endl;
this->print_xyz(os);
os << "Values of JxW at the quadrature pts." << std::endl;
this->print_JxW(os);
}
| void libMesh::FEAbstract::print_JxW | ( | std::ostream & | os | ) | const [inherited] |
Prints the Jacobian times the weight for each quadrature point.
Definition at line 748 of file fe_abstract.C.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::FEAbstract::print_info().
{
this->_fe_map->print_JxW(os);
}
| void libMesh::FEGenericBase< OutputType >::print_phi | ( | std::ostream & | os | ) | const [virtual, inherited] |
| void libMesh::FEAbstract::print_xyz | ( | std::ostream & | os | ) | const [inherited] |
Prints the spatial location of each quadrature point (on the physical element).
Definition at line 755 of file fe_abstract.C.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::FEAbstract::print_info().
{
this->_fe_map->print_xyz(os);
}
| void libMesh::InfFE< Dim, T_radial, T_map >::reinit | ( | const Elem * | elem, |
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
This is at the core of this class. Use this for each new element in the mesh. Reinitializes all the physical element-dependent data based on the current element elem.
Implements libMesh::FEAbstract.
Definition at line 146 of file inf_fe.C.
References libMesh::FEGenericBase< OutputType >::build(), libMesh::EDGE2, libMesh::libmesh_assert(), and libMesh::Elem::type().
{
libmesh_assert(base_fe);
libmesh_assert(base_fe->qrule);
libmesh_assert_equal_to (base_fe->qrule, base_qrule);
libmesh_assert(radial_qrule);
libmesh_assert(inf_elem);
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 \p 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->_fe_map->compute_map (this->dim,_total_qrule_weights, inf_elem);
// Compute the shape functions and the derivatives
// at all quadrature points.
this->compute_shape_functions (inf_elem,base_fe->qrule->get_points());
}
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
{
UniquePtr<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);
// weights
if (weights != NULL)
{
this->_fe_map->compute_map (this->dim, *weights, inf_elem);
}
else
{
std::vector<Real> dummy_weights (pts->size(), 1.);
this->_fe_map->compute_map (this->dim, dummy_weights, inf_elem);
}
// finally compute the ifem shapes
this->compute_shape_functions (inf_elem,*pts);
}
}
| void libMesh::InfFE< Dim, T_radial, T_base >::reinit | ( | const Elem * | elem, |
| const unsigned int | side, | ||
| const Real | tolerance = TOLERANCE, |
||
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
Not implemented yet. Reinitializes all the physical element-dependent data based on the side of an infinite element.
Implements libMesh::FEAbstract.
Definition at line 40 of file inf_fe_boundary.C.
References libMesh::Elem::build_side(), libMesh::EDGE2, libMesh::libmesh_assert(), libMesh::Elem::p_level(), side, and libMesh::Elem::type().
{
if (weights != NULL)
libmesh_not_implemented_msg("ERROR: User-specified weights for infinite elements are not implemented!");
if (pts != NULL)
libmesh_not_implemented_msg("ERROR: User-specified points for infinite elements are not implemented!");
// We don't do this for 1D elements!
libmesh_assert_not_equal_to (Dim, 1);
libmesh_assert(inf_elem);
libmesh_assert(qrule);
// Don't do this for the base
libmesh_assert_not_equal_to (s, 0);
// Build the side of interest
const UniquePtr<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->_fe_map->compute_face_map(this->dim, _total_qrule_weights, side.get());
// make a copy of the Jacobian for integration
const std::vector<Real> JxW_int(this->_fe_map->get_JxW());
// Find where the integration points are located on the
// full element.
std::vector<Point> qp; this->inverse_map (inf_elem, this->_fe_map->get_xyz(),
qp, tolerance);
// compute the shape function and derivative values
// at the points qp
this->reinit (inf_elem, &qp);
// copy back old data
this->_fe_map->get_JxW() = JxW_int;
}
| Real libMesh::InfFE< Dim, T_radial, T_map >::shape | ( | const FEType & | fet, |
| const ElemType | t, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) | [static] |
shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static. Note that this class member is by far not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle. Also note that this method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping. Definition at line 154 of file inf_fe_static.C.
References libMesh::InfFE< Dim, T_radial, T_map >::Radial::decay(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::INFINITE_MAP, libMesh::FEType::radial_order, libMesh::Real, and libMesh::FEInterface::shape().
{
libmesh_assert_not_equal_to (Dim, 0);
#ifdef DEBUG
// this makes only sense when used for mapping
if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
{
libMesh::err << "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);
}
| Real libMesh::InfFE< Dim, T_radial, T_map >::shape | ( | const FEType & | fet, |
| const Elem * | elem, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) | [static] |
shape function at point p. This method lets you specify the relevant data directly, and is therefore allowed to be static. Note that this class member is not as efficient as its counterpart in FE<Dim,T>, and is not employed in the reinit() cycle. Also note that this method does not return physically correct shapes, instead use compute_data(). The shape() methods should only be used for mapping. Definition at line 196 of file inf_fe_static.C.
References libMesh::Elem::build_side(), libMesh::InfFE< Dim, T_radial, T_map >::Radial::decay(), libMesh::err, libMesh::InfFE< Dim, T_radial, T_map >::eval(), libMesh::INFINITE_MAP, libMesh::libmesh_assert(), libMesh::FEType::radial_order, libMesh::Real, libMesh::FEInterface::shape(), and libMesh::Elem::type().
{
libmesh_assert(inf_elem);
libmesh_assert_not_equal_to (Dim, 0);
#ifdef DEBUG
// this makes only sense when used for mapping
if ((T_radial != INFINITE_MAP) && !_warned_for_shape)
{
libMesh::err << "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));
UniquePtr<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);
}
| bool libMesh::InfFE< Dim, T_radial, T_map >::shapes_need_reinit | ( | ) | const [private, virtual] |
false, currently not required. Implements libMesh::FEAbstract.
Definition at line 1000 of file inf_fe.C.
{
return false;
}
| virtual void libMesh::InfFE< Dim, T_radial, T_map >::side_map | ( | const Elem * | , |
| const Elem * | , | ||
| const unsigned int | , | ||
| const std::vector< Point > & | , | ||
| std::vector< Point > & | |||
| ) | [inline, virtual] |
Computes the reference space quadrature points on the side of an element based on the side quadrature points.
Implements libMesh::FEAbstract.
Definition at line 435 of file inf_fe.h.
{
libmesh_not_implemented();
}
| void libMesh::InfFE< Dim, T_radial, T_base >::update_base_elem | ( | const Elem * | inf_elem | ) | [protected] |
friend class InfFE [friend] |
Make all InfFE<Dim,T_radial,T_map> classes friends of each other, so that the protected eval() may be accessed.
Reimplemented from libMesh::FEGenericBase< OutputType >.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const FEAbstract & | fe | ||
| ) | [friend, inherited] |
Same as above, but allows you to print to a stream.
Definition at line 777 of file fe_abstract.C.
{
fe.print_info(os);
return os;
}
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_base_node_index [protected] |
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_base_shape_index [protected] |
ElemType libMesh::InfFE< Dim, T_radial, T_map >::_compute_node_indices_fast_current_elem_type = INVALID_ELEM [static, private] |
When compute_node_indices_fast() is used, this static variable remembers the element type for which the static variables in compute_node_indices_fast() are currently set. Using a class member for the element type helps initializing it to a default value.
ReferenceCounter::Counts libMesh::ReferenceCounter::_counts [static, protected, inherited] |
Actually holds the data.
Definition at line 118 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
bool libMesh::ReferenceCounter::_enable_print_counter = true [static, protected, inherited] |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 137 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
UniquePtr<FEMap> libMesh::FEAbstract::_fe_map [protected, inherited] |
Definition at line 509 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::get_curvatures(), libMesh::FEAbstract::get_d2xyzdeta2(), libMesh::FEAbstract::get_d2xyzdetadzeta(), libMesh::FEAbstract::get_d2xyzdxi2(), libMesh::FEAbstract::get_d2xyzdxideta(), libMesh::FEAbstract::get_d2xyzdxidzeta(), libMesh::FEAbstract::get_d2xyzdzeta2(), libMesh::FEAbstract::get_detadx(), libMesh::FEAbstract::get_detady(), libMesh::FEAbstract::get_detadz(), libMesh::FEAbstract::get_dxidx(), libMesh::FEAbstract::get_dxidy(), libMesh::FEAbstract::get_dxidz(), libMesh::FEAbstract::get_dxyzdeta(), libMesh::FEAbstract::get_dxyzdxi(), libMesh::FEAbstract::get_dxyzdzeta(), libMesh::FEAbstract::get_dzetadx(), libMesh::FEAbstract::get_dzetady(), libMesh::FEAbstract::get_dzetadz(), libMesh::FEAbstract::get_fe_map(), libMesh::FEAbstract::get_JxW(), libMesh::FEAbstract::get_normals(), libMesh::FEAbstract::get_tangents(), libMesh::FEAbstract::get_xyz(), libMesh::FESubdivision::init_shape_functions(), libMesh::FEAbstract::print_JxW(), and libMesh::FEAbstract::print_xyz().
UniquePtr<FETransformationBase<OutputType> > libMesh::FEGenericBase< OutputType >::_fe_trans [protected, inherited] |
Threads::spin_mutex libMesh::ReferenceCounter::_mutex [static, protected, inherited] |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 131 of file reference_counter.h.
Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects [static, protected, inherited] |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 126 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::_n_total_approx_sf [protected] |
The number of total approximation shape functions for the current configuration
Definition at line 745 of file inf_fe.h.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::n_shape_functions().
unsigned int libMesh::InfFE< Dim, T_radial, T_map >::_n_total_qp [protected] |
The total number of quadrature points for the current configuration
Definition at line 751 of file inf_fe.h.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points().
unsigned int libMesh::FEAbstract::_p_level [protected, inherited] |
The p refinement level the current data structures are set up for.
Definition at line 570 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::get_order(), and libMesh::FEAbstract::get_p_level().
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_radial_node_index [protected] |
std::vector<unsigned int> libMesh::InfFE< Dim, T_radial, T_map >::_radial_shape_index [protected] |
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::_total_qrule_weights [protected] |
bool libMesh::InfFE< Dim, T_radial, T_map >::_warned_for_nodal_soln = false [static, private] |
bool libMesh::InfFE< Dim, T_radial, T_map >::_warned_for_shape = false [static, private] |
Elem* libMesh::InfFE< Dim, T_radial, T_map >::base_elem [protected] |
FEBase* libMesh::InfFE< Dim, T_radial, T_map >::base_fe [protected] |
Have a FE<Dim-1,T_base> handy for base approximation. Since this one is created using the FEBase::build() method, the InfFE class is not required to be templated w.r.t. to the base approximation shape.
Definition at line 783 of file inf_fe.h.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::InfFE().
QBase* libMesh::InfFE< Dim, T_radial, T_map >::base_qrule [protected] |
bool libMesh::FEAbstract::calculate_curl_phi [mutable, protected, inherited] |
Should we calculate shape function curls?
Definition at line 541 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().
bool libMesh::FEAbstract::calculate_d2phi [mutable, protected, inherited] |
Should we calculate shape function hessians?
Definition at line 536 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculate_div_phi [mutable, protected, inherited] |
Should we calculate shape function divergences?
Definition at line 546 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().
bool libMesh::FEAbstract::calculate_dphi [mutable, protected, inherited] |
Should we calculate shape function gradients?
Definition at line 531 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculate_dphiref [mutable, protected, inherited] |
Should we calculate reference shape function gradients?
Definition at line 551 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().
bool libMesh::FEAbstract::calculate_phi [mutable, protected, inherited] |
Should we calculate shape functions?
Definition at line 526 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculations_started [mutable, protected, inherited] |
Have calculations with this object already been started? Then all get_* functions should already have been called.
Definition at line 521 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), and libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::curl_phi [protected, inherited] |
Shape function curl values. Only defined for vector types.
Definition at line 505 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().
FEType libMesh::InfFE< Dim, T_radial, T_map >::current_fe_type [protected] |
std::vector<std::vector<OutputTensor> > libMesh::FEGenericBase< OutputType >::d2phi [protected, inherited] |
Shape function second derivative values.
Definition at line 548 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phideta2 [protected, inherited] |
Shape function second derivatives in the eta direction.
Definition at line 568 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidetadzeta [protected, inherited] |
Shape function second derivatives in the eta-zeta direction.
Definition at line 573 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidx2 [protected, inherited] |
Shape function second derivatives in the x direction.
Definition at line 583 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxdy [protected, inherited] |
Shape function second derivatives in the x-y direction.
Definition at line 588 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxdz [protected, inherited] |
Shape function second derivatives in the x-z direction.
Definition at line 593 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxi2 [protected, inherited] |
Shape function second derivatives in the xi direction.
Definition at line 553 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxideta [protected, inherited] |
Shape function second derivatives in the xi-eta direction.
Definition at line 558 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidxidzeta [protected, inherited] |
Shape function second derivatives in the xi-zeta direction.
Definition at line 563 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidy2 [protected, inherited] |
Shape function second derivatives in the y direction.
Definition at line 598 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidydz [protected, inherited] |
Shape function second derivatives in the y-z direction.
Definition at line 603 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidz2 [protected, inherited] |
Shape function second derivatives in the z direction.
Definition at line 608 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::d2phidzeta2 [protected, inherited] |
Shape function second derivatives in the zeta direction.
Definition at line 578 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2().
const unsigned int libMesh::FEAbstract::dim [protected, inherited] |
The dimensionality of the object
Definition at line 515 of file fe_abstract.h.
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dist [protected] |
std::vector<std::vector<OutputDivergence> > libMesh::FEGenericBase< OutputType >::div_phi [protected, inherited] |
Shape function divergence values. Only defined for vector types.
Definition at line 510 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::dmodedv [protected] |
std::vector<OutputGradient> libMesh::FEGenericBase< OutputType >::dphase [protected, inherited] |
Used for certain infinite element families: the first derivatives of the phase term in global coordinates, over all quadrature points.
Definition at line 626 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphase().
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedeta [protected] |
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedxi [protected] |
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dphasedzeta [protected] |
std::vector<std::vector<OutputGradient> > libMesh::FEGenericBase< OutputType >::dphi [protected, inherited] |
Shape function derivative values.
Definition at line 500 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphideta [protected, inherited] |
Shape function derivatives in the eta direction.
Definition at line 520 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidx [protected, inherited] |
Shape function derivatives in the x direction.
Definition at line 530 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidxi [protected, inherited] |
Shape function derivatives in the xi direction.
Definition at line 515 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidy [protected, inherited] |
Shape function derivatives in the y direction.
Definition at line 535 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidz [protected, inherited] |
Shape function derivatives in the z direction.
Definition at line 540 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::dphidzeta [protected, inherited] |
Shape function derivatives in the zeta direction.
Definition at line 525 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::dradialdv_map [protected] |
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dsomdv [protected] |
std::vector<RealGradient> libMesh::FEGenericBase< OutputType >::dweight [protected, inherited] |
Used for certain infinite element families: the global derivative of the additional radial weight
, over all quadrature points.
Definition at line 633 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_dweight().
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::dweightdv [protected] |
ElemType libMesh::FEAbstract::elem_type [protected, inherited] |
The element type the current data structures are set up for.
Definition at line 564 of file fe_abstract.h.
Referenced by libMesh::FESubdivision::attach_quadrature_rule(), and libMesh::FEAbstract::get_type().
const FEType libMesh::FEAbstract::fe_type [protected, inherited] |
The finite element type for this object. Note that this should be constant for the object.
Definition at line 558 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEAbstract::get_family(), libMesh::FEAbstract::get_fe_type(), libMesh::FEAbstract::get_order(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), and libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::mode [protected] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< OutputType >::phi [protected, inherited] |
Shape function values.
Definition at line 495 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi().
QBase* libMesh::FEAbstract::qrule [protected, inherited] |
A pointer to the quadrature rule employed
Definition at line 575 of file fe_abstract.h.
Referenced by libMesh::FESubdivision::attach_quadrature_rule().
std::vector<std::vector<Real> > libMesh::InfFE< Dim, T_radial, T_map >::radial_map [protected] |
QBase* libMesh::InfFE< Dim, T_radial, T_map >::radial_qrule [protected] |
The quadrature rule for the base element associated with the current infinite element
Definition at line 769 of file inf_fe.h.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::n_quadrature_points().
bool libMesh::FEAbstract::shapes_on_quadrature [protected, inherited] |
A flag indicating if current data structures correspond to quadrature rule points
Definition at line 581 of file fe_abstract.h.
std::vector<Real> libMesh::InfFE< Dim, T_radial, T_map >::som [protected] |
std::vector<Real> libMesh::FEGenericBase< OutputType >::weight [protected, inherited] |
Used for certain infinite element families: the additional radial weight
in local coordinates, over all quadrature points.
Definition at line 640 of file fe_base.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_weight().