Go to the documentation of this file.
20 #ifndef LIBMESH_ELEM_H
21 #define LIBMESH_ELEM_H
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/bounding_box.h"
26 #include "libmesh/dof_object.h"
27 #include "libmesh/id_types.h"
28 #include "libmesh/reference_counted_object.h"
29 #include "libmesh/node.h"
30 #include "libmesh/enum_elem_type.h"
31 #include "libmesh/multi_predicates.h"
32 #include "libmesh/pointer_to_pointer_iter.h"
33 #include "libmesh/int_range.h"
34 #include "libmesh/simple_range.h"
35 #include "libmesh/variant_filter_iterator.h"
36 #include "libmesh/hashword.h"
38 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS
46 #include "libmesh/enum_elem_quality.h"
47 #include "libmesh/enum_io_package.h"
48 #include "libmesh/enum_order.h"
67 #ifdef LIBMESH_ENABLE_PERIODIC
68 class PeriodicBoundaries;
69 class PointLocatorBase;
114 Elem ** elemlinkdata,
115 Node ** nodelinkdata);
141 const Point &
point (
const unsigned int i)
const;
313 #ifdef LIBMESH_ENABLE_PERIODIC
418 unsigned int side_node)
const = 0;
450 std::set<const Elem *> & neighbor_set)
const;
465 const Elem * start_elem)
const;
480 std::set<const Elem *> & neighbor_set)
const;
551 std::vector<dof_id_type> & conn)
const = 0;
570 virtual unsigned short dim ()
const = 0;
581 virtual unsigned int n_nodes ()
const = 0;
614 virtual unsigned int n_sides ()
const = 0;
644 virtual unsigned int n_edges ()
const = 0;
662 virtual unsigned int n_faces ()
const = 0;
673 virtual bool is_vertex(
const unsigned int i)
const = 0;
682 unsigned int n)
const
690 unsigned int n)
const;
695 virtual bool is_edge(
const unsigned int i)
const = 0;
700 virtual bool is_face(
const unsigned int i)
const = 0;
707 const unsigned int s)
const = 0;
712 virtual std::vector<unsigned int>
nodes_on_side(
const unsigned int )
const = 0;
719 const unsigned int e)
const = 0;
725 const unsigned int s)
const = 0;
731 virtual unsigned int opposite_side(
const unsigned int s)
const;
739 const unsigned int s)
const;
762 virtual std::unique_ptr<Elem>
side_ptr (
unsigned int i) = 0;
763 std::unique_ptr<const Elem>
side_ptr (
unsigned int i)
const;
780 virtual void side_ptr (std::unique_ptr<Elem> & side,
const unsigned int i) = 0;
781 void side_ptr (std::unique_ptr<const Elem> & side,
const unsigned int i)
const;
804 virtual std::unique_ptr<Elem>
build_side_ptr (
const unsigned int i,
bool proxy=
true) = 0;
805 std::unique_ptr<const Elem>
build_side_ptr (
const unsigned int i,
bool proxy=
true)
const;
822 virtual void build_side_ptr (std::unique_ptr<Elem> & side,
const unsigned int i) = 0;
823 void build_side_ptr (std::unique_ptr<const Elem> & side,
const unsigned int i)
const;
838 virtual std::unique_ptr<Elem>
build_edge_ptr (
const unsigned int i) = 0;
839 std::unique_ptr<const Elem>
build_edge_ptr (
const unsigned int i)
const;
899 { libmesh_not_implemented();
return std::make_pair(0.,0.); }
1053 const unsigned int n2)
const;
1076 const unsigned int v)
const;
1093 virtual std::pair<unsigned short int, unsigned short int>
1109 const bool full_ordered=
true);
1128 unsigned int level ()
const;
1135 unsigned int p_level ()
const;
1141 const unsigned int s)
const = 0;
1164 #ifdef LIBMESH_ENABLE_AMR
1201 class ConstChildRefIter;
1234 const unsigned int e)
const;
1268 void family_tree (std::vector<const Elem *> & family,
1269 bool reset =
true)
const;
1282 bool reset =
true)
const;
1297 bool reset =
true)
const;
1311 bool reset =
true)
const;
1326 bool reset =
true)
const;
1340 const Elem * neighbor,
1341 bool reset =
true)
const;
1355 const Elem * neighbor,
1356 bool reset =
true)
const;
1372 const Elem * neighbor,
1373 const Elem * subneighbor,
1374 bool reset =
true)
const;
1389 const Elem * neighbor,
1390 const Elem * subneighbor,
1391 bool reset =
true)
const;
1406 const Elem * neighbor,
1407 bool reset =
true)
const;
1422 const Elem * neighbor,
1426 bool reset =
true)
const;
1470 unsigned int current_min)
const;
1478 unsigned int current_min)
const;
1569 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
1575 virtual bool infinite ()
const = 0;
1606 #ifdef LIBMESH_ENABLE_AMR
1614 unsigned int n)
const;
1621 const std::vector<std::pair<unsigned char, unsigned char>> &
1623 unsigned int n)
const;
1630 const std::vector<std::pair<dof_id_type, dof_id_type>>
1632 unsigned int n)
const;
1639 const unsigned int child_node_num,
1640 const unsigned int parent_node_num)
const = 0;
1651 #endif // LIBMESH_ENABLE_AMR
1685 template <
typename Sub
class>
1687 const unsigned int i,
1693 template <
typename Sub
class,
typename Map
class>
1695 const unsigned int i,
1698 #ifdef LIBMESH_ENABLE_AMR
1706 std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> &
1709 static std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> c;
1720 std::vector<std::vector<std::vector<signed char>>> &
1723 static std::vector<std::vector<std::vector<signed char>>> c;
1728 #endif // LIBMESH_ENABLE_AMR
1751 #ifdef LIBMESH_ENABLE_AMR
1763 #ifdef LIBMESH_ENABLE_AMR
1821 #ifdef LIBMESH_ENABLE_AMR
1852 #endif // LIBMESH_ENABLE_AMR
1872 const unsigned int ns,
1874 Elem ** elemlinkdata,
1875 Node ** nodelinkdata) :
1876 _nodes(nodelinkdata),
1877 _elemlinks(elemlinkdata),
1878 #ifdef LIBMESH_ENABLE_AMR
1882 #ifdef LIBMESH_ENABLE_AMR
1883 _rflag(
Elem::DO_NOTHING),
1884 _pflag(
Elem::DO_NOTHING),
1887 _map_type(p ? p->mapping_type() : 0),
1888 _map_data(p ? p->mapping_data() : 0)
1898 for (
unsigned int n=0; n<nn; n++)
1909 for (
unsigned int n=1; n<ns+1; n++)
1914 if (this->
parent() !=
nullptr)
1922 #ifdef LIBMESH_ENABLE_AMR
1942 #ifdef LIBMESH_ENABLE_AMR
1957 libmesh_assert_less (i, this->
n_nodes());
1969 libmesh_assert_less (i, this->
n_nodes());
1979 libmesh_assert_less (i, this->
n_nodes());
2011 libmesh_assert_less (i, this->
n_nodes());
2022 libmesh_assert_less (i, this->
n_nodes());
2061 libmesh_assert_less (i, this->
n_nodes());
2130 if (n && n->parent() ==
this)
2142 if (n && n->parent() ==
this)
2172 return {0, cast_int<unsigned short>(this->
n_nodes())};
2181 return {0, cast_int<unsigned short>(this->
n_edges())};
2190 return {0, cast_int<unsigned short>(this->
n_sides())};
2201 Elem * me = const_cast<Elem *>(
this);
2202 const Elem * s = const_cast<const Elem *>(me->
side_ptr(i).release());
2203 return std::unique_ptr<const Elem>(s);
2211 const unsigned int i)
const
2214 Elem * me = const_cast<Elem *>(
this);
2215 std::unique_ptr<Elem> e {const_cast<Elem *>(elem.release())};
2217 elem.reset(e.release());
2223 std::unique_ptr<const Elem>
2228 Elem * me = const_cast<Elem *>(
this);
2230 return std::unique_ptr<const Elem>(s);
2238 const unsigned int i)
const
2241 Elem * me = const_cast<Elem *>(
this);
2242 std::unique_ptr<Elem> e {const_cast<Elem *>(elem.release())};
2244 elem.reset(e.release());
2249 template <
typename Sub
class>
2253 const unsigned int i,
2256 libmesh_assert_less (i, this->
n_sides());
2258 if (!side.get() || side->type() != sidetype)
2260 Subclass & real_me = cast_ref<Subclass&>(*
this);
2261 side = real_me.Subclass::build_side_ptr(i,
false);
2267 for (
auto n : side->node_index_range())
2268 side->set_node(n) = this->
node_ptr(Subclass::side_nodes_map[i][n]);
2274 template <
typename Sub
class,
typename Map
class>
2278 const unsigned int i,
2281 libmesh_assert_less (i, this->
n_sides());
2283 if (!side.get() || side->type() != sidetype)
2285 Subclass & real_me = cast_ref<Subclass&>(*
this);
2286 side = real_me.Subclass::side_ptr(i);
2292 for (
auto n : side->node_index_range())
2293 side->set_node(n) = this->
node_ptr(Mapclass::side_nodes_map[i][n]);
2300 std::unique_ptr<const Elem>
2305 Elem * me = const_cast<Elem *>(
this);
2307 return std::unique_ptr<const Elem>(e);
2327 const Elem * eparent = e;
2331 eparent = eparent->
parent();
2347 #ifdef LIBMESH_ENABLE_AMR
2365 #ifdef LIBMESH_ENABLE_AMR
2370 for (
const Elem * my_ancestor = this->
parent();
2371 my_ancestor !=
nullptr;
2372 my_ancestor = my_ancestor->
parent())
2373 if (my_ancestor->active())
2385 #ifdef LIBMESH_ENABLE_AMR
2399 #ifdef LIBMESH_ENABLE_AMR
2404 if (c.has_children())
2414 #ifdef LIBMESH_ENABLE_AMR
2419 #ifdef LIBMESH_ENABLE_AMR
2420 const Elem * e = descendant;
2453 libmesh_assert_equal_to(this->
dim(), p ? p->
dim() : this->
dim());
2462 const Elem * tp =
this;
2466 while (tp->
parent() !=
nullptr)
2470 libmesh_assert_equal_to (tp->
level(), 0);
2480 #ifdef LIBMESH_ENABLE_AMR
2486 if (this->
parent() ==
nullptr)
2514 #ifdef LIBMESH_ENABLE_AMR
2526 return static_cast<ElemMappingType>(
_map_type);
2555 #ifdef LIBMESH_ENABLE_AMR
2602 for (
unsigned int c=0; c != nc; c++)
2606 libmesh_error_msg(
"ERROR: which_child_am_i() was called with a non-child!");
2616 return static_cast<RefinementState>(
_rflag);
2624 _rflag = cast_int<unsigned char>(rflag);
2632 return static_cast<RefinementState>(
_pflag);
2641 libmesh_assert_not_equal_to
2644 _pflag = cast_int<unsigned char>(pflag);
2658 unsigned int max_p_level =
_p_level;
2660 max_p_level = std::max(max_p_level,
2661 c.max_descendant_p_level());
2671 libmesh_assert_not_equal_to
2674 _p_level = cast_int<unsigned char>(p);
2679 #endif // ifdef LIBMESH_ENABLE_AMR
2830 this->_parent == other.
_parent);
2907 template <
typename PredType,
typename IterType>
2910 const PredType & p ) :
2934 #define LIBMESH_ENABLE_TOPOLOGY_CACHES \
2936 std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> & \
2937 _get_bracketing_node_cache() const override \
2939 static std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> c; \
2944 std::vector<std::vector<std::vector<signed char>>> & \
2945 _get_parent_indices_cache() const override \
2947 static std::vector<std::vector<std::vector<signed char>>> c; \
2956 #endif // LIBMESH_ELEM_H
unsigned char mapping_data() const
void active_family_tree_by_side(std::vector< const Elem * > &family, unsigned int side, bool reset=true) const
Same as the active_family_tree() member, but only adds elements which are next to side.
void find_point_neighbors(const Point &p, std::set< const Elem * > &neighbor_set) const
This function finds all active elements (including this one) which are in the same manifold as this e...
void nullify_neighbors()
Replaces this element with nullptr for all of its neighbors.
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const =0
const Elem * child_ptr(unsigned int i) const
virtual const std::vector< std::pair< dof_id_type, dof_id_type > > bracketing_nodes(unsigned int c, unsigned int n) const
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const =0
virtual unsigned int is_vertex_on_child(unsigned int, unsigned int n) const
We're using a class instead of a typedef to allow forward declarations and future flexibility.
virtual unsigned int n_edges() const =0
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
static dof_id_type compute_key(dof_id_type n0)
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const
void replace_child(Elem *elem, unsigned int c)
Replaces the child pointer at the specified index in the child array.
void set_p_refinement_flag(const RefinementState pflag)
Sets the value of the p-refinement flag for the element.
virtual unsigned int n_faces() const =0
void total_family_tree(std::vector< const Elem * > &family, bool reset=true) const
Same as the family_tree() member, but also adds any subactive descendants.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true)=0
void set_parent(Elem *p)
Sets the pointer to the element's parent.
void set_interior_parent(Elem *p)
Sets the pointer to the element's interior_parent.
bool contains_edge_of(const Elem *e) const
virtual bool close_to_point(const Point &p, Real tol) const
The SimpleRange templated class is intended to make it easy to construct ranges from pairs of iterato...
void find_edge_neighbors(const Point &p1, const Point &p2, std::set< const Elem * > &neighbor_set) const
This function finds all active elements in the same manifold as this element which touch the current ...
unsigned int level() const
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
SideIter(const SideIter &other)
SideIter _first_side()
Side iterator helper functions.
virtual unsigned int n_nodes() const =0
virtual float embedding_matrix(const unsigned int child_num, const unsigned int child_node_num, const unsigned int parent_node_num) const =0
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const
IntRange< unsigned short > edge_index_range() const
void _update_side_ptr() const
bool is_semilocal(const processor_id_type my_pid) const
variant_filter_iterator(const IterType &d, const IterType &e, const PredType &p)
Templated Constructor.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
virtual const std::vector< std::pair< unsigned char, unsigned char > > & parent_bracketing_nodes(unsigned int c, unsigned int n) const
unsigned int n_neighbors() const
void contract()
Contract an active element, i.e.
Defines a Cartesian bounding box by the two corner extremum.
Elem ** _children
Pointers to this element's children.
ConstNodeRefIter(const Node *const *nodepp)
This class implements reference counting.
The libMesh namespace provides an interface to certain functionality in the library.
void set_p_level(const unsigned int p)
Sets the value of the p-refinement level for the element.
virtual unsigned short dim() const =0
unsigned int which_side_am_i(const Elem *e) const
This function tells you which side the boundary element e is.
std::ostream & operator<<(std::ostream &os, const OrderWrapper &order)
Overload stream operators.
side_iterator(const IterType &d, const IterType &e, const PredType &p)
void set_mapping_data(const unsigned char data)
Sets the value of the mapping data for the element.
void add_child(Elem *elem)
Adds a child pointer to the array of children of this element.
virtual bool infinite() const =0
unsigned int min_new_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
static const Real TOLERANCE
void set_neighbor(const unsigned int i, Elem *n)
Assigns n as the neighbor.
void find_interior_neighbors(std::set< const Elem * > &neighbor_set) const
This function finds all active elements (not including this one) in the parent manifold of this eleme...
bool contains_vertex_of(const Elem *e) const
unsigned int p_level() const
SimpleRange< NeighborPtrIter > neighbor_ptr_range()
Returns a range with all neighbors of an element, usable in range-based for loops.
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const
The definition of the protected nested SideIter class.
IntRange< unsigned short > node_index_range() const
subdomain_id_type _sbd_id
The subdomain to which this element belongs.
RefinementState
Enumeration of possible element refinement states.
void print_info(std::ostream &os=libMesh::out) const
Prints relevant information about the element.
virtual void refine(MeshRefinement &mesh_refinement)
Refine the element.
unsigned char _map_data
Mapping function data; currently used when needed to store the RATIONAL_BERNSTEIN nodal weight data i...
unsigned char _pflag
p refinement flag.
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
void simple_side_ptr(std::unique_ptr< Elem > &side, const unsigned int i, ElemType sidetype)
An implementation for simple (all sides equal) elements.
virtual bool is_remote() const
processor_id_type processor_id() const
virtual bool is_child_on_edge(const unsigned int c, const unsigned int e) const
Node ** _nodes
Pointers to the nodes we are connected to.
The DofObject defines an abstract base class for objects that have degrees of freedom associated with...
void family_tree_by_side(std::vector< const Elem * > &family, unsigned int side, bool reset=true) const
Same as the family_tree() member, but only adds elements which are next to side.
Real length(const unsigned int n1, const unsigned int n2) const
unsigned char _rflag
h refinement flag.
virtual bool is_vertex_on_parent(unsigned int c, unsigned int n) const
const Point & point(const unsigned int i) const
virtual Point centroid() const
side_iterator boundary_sides_end()
Predicates::multi_predicate Predicate
Useful iterator typedefs.
virtual unsigned int opposite_side(const unsigned int s) const
Elem *& operator*() const
static const subdomain_id_type invalid_subdomain_id
A static integral constant representing an invalid subdomain id.
void make_links_to_me_remote()
Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's approp...
ConstChildRefIter(const Elem *const *childpp)
bool has_neighbor(const Elem *elem) const
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const
NodeRefIter(Node *const *nodepp)
Implements (adaptive) mesh refinement algorithms for a MeshBase.
void family_tree_by_subneighbor(std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, bool reset=true) const
Same as the family_tree() member, but only adds elements which are next to subneighbor.
unsigned int local_node(const dof_id_type i) const
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const =0
virtual bool is_mid_infinite_edge_node(const unsigned int) const
The IntRange templated class is intended to make it easy to loop over integers which are indices of a...
void libmesh_assert_valid_node_pointers() const
Checks for a valid id and pointers to nodes with valid ids on this element.
bool has_ancestor_children() const
This is the MeshBase class.
virtual ~Elem()
Destructor.
SimpleRange< NodeRefIter > node_ref_range()
Returns a range with all nodes of an element, usable in range-based for loops.
Elem * child_neighbor(Elem *elem)
void set_mapping_type(const ElemMappingType type)
Sets the value of the mapping type for the element.
void active_family_tree_by_topological_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb, bool reset=true) const
Same as the active_family_tree_by_neighbor() member, but the neighbor here may be a topological (e....
RefinementState p_refinement_flag() const
virtual Real volume() const
static const unsigned int type_to_n_edges_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of edges on the element...
const Node *const * get_nodes() const
static ElemType first_order_equivalent_type(const ElemType et)
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
void write_connectivity(std::ostream &out, const IOPackage iop) const
Writes the element connectivity for various IO packages to the passed ostream "out".
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual std::unique_ptr< Elem > side_ptr(unsigned int i)=0
static const unsigned int type_to_n_sides_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of sides on the element...
virtual dof_id_type key() const
uint8_t processor_id_type
ElemMappingType mapping_type() const
bool operator==(const Elem &rhs) const
void total_family_tree_by_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, bool reset=true) const
Same as the family_tree_by_neighbor() member, but also adds any subactive descendants.
virtual unsigned int n_vertices() const =0
uint32_t hashword2(const uint32_t &first, const uint32_t &second, uint32_t initval=0)
This is a hard-coded version of hashword for hashing exactly 2 numbers.
virtual std::pair< Real, Real > qual_bounds(const ElemQuality) const
The definition of the struct used for iterating over sides.
A Node is like a Point, but with more information.
const Elem * raw_child_ptr(unsigned int i) const
virtual Order default_order() const =0
SideIter(const unsigned int side_number, Elem *parent)
virtual Real quality(const ElemQuality q) const
bool operator==(const SideIter &other) const
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const =0
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const =0
virtual unsigned int n_nodes_in_child(unsigned int) const
virtual BoundingBox loose_bounding_box() const
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
void set_child(unsigned int c, Elem *elem)
Sets the pointer to the child for this element.
virtual unsigned int as_parent_node(unsigned int c, unsigned int n) const
virtual Node *& set_node(const unsigned int i)
bool side_on_boundary() const
void family_tree(std::vector< const Elem * > &family, bool reset=true) const
Fills the vector family with the children of this element, recursively.
void make_links_to_me_local(unsigned int n, unsigned int neighbor_side)
Resets the neighbor_side pointers of our nth neighbor (and its descendants, if appropriate) to point ...
ElemQuality
Defines an enum for element quality metrics.
const Elem * parent() const
SideIter & operator=(const SideIter &other)
side_iterator boundary_sides_begin()
Iterator accessor functions.
RefinementState refinement_flag() const
unsigned int max_descendant_p_level() const
const Elem * interior_parent() const
uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval=0)
The hashword function takes an array of uint32_t's of length 'length' and computes a single key from ...
void family_tree_by_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, bool reset=true) const
Same as the family_tree() member, but only adds elements which are next to neighbor.
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
virtual bool is_edge(const unsigned int i) const =0
void remove_links_to_me()
Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's approp...
const typedef Elem *const * ConstNeighborPtrIter
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the number of nodes in the element...
virtual Real hmax() const
virtual unsigned int n_children() const =0
virtual unsigned int opposite_node(const unsigned int n, const unsigned int s) const
bool is_ancestor_of(const Elem *descendant) const
const Elem * topological_neighbor(const unsigned int i, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
std::unique_ptr< Elem > _side
const Elem * reference_elem() const
ElemMappingType
Enumeration of possible element master->physical mapping types.
virtual Real hmin() const
void total_family_tree_by_subneighbor(std::vector< const Elem * > &family, const Elem *neighbor, const Elem *subneighbor, bool reset=true) const
Same as the family_tree_by_subneighbor() member, but also adds any subactive descendants.
subdomain_id_type subdomain_id() const
unsigned int _side_number
void active_family_tree(std::vector< const Elem * > &active_family, bool reset=true) const
Same as the family_tree() member, but only adds the active children.
static const unsigned int max_n_nodes
The maximum number of nodes any element can contain.
virtual bool has_affine_map() const
bool has_children() const
IntRange< unsigned short > side_index_range() const
virtual unsigned int embedding_matrix_version() const
void coarsen()
Coarsen the element.
virtual bool is_vertex(const unsigned int i) const =0
unsigned int min_p_level_by_neighbor(const Elem *neighbor, unsigned int current_min) const
virtual Point master_point(const unsigned int i) const =0
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
std::string get_info() const
Prints relevant information about the element to a string.
This is the base class from which all geometric element types are derived.
static ElemType second_order_equivalent_type(const ElemType et, const bool full_ordered=true)
virtual bool is_face(const unsigned int i) const =0
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const =0
void libmesh_assert_valid_neighbors() const
Checks for consistent neighbor links on this element.
IterBase * data
Ideally this private member data should have protected access.
void set_refinement_flag(const RefinementState rflag)
Sets the value of the refinement flag for the element.
unsigned int get_node_index(const Node *node_ptr) const
virtual Point origin() const
const Elem * neighbor_ptr(unsigned int i) const
dof_id_type node_id(const unsigned int i) const
const Node & node_ref(const unsigned int i) const
unsigned char _map_type
Mapping function type; currently either 0 (LAGRANGE) or 1 (RATIONAL_BERNSTEIN).
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Elem & operator=(const Elem &)=delete
Elem ** _elemlinks
Pointers to this element's parent and neighbors, and for lower-dimensional elements' interior_parent.
virtual bool is_linear() const
void active_family_tree_by_neighbor(std::vector< const Elem * > &family, const Elem *neighbor, bool reset=true) const
Same as the active_family_tree() member, but only adds elements which are next to neighbor.
void simple_build_side_ptr(std::unique_ptr< Elem > &side, const unsigned int i, ElemType sidetype)
An implementation for simple (all sides equal) elements.
virtual unsigned int n_sides() const =0
virtual std::vector< std::vector< std::vector< signed char > > > & _get_parent_indices_cache() const
Elem subclasses which don't do their own child-to-parent node calculations will need to supply a stat...
virtual unsigned int n_sub_elem() const =0
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i)=0
Elem *const * NeighborPtrIter
Nested "classes" for use iterating over all neighbors of an element.
const Node * node_ptr(const unsigned int i) const
This is the base class for point locators.
void hack_p_level(const unsigned int p)
Sets the value of the p-refinement level for the element without altering the p-level of its ancestor...
virtual std::vector< unsigned int > nodes_on_side(const unsigned int) const =0
virtual ElemType type() const =0
unsigned int which_neighbor_am_i(const Elem *e) const
This function tells you which neighbor e is.
bool has_topological_neighbor(const Elem *elem, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
unsigned int which_child_am_i(const Elem *e) const
void ErrorVector unsigned int
ChildRefIter(Elem *const *childpp)
virtual std::vector< std::vector< std::vector< std::vector< std::pair< unsigned char, unsigned char > > > > > & _get_bracketing_node_cache() const
Elem subclasses which don't do their own bracketing node calculations will need to supply a static ca...
ElemType
Defines an enum for geometric element types.
bool point_test(const Point &p, Real box_tol, Real map_tol) const
Shared private implementation used by the contains_point() and close_to_point() routines.
const Elem * top_parent() const