libMesh
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Attributes | List of all members
libMesh::Tri6 Class Reference


The Tri6 is an element in 2D composed of 6 nodes. More...

#include <face_tri6.h>

Inheritance diagram for libMesh::Tri6:
[legend]

Public Types

enum  RefinementState {
  COARSEN = 0, DO_NOTHING, REFINE, JUST_REFINED,
  JUST_COARSENED, INACTIVE, COARSEN_INACTIVE, INVALID_REFINEMENTSTATE
}
 Enumeration of possible element refinement states. More...
 
typedef Elem *const * NeighborPtrIter
 Nested "classes" for use iterating over all neighbors of an element. More...
 
typedef const Elem *const * ConstNeighborPtrIter
 
typedef Predicates::multi_predicate Predicate
 Useful iterator typedefs. More...
 

Public Member Functions

 Tri6 (Elem *p=nullptr)
 Constructor. More...
 
 Tri6 (Tri6 &&)=delete
 
 Tri6 (const Tri6 &)=delete
 
Tri6operator= (const Tri6 &)=delete
 
Tri6operator= (Tri6 &&)=delete
 
virtual ~Tri6 ()=default
 
virtual ElemType type () const override
 
virtual unsigned int n_nodes () const override
 
virtual unsigned int n_sub_elem () const override
 
virtual bool is_vertex (const unsigned int i) const override
 
virtual bool is_edge (const unsigned int i) const override
 
virtual bool is_face (const unsigned int i) const override
 
virtual bool is_node_on_side (const unsigned int n, const unsigned int s) const override
 
virtual std::vector< unsigned int > nodes_on_side (const unsigned int s) const override
 
virtual bool is_node_on_edge (const unsigned int n, const unsigned int e) const override
 
virtual bool has_affine_map () const override
 
virtual Order default_order () const override
 
virtual dof_id_type key (const unsigned int s) const override
 
virtual unsigned int which_node_am_i (unsigned int side, unsigned int side_node) const override
 
virtual std::unique_ptr< Elembuild_side_ptr (const unsigned int i, bool proxy) override
 
virtual void connectivity (const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
 
virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override
 
virtual unsigned short int second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const override
 
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex (const unsigned int n) const override
 
virtual Real volume () const override
 An optimized method for approximating the area of a TRI6 using quadrature. More...
 
virtual BoundingBox loose_bounding_box () const override
 
virtual dof_id_type key (const unsigned int s) const=0
 Don't hide Elem::key() defined in the base class. More...
 
virtual dof_id_type key () const
 Don't hide Elem::key() defined in the base class. More...
 
virtual Point master_point (const unsigned int i) const override
 
virtual unsigned int n_sides () const override
 
virtual unsigned int n_vertices () const override
 
virtual unsigned int n_edges () const override
 
virtual unsigned int n_children () const override
 
virtual bool is_child_on_side (const unsigned int c, const unsigned int s) const override
 
virtual dof_id_type key () const override
 
virtual std::unique_ptr< Elemside_ptr (const unsigned int i) override
 
std::unique_ptr< const Elemside_ptr (unsigned int i) const
 
virtual Real quality (const ElemQuality q) const override
 
virtual std::pair< Real, Realqual_bounds (const ElemQuality q) const override
 
virtual unsigned short dim () const override
 
virtual unsigned int n_faces () const override
 
virtual std::unique_ptr< Elembuild_edge_ptr (const unsigned int i) override
 build_side and build_edge are identical for faces. More...
 
std::unique_ptr< const Elembuild_edge_ptr (const unsigned int i) const
 
virtual bool is_edge_on_side (const unsigned int e, const unsigned int s) const override
 is_edge_on_side is trivial in 2D. More...
 
virtual bool infinite () const override
 
const Pointpoint (const unsigned int i) const
 
Pointpoint (const unsigned int i)
 
dof_id_type node_id (const unsigned int i) const
 
dof_id_type node (const unsigned int i) const
 
unsigned int local_node (const dof_id_type i) const
 
unsigned int get_node_index (const Node *node_ptr) const
 
const Node *const * get_nodes () const
 
const Nodenode_ptr (const unsigned int i) const
 
Nodenode_ptr (const unsigned int i)
 
const Nodenode_ref (const unsigned int i) const
 
Nodenode_ref (const unsigned int i)
 
Nodeget_node (const unsigned int i) const
 
virtual Node *& set_node (const unsigned int i)
 
SimpleRange< NodeRefIternode_ref_range ()
 Returns a range with all nodes of an element, usable in range-based for loops. More...
 
SimpleRange< ConstNodeRefIternode_ref_range () const
 
subdomain_id_type subdomain_id () const
 
subdomain_id_typesubdomain_id ()
 
const Elemreference_elem () const
 
bool operator== (const Elem &rhs) const
 
const Elemneighbor_ptr (unsigned int i) const
 
Elemneighbor_ptr (unsigned int i)
 
Elemneighbor (const unsigned int i) const
 
SimpleRange< NeighborPtrIterneighbor_ptr_range ()
 Returns a range with all neighbors of an element, usable in range-based for loops. More...
 
SimpleRange< ConstNeighborPtrIterneighbor_ptr_range () const
 
const Elemtopological_neighbor (const unsigned int i, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
 
Elemtopological_neighbor (const unsigned int i, MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb)
 
bool has_topological_neighbor (const Elem *elem, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb) const
 
void set_neighbor (const unsigned int i, Elem *n)
 Assigns n as the $ i^{th} $ neighbor. More...
 
bool has_neighbor (const Elem *elem) const
 
Elemchild_neighbor (Elem *elem)
 
const Elemchild_neighbor (const Elem *elem) const
 
bool on_boundary () const
 
bool is_semilocal (const processor_id_type my_pid) const
 
unsigned int which_neighbor_am_i (const Elem *e) const
 This function tells you which neighbor e is. More...
 
unsigned int which_side_am_i (const Elem *e) const
 This function tells you which side the boundary element e is. More...
 
bool contains_vertex_of (const Elem *e) const
 
bool contains_edge_of (const Elem *e) const
 
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 element and which touch the current active element at the specified point, which should be a point in the current element. More...
 
void find_point_neighbors (std::set< const Elem *> &neighbor_set) const
 This function finds all active elements (including this one) in the same manifold as this element which touch this active element at any point. More...
 
void find_point_neighbors (std::set< const Elem *> &neighbor_set, const Elem *start_elem) const
 This function finds all active elements (including this one) in the same manifold as start_elem (which must be active and must touch this element) which touch this element at any point. More...
 
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 active element along the whole edge defined by the two points p1 and p2. More...
 
void find_edge_neighbors (std::set< const Elem *> &neighbor_set) const
 This function finds all active elements in the same manifold as this element which touch the current active element along any edge (more precisely, at at least two points). More...
 
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 element whose intersection with this element has non-zero measure. More...
 
void remove_links_to_me ()
 Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's appropriate pointers to point to null instead of to this. More...
 
void make_links_to_me_remote ()
 Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's appropriate pointers to point to the global remote_elem instead of this. More...
 
void make_links_to_me_local (unsigned int n)
 Resets the appropriate neighbor pointers of our nth neighbor (and its descendants, if appropriate) to point to this Elem instead of to the global remote_elem. More...
 
virtual bool is_remote () const
 
void write_connectivity (std::ostream &out, const IOPackage iop) const
 Writes the element connectivity for various IO packages to the passed ostream "out". More...
 
IntRange< unsigned short > node_index_range () const
 
virtual unsigned int n_nodes_in_child (unsigned int) const
 
IntRange< unsigned short > side_index_range () const
 
unsigned int n_neighbors () const
 
IntRange< unsigned short > edge_index_range () const
 
virtual unsigned int is_vertex_on_child (unsigned int, unsigned int n) const
 
virtual bool is_vertex_on_parent (unsigned int c, unsigned int n) const
 
virtual unsigned int opposite_side (const unsigned int s) const
 
virtual unsigned int opposite_node (const unsigned int n, const unsigned int s) const
 
std::unique_ptr< Elemside (const unsigned int i) const
 
std::unique_ptr< const Elembuild_side_ptr (const unsigned int i, bool proxy=true) const
 
std::unique_ptr< Elembuild_side (const unsigned int i, bool proxy=true) const
 
std::unique_ptr< Elembuild_edge (const unsigned int i) const
 Creates an element coincident with edge i. More...
 
virtual Point centroid () const
 
virtual Real hmin () const
 
virtual Real hmax () const
 
virtual bool contains_point (const Point &p, Real tol=TOLERANCE) const
 
virtual bool close_to_point (const Point &p, Real tol) const
 
virtual bool is_linear () const
 
void print_info (std::ostream &os=libMesh::out) const
 Prints relevant information about the element. More...
 
std::string get_info () const
 Prints relevant information about the element to a string. More...
 
bool active () const
 
bool ancestor () const
 
bool subactive () const
 
bool has_children () const
 
bool has_ancestor_children () const
 
bool is_ancestor_of (const Elem *descendant) const
 
const Elemparent () const
 
Elemparent ()
 
void set_parent (Elem *p)
 Sets the pointer to the element's parent. More...
 
const Elemtop_parent () const
 
const Eleminterior_parent () const
 
Eleminterior_parent ()
 
void set_interior_parent (Elem *p)
 Sets the pointer to the element's interior_parent. More...
 
Real length (const unsigned int n1, const unsigned int n2) const
 
unsigned int level () const
 
unsigned int p_level () const
 
const Elemraw_child_ptr (unsigned int i) const
 
const Elemchild_ptr (unsigned int i) const
 
Elemchild_ptr (unsigned int i)
 
Elemchild (const unsigned int i) const
 
SimpleRange< ChildRefIterchild_ref_range ()
 Returns a range with all children of a parent element, usable in range-based for loops. More...
 
SimpleRange< ConstChildRefIterchild_ref_range () const
 
unsigned int which_child_am_i (const Elem *e) const
 
virtual bool is_child_on_edge (const unsigned int c, const unsigned int e) const
 
void add_child (Elem *elem)
 Adds a child pointer to the array of children of this element. More...
 
void add_child (Elem *elem, unsigned int c)
 Adds a new child pointer to the specified index in the array of children of this element. More...
 
void replace_child (Elem *elem, unsigned int c)
 Replaces the child pointer at the specified index in the child array. More...
 
void family_tree (std::vector< const Elem *> &family, const bool reset=true) const
 Fills the vector family with the children of this element, recursively. More...
 
void total_family_tree (std::vector< const Elem *> &active_family, const bool reset=true) const
 Same as the family_tree() member, but also adds any subactive descendants. More...
 
void active_family_tree (std::vector< const Elem *> &active_family, const bool reset=true) const
 Same as the family_tree() member, but only adds the active children. More...
 
void family_tree_by_side (std::vector< const Elem *> &family, const unsigned int side, const bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to side. More...
 
void active_family_tree_by_side (std::vector< const Elem *> &family, const unsigned int side, const bool reset=true) const
 Same as the active_family_tree() member, but only adds elements which are next to side. More...
 
void family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, const bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to neighbor. More...
 
void total_family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, const bool reset=true) const
 Same as the family_tree_by_neighbor() member, but also adds any subactive descendants. More...
 
void family_tree_by_subneighbor (std::vector< const Elem *> &family, const Elem *neighbor, const Elem *subneighbor, const bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to subneighbor. More...
 
void total_family_tree_by_subneighbor (std::vector< const Elem *> &family, const Elem *neighbor, const Elem *subneighbor, const bool reset=true) const
 Same as the family_tree_by_subneighbor() member, but also adds any subactive descendants. More...
 
void active_family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, const bool reset=true) const
 Same as the active_family_tree() member, but only adds elements which are next to neighbor. More...
 
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, const bool reset=true) const
 Same as the active_family_tree_by_neighbor() member, but the neighbor here may be a topological (e.g. More...
 
RefinementState refinement_flag () const
 
void set_refinement_flag (const RefinementState rflag)
 Sets the value of the refinement flag for the element. More...
 
RefinementState p_refinement_flag () const
 
void set_p_refinement_flag (const RefinementState pflag)
 Sets the value of the p-refinement flag for the element. More...
 
unsigned int max_descendant_p_level () const
 
unsigned int min_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const
 
unsigned int min_new_p_level_by_neighbor (const Elem *neighbor, unsigned int current_min) const
 
void set_p_level (const unsigned int p)
 Sets the value of the p-refinement level for the element. More...
 
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 ancestors. More...
 
virtual void refine (MeshRefinement &mesh_refinement)
 Refine the element. More...
 
void coarsen ()
 Coarsen the element. More...
 
void contract ()
 Contract an active element, i.e. More...
 
void libmesh_assert_valid_neighbors () const
 Checks for consistent neighbor links on this element. More...
 
void libmesh_assert_valid_node_pointers () const
 Checks for a valid id and pointers to nodes with valid ids on this element. More...
 
side_iterator boundary_sides_begin ()
 Iterator accessor functions. More...
 
side_iterator boundary_sides_end ()
 
virtual bool is_mid_infinite_edge_node (const unsigned int) const
 
virtual Point origin () const
 
virtual unsigned int as_parent_node (unsigned int c, unsigned int n) const
 
virtual const std::vector< std::pair< unsigned char, unsigned char > > & parent_bracketing_nodes (unsigned int c, unsigned int n) const
 
virtual const std::vector< std::pair< dof_id_type, dof_id_type > > bracketing_nodes (unsigned int c, unsigned int n) const
 
virtual unsigned int embedding_matrix_version () const
 
void nullify_neighbors ()
 Replaces this element with nullptr for all of its neighbors. More...
 
void clear_old_dof_object ()
 Sets the old_dof_object to nullptr. More...
 
void set_old_dof_object ()
 Sets the old_dof_object to a copy of this. More...
 
void clear_dofs ()
 Clear the DofMap data structures and return to a pristine state. More...
 
void invalidate_dofs (const unsigned int sys_num=libMesh::invalid_uint)
 Sets all degree of freedom numbers to invalid_id. More...
 
void invalidate_id ()
 Sets the id to invalid_id. More...
 
void invalidate_processor_id ()
 Sets the processor id to invalid_processor_id. More...
 
void invalidate ()
 Invalidates all the indices for this DofObject. More...
 
unsigned int n_dofs (const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
 
dof_id_type id () const
 
dof_id_typeset_id ()
 
void set_id (const dof_id_type dofid)
 Sets the id for this DofObject. More...
 
unique_id_type unique_id () const
 
unique_id_typeset_unique_id ()
 
bool valid_id () const
 
bool valid_unique_id () const
 
processor_id_type processor_id () const
 
processor_id_typeprocessor_id ()
 
void processor_id (const processor_id_type pid)
 Sets the processor_id for this DofObject. More...
 
bool valid_processor_id () const
 
unsigned int n_systems () const
 
void set_n_systems (const unsigned int s)
 Sets the number of systems for this DofObject. More...
 
void add_system ()
 Adds an additional system to the DofObject. More...
 
unsigned int n_var_groups (const unsigned int s) const
 
unsigned int n_vars (const unsigned int s, const unsigned int vg) const
 
unsigned int n_vars (const unsigned int s) const
 
void set_n_vars_per_group (const unsigned int s, const std::vector< unsigned int > &nvpg)
 Sets number of variables in each group associated with system s for this DofObject. More...
 
unsigned int n_comp (const unsigned int s, const unsigned int var) const
 
unsigned int n_comp_group (const unsigned int s, const unsigned int vg) const
 
void set_n_comp (const unsigned int s, const unsigned int var, const unsigned int ncomp)
 Sets the number of components for Variable var of system s associated with this DofObject. More...
 
void set_n_comp_group (const unsigned int s, const unsigned int vg, const unsigned int ncomp)
 Sets the number of components for VariableGroup vg of system s associated with this DofObject. More...
 
dof_id_type dof_number (const unsigned int s, const unsigned int var, const unsigned int comp) const
 
dof_id_type dof_number (const unsigned int s, const unsigned int vg, const unsigned int vig, const unsigned int comp, const unsigned int n_comp) const
 
std::pair< unsigned int, unsigned int > var_to_vg_and_offset (const unsigned int s, const unsigned int var) const
 
void set_dof_number (const unsigned int s, const unsigned int var, const unsigned int comp, const dof_id_type dn)
 Sets the global degree of freedom number for variable var, component comp for system s associated with this DofObject. More...
 
bool has_dofs (const unsigned int s=libMesh::invalid_uint) const
 
void set_vg_dof_base (const unsigned int s, const unsigned int vg, const dof_id_type db)
 VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base. More...
 
dof_id_type vg_dof_base (const unsigned int s, const unsigned int vg) const
 VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base. More...
 
unsigned int packed_indexing_size () const
 If we pack our indices into an buffer for communications, how many ints do we need? More...
 
void unpack_indexing (std::vector< largest_id_type >::const_iterator begin)
 A method for creating our index buffer from packed data - basically with our current implementation we investigate the size term and then copy. More...
 
void pack_indexing (std::back_insert_iterator< std::vector< largest_id_type >> target) const
 A method for creating packed data from our index buffer - basically a copy with prepended size with our current implementation. More...
 
void debug_buffer () const
 Print our buffer for debugging. More...
 
void print_dof_info () const
 Print out info for debugging. More...
 
void set_buffer (const std::vector< dof_id_type > &buf)
 

Static Public Member Functions

static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static ElemType second_order_equivalent_type (const ElemType et, const bool full_ordered=true)
 
static ElemType first_order_equivalent_type (const ElemType et)
 
static std::unique_ptr< Elembuild (const ElemType type, Elem *p=nullptr)
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 
static void disable_print_counter_info ()
 
static unsigned int unpackable_indexing_size (std::vector< largest_id_type >::const_iterator begin)
 If we have indices packed into an buffer for communications, how much of that buffer applies to this dof object? More...
 

Public Attributes

DofObjectold_dof_object
 This object on the last mesh. More...
 

Static Public Attributes

static const int num_nodes = 6
 Geometric constants for Tri6. More...
 
static const int num_sides = 3
 
static const int num_children = 4
 
static const int nodes_per_side = 3
 
static const unsigned int side_nodes_map [num_sides][nodes_per_side]
 This maps the $ j^{th} $ node of the $ i^{th} $ side to element node numbers. More...
 
static const subdomain_id_type invalid_subdomain_id
 A static integral constant representing an invalid subdomain id. More...
 
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. More...
 
static const unsigned int max_n_nodes = 27
 The maximum number of nodes any element can contain. More...
 
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. More...
 
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. More...
 
static const dof_id_type invalid_id = static_cast<dof_id_type>(-1)
 An invalid id to distinguish an uninitialized DofObject. More...
 
static const unique_id_type invalid_unique_id = static_cast<unique_id_type>(-1)
 An invalid unique_id to distinguish an uninitialized DofObject. More...
 
static const processor_id_type invalid_processor_id = static_cast<processor_id_type>(-1)
 An invalid processor_id to distinguish DoFs that have not been assigned to a processor. More...
 

Protected Types

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

Protected Member Functions

virtual float embedding_matrix (const unsigned int i, const unsigned int j, const unsigned int k) const override
 Matrix used to create the elements children. More...
 
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 cache, since the default calculation is slow. More...
 
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 static cache, since the default calculation is slow. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 

Static Protected Member Functions

static dof_id_type compute_key (dof_id_type n0)
 
static dof_id_type compute_key (dof_id_type n0, dof_id_type n1)
 
static dof_id_type compute_key (dof_id_type n0, dof_id_type n1, dof_id_type n2)
 
static dof_id_type compute_key (dof_id_type n0, dof_id_type n1, dof_id_type n2, dof_id_type n3)
 

Protected Attributes

Node_nodelinks_data [num_nodes]
 Data for links to nodes. More...
 
 LIBMESH_ENABLE_TOPOLOGY_CACHES
 
Elem_elemlinks_data [4+(LIBMESH_DIM >2)]
 Data for links to parent/neighbor/interior_parent elements. More...
 
Node ** _nodes
 Pointers to the nodes we are connected to. More...
 
Elem ** _elemlinks
 Pointers to this element's parent and neighbors, and for lower-dimensional elements' interior_parent. More...
 
Elem ** _children
 Pointers to this element's children. More...
 
subdomain_id_type _sbd_id
 The subdomain to which this element belongs. More...
 
unsigned char _rflag
 h refinement flag. More...
 
unsigned char _pflag
 p refinement flag. More...
 
unsigned char _p_level
 p refinement level - the difference between the polynomial degree on this element and the minimum polynomial degree on the mesh. More...
 

Static Protected Attributes

static const float _embedding_matrix [num_children][num_nodes][num_nodes]
 Matrix that computes new nodal locations/solution values from current nodes/solution. More...
 
static const Real _master_points [6][3]
 Master element node locations. More...
 
static Counts _counts
 Actually holds the data. More...
 
static Counts _counts
 Actually holds the data. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 

Static Private Attributes

static const unsigned short int _second_order_adjacent_vertices [num_sides][2]
 Matrix that tells which vertices define the location of mid-side (or second-order) nodes. More...
 
static const unsigned short int _second_order_vertex_child_number [num_nodes]
 Vector that names a child sharing each second order node. More...
 
static const unsigned short int _second_order_vertex_child_index [num_nodes]
 Vector that names the child vertex index for each second order node. More...
 

Detailed Description


The Tri6 is an element in 2D composed of 6 nodes.

It is numbered like this:

*   TRI6:
*    2
*    o
*    |\
*    | \
*    |  \            eta
*    |   \            ^
*    |    \           |
*  5 o     o 4        |
*    |      \         o---> xi
*    |       \
*    |        \
*    o----o----o
*    0    3    1
* 

(xi, eta) are the reference element coordinates associated with the given numbering.

Author
Benjamin S. Kirk
Date
2002 A 2D triangular element with 6 nodes.

Definition at line 56 of file face_tri6.h.

Member Typedef Documentation

◆ ConstNeighborPtrIter

typedef const Elem* const* libMesh::Elem::ConstNeighborPtrIter
inherited

Definition at line 324 of file elem.h.

◆ Counts [1/2]

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

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ Counts [2/2]

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

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ NeighborPtrIter

typedef Elem* const* libMesh::Elem::NeighborPtrIter
inherited

Nested "classes" for use iterating over all neighbors of an element.

Definition at line 323 of file elem.h.

◆ Predicate

Useful iterator typedefs.

Definition at line 1462 of file elem.h.

Member Enumeration Documentation

◆ RefinementState

Enumeration of possible element refinement states.

Enumerator
COARSEN 
DO_NOTHING 
REFINE 
JUST_REFINED 
JUST_COARSENED 
INACTIVE 
COARSEN_INACTIVE 
INVALID_REFINEMENTSTATE 

Definition at line 1161 of file elem.h.

Constructor & Destructor Documentation

◆ Tri6() [1/3]

libMesh::Tri6::Tri6 ( Elem p = nullptr)
explicit

Constructor.

By default this element has no parent.

Definition at line 64 of file face_tri6.h.

64  :
Tri(const unsigned int nn, Elem *p, Node **nodelinkdata)
Default triangular element, takes number of nodes and parent.
Definition: face_tri.h:55
virtual unsigned int n_nodes() const override
Definition: face_tri6.h:81
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition: face_tri6.h:214

◆ Tri6() [2/3]

libMesh::Tri6::Tri6 ( Tri6 &&  )
delete

◆ Tri6() [3/3]

libMesh::Tri6::Tri6 ( const Tri6 )
delete

◆ ~Tri6()

virtual libMesh::Tri6::~Tri6 ( )
virtualdefault

Member Function Documentation

◆ _get_bracketing_node_cache()

virtual std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char> > > > >& libMesh::Elem::_get_bracketing_node_cache ( ) const
protectedvirtualinherited

Elem subclasses which don't do their own bracketing node calculations will need to supply a static cache, since the default calculation is slow.

Definition at line 1615 of file elem.h.

1616  {
1617  static std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> c;
1618  libmesh_error();
1619  return c;
1620  }

◆ _get_parent_indices_cache()

virtual std::vector<std::vector<std::vector<signed char> > >& libMesh::Elem::_get_parent_indices_cache ( ) const
protectedvirtualinherited

Elem subclasses which don't do their own child-to-parent node calculations will need to supply a static cache, since the default calculation is slow.

Definition at line 1629 of file elem.h.

1630  {
1631  static std::vector<std::vector<std::vector<signed char>>> c;
1632  libmesh_error();
1633  return c;
1634  }

◆ active()

bool libMesh::Elem::active ( ) const
inherited
Returns
true if the element is active (i.e. has no active descendants) or AMR is disabled, false otherwise.
Note
It suffices to check the first child only.

Definition at line 2296 of file elem.h.

References libMesh::Elem::COARSEN_INACTIVE, libMesh::Elem::INACTIVE, and libMesh::Elem::refinement_flag().

Referenced by libMesh::Elem::max_descendant_p_level(), libMesh::Elem::subactive(), and libMesh::Parallel::sync_element_data_by_parent_id().

2297 {
2298 #ifdef LIBMESH_ENABLE_AMR
2299  if ((this->refinement_flag() == INACTIVE) ||
2300  (this->refinement_flag() == COARSEN_INACTIVE))
2301  return false;
2302  else
2303  return true;
2304 #else
2305  return true;
2306 #endif
2307 }
RefinementState refinement_flag() const
Definition: elem.h:2544

◆ active_family_tree()

void libMesh::Elem::active_family_tree ( std::vector< const Elem *> &  active_family,
const bool  reset = true 
) const
inherited

Same as the family_tree() member, but only adds the active children.

Can be thought of as removing all the inactive elements from the vector created by family_tree, but is implemented more efficiently.

◆ active_family_tree_by_neighbor()

void libMesh::Elem::active_family_tree_by_neighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const bool  reset = true 
) const
inherited

Same as the active_family_tree() member, but only adds elements which are next to neighbor.

◆ active_family_tree_by_side()

void libMesh::Elem::active_family_tree_by_side ( std::vector< const Elem *> &  family,
const unsigned int  side,
const bool  reset = true 
) const
inherited

Same as the active_family_tree() member, but only adds elements which are next to side.

◆ active_family_tree_by_topological_neighbor()

void libMesh::Elem::active_family_tree_by_topological_neighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const MeshBase mesh,
const PointLocatorBase point_locator,
const PeriodicBoundaries pb,
const bool  reset = true 
) const
inherited

Same as the active_family_tree_by_neighbor() member, but the neighbor here may be a topological (e.g.

periodic boundary condition) neighbor, not just a local neighbor.

◆ add_child() [1/2]

void libMesh::Elem::add_child ( Elem elem)
inherited

Adds a child pointer to the array of children of this element.

If this is the first child to be added, this method allocates memory in the parent's _children array, otherwise, it just sets the pointer.

◆ add_child() [2/2]

void libMesh::Elem::add_child ( Elem elem,
unsigned int  c 
)
inherited

Adds a new child pointer to the specified index in the array of children of this element.

If this is the first child to be added, this method allocates memory in the parent's _children array, otherwise, it just sets the pointer.

◆ add_system()

void libMesh::DofObject::add_system ( )
inherited

Adds an additional system to the DofObject.

◆ ancestor()

bool libMesh::Elem::ancestor ( ) const
inherited
Returns
true if the element is an ancestor (i.e. has an active child or ancestor child), false otherwise or when AMR is disabled.

◆ as_parent_node()

virtual unsigned int libMesh::Elem::as_parent_node ( unsigned int  c,
unsigned int  n 
) const
virtualinherited
Returns
The local node id on the parent which corresponds to node n of child c, or invalid_uint if no such parent node exists.

◆ boundary_sides_begin()

side_iterator libMesh::Elem::boundary_sides_begin ( )
inherited

Iterator accessor functions.

◆ boundary_sides_end()

side_iterator libMesh::Elem::boundary_sides_end ( )
inherited

◆ bracketing_nodes()

virtual const std::vector<std::pair<dof_id_type, dof_id_type> > libMesh::Elem::bracketing_nodes ( unsigned int  c,
unsigned int  n 
) const
virtualinherited
Returns
All the pairs of nodes (indexed by global node id) which should bracket node n of child c.

◆ build()

static std::unique_ptr<Elem> libMesh::Elem::build ( const ElemType  type,
Elem p = nullptr 
)
staticinherited
Returns
An Elem of type type wrapped in a smart pointer.

Referenced by FETest< order, family, elem_type >::setUp().

◆ build_edge()

std::unique_ptr< Elem > libMesh::Elem::build_edge ( const unsigned int  i) const
inherited

Creates an element coincident with edge i.

Deprecated:
This method will eventually be removed since it hands back a non-const pointer to an edge that could be used to indirectly modify this Elem. Please use the the const-correct build_edge_ptr() function instead.

Definition at line 2198 of file elem.h.

References libMesh::Elem::build_edge_ptr().

2199 {
2200  // Call the const version of build_edge_ptr(), and const_cast the result.
2201  libmesh_deprecated();
2202  Elem * e = const_cast<Elem *>(this->build_edge_ptr(i).release());
2203  return std::unique_ptr<Elem>(e);
2204 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i)=0

◆ build_edge_ptr() [1/2]

virtual std::unique_ptr<Elem> libMesh::Face::build_edge_ptr ( const unsigned int  i)
overridevirtualinherited

build_side and build_edge are identical for faces.

Implements libMesh::Elem.

Definition at line 72 of file face.h.

References libMesh::Elem::build_side_ptr().

73  { return build_side_ptr(i); }
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true)=0

◆ build_edge_ptr() [2/2]

std::unique_ptr< const Elem > libMesh::Elem::build_edge_ptr ( const unsigned int  i) const
inherited

Definition at line 2184 of file elem.h.

References libMesh::Elem::build_edge_ptr().

2185 {
2186  // Call the non-const version of this function, return the result as
2187  // a std::unique_ptr<const Elem>.
2188  Elem * me = const_cast<Elem *>(this);
2189  const Elem * e = const_cast<const Elem *>(me->build_edge_ptr(i).release());
2190  return std::unique_ptr<const Elem>(e);
2191 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ build_side()

std::unique_ptr< Elem > libMesh::Elem::build_side ( const unsigned int  i,
bool  proxy = true 
) const
inherited
Returns
A proxy element coincident with side i.
Deprecated:
This method will eventually be removed since it hands back a non-const pointer to a side that could be used to indirectly modify this. Please use the the const-correct build_side_ptr() function instead.

Definition at line 2171 of file elem.h.

References libMesh::Elem::build_side_ptr().

2172 {
2173  // Call the const version of build_side_ptr(), and const_cast the result.
2174  libmesh_deprecated();
2175  Elem * s = const_cast<Elem *>(this->build_side_ptr(i, proxy).release());
2176  return std::unique_ptr<Elem>(s);
2177 }
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true)=0
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ build_side_ptr() [1/2]

virtual std::unique_ptr<Elem> libMesh::Tri6::build_side_ptr ( const unsigned int  i,
bool  proxy 
)
overridevirtual
Returns
An element coincident with side i wrapped in a smart pointer.

The element returned is full-ordered, in contrast to the side method. For example, calling build_side_ptr(0) on a 20-noded hex will build a 8-noded quadrilateral coincident with face 0 and pass back the pointer. A std::unique_ptr<Elem> is returned to prevent a memory leak. This way the user need not remember to delete the object.

The second argument, which is true by default, specifies that a "proxy" element (of type Side) will be returned. This type of value is useful because it does not allocate additional memory, and is usually sufficient for FE calculation purposes. If you really need a full-ordered, non-proxy side object, call this function with proxy=false.

The const version of this function is non-virtual; it simply calls the virtual non-const version and const_casts the return type.

Implements libMesh::Elem.

◆ build_side_ptr() [2/2]

std::unique_ptr< const Elem > libMesh::Elem::build_side_ptr ( const unsigned int  i,
bool  proxy = true 
) const
inherited

Definition at line 2157 of file elem.h.

References libMesh::Elem::build_side_ptr().

2158 {
2159  // Call the non-const version of this function, return the result as
2160  // a std::unique_ptr<const Elem>.
2161  Elem * me = const_cast<Elem *>(this);
2162  const Elem * s = const_cast<const Elem *>(me->build_side_ptr(i, proxy).release());
2163  return std::unique_ptr<const Elem>(s);
2164 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ centroid()

virtual Point libMesh::Elem::centroid ( ) const
virtualinherited
Returns
The centroid of the element. The centroid is computed as the average of all the element vertices.

This method is virtual since some derived elements might want to use shortcuts to compute their centroid.

Referenced by A0::interior_assembly(), A1::interior_assembly(), and OutputAssembly::interior_assembly().

◆ child()

Elem * libMesh::Elem::child ( const unsigned int  i) const
inherited
Returns
A non-constant pointer to the $ i^{th} $ child for this element.
Deprecated:
Use the more accurately-named and const correct child_ptr() function instead.

Definition at line 2504 of file elem.h.

References libMesh::Elem::child_ptr().

2505 {
2506  // Support the deprecated interface by calling the new,
2507  // const-correct interface and casting the result to an Elem *.
2508  libmesh_deprecated();
2509  return const_cast<Elem *>(this->child_ptr(i));
2510 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:2484

◆ child_neighbor() [1/2]

Elem * libMesh::Elem::child_neighbor ( Elem elem)
inherited
Returns
If elem is a neighbor of a child of this element, a pointer to that child, otherwise nullptr.

Definition at line 2061 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

2062 {
2063  for (auto n : elem->neighbor_ptr_range())
2064  if (n && n->parent() == this)
2065  return n;
2066 
2067  return nullptr;
2068 }

◆ child_neighbor() [2/2]

const Elem * libMesh::Elem::child_neighbor ( const Elem elem) const
inherited
Returns
If elem is a neighbor of a child of this element, a pointer to that child, otherwise nullptr.

Definition at line 2073 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

2074 {
2075  for (auto n : elem->neighbor_ptr_range())
2076  if (n && n->parent() == this)
2077  return n;
2078 
2079  return nullptr;
2080 }

◆ child_ptr() [1/2]

const Elem * libMesh::Elem::child_ptr ( unsigned int  i) const
inherited
Returns
A constant pointer to the $ i^{th} $ child for this element. Do not call if this element has no children, i.e. is active.

Definition at line 2484 of file elem.h.

References libMesh::Elem::_children.

Referenced by libMesh::Elem::child(), libMesh::Parallel::sync_element_data_by_parent_id(), and libMesh::Elem::which_child_am_i().

2485 {
2486  libmesh_assert(_children);
2487  libmesh_assert(_children[i]);
2488 
2489  return _children[i];
2490 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ child_ptr() [2/2]

Elem * libMesh::Elem::child_ptr ( unsigned int  i)
inherited
Returns
A non-constant pointer to the $ i^{th} $ child for this element. Do not call if this element has no children, i.e. is active.

Definition at line 2493 of file elem.h.

References libMesh::Elem::_children.

2494 {
2495  libmesh_assert(_children);
2496  libmesh_assert(_children[i]);
2497 
2498  return _children[i];
2499 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ child_ref_range() [1/2]

SimpleRange< Elem::ChildRefIter > libMesh::Elem::child_ref_range ( )
inherited

Returns a range with all children of a parent element, usable in range-based for loops.

The exact type of the return value here may be subject to change in future libMesh releases, but the iterators will always dereference to produce a reference to a child element.

Definition at line 1735 of file elem.h.

References libMesh::Elem::_children, and libMesh::Elem::n_children().

Referenced by libMesh::OldSolutionBase< Output, point_output >::check_old_context(), libMesh::Elem::has_ancestor_children(), libMesh::Elem::max_descendant_p_level(), and libMesh::Elem::set_p_level().

1736 {
1737  libmesh_assert(_children);
1738  return {_children, _children + this->n_children()};
1739 }
virtual unsigned int n_children() const =0
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ child_ref_range() [2/2]

SimpleRange< Elem::ConstChildRefIter > libMesh::Elem::child_ref_range ( ) const
inherited

Definition at line 1743 of file elem.h.

References libMesh::Elem::_children, and libMesh::Elem::n_children().

1744 {
1745  libmesh_assert(_children);
1746  return {_children, _children + this->n_children()};
1747 }
virtual unsigned int n_children() const =0
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ clear_dofs()

void libMesh::DofObject::clear_dofs ( )
inherited

Clear the DofMap data structures and return to a pristine state.

Definition at line 621 of file dof_object.h.

References libMesh::DofObject::_idx_buf, and libMesh::DofObject::n_systems().

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

622 {
623  // vector swap trick to force deallocation
624  index_buffer_t().swap(_idx_buf);
625 
626  libmesh_assert_equal_to (this->n_systems(), 0);
627  libmesh_assert (_idx_buf.empty());
628 }
unsigned int n_systems() const
Definition: dof_object.h:749
std::vector< index_t > index_buffer_t
Definition: dof_object.h:507
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ clear_old_dof_object()

void libMesh::DofObject::clear_old_dof_object ( )
inherited

Sets the old_dof_object to nullptr.

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

◆ close_to_point()

virtual bool libMesh::Elem::close_to_point ( const Point p,
Real  tol 
) const
virtualinherited
Returns
true if this element is "close" to the point p, where "close" is determined by the tolerance tol.

◆ coarsen()

void libMesh::Elem::coarsen ( )
inherited

Coarsen the element.

This function is non-virtual since it is the same for all element types.

◆ compute_key() [1/4]

dof_id_type libMesh::Elem::compute_key ( dof_id_type  n0)
staticprotectedinherited
Returns
A hash key computed from a single node id.

Definition at line 2660 of file elem.h.

Referenced by libMesh::Edge::key().

2661 {
2662  return n0;
2663 }

◆ compute_key() [2/4]

dof_id_type libMesh::Elem::compute_key ( dof_id_type  n0,
dof_id_type  n1 
)
staticprotectedinherited
Returns
A hash key computed from two node ids.

Definition at line 2668 of file elem.h.

References libMesh::Utility::hashword2(), and swap().

2670 {
2671  // Order the two so that n0 < n1
2672  if (n0 > n1) std::swap (n0, n1);
2673 
2674  return Utility::hashword2(n0, n1);
2675 }
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
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.
Definition: hashword.h:210

◆ compute_key() [3/4]

dof_id_type libMesh::Elem::compute_key ( dof_id_type  n0,
dof_id_type  n1,
dof_id_type  n2 
)
staticprotectedinherited
Returns
A hash key computed from three node ids.

Definition at line 2680 of file elem.h.

References libMesh::Utility::hashword(), and swap().

2683 {
2684  // Order the numbers such that n0 < n1 < n2.
2685  // We'll do it in 3 steps like this:
2686  //
2687  // n0 n1 n2
2688  // min(n0,n1) max(n0,n1) n2
2689  // min(n0,n1) min(n2,max(n0,n1) max(n2,max(n0,n1)
2690  // |\ /| |
2691  // | \ / | |
2692  // | / | |
2693  // | / \| |
2694  // gb min= min max gb max
2695 
2696  // Step 1
2697  if (n0 > n1) std::swap (n0, n1);
2698 
2699  // Step 2
2700  if (n1 > n2) std::swap (n1, n2);
2701 
2702  // Step 3
2703  if (n0 > n1) std::swap (n0, n1);
2704 
2705  libmesh_assert ((n0 < n1) && (n1 < n2));
2706 
2707  dof_id_type array[3] = {n0, n1, n2};
2708  return Utility::hashword(array, 3);
2709 }
uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval=0)
The hashword function takes an array of uint32_t&#39;s of length &#39;length&#39; and computes a single key from ...
Definition: hashword.h:153
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
uint8_t dof_id_type
Definition: id_types.h:64

◆ compute_key() [4/4]

dof_id_type libMesh::Elem::compute_key ( dof_id_type  n0,
dof_id_type  n1,
dof_id_type  n2,
dof_id_type  n3 
)
staticprotectedinherited
Returns
A hash key computed from four node ids.

Definition at line 2714 of file elem.h.

References libMesh::Utility::hashword(), and swap().

2718 {
2719  // Sort first
2720  // Step 1
2721  if (n0 > n1) std::swap (n0, n1);
2722 
2723  // Step 2
2724  if (n2 > n3) std::swap (n2, n3);
2725 
2726  // Step 3
2727  if (n0 > n2) std::swap (n0, n2);
2728 
2729  // Step 4
2730  if (n1 > n3) std::swap (n1, n3);
2731 
2732  // Finally sort step 5
2733  if (n1 > n2) std::swap (n1, n2);
2734 
2735  libmesh_assert ((n0 < n1) && (n1 < n2) && (n2 < n3));
2736 
2737  dof_id_type array[4] = {n0, n1, n2, n3};
2738  return Utility::hashword(array, 4);
2739 }
uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval=0)
The hashword function takes an array of uint32_t&#39;s of length &#39;length&#39; and computes a single key from ...
Definition: hashword.h:153
void swap(Iterator &lhs, Iterator &rhs)
swap, used to implement op=
uint8_t dof_id_type
Definition: id_types.h:64

◆ connectivity()

virtual void libMesh::Tri6::connectivity ( const unsigned int  sc,
const IOPackage  iop,
std::vector< dof_id_type > &  conn 
) const
overridevirtual
Returns
The connectivity for this element in a specific format, which is specified by the IOPackage tag.

Implements libMesh::Elem.

◆ contains_edge_of()

bool libMesh::Elem::contains_edge_of ( const Elem e) const
inherited
Returns
true if an edge of e is contained in this element. (Internally, this is done by checking whether at least two vertices of e are contained in this element).

◆ contains_point()

virtual bool libMesh::Elem::contains_point ( const Point p,
Real  tol = TOLERANCE 
) const
virtualinherited
Returns
true if the point p is contained in this element, false otherwise.

For linear elements, performs an initial tight bounding box check (as an optimization step) and (if that passes) then uses the user-defined tolerance "tol" in a call to inverse_map() to actually test if the point is in the element. For quadratic elements, the bounding box optimization is skipped, and only the inverse_map() steps are performed.

Note
This routine should not be used to determine if a point is merely "nearby" an element to within some tolerance. For that, use Elem::close_to_point() instead.

Reimplemented in libMesh::Tet4, libMesh::InfHex, libMesh::Tri3, libMesh::InfPrism, and libMesh::InfQuad4.

Referenced by FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

◆ contains_vertex_of()

bool libMesh::Elem::contains_vertex_of ( const Elem e) const
inherited
Returns
true if a vertex of e is contained in this element.

◆ contract()

void libMesh::Elem::contract ( )
inherited

Contract an active element, i.e.

remove pointers to any subactive children. This should only be called via MeshRefinement::contract, which will also remove subactive children from the mesh.

◆ debug_buffer()

void libMesh::DofObject::debug_buffer ( ) const
inherited

Print our buffer for debugging.

◆ default_order()

virtual Order libMesh::Tri6::default_order ( ) const
overridevirtual
Returns
SECOND.

Implements libMesh::Elem.

◆ dim()

virtual unsigned short libMesh::Face::dim ( ) const
overridevirtualinherited
Returns
2, the dimensionality of the object.

Implements libMesh::Elem.

Definition at line 61 of file face.h.

61 { return 2; }

◆ disable_print_counter_info() [1/2]

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ disable_print_counter_info() [2/2]

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ dof_number() [1/2]

dof_id_type libMesh::DofObject::dof_number ( const unsigned int  s,
const unsigned int  var,
const unsigned int  comp 
) const
inherited
Returns
The global degree of freedom number for variable var, component comp for system s associated with this DofObject

When partitioning and DoF numbering have been performed by libMesh, every current DoF on this DofObject will belong to its processor.

Definition at line 833 of file dof_object.h.

References libMesh::DofObject::n_comp(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::DofObject::var_to_vg_and_offset().

Referenced by libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), DofObjectTest< DerivedClass >::testJensEftangBug(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

836 {
837  libmesh_assert_less (s, this->n_systems());
838  libmesh_assert_less (var, this->n_vars(s));
839  libmesh_assert_less (comp, this->n_comp(s,var));
840 
841  const std::pair<unsigned int, unsigned int>
842  vg_vig = this->var_to_vg_and_offset(s,var);
843 
844  const unsigned int
845  n_comp = this->n_comp_group(s,vg_vig.first);
846 
847  return this->dof_number(s, vg_vig.first, vg_vig.second,
848  comp, n_comp);
849 }
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
Definition: dof_object.h:833
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
std::pair< unsigned int, unsigned int > var_to_vg_and_offset(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:887
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ dof_number() [2/2]

dof_id_type libMesh::DofObject::dof_number ( const unsigned int  s,
const unsigned int  vg,
const unsigned int  vig,
const unsigned int  comp,
const unsigned int  n_comp 
) const
inherited
Returns
The global degree of freedom number for variable group vg, variable index vig within the group, component comp out of n_comp, for system s on this DofObject

Even users who need to call dof_number from user code probably don't want to call this overload.

Definition at line 854 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::n_vars(), and libMesh::DofObject::start_idx().

859 {
860  libmesh_assert_less (s, this->n_systems());
861  libmesh_assert_less (vg, this->n_var_groups(s));
862  libmesh_assert_less (vig, this->n_vars(s,vg));
863 
864  const unsigned int
865  start_idx_sys = this->start_idx(s);
866 
867  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
868 
869  const dof_id_type
870  base_idx = _idx_buf[start_idx_sys + 2*vg + 1];
871 
872  // if the first component is invalid, they
873  // are all invalid
874  if (base_idx == invalid_id)
875  return invalid_id;
876 
877  // otherwise the index is the first component
878  // index augmented by the component number
879  else
880  return cast_int<dof_id_type>(base_idx + vig*n_comp + comp);
881 }
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
uint8_t dof_id_type
Definition: id_types.h:64

◆ edge_index_range()

IntRange< unsigned short > libMesh::Elem::edge_index_range ( ) const
inherited
Returns
An integer range from 0 up to (but not including) the number of edges this element has.

Definition at line 2113 of file elem.h.

References libMesh::Elem::n_edges().

2114 {
2115  return {0, cast_int<unsigned short>(this->n_edges())};
2116 }
virtual unsigned int n_edges() const =0

◆ embedding_matrix()

virtual float libMesh::Tri6::embedding_matrix ( const unsigned int  i,
const unsigned int  j,
const unsigned int  k 
) const
overrideprotectedvirtual

Matrix used to create the elements children.

Implements libMesh::Elem.

Definition at line 223 of file face_tri6.h.

References _embedding_matrix.

226  { return _embedding_matrix[i][j][k]; }
static const float _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition: face_tri6.h:232

◆ embedding_matrix_version()

virtual unsigned int libMesh::Elem::embedding_matrix_version ( ) const
virtualinherited
Returns
A "version number" that identifies which embedding matrix is in use.

Some element types may use a different embedding matrix depending on their geometric characteristics.

Reimplemented in libMesh::Tet.

Definition at line 1572 of file elem.h.

1572 { return 0; }

◆ enable_print_counter_info() [1/2]

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

◆ enable_print_counter_info() [2/2]

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

◆ family_tree()

void libMesh::Elem::family_tree ( std::vector< const Elem *> &  family,
const bool  reset = true 
) const
inherited

Fills the vector family with the children of this element, recursively.

Calling this method on a twice-refined element will give you the element itself, its direct children, and their children, etc... When the optional parameter reset is true, the vector will be cleared before the element and its descendants are added.

The family tree only includes ancestor and active elements. To include subactive elements as well, use total_family_tree().

◆ family_tree_by_neighbor()

void libMesh::Elem::family_tree_by_neighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const bool  reset = true 
) const
inherited

Same as the family_tree() member, but only adds elements which are next to neighbor.

◆ family_tree_by_side()

void libMesh::Elem::family_tree_by_side ( std::vector< const Elem *> &  family,
const unsigned int  side,
const bool  reset = true 
) const
inherited

Same as the family_tree() member, but only adds elements which are next to side.

◆ family_tree_by_subneighbor()

void libMesh::Elem::family_tree_by_subneighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const Elem subneighbor,
const bool  reset = true 
) const
inherited

Same as the family_tree() member, but only adds elements which are next to subneighbor.

Only applicable when this->has_neighbor(neighbor) and neighbor->is_ancestor(subneighbor)

◆ find_edge_neighbors() [1/2]

void libMesh::Elem::find_edge_neighbors ( const Point p1,
const Point p2,
std::set< const Elem *> &  neighbor_set 
) const
inherited

This function finds all active elements in the same manifold as this element which touch the current active element along the whole edge defined by the two points p1 and p2.

◆ find_edge_neighbors() [2/2]

void libMesh::Elem::find_edge_neighbors ( std::set< const Elem *> &  neighbor_set) const
inherited

This function finds all active elements in the same manifold as this element which touch the current active element along any edge (more precisely, at at least two points).

In this case, elements are included even if they do not touch a whole edge of this element.

◆ find_interior_neighbors()

void libMesh::Elem::find_interior_neighbors ( std::set< const Elem *> &  neighbor_set) const
inherited

This function finds all active elements (not including this one) in the parent manifold of this element whose intersection with this element has non-zero measure.

◆ find_point_neighbors() [1/3]

void libMesh::Elem::find_point_neighbors ( const Point p,
std::set< const Elem *> &  neighbor_set 
) const
inherited

This function finds all active elements (including this one) which are in the same manifold as this element and which touch the current active element at the specified point, which should be a point in the current element.

Elements which are not "in the same manifold" (e.g. the interior_parent of a boundary element) will not be found with this method.

Elements which overlap the specified point but which are only connected to the current element via elements which do not overlap that point (e.g. in a folded or tangled mesh) are not considered to "touch" the current element and will not be found with this method.

◆ find_point_neighbors() [2/3]

void libMesh::Elem::find_point_neighbors ( std::set< const Elem *> &  neighbor_set) const
inherited

This function finds all active elements (including this one) in the same manifold as this element which touch this active element at any point.

◆ find_point_neighbors() [3/3]

void libMesh::Elem::find_point_neighbors ( std::set< const Elem *> &  neighbor_set,
const Elem start_elem 
) const
inherited

This function finds all active elements (including this one) in the same manifold as start_elem (which must be active and must touch this element) which touch this element at any point.

◆ first_order_equivalent_type()

static ElemType libMesh::Elem::first_order_equivalent_type ( const ElemType  et)
staticinherited
Returns
The element type of the associated first-order element, or INVALID_ELEM for first-order or other elements that cannot be converted into lower order equivalents.

For example, when this is a TET10, then TET4 is returned.

◆ get_info() [1/3]

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

Gets a string containing the reference information.

◆ get_info() [2/3]

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

Gets a string containing the reference information.

◆ get_info() [3/3]

std::string libMesh::Elem::get_info ( ) const
inherited

Prints relevant information about the element to a string.

◆ get_node()

Node * libMesh::Elem::get_node ( const unsigned int  i) const
inherited
Returns
The pointer to local Node i.
Deprecated:
Use the less ambiguously named node_ptr() instead.

Definition at line 1952 of file elem.h.

References libMesh::Elem::node_ptr().

1953 {
1954  // This const function has incorrectly returned a non-const pointer
1955  // for years. Now that it is reimplemented in terms of the new
1956  // interface which does return a const pointer, we need to use a
1957  // const_cast to mimic the old (incorrect) behavior. This function
1958  // is now deprecated and eventually will be removed entirely,
1959  // obviating the need for this ugly cast.
1960  libmesh_deprecated();
1961  return const_cast<Node *>(this->node_ptr(i));
1962 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:1913

◆ get_node_index()

unsigned int libMesh::Elem::get_node_index ( const Node node_ptr) const
inherited
Returns
The local index for the Node pointer node_ptr, or invalid_id if node_ptr is not a local node.

Definition at line 1968 of file elem.h.

References libMesh::Elem::_nodes, libMesh::invalid_uint, libMesh::Elem::n_nodes(), and libMesh::Elem::node_ptr().

1969 {
1970  for (unsigned int n=0; n != this->n_nodes(); ++n)
1971  if (this->_nodes[n] == node_ptr)
1972  return n;
1973 
1974  return libMesh::invalid_uint;
1975 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
virtual unsigned int n_nodes() const =0
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:1913

◆ get_nodes()

const Node *const * libMesh::Elem::get_nodes ( ) const
inherited
Returns
A pointer to an array of local node pointers.

Definition at line 1905 of file elem.h.

References libMesh::Elem::_nodes.

1906 {
1907  return _nodes;
1908 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651

◆ hack_p_level()

void libMesh::Elem::hack_p_level ( const unsigned int  p)
inherited

Sets the value of the p-refinement level for the element without altering the p-level of its ancestors.

Definition at line 2645 of file elem.h.

References libMesh::Elem::_p_level, libMesh::Elem::JUST_REFINED, and libMesh::Elem::p_refinement_flag().

2646 {
2647  if (p == 0)
2648  libmesh_assert_not_equal_to
2650 
2651  _p_level = cast_int<unsigned char>(p);
2652 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1692
RefinementState p_refinement_flag() const
Definition: elem.h:2560

◆ has_affine_map()

virtual bool libMesh::Tri6::has_affine_map ( ) const
overridevirtual
Returns
true if the element map is definitely affine within numerical tolerances.

Reimplemented from libMesh::Elem.

◆ has_ancestor_children()

bool libMesh::Elem::has_ancestor_children ( ) const
inherited
Returns
true if the element has any descendants other than its immediate children, false otherwise, or if AMR is disabled.

Definition at line 2348 of file elem.h.

References libMesh::Elem::_children, and libMesh::Elem::child_ref_range().

2349 {
2350 #ifdef LIBMESH_ENABLE_AMR
2351  if (_children == nullptr)
2352  return false;
2353  else
2354  for (auto & c : child_ref_range())
2355  if (c.has_children())
2356  return true;
2357 #endif
2358  return false;
2359 }
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
Definition: elem.h:1735
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ has_children()

bool libMesh::Elem::has_children ( ) const
inherited
Returns
true if the element has any children (active or not), false otherwise, or if AMR is disabled.

Definition at line 2334 of file elem.h.

References libMesh::Elem::_children.

Referenced by libMesh::Elem::set_child(), libMesh::Elem::subactive(), libMesh::Parallel::sync_element_data_by_parent_id(), and libMesh::Elem::which_child_am_i().

2335 {
2336 #ifdef LIBMESH_ENABLE_AMR
2337  if (_children == nullptr)
2338  return false;
2339  else
2340  return true;
2341 #else
2342  return false;
2343 #endif
2344 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ has_dofs()

bool libMesh::DofObject::has_dofs ( const unsigned int  s = libMesh::invalid_uint) const
inherited
Returns
true if any system has variables which have been assigned, false otherwise.

Definition at line 913 of file dof_object.h.

References libMesh::invalid_uint, libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().

914 {
915  if (sys == libMesh::invalid_uint)
916  {
917  for (unsigned int s=0; s<this->n_systems(); s++)
918  if (this->n_vars(s))
919  return true;
920  }
921 
922  else
923  {
924  libmesh_assert_less (sys, this->n_systems());
925 
926  if (this->n_vars(sys))
927  return true;
928  }
929 
930  return false;
931 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ has_neighbor()

bool libMesh::Elem::has_neighbor ( const Elem elem) const
inherited
Returns
true if the element elem in question is a neighbor of this element, false otherwise.

Definition at line 2049 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

Referenced by libMesh::Elem::on_boundary().

2050 {
2051  for (auto n : this->neighbor_ptr_range())
2052  if (n == elem)
2053  return true;
2054 
2055  return false;
2056 }
SimpleRange< NeighborPtrIter > neighbor_ptr_range()
Returns a range with all neighbors of an element, usable in range-based for loops.
Definition: elem.h:2894

◆ has_topological_neighbor()

bool libMesh::Elem::has_topological_neighbor ( const Elem elem,
const MeshBase mesh,
const PointLocatorBase point_locator,
const PeriodicBoundaries pb 
) const
inherited
Returns
true if the element elem in question is a neighbor or topological neighbor of this element, false otherwise.

◆ hmax()

virtual Real libMesh::Elem::hmax ( ) const
virtualinherited
Returns
The maximum vertex separation for the element.

Referenced by libMesh::OldSolutionBase< Output, point_output >::check_old_context().

◆ hmin()

virtual Real libMesh::Elem::hmin ( ) const
virtualinherited
Returns
The minimum vertex separation for the element.

◆ id()

dof_id_type libMesh::DofObject::id ( ) const
inherited

◆ increment_constructor_count() [1/2]

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

Increments the construction counter.

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

Definition at line 181 of file reference_counter.h.

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

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

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_constructor_count() [2/2]

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

Increments the construction counter.

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

Definition at line 181 of file reference_counter.h.

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

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

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count() [1/2]

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

Increments the destruction counter.

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

Definition at line 194 of file reference_counter.h.

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

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

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count() [2/2]

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

Increments the destruction counter.

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

Definition at line 194 of file reference_counter.h.

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

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

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ infinite()

virtual bool libMesh::Face::infinite ( ) const
overridevirtualinherited
Returns
false. All classes derived from Face are finite elements.

Implements libMesh::Elem.

Definition at line 88 of file face.h.

88 { return false; }

◆ interior_parent() [1/2]

const Elem* libMesh::Elem::interior_parent ( ) const
inherited
Returns
The higher-dimensional Elem for which this Elem is a face.

In some cases it is desirable to extract the boundary (or a subset thereof) of a D-dimensional mesh as a (D-1)-dimensional manifold. In this case we may want to know the 'parent' element from which the manifold elements were extracted. We can easily do that for the level-0 manifold elements by storing the D-dimensional parent. This method provides access to that element.

This method is not safe to call if this->dim() == LIBMESH_DIM; in such cases no data storage for an interior parent pointer has been allocated.

◆ interior_parent() [2/2]

Elem* libMesh::Elem::interior_parent ( )
inherited

◆ invalidate()

void libMesh::DofObject::invalidate ( )
inherited

Invalidates all the indices for this DofObject.

Definition at line 611 of file dof_object.h.

References libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::invalidate_id(), and libMesh::DofObject::invalidate_processor_id().

Referenced by libMesh::DofObject::DofObject().

612 {
613  this->invalidate_dofs ();
614  this->invalidate_id ();
615  this->invalidate_processor_id ();
616 }
void invalidate_id()
Sets the id to invalid_id.
Definition: dof_object.h:595
void invalidate_processor_id()
Sets the processor id to invalid_processor_id.
Definition: dof_object.h:603
void invalidate_dofs(const unsigned int sys_num=libMesh::invalid_uint)
Sets all degree of freedom numbers to invalid_id.
Definition: dof_object.h:575

◆ invalidate_dofs()

void libMesh::DofObject::invalidate_dofs ( const unsigned int  sys_num = libMesh::invalid_uint)
inherited

Sets all degree of freedom numbers to invalid_id.

Definition at line 575 of file dof_object.h.

References libMesh::DofObject::invalid_id, libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::set_vg_dof_base().

Referenced by libMesh::DofObject::invalidate().

576 {
577  // If the user does not specify the system number...
578  if (sys_num >= this->n_systems())
579  {
580  for (unsigned int s=0; s<this->n_systems(); s++)
581  for (unsigned int vg=0; vg<this->n_var_groups(s); vg++)
582  if (this->n_comp_group(s,vg))
583  this->set_vg_dof_base(s,vg,invalid_id);
584  }
585  // ...otherwise invalidate the dofs for all systems
586  else
587  for (unsigned int vg=0; vg<this->n_var_groups(sys_num); vg++)
588  if (this->n_comp_group(sys_num,vg))
589  this->set_vg_dof_base(sys_num,vg,invalid_id);
590 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
void set_vg_dof_base(const unsigned int s, const unsigned int vg, const dof_id_type db)
VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for di...
Definition: dof_object.h:960
unsigned int n_systems() const
Definition: dof_object.h:749
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ invalidate_id()

void libMesh::DofObject::invalidate_id ( )
inherited

Sets the id to invalid_id.

Definition at line 595 of file dof_object.h.

References libMesh::DofObject::invalid_id, and libMesh::DofObject::set_id().

Referenced by libMesh::DofObject::invalidate(), and DofObjectTest< DerivedClass >::testInvalidateId().

596 {
597  this->set_id (invalid_id);
598 }
dof_id_type & set_id()
Definition: dof_object.h:664
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ invalidate_processor_id()

void libMesh::DofObject::invalidate_processor_id ( )
inherited

Sets the processor id to invalid_processor_id.

Definition at line 603 of file dof_object.h.

References libMesh::DofObject::invalid_processor_id, and libMesh::DofObject::processor_id().

Referenced by libMesh::DofObject::invalidate(), and DofObjectTest< DerivedClass >::testInvalidateProcId().

604 {
606 }
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:358
processor_id_type processor_id() const
Definition: dof_object.h:717

◆ is_ancestor_of()

bool libMesh::Elem::is_ancestor_of ( const Elem descendant) const
inherited
Returns
true if descendant is a child of this, or a child of a child of this, etc., false otherwise or if AMR is disabled.

Definition at line 2364 of file elem.h.

References libMesh::Elem::parent().

2369 {
2370 #ifdef LIBMESH_ENABLE_AMR
2371  const Elem * e = descendant;
2372  while (e)
2373  {
2374  if (this == e)
2375  return true;
2376  e = e->parent();
2377  }
2378 #endif
2379  return false;
2380 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ is_child_on_edge()

virtual bool libMesh::Elem::is_child_on_edge ( const unsigned int  c,
const unsigned int  e 
) const
virtualinherited
Returns
true if the specified child is on the specified edge.

◆ is_child_on_side()

virtual bool libMesh::Tri::is_child_on_side ( const unsigned int  c,
const unsigned int  s 
) const
overridevirtualinherited
Returns
true if the specified child is on the specified side.

Implements libMesh::Elem.

◆ is_edge()

virtual bool libMesh::Tri6::is_edge ( const unsigned int  i) const
overridevirtual
Returns
true if the specified (local) node number is an edge.

Implements libMesh::Elem.

◆ is_edge_on_side()

virtual bool libMesh::Face::is_edge_on_side ( const unsigned int  e,
const unsigned int  s 
) const
overridevirtualinherited

is_edge_on_side is trivial in 2D.

Implements libMesh::Elem.

Definition at line 78 of file face.h.

80  { return (e == s); }

◆ is_face()

virtual bool libMesh::Tri6::is_face ( const unsigned int  i) const
overridevirtual
Returns
true if the specified (local) node number is a face.

Implements libMesh::Elem.

◆ is_linear()

virtual bool libMesh::Elem::is_linear ( ) const
virtualinherited
Returns
true if the Lagrange shape functions on this element are linear.

Reimplemented in libMesh::NodeElem, libMesh::Tet4, libMesh::Tri3, libMesh::Edge2, and libMesh::Tri3Subdivision.

Definition at line 957 of file elem.h.

957 { return false; }

◆ is_mid_infinite_edge_node()

virtual bool libMesh::Elem::is_mid_infinite_edge_node ( const unsigned int  ) const
virtualinherited
Returns
true if the specified (local) node number is a "mid-edge" node on an infinite element edge.

This is false for all nodes on non-infinite elements, so we won't make it pure virtual, to simplify their code.

Reimplemented in libMesh::InfEdge2, libMesh::InfQuad, libMesh::InfPrism, and libMesh::InfHex.

Definition at line 1507 of file elem.h.

References libMesh::Elem::infinite().

1508  { libmesh_assert (!this->infinite()); return false; }
virtual bool infinite() const =0

◆ is_node_on_edge()

virtual bool libMesh::Tri6::is_node_on_edge ( const unsigned int  n,
const unsigned int  e 
) const
overridevirtual
Returns
true if the specified (local) node number is on the specified edge (== is_node_on_side in 2D).

Implements libMesh::Elem.

Definition at line 116 of file face_tri6.h.

References is_node_on_side().

118  { return this->is_node_on_side(n,e); }
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override

◆ is_node_on_side()

virtual bool libMesh::Tri6::is_node_on_side ( const unsigned int  n,
const unsigned int  s 
) const
overridevirtual
Returns
true if the specified (local) node number is on the specified side.

Implements libMesh::Elem.

Referenced by is_node_on_edge().

◆ is_remote()

virtual bool libMesh::Elem::is_remote ( ) const
virtualinherited
Returns
true if this element is remote, false otherwise.

A remote element (see RemoteElem) is a syntactic convenience – it is a placeholder for an element which exists on some other processor. Local elements are required to have valid neighbors, and these ghost elements may have remote neighbors for data structure consistency. The use of remote elements helps ensure that any element we may access has a nullptr neighbor only if it lies on the physical boundary of the domain.

Reimplemented in libMesh::RemoteElem.

Definition at line 555 of file elem.h.

556  { return false; }

◆ is_semilocal()

bool libMesh::Elem::is_semilocal ( const processor_id_type  my_pid) const
inherited
Returns
true if this element is semilocal to the calling processor, which must specify its rank.

◆ is_vertex()

virtual bool libMesh::Tri6::is_vertex ( const unsigned int  i) const
overridevirtual
Returns
true if the specified (local) node number is a vertex.

Implements libMesh::Elem.

◆ is_vertex_on_child()

virtual unsigned int libMesh::Elem::is_vertex_on_child ( unsigned  int,
unsigned int  n 
) const
virtualinherited
Returns
true if the specified child has a vertex at the specified (child-local) node number. Except in odd cases like pyramid refinement the child will have the same local structure as the parent element.

Definition at line 694 of file elem.h.

References libMesh::Elem::is_vertex().

696  { return this->is_vertex(n); }
virtual bool is_vertex(const unsigned int i) const =0

◆ is_vertex_on_parent()

virtual bool libMesh::Elem::is_vertex_on_parent ( unsigned int  c,
unsigned int  n 
) const
virtualinherited
Returns
true if this element has a vertex at the specified (child-local) node number n of the specified child c.

◆ key() [1/4]

virtual dof_id_type libMesh::Tri::key ( ) const
overridevirtualinherited
Returns
An id associated with the global node ids of this element. The id is not necessarily unique, but should be close.

Reimplemented from libMesh::Elem.

◆ key() [2/4]

virtual dof_id_type libMesh::Elem::key

Don't hide Elem::key() defined in the base class.

◆ key() [3/4]

virtual dof_id_type libMesh::Elem::key

Don't hide Elem::key() defined in the base class.

◆ key() [4/4]

virtual dof_id_type libMesh::Tri6::key ( const unsigned int  s) const
overridevirtual
Returns
An id associated with the s side of this element. The id is not necessarily unique, but should be close. This is particularly useful in the MeshBase::find_neighbors() routine.

We reimplement this method here for the Quad8 since we can use the center node of each edge to provide a perfect (unique) key.

Reimplemented from libMesh::Tri.

◆ length()

Real libMesh::Elem::length ( const unsigned int  n1,
const unsigned int  n2 
) const
inherited
Returns
The distance between nodes n1 and n2.

Useful for computing the lengths of the sides of elements.

◆ level()

unsigned int libMesh::Elem::level ( ) const
inherited
Returns
The refinement level of the current element.

If the element's parent is nullptr then by convention it is at level 0, otherwise it is simply at one level greater than its parent.

Definition at line 2427 of file elem.h.

References libMesh::Elem::dim(), libMesh::Elem::level(), and libMesh::Elem::parent().

Referenced by libMesh::Elem::level(), libMesh::CompareElemIdsByLevel::operator()(), libMesh::Elem::top_parent(), and libMesh::Elem::which_neighbor_am_i().

2428 {
2429 #ifdef LIBMESH_ENABLE_AMR
2430 
2431  // if I don't have a parent I was
2432  // created directly from file
2433  // or by the user, so I am a
2434  // level-0 element
2435  if (this->parent() == nullptr)
2436  return 0;
2437 
2438  // if the parent and this element are of different
2439  // dimensionality we are at the same level as
2440  // the parent (e.g. we are the 2D side of a
2441  // 3D element)
2442  if (this->dim() != this->parent()->dim())
2443  return this->parent()->level();
2444 
2445  // otherwise we are at a level one
2446  // higher than our parent
2447  return (this->parent()->level() + 1);
2448 
2449 #else
2450 
2451  // Without AMR all elements are
2452  // at level 0.
2453  return 0;
2454 
2455 #endif
2456 }
const Elem * parent() const
Definition: elem.h:2385
unsigned int level() const
Definition: elem.h:2427
virtual unsigned short dim() const =0

◆ libmesh_assert_valid_neighbors()

void libMesh::Elem::libmesh_assert_valid_neighbors ( ) const
inherited

Checks for consistent neighbor links on this element.

◆ libmesh_assert_valid_node_pointers()

void libMesh::Elem::libmesh_assert_valid_node_pointers ( ) const
inherited

Checks for a valid id and pointers to nodes with valid ids on this element.

◆ local_node()

unsigned int libMesh::Elem::local_node ( const dof_id_type  i) const
inherited
Returns
The local id number of global Node id i, or invalid_uint if Node id i is not local.

Definition at line 1893 of file elem.h.

References libMesh::invalid_uint, libMesh::Elem::n_nodes(), and libMesh::Elem::node_id().

1894 {
1895  for (unsigned int n=0; n != this->n_nodes(); ++n)
1896  if (this->node_id(n) == i)
1897  return n;
1898 
1899  return libMesh::invalid_uint;
1900 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
virtual unsigned int n_nodes() const =0
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:1870

◆ loose_bounding_box()

virtual BoundingBox libMesh::Tri6::loose_bounding_box ( ) const
overridevirtual
Returns
A bounding box (not necessarily the minimal bounding box) containing the geometric element.

Reimplemented from libMesh::Elem.

◆ make_links_to_me_local()

void libMesh::Elem::make_links_to_me_local ( unsigned int  n)
inherited

Resets the appropriate neighbor pointers of our nth neighbor (and its descendants, if appropriate) to point to this Elem instead of to the global remote_elem.

Used by the library when a formerly remote element is being added to the local processor.

◆ make_links_to_me_remote()

void libMesh::Elem::make_links_to_me_remote ( )
inherited

Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's appropriate pointers to point to the global remote_elem instead of this.

Used by the library before an element becomes remote on the local processor.

◆ master_point()

virtual Point libMesh::Tri::master_point ( const unsigned int  i) const
overridevirtualinherited
Returns
The Point associated with local Node i, in master element rather than physical coordinates.

Implements libMesh::Elem.

Definition at line 75 of file face_tri.h.

References libMesh::Tri::_master_points, and libMesh::Tri::n_nodes().

76  {
77  libmesh_assert_less(i, this->n_nodes());
78  return Point(_master_points[i][0],
79  _master_points[i][1],
80  _master_points[i][2]);
81  }
virtual unsigned int n_nodes() const override
Definition: face_tri.h:87
static const Real _master_points[6][3]
Master element node locations.
Definition: face_tri.h:170

◆ max_descendant_p_level()

unsigned int libMesh::Elem::max_descendant_p_level ( ) const
inherited
Returns
The maximum value of the p-refinement levels of an ancestor element's descendants.

Definition at line 2580 of file elem.h.

References libMesh::Elem::_p_level, libMesh::Elem::active(), libMesh::Elem::child_ref_range(), std::max(), libMesh::Elem::p_level(), and libMesh::Elem::subactive().

2581 {
2582  // This is undefined for subactive elements,
2583  // which have no active descendants
2584  libmesh_assert (!this->subactive());
2585  if (this->active())
2586  return this->p_level();
2587 
2588  unsigned int max_p_level = _p_level;
2589  for (auto & c : child_ref_range())
2590  max_p_level = std::max(max_p_level,
2591  c.max_descendant_p_level());
2592  return max_p_level;
2593 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1692
unsigned int p_level() const
Definition: elem.h:2461
long double max(long double a, double b)
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
Definition: elem.h:1735
bool subactive() const
Definition: elem.h:2314
bool active() const
Definition: elem.h:2296

◆ min_new_p_level_by_neighbor()

unsigned int libMesh::Elem::min_new_p_level_by_neighbor ( const Elem neighbor,
unsigned int  current_min 
) const
inherited
Returns
The minimum new p-refinement level (i.e. after refinement and coarsening is done) of elements which are descended from this element and which share a side with the active neighbor.

◆ min_p_level_by_neighbor()

unsigned int libMesh::Elem::min_p_level_by_neighbor ( const Elem neighbor,
unsigned int  current_min 
) const
inherited
Returns
The minimum p-refinement level of elements which are descended from this element, and which share a side with the active neighbor.

◆ n_children()

virtual unsigned int libMesh::Tri::n_children ( ) const
overridevirtualinherited
Returns
4.

Implements libMesh::Elem.

Definition at line 107 of file face_tri.h.

107 { return 4; }

◆ n_comp()

unsigned int libMesh::DofObject::n_comp ( const unsigned int  s,
const unsigned int  var 
) const
inherited
Returns
The number of components for variable var of system s associated with this DofObject. For example, the HIERARCHIC shape functions may have multiple DoFs associated with one node. Another example is the MONOMIALs, where only the elements hold the DoFs. For the different spatial directions, and orders, see FE.

Definition at line 803 of file dof_object.h.

References libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_systems(), libMesh::DofObject::n_vars(), and libMesh::DofObject::var_to_vg().

Referenced by libMesh::DofObject::dof_number(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), and libMesh::DofObject::n_dofs().

805 {
806  libmesh_assert_less (s, this->n_systems());
807  libmesh_assert_less (var, this->n_vars(s));
808 
809  return this->n_comp_group(s,this->var_to_vg(s,var));
810 }
unsigned int var_to_vg(const unsigned int s, const unsigned int var) const
Utility function - for variable var in system s, figure out what variable group it lives in...
Definition: dof_object.h:1004
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int n_comp_group(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:816

◆ n_comp_group()

unsigned int libMesh::DofObject::n_comp_group ( const unsigned int  s,
const unsigned int  vg 
) const
inherited
Returns
The number of components for VariableGroup vg of system s associated with this DofObject. For example, the HIERARCHIC shape functions may have multiple DoFs associated with one node. Another example is the MONOMIALs, where only the elements hold the DoFs. For the different spatial directions, and orders, see FE.

Definition at line 816 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic, and libMesh::DofObject::start_idx().

Referenced by libMesh::DofObject::dof_number(), libMesh::DofObject::invalidate_dofs(), and libMesh::DofObject::n_comp().

818 {
819  libmesh_assert_less (s, this->n_systems());
820  libmesh_assert_less (vg, this->n_var_groups(s));
821 
822  const unsigned int
823  start_idx_sys = this->start_idx(s);
824 
825  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
826 
827  return (_idx_buf[start_idx_sys + 2*vg] % ncv_magic);
828 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
static const index_t ncv_magic
Above we introduced the chimera ncv, which is a hybrid of the form ncv = ncv_magic*nv + nc where nv a...
Definition: dof_object.h:519

◆ n_dofs()

unsigned int libMesh::DofObject::n_dofs ( const unsigned int  s,
const unsigned int  var = libMesh::invalid_uint 
) const
inherited
Returns
The number of degrees of freedom associated with system s for this object. Optionally only counts degrees of freedom for variable number var

Definition at line 633 of file dof_object.h.

References libMesh::invalid_uint, libMesh::DofObject::n_comp(), libMesh::DofObject::n_systems(), and libMesh::DofObject::n_vars().

635 {
636  libmesh_assert_less (s, this->n_systems());
637 
638  unsigned int num = 0;
639 
640  // Count all variables
641  if (var == libMesh::invalid_uint)
642  for (unsigned int v=0; v<this->n_vars(s); v++)
643  num += this->n_comp(s,v);
644 
645  // Only count specified variable
646  else
647  num = this->n_comp(s,var);
648 
649  return num;
650 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
unsigned int n_comp(const unsigned int s, const unsigned int var) const
Definition: dof_object.h:803
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ n_edges()

virtual unsigned int libMesh::Tri::n_edges ( ) const
overridevirtualinherited
Returns
3. All triangles have 3 edges.

Implements libMesh::Elem.

Definition at line 102 of file face_tri.h.

102 { return 3; }

◆ n_faces()

virtual unsigned int libMesh::Face::n_faces ( ) const
overridevirtualinherited
Returns
0. All 2D elements have no faces, just edges.

Implements libMesh::Elem.

Definition at line 67 of file face.h.

67 { return 0; }

◆ n_neighbors()

unsigned int libMesh::Elem::n_neighbors ( ) const
inherited
Returns
The number of neighbors the element that has been derived from this class has.

Only face (or edge in 2D) neighbors are stored, so this method returns n_sides(). At one point we intended to allow derived classes to override this, but too much current libMesh code assumes n_neighbors==n_sides.

Definition at line 644 of file elem.h.

References libMesh::Elem::n_sides().

Referenced by libMesh::Elem::_last_side(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::neighbor_ptr_range(), and libMesh::Elem::set_neighbor().

645  { return this->n_sides(); }
virtual unsigned int n_sides() const =0

◆ n_nodes()

virtual unsigned int libMesh::Tri6::n_nodes ( ) const
overridevirtual
Returns
6.

Reimplemented from libMesh::Tri.

Definition at line 81 of file face_tri6.h.

References num_nodes.

81 { return num_nodes; }
static const int num_nodes
Geometric constants for Tri6.
Definition: face_tri6.h:186

◆ n_nodes_in_child()

virtual unsigned int libMesh::Elem::n_nodes_in_child ( unsigned  int) const
virtualinherited
Returns
The number of nodes the given child of this element contains. Except in odd cases like pyramid refinement this will be the same as the number of nodes in the parent element.

Definition at line 613 of file elem.h.

References libMesh::Elem::n_nodes().

614  { return this->n_nodes(); }
virtual unsigned int n_nodes() const =0

◆ n_objects() [1/2]

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

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

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

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

◆ n_objects() [2/2]

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

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

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

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

◆ n_second_order_adjacent_vertices()

virtual unsigned int libMesh::Tri6::n_second_order_adjacent_vertices ( const unsigned int  ) const
overridevirtual
Returns
2 for all n.

Reimplemented from libMesh::Elem.

Definition at line 163 of file face_tri6.h.

164  { return 2; }

◆ n_sides()

virtual unsigned int libMesh::Tri::n_sides ( ) const
overridevirtualinherited
Returns
3.

Implements libMesh::Elem.

Definition at line 92 of file face_tri.h.

92 { return 3; }

◆ n_sub_elem()

virtual unsigned int libMesh::Tri6::n_sub_elem ( ) const
overridevirtual
Returns
4.

Implements libMesh::Elem.

Definition at line 86 of file face_tri6.h.

86 { return 4; }

◆ n_systems()

unsigned int libMesh::DofObject::n_systems ( ) const
inherited

◆ n_var_groups()

unsigned int libMesh::DofObject::n_var_groups ( const unsigned int  s) const
inherited
Returns
The number of VariableGroup variable groups associated with system s for this DofObject

Definition at line 758 of file dof_object.h.

References libMesh::DofObject::end_idx(), libMesh::DofObject::n_systems(), and libMesh::DofObject::start_idx().

Referenced by libMesh::DofObject::dof_number(), libMesh::DofObject::invalidate_dofs(), libMesh::DofObject::n_comp_group(), libMesh::DofObject::n_vars(), libMesh::DofObject::set_vg_dof_base(), DofObjectTest< DerivedClass >::testSetNVariableGroups(), libMesh::DofObject::var_to_vg(), libMesh::DofObject::var_to_vg_and_offset(), and libMesh::DofObject::vg_dof_base().

759 {
760  libmesh_assert_less (s, this->n_systems());
761 
762  return (this->end_idx(s) - this->start_idx(s)) / 2;
763 }
unsigned int end_idx(const unsigned int s) const
The ending index for system s.
Definition: dof_object.h:947
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936

◆ n_vars() [1/2]

unsigned int libMesh::DofObject::n_vars ( const unsigned int  s,
const unsigned int  vg 
) const
inherited
Returns
The number of Variable variables associated with VariableGroup vg in system s for this DofObject

Definition at line 768 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::ncv_magic_exp, and libMesh::DofObject::start_idx().

Referenced by libMesh::DofObject::dof_number(), libMesh::OldSolutionValue< Output, point_output >::eval_at_node(), libMesh::DofObject::has_dofs(), libMesh::DofObject::n_comp(), libMesh::DofObject::n_dofs(), libMesh::DofObject::n_vars(), libMesh::DofObject::system_var_to_vg_var(), DofObjectTest< DerivedClass >::testSetNVariableGroups(), libMesh::DofObject::var_to_vg(), and libMesh::DofObject::var_to_vg_and_offset().

770 {
771  libmesh_assert_less (s, this->n_systems());
772  libmesh_assert_less (vg, this->n_var_groups(s));
773 
774  const unsigned int start_idx_sys = this->start_idx(s);
775 
776  libmesh_assert_less ((start_idx_sys + 2*vg), _idx_buf.size());
777 
778  return (cast_int<unsigned int>
779  (_idx_buf[start_idx_sys + 2*vg]) >> ncv_magic_exp);
780 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508
static const index_t ncv_magic_exp
Definition: dof_object.h:520

◆ n_vars() [2/2]

unsigned int libMesh::DofObject::n_vars ( const unsigned int  s) const
inherited
Returns
The number of Variable variables associated with system s for this DofObject

Definition at line 785 of file dof_object.h.

References libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().

786 {
787  libmesh_assert_less (s, this->n_systems());
788 
789  const unsigned int nvg = this->n_var_groups(s);
790 
791  unsigned int val=0;
792 
793  for (unsigned int vg=0; vg<nvg; vg++)
794  val += this->n_vars(s,vg);
795 
796  return val;
797 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768
unsigned int n_systems() const
Definition: dof_object.h:749

◆ n_vertices()

virtual unsigned int libMesh::Tri::n_vertices ( ) const
overridevirtualinherited
Returns
3. All triangles have 3 vertices.

Implements libMesh::Elem.

Definition at line 97 of file face_tri.h.

97 { return 3; }

◆ neighbor()

Elem * libMesh::Elem::neighbor ( const unsigned int  i) const
inherited
Deprecated:
Use the const-correct neighbor_ptr() function instead.

Definition at line 2027 of file elem.h.

References libMesh::Elem::neighbor_ptr().

2028 {
2029  // Support the deprecated interface by calling the new,
2030  // const-correct interface and casting the result to an Elem *.
2031  libmesh_deprecated();
2032  return const_cast<Elem *>(this->neighbor_ptr(i));
2033 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2006

◆ neighbor_ptr() [1/2]

const Elem * libMesh::Elem::neighbor_ptr ( unsigned int  i) const
inherited
Returns
A const pointer to the $ i^{th} $ neighbor of this element, or nullptr if MeshBase::find_neighbors() has not been called.
Note
If MeshBase::find_neighbors() has been called and this function still returns nullptr, then the side is on a boundary of the domain.

Definition at line 2006 of file elem.h.

References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().

Referenced by libMesh::Elem::neighbor(), libMesh::Elem::SideIter::side_on_boundary(), and libMesh::Elem::which_neighbor_am_i().

2007 {
2008  libmesh_assert_less (i, this->n_neighbors());
2009 
2010  return _elemlinks[i+1];
2011 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657
unsigned int n_neighbors() const
Definition: elem.h:644

◆ neighbor_ptr() [2/2]

Elem * libMesh::Elem::neighbor_ptr ( unsigned int  i)
inherited
Returns
A non-const pointer to the $ i^{th} $ neighbor of this element.

Definition at line 2016 of file elem.h.

References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().

2017 {
2018  libmesh_assert_less (i, this->n_neighbors());
2019 
2020  return _elemlinks[i+1];
2021 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657
unsigned int n_neighbors() const
Definition: elem.h:644

◆ neighbor_ptr_range() [1/2]

SimpleRange< Elem::NeighborPtrIter > libMesh::Elem::neighbor_ptr_range ( )
inherited

Returns a range with all neighbors of an element, usable in range-based for loops.

The exact type of the return value here may be subject to change in future libMesh releases, but the iterators will always dereference to produce a pointer to a neighbor element (or a null pointer, for sides which have no neighbors).

Definition at line 2894 of file elem.h.

References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().

Referenced by libMesh::Elem::child_neighbor(), and libMesh::Elem::has_neighbor().

2895 {
2896  return {_elemlinks+1, _elemlinks + 1 + this->n_neighbors()};
2897 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657
unsigned int n_neighbors() const
Definition: elem.h:644

◆ neighbor_ptr_range() [2/2]

SimpleRange< Elem::ConstNeighborPtrIter > libMesh::Elem::neighbor_ptr_range ( ) const
inherited

Definition at line 2901 of file elem.h.

References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().

2902 {
2903  return {_elemlinks+1, _elemlinks + 1 + this->n_neighbors()};
2904 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657
unsigned int n_neighbors() const
Definition: elem.h:644

◆ node()

dof_id_type libMesh::Elem::node ( const unsigned int  i) const
inherited
Returns
The global id number of local Node i.
Deprecated:
Use the less ambiguously named node_id() instead.

Definition at line 1883 of file elem.h.

References libMesh::Elem::node_id().

1884 {
1885  libmesh_deprecated();
1886  return this->node_id(i);
1887 }
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:1870

◆ node_id()

dof_id_type libMesh::Elem::node_id ( const unsigned int  i) const
inherited
Returns
The global id number of local Node i.

Definition at line 1870 of file elem.h.

References libMesh::Elem::_nodes, libMesh::DofObject::id(), libMesh::DofObject::invalid_id, and libMesh::Elem::n_nodes().

Referenced by libMesh::Edge::key(), libMesh::Elem::local_node(), and libMesh::Elem::node().

1871 {
1872  libmesh_assert_less (i, this->n_nodes());
1873  libmesh_assert(_nodes[i]);
1874  libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id);
1875 
1876  return _nodes[i]->id();
1877 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
dof_id_type id() const
Definition: dof_object.h:655
virtual unsigned int n_nodes() const =0
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ node_index_range()

IntRange< unsigned short > libMesh::Elem::node_index_range ( ) const
inherited
Returns
An integer range from 0 up to (but not including) the number of nodes this element contains.

Definition at line 2104 of file elem.h.

References libMesh::Elem::n_nodes().

2105 {
2106  return {0, cast_int<unsigned short>(this->n_nodes())};
2107 }
virtual unsigned int n_nodes() const =0

◆ node_ptr() [1/2]

const Node * libMesh::Elem::node_ptr ( const unsigned int  i) const
inherited
Returns
A const pointer to local Node i.

Definition at line 1913 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

Referenced by libMesh::Elem::get_node(), libMesh::Elem::get_node_index(), and libMesh::Elem::node_ref().

1914 {
1915  libmesh_assert_less (i, this->n_nodes());
1916  libmesh_assert(_nodes[i]);
1917 
1918  return _nodes[i];
1919 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ node_ptr() [2/2]

Node * libMesh::Elem::node_ptr ( const unsigned int  i)
inherited
Returns
A non-const pointer to local Node i.

Definition at line 1924 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

1925 {
1926  libmesh_assert_less (i, this->n_nodes());
1927  libmesh_assert(_nodes[i]);
1928 
1929  return _nodes[i];
1930 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ node_ref() [1/2]

const Node & libMesh::Elem::node_ref ( const unsigned int  i) const
inherited
Returns
A const reference to local Node i.

Definition at line 1935 of file elem.h.

References libMesh::Elem::node_ptr().

Referenced by libMesh::Parallel::sync_node_data_by_element_id_once().

1936 {
1937  return *this->node_ptr(i);
1938 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:1913

◆ node_ref() [2/2]

Node & libMesh::Elem::node_ref ( const unsigned int  i)
inherited
Returns
A writable reference to local Node i.

Definition at line 1943 of file elem.h.

References libMesh::Elem::node_ptr().

1944 {
1945  return *this->node_ptr(i);
1946 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:1913

◆ node_ref_range() [1/2]

SimpleRange< Elem::NodeRefIter > libMesh::Elem::node_ref_range ( )
inherited

Returns a range with all nodes of an element, usable in range-based for loops.

The exact type of the return value here may be subject to change in future libMesh releases, but the iterators will always dereference to produce a reference to a Node.

Definition at line 2086 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

2087 {
2088  return {_nodes, _nodes+this->n_nodes()};
2089 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ node_ref_range() [2/2]

SimpleRange< Elem::ConstNodeRefIter > libMesh::Elem::node_ref_range ( ) const
inherited

Definition at line 2095 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

2096 {
2097  return {_nodes, _nodes+this->n_nodes()};
2098 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ nodes_on_side()

virtual std::vector<unsigned int> libMesh::Tri6::nodes_on_side ( const unsigned int  int) const
overridevirtual
Returns
the (local) node numbers on the specified side

Implements libMesh::Elem.

◆ nullify_neighbors()

void libMesh::Elem::nullify_neighbors ( )
inherited

Replaces this element with nullptr for all of its neighbors.

This is useful when deleting an element.

◆ on_boundary()

bool libMesh::Elem::on_boundary ( ) const
inherited
Returns
true if this element has a side coincident with a boundary (indicated by a nullptr neighbor), false otherwise.

Definition at line 2210 of file elem.h.

References libMesh::Elem::has_neighbor().

2211 {
2212  // By convention, the element is on the boundary
2213  // if it has a nullptr neighbor.
2214  return this->has_neighbor(nullptr);
2215 }
bool has_neighbor(const Elem *elem) const
Definition: elem.h:2049

◆ operator=() [1/2]

Tri6& libMesh::Tri6::operator= ( const Tri6 )
delete

◆ operator=() [2/2]

Tri6& libMesh::Tri6::operator= ( Tri6 &&  )
delete

◆ operator==()

bool libMesh::Elem::operator== ( const Elem rhs) const
inherited
Returns
true if two elements are identical, false otherwise. This is true if the elements are connected to identical global nodes, regardless of how those nodes might be numbered local to the elements.

◆ opposite_node()

virtual unsigned int libMesh::Elem::opposite_node ( const unsigned int  n,
const unsigned int  s 
) const
virtualinherited
Returns
The local node number for the node opposite to node n on side opposite_side(s) (for a tensor product element), or throws an error otherwise.

Reimplemented in libMesh::Quad, libMesh::Edge, and libMesh::Hex.

◆ opposite_side()

virtual unsigned int libMesh::Elem::opposite_side ( const unsigned int  s) const
virtualinherited
Returns
The side number opposite to s (for a tensor product element), or throws an error otherwise.

Reimplemented in libMesh::Quad, libMesh::Edge, and libMesh::Hex.

◆ origin()

virtual Point libMesh::Elem::origin ( ) const
virtualinherited
Returns
The origin for an infinite element.

Currently, all infinite elements used in a mesh share the same origin. Override this in infinite element classes.

Reimplemented in libMesh::InfQuad, libMesh::InfEdge2, and libMesh::InfCell.

Definition at line 1516 of file elem.h.

1516 { libmesh_not_implemented(); return Point(); }

◆ p_level()

unsigned int libMesh::Elem::p_level ( ) const
inherited
Returns
The value of the p refinement level of an active element, or the minimum value of the p refinement levels of an ancestor element's descendants.

Definition at line 2461 of file elem.h.

References libMesh::Elem::_p_level.

Referenced by libMesh::Elem::Elem(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::set_p_level(), and libMesh::Elem::set_p_refinement_flag().

2462 {
2463 #ifdef LIBMESH_ENABLE_AMR
2464  return _p_level;
2465 #else
2466  return 0;
2467 #endif
2468 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1692

◆ p_refinement_flag()

Elem::RefinementState libMesh::Elem::p_refinement_flag ( ) const
inherited
Returns
The value of the p-refinement flag for the element.

Definition at line 2560 of file elem.h.

References libMesh::Elem::_pflag.

Referenced by libMesh::Elem::hack_p_level().

2561 {
2562  return static_cast<RefinementState>(_pflag);
2563 }
unsigned char _pflag
p refinement flag.
Definition: elem.h:1682
RefinementState
Enumeration of possible element refinement states.
Definition: elem.h:1161

◆ pack_indexing()

void libMesh::DofObject::pack_indexing ( std::back_insert_iterator< std::vector< largest_id_type >>  target) const
inherited

A method for creating packed data from our index buffer - basically a copy with prepended size with our current implementation.

◆ packed_indexing_size()

unsigned int libMesh::DofObject::packed_indexing_size ( ) const
inherited

If we pack our indices into an buffer for communications, how many ints do we need?

Referenced by libMesh::Node::packed_size().

◆ parent() [1/2]

const Elem * libMesh::Elem::parent ( ) const
inherited
Returns
A const pointer to the element's parent, or nullptr if the element was not created via refinement.

Definition at line 2385 of file elem.h.

References libMesh::Elem::_elemlinks.

Referenced by libMesh::OldSolutionBase< Output, point_output >::check_old_context(), libMesh::Elem::Elem(), libMesh::Elem::is_ancestor_of(), libMesh::Elem::level(), libMesh::Elem::set_p_level(), libMesh::Elem::subactive(), libMesh::Parallel::sync_element_data_by_parent_id(), libMesh::Elem::top_parent(), and libMesh::Elem::which_neighbor_am_i().

2386 {
2387  return _elemlinks[0];
2388 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657

◆ parent() [2/2]

Elem * libMesh::Elem::parent ( )
inherited
Returns
A pointer to the element's parent, or nullptr if the element was not created via refinement.

Definition at line 2393 of file elem.h.

References libMesh::Elem::_elemlinks.

2394 {
2395  return _elemlinks[0];
2396 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657

◆ parent_bracketing_nodes()

virtual const std::vector<std::pair<unsigned char, unsigned char> >& libMesh::Elem::parent_bracketing_nodes ( unsigned int  c,
unsigned int  n 
) const
virtualinherited
Returns
All the pairs of nodes (indexed by local node id) which should bracket node n of child c.

◆ point() [1/2]

const Point & libMesh::Elem::point ( const unsigned int  i) const
inherited
Returns
The Point associated with local Node i.

Definition at line 1848 of file elem.h.

References libMesh::Elem::_nodes, libMesh::DofObject::invalid_id, and libMesh::Elem::n_nodes().

Referenced by libMesh::InfCell::origin(), libMesh::InfEdge2::origin(), libMesh::InfQuad::origin(), and libMesh::Elem::which_side_am_i().

1849 {
1850  libmesh_assert_less (i, this->n_nodes());
1851  libmesh_assert(_nodes[i]);
1852  libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id);
1853 
1854  return *_nodes[i];
1855 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ point() [2/2]

Point & libMesh::Elem::point ( const unsigned int  i)
inherited
Returns
The Point associated with local Node i as a writable reference.

Definition at line 1860 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

1861 {
1862  libmesh_assert_less (i, this->n_nodes());
1863 
1864  return *_nodes[i];
1865 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ print_dof_info()

void libMesh::DofObject::print_dof_info ( ) const
inherited

Print out info for debugging.

◆ print_info() [1/3]

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

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

◆ print_info() [2/3]

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

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

◆ print_info() [3/3]

void libMesh::Elem::print_info ( std::ostream &  os = libMesh::out) const
inherited

Prints relevant information about the element.

Referenced by libMesh::operator<<().

◆ processor_id() [1/3]

processor_id_type libMesh::DofObject::processor_id ( ) const
inherited
Returns
The processor that this DofObject belongs to.

When partitioning and DoF numbering have been performed by libMesh, every current DoF on this DofObject will belong to its processor.

Definition at line 717 of file dof_object.h.

References libMesh::DofObject::_processor_id.

Referenced by libMesh::Elem::Elem(), libMesh::DofObject::invalidate_processor_id(), libMesh::DofObject::processor_id(), libMesh::Parallel::sync_dofobject_data_by_id(), libMesh::Parallel::sync_element_data_by_parent_id(), DofObjectTest< DerivedClass >::testInvalidateProcId(), DofObjectTest< DerivedClass >::testSetProcId(), and DofObjectTest< DerivedClass >::testValidProcId().

718 {
719  return _processor_id;
720 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ processor_id() [2/3]

processor_id_type & libMesh::DofObject::processor_id ( )
inherited
Returns
The processor that this DofObject belongs to as a writable reference.

Definition at line 725 of file dof_object.h.

References libMesh::DofObject::_processor_id.

726 {
727  return _processor_id;
728 }
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ processor_id() [3/3]

void libMesh::DofObject::processor_id ( const processor_id_type  pid)
inherited

Sets the processor_id for this DofObject.

Definition at line 733 of file dof_object.h.

References libMesh::DofObject::processor_id().

734 {
735  this->processor_id() = pid;
736 }
processor_id_type processor_id() const
Definition: dof_object.h:717

◆ qual_bounds()

virtual std::pair<Real, Real> libMesh::Tri::qual_bounds ( const ElemQuality  q) const
overridevirtualinherited
Returns
The suggested quality bounds for the hex based on quality measure q. These are the values suggested by the CUBIT User's Manual.

Reimplemented from libMesh::Elem.

◆ quality()

virtual Real libMesh::Tri::quality ( const ElemQuality  q) const
overridevirtualinherited
Returns
A quantitative assessment of element quality based on the quality metric q specified by the user.

Reimplemented from libMesh::Elem.

◆ raw_child_ptr()

const Elem * libMesh::Elem::raw_child_ptr ( unsigned int  i) const
inherited
Returns
A constant pointer to the $ i^{th} $ child for this element. For internal use only - skips assertions about null pointers.

Definition at line 2475 of file elem.h.

References libMesh::Elem::_children.

2476 {
2477  if (!_children)
2478  return nullptr;
2479 
2480  return _children[i];
2481 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1663

◆ reference_elem()

const Elem* libMesh::Elem::reference_elem ( ) const
inherited
Returns
A pointer to the "reference element" associated with this element. The reference element is the image of this element in reference parametric space. Importantly, it is not an actual element in the mesh, but rather a Singleton-type object, so for example all Quad4 elements share the same reference_elem().

◆ refine()

virtual void libMesh::Elem::refine ( MeshRefinement mesh_refinement)
virtualinherited

Refine the element.

◆ refinement_flag()

Elem::RefinementState libMesh::Elem::refinement_flag ( ) const
inherited
Returns
The value of the refinement flag for the element.

Definition at line 2544 of file elem.h.

References libMesh::Elem::_rflag.

Referenced by libMesh::Elem::active(), and libMesh::OldSolutionBase< Output, point_output >::check_old_context().

2545 {
2546  return static_cast<RefinementState>(_rflag);
2547 }
RefinementState
Enumeration of possible element refinement states.
Definition: elem.h:1161
unsigned char _rflag
h refinement flag.
Definition: elem.h:1676

◆ remove_links_to_me()

void libMesh::Elem::remove_links_to_me ( )
inherited

Resets this element's neighbors' appropriate neighbor pointers and its parent's and children's appropriate pointers to point to null instead of to this.

Used by the library before an element is deleted from a mesh.

◆ replace_child()

void libMesh::Elem::replace_child ( Elem elem,
unsigned int  c 
)
inherited

Replaces the child pointer at the specified index in the child array.

◆ second_order_adjacent_vertex()

virtual unsigned short int libMesh::Tri6::second_order_adjacent_vertex ( const unsigned int  n,
const unsigned int  v 
) const
overridevirtual
Returns
The element-local number of the $ v^{th} $ vertex that defines the $ n^{th} $ second-order node.
Note
n is counted as depicted above, $ 3 \le n < 6 $.

Reimplemented from libMesh::Elem.

◆ second_order_child_vertex()

virtual std::pair<unsigned short int, unsigned short int> libMesh::Tri6::second_order_child_vertex ( const unsigned int  n) const
overridevirtual
Returns
The child number c and element-local index v of the $ n^{th} $ second-order node on the parent element. See elem.h for further details.

Reimplemented from libMesh::Elem.

◆ second_order_equivalent_type()

static ElemType libMesh::Elem::second_order_equivalent_type ( const ElemType  et,
const bool  full_ordered = true 
)
staticinherited
Returns
The element type of the associated second-order element, or INVALID_ELEM for second-order or other elements that cannot be converted into higher order equivalents.

For example, when this is a TET4, then TET10 is returned.

For some elements, there exist two second-order equivalents, e.g. for Quad4 there is Quad8 and Quad9. When the optional full_ordered is true, then QUAD9 is returned. When full_ordered is false, then QUAD8 is returned.

◆ set_buffer()

void libMesh::DofObject::set_buffer ( const std::vector< dof_id_type > &  buf)
inherited

Definition at line 535 of file dof_object.h.

References libMesh::DofObject::_idx_buf.

Referenced by DofObjectTest< DerivedClass >::testJensEftangBug().

536  { _idx_buf = buf; }
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ set_dof_number()

void libMesh::DofObject::set_dof_number ( const unsigned int  s,
const unsigned int  var,
const unsigned int  comp,
const dof_id_type  dn 
)
inherited

Sets the global degree of freedom number for variable var, component comp for system s associated with this DofObject.

◆ set_id() [1/2]

dof_id_type & libMesh::DofObject::set_id ( )
inherited

◆ set_id() [2/2]

void libMesh::DofObject::set_id ( const dof_id_type  dofid)
inherited

Sets the id for this DofObject.

Definition at line 151 of file dof_object.h.

References libMesh::DofObject::set_id().

152  { this->set_id() = dofid; }
dof_id_type & set_id()
Definition: dof_object.h:664

◆ set_interior_parent()

void libMesh::Elem::set_interior_parent ( Elem p)
inherited

◆ set_n_comp()

void libMesh::DofObject::set_n_comp ( const unsigned int  s,
const unsigned int  var,
const unsigned int  ncomp 
)
inherited

Sets the number of components for Variable var of system s associated with this DofObject.

◆ set_n_comp_group()

void libMesh::DofObject::set_n_comp_group ( const unsigned int  s,
const unsigned int  vg,
const unsigned int  ncomp 
)
inherited

Sets the number of components for VariableGroup vg of system s associated with this DofObject.

Referenced by DofObjectTest< DerivedClass >::testManualDofCalculation().

◆ set_n_systems()

void libMesh::DofObject::set_n_systems ( const unsigned int  s)
inherited

◆ set_n_vars_per_group()

void libMesh::DofObject::set_n_vars_per_group ( const unsigned int  s,
const std::vector< unsigned int > &  nvpg 
)
inherited

Sets number of variables in each group associated with system s for this DofObject.

Implicit in this is also setting the number of VariableGroup variable groups for the system. Has the effect of setting the number of components to 0 even when called even with (nvg == this->n_var_groups(s)).

Referenced by DofObjectTest< DerivedClass >::testManualDofCalculation(), and DofObjectTest< DerivedClass >::testSetNVariableGroups().

◆ set_neighbor()

void libMesh::Elem::set_neighbor ( const unsigned int  i,
Elem n 
)
inherited

Assigns n as the $ i^{th} $ neighbor.

Definition at line 2039 of file elem.h.

References libMesh::Elem::_elemlinks, and libMesh::Elem::n_neighbors().

2040 {
2041  libmesh_assert_less (i, this->n_neighbors());
2042 
2043  _elemlinks[i+1] = n;
2044 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657
unsigned int n_neighbors() const
Definition: elem.h:644

◆ set_node()

Node *& libMesh::Elem::set_node ( const unsigned int  i)
virtualinherited
Returns
The pointer to local Node i as a writable reference.

Reimplemented in libMesh::RemoteElem.

Definition at line 1980 of file elem.h.

References libMesh::Elem::_nodes, and libMesh::Elem::n_nodes().

Referenced by libMesh::RemoteElem::set_node().

1981 {
1982  libmesh_assert_less (i, this->n_nodes());
1983 
1984  return _nodes[i];
1985 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1651
virtual unsigned int n_nodes() const =0

◆ set_old_dof_object()

void libMesh::DofObject::set_old_dof_object ( )
inherited

Sets the old_dof_object to a copy of this.

◆ set_p_level()

void libMesh::Elem::set_p_level ( const unsigned int  p)
inherited

Sets the value of the p-refinement level for the element.

Note
The maximum p-refinement level is currently 255.

Definition at line 2598 of file elem.h.

References libMesh::Elem::_p_level, libMesh::Elem::child_ref_range(), libMesh::Elem::JUST_COARSENED, libMesh::Elem::JUST_REFINED, std::min(), libMesh::Elem::p_level(), libMesh::Elem::parent(), libMesh::Elem::set_p_level(), and libMesh::Elem::set_p_refinement_flag().

Referenced by libMesh::Elem::Elem(), and libMesh::Elem::set_p_level().

2599 {
2600  // Maintain the parent's p level as the minimum of it's children
2601  if (this->parent() != nullptr)
2602  {
2603  unsigned int parent_p_level = this->parent()->p_level();
2604 
2605  // If our new p level is less than our parents, our parents drops
2606  if (parent_p_level > p)
2607  {
2608  this->parent()->set_p_level(p);
2609 
2610  // And we should keep track of the drop, in case we need to
2611  // do a projection later.
2613  }
2614  // If we are the lowest p level and it increases, so might
2615  // our parent's, but we have to check every other child to see
2616  else if (parent_p_level == _p_level && _p_level < p)
2617  {
2618  _p_level = cast_int<unsigned char>(p);
2619  parent_p_level = cast_int<unsigned char>(p);
2620  for (auto & c : this->parent()->child_ref_range())
2621  parent_p_level = std::min(parent_p_level,
2622  c.p_level());
2623 
2624  // When its children all have a higher p level, the parent's
2625  // should rise
2626  if (parent_p_level > this->parent()->p_level())
2627  {
2628  this->parent()->set_p_level(parent_p_level);
2629 
2630  // And we should keep track of the rise, in case we need to
2631  // do a projection later.
2633  }
2634 
2635  return;
2636  }
2637  }
2638 
2639  _p_level = cast_int<unsigned char>(p);
2640 }
void set_p_level(const unsigned int p)
Sets the value of the p-refinement level for the element.
Definition: elem.h:2598
const Elem * parent() const
Definition: elem.h:2385
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1692
unsigned int p_level() const
Definition: elem.h:2461
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
Definition: elem.h:1735
void set_p_refinement_flag(const RefinementState pflag)
Sets the value of the p-refinement flag for the element.
Definition: elem.h:2568
long double min(long double a, double b)

◆ set_p_refinement_flag()

void libMesh::Elem::set_p_refinement_flag ( const RefinementState  pflag)
inherited

Sets the value of the p-refinement flag for the element.

Definition at line 2568 of file elem.h.

References libMesh::Elem::_pflag, libMesh::Elem::JUST_REFINED, and libMesh::Elem::p_level().

Referenced by libMesh::Elem::set_p_level().

2569 {
2570  if (this->p_level() == 0)
2571  libmesh_assert_not_equal_to
2572  (pflag, Elem::JUST_REFINED);
2573 
2574  _pflag = cast_int<unsigned char>(pflag);
2575 }
unsigned char _pflag
p refinement flag.
Definition: elem.h:1682
unsigned int p_level() const
Definition: elem.h:2461

◆ set_parent()

void libMesh::Elem::set_parent ( Elem p)
inherited

Sets the pointer to the element's parent.

Dangerous! Only use this if you know what you are doing!

Definition at line 2401 of file elem.h.

References libMesh::Elem::_elemlinks.

2402 {
2403  _elemlinks[0] = p;
2404 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1657

◆ set_refinement_flag()

void libMesh::Elem::set_refinement_flag ( const RefinementState  rflag)
inherited

Sets the value of the refinement flag for the element.

Definition at line 2552 of file elem.h.

References libMesh::Elem::_rflag.

2553 {
2554  _rflag = cast_int<RefinementState>(rflag);
2555 }
unsigned char _rflag
h refinement flag.
Definition: elem.h:1676

◆ set_unique_id()

unique_id_type & libMesh::DofObject::set_unique_id ( )
inherited
Returns
The globally unique_id for this DofObject as a writable reference.

Definition at line 685 of file dof_object.h.

References libMesh::DofObject::_unique_id.

686 {
687 #ifdef LIBMESH_ENABLE_UNIQUE_ID
688  return _unique_id;
689 #else
690  libmesh_not_implemented();
691 #endif
692 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436

◆ set_vg_dof_base()

void libMesh::DofObject::set_vg_dof_base ( const unsigned int  s,
const unsigned int  vg,
const dof_id_type  db 
)
inherited

VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.

Definition at line 960 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), libMesh::DofObject::start_idx(), and libMesh::DofObject::vg_dof_base().

Referenced by libMesh::DofObject::invalidate_dofs(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

963 {
964  libmesh_assert_less (s, this->n_systems());
965  libmesh_assert_less (vg, this->n_var_groups(s));
966 
967  const unsigned int
968  start_idx_sys = this->start_idx(s);
969 
970  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
971 
972  _idx_buf[start_idx_sys + 2*vg + 1] = db;
973 
974  libmesh_assert_equal_to (this->vg_dof_base(s,vg), db);
975 }
dof_id_type vg_dof_base(const unsigned int s, const unsigned int vg) const
VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for di...
Definition: dof_object.h:980
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ side()

std::unique_ptr< Elem > libMesh::Elem::side ( const unsigned int  i) const
inherited
Returns
A proxy element coincident with side i.
Deprecated:
This method will eventually be removed since it hands back a non-const pointer to a side that could be used to indirectly modify this. Please use the the const-correct side_ptr() function instead.

Definition at line 2144 of file elem.h.

References libMesh::Elem::side_ptr().

2145 {
2146  // Call the const version of side_ptr(), and const_cast the result.
2147  libmesh_deprecated();
2148  Elem * s = const_cast<Elem *>(this->side_ptr(i).release());
2149  return std::unique_ptr<Elem>(s);
2150 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
virtual std::unique_ptr< Elem > side_ptr(unsigned int i)=0

◆ side_index_range()

IntRange< unsigned short > libMesh::Elem::side_index_range ( ) const
inherited
Returns
An integer range from 0 up to (but not including) the number of sides this element has.

Definition at line 2122 of file elem.h.

References libMesh::Elem::n_sides().

2123 {
2124  return {0, cast_int<unsigned short>(this->n_sides())};
2125 }
virtual unsigned int n_sides() const =0

◆ side_ptr() [1/2]

virtual std::unique_ptr<Elem> libMesh::Tri::side_ptr ( const unsigned int  i)
overridevirtualinherited
Returns
A primitive (2-noded) edge for edge i.

Implements libMesh::Elem.

◆ side_ptr() [2/2]

std::unique_ptr< const Elem > libMesh::Elem::side_ptr ( unsigned int  i) const
inherited

Definition at line 2131 of file elem.h.

References libMesh::Elem::side_ptr().

2132 {
2133  // Call the non-const version of this function, return the result as
2134  // a std::unique_ptr<const Elem>.
2135  Elem * me = const_cast<Elem *>(this);
2136  const Elem * s = const_cast<const Elem *>(me->side_ptr(i).release());
2137  return std::unique_ptr<const Elem>(s);
2138 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ subactive()

bool libMesh::Elem::subactive ( ) const
inherited
Returns
true if the element is subactive (i.e. has no active descendants), false otherwise or if AMR is disabled.

Definition at line 2314 of file elem.h.

References libMesh::Elem::active(), libMesh::Elem::has_children(), and libMesh::Elem::parent().

Referenced by libMesh::Elem::max_descendant_p_level().

2315 {
2316 #ifdef LIBMESH_ENABLE_AMR
2317  if (this->active())
2318  return false;
2319  if (!this->has_children())
2320  return true;
2321  for (const Elem * my_ancestor = this->parent();
2322  my_ancestor != nullptr;
2323  my_ancestor = my_ancestor->parent())
2324  if (my_ancestor->active())
2325  return true;
2326 #endif
2327 
2328  return false;
2329 }
const Elem * parent() const
Definition: elem.h:2385
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
bool active() const
Definition: elem.h:2296
bool has_children() const
Definition: elem.h:2334

◆ subdomain_id() [1/2]

subdomain_id_type libMesh::Elem::subdomain_id ( ) const
inherited
Returns
The subdomain that this element belongs to.

Definition at line 1990 of file elem.h.

References libMesh::Elem::_sbd_id.

Referenced by libMesh::Elem::Elem().

1991 {
1992  return _sbd_id;
1993 }
subdomain_id_type _sbd_id
The subdomain to which this element belongs.
Definition: elem.h:1669

◆ subdomain_id() [2/2]

subdomain_id_type & libMesh::Elem::subdomain_id ( )
inherited
Returns
The subdomain that this element belongs to as a writable reference.

Definition at line 1998 of file elem.h.

References libMesh::Elem::_sbd_id.

1999 {
2000  return _sbd_id;
2001 }
subdomain_id_type _sbd_id
The subdomain to which this element belongs.
Definition: elem.h:1669

◆ top_parent()

const Elem * libMesh::Elem::top_parent ( ) const
inherited
Returns
A pointer to the element's top-most (i.e. level-0) parent.

That is, this if this is a level-0 element, this element's parent if this is a level-1 element, this element's grandparent if this is a level-2 element, etc...

Definition at line 2409 of file elem.h.

References libMesh::Elem::level(), and libMesh::Elem::parent().

2410 {
2411  const Elem * tp = this;
2412 
2413  // Keep getting the element's parent
2414  // until that parent is at level-0
2415  while (tp->parent() != nullptr)
2416  tp = tp->parent();
2417 
2418  libmesh_assert(tp);
2419  libmesh_assert_equal_to (tp->level(), 0);
2420 
2421  return tp;
2422 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767

◆ topological_neighbor() [1/2]

const Elem* libMesh::Elem::topological_neighbor ( const unsigned int  i,
const MeshBase mesh,
const PointLocatorBase point_locator,
const PeriodicBoundaries pb 
) const
inherited
Returns
A pointer to the $ i^{th} $ neighbor of this element for interior elements. If an element is on a periodic boundary, it will return a corresponding element on the opposite side.

◆ topological_neighbor() [2/2]

Elem* libMesh::Elem::topological_neighbor ( const unsigned int  i,
MeshBase mesh,
const PointLocatorBase point_locator,
const PeriodicBoundaries pb 
)
inherited
Returns
A writable pointer to the $ i^{th} $ neighbor of this element for interior elements. If an element is on a periodic boundary, it will return a corresponding element on the opposite side.

◆ total_family_tree()

void libMesh::Elem::total_family_tree ( std::vector< const Elem *> &  active_family,
const bool  reset = true 
) const
inherited

Same as the family_tree() member, but also adds any subactive descendants.

◆ total_family_tree_by_neighbor()

void libMesh::Elem::total_family_tree_by_neighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const bool  reset = true 
) const
inherited

Same as the family_tree_by_neighbor() member, but also adds any subactive descendants.

◆ total_family_tree_by_subneighbor()

void libMesh::Elem::total_family_tree_by_subneighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const Elem subneighbor,
const bool  reset = true 
) const
inherited

Same as the family_tree_by_subneighbor() member, but also adds any subactive descendants.

◆ type()

virtual ElemType libMesh::Tri6::type ( ) const
overridevirtual
Returns
TRI6.

Implements libMesh::Elem.

Definition at line 76 of file face_tri6.h.

References libMesh::TRI6.

76 { return TRI6; }

◆ unique_id()

unique_id_type libMesh::DofObject::unique_id ( ) const
inherited
Returns
The globally unique_id for this DofObject

Definition at line 672 of file dof_object.h.

References libMesh::DofObject::_unique_id, libMesh::DofObject::invalid_unique_id, and libMesh::DofObject::valid_unique_id().

673 {
674 #ifdef LIBMESH_ENABLE_UNIQUE_ID
675  libmesh_assert (this->valid_unique_id());
676  return _unique_id;
677 #else
678  return invalid_unique_id;
679 #endif
680 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:352
bool valid_unique_id() const
Definition: dof_object.h:705

◆ unpack_indexing()

void libMesh::DofObject::unpack_indexing ( std::vector< largest_id_type >::const_iterator  begin)
inherited

A method for creating our index buffer from packed data - basically with our current implementation we investigate the size term and then copy.

◆ unpackable_indexing_size()

static unsigned int libMesh::DofObject::unpackable_indexing_size ( std::vector< largest_id_type >::const_iterator  begin)
staticinherited

If we have indices packed into an buffer for communications, how much of that buffer applies to this dof object?

◆ valid_id()

bool libMesh::DofObject::valid_id ( ) const
inherited
Returns
true if this DofObject has a valid id set, false otherwise.

Definition at line 697 of file dof_object.h.

References libMesh::DofObject::_id, and libMesh::DofObject::invalid_id.

Referenced by libMesh::DofObject::id(), DofObjectTest< DerivedClass >::testInvalidateId(), and DofObjectTest< DerivedClass >::testValidId().

698 {
699  return (DofObject::invalid_id != _id);
700 }
dof_id_type _id
The id of the DofObject.
Definition: dof_object.h:442
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
Definition: dof_object.h:347

◆ valid_processor_id()

bool libMesh::DofObject::valid_processor_id ( ) const
inherited
Returns
true if this DofObject has a valid id set, false otherwise.

Definition at line 741 of file dof_object.h.

References libMesh::DofObject::_processor_id, and libMesh::DofObject::invalid_processor_id.

Referenced by DofObjectTest< DerivedClass >::testInvalidateProcId(), and DofObjectTest< DerivedClass >::testValidProcId().

742 {
744 }
static const processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
Definition: dof_object.h:358
processor_id_type _processor_id
The processor_id of the DofObject.
Definition: dof_object.h:453

◆ valid_unique_id()

bool libMesh::DofObject::valid_unique_id ( ) const
inherited
Returns
true if this DofObject has a valid unique_id set, false otherwise.

Definition at line 705 of file dof_object.h.

References libMesh::DofObject::_unique_id, and libMesh::DofObject::invalid_unique_id.

Referenced by libMesh::DofObject::unique_id().

706 {
707 #ifdef LIBMESH_ENABLE_UNIQUE_ID
709 #else
710  return false;
711 #endif
712 }
unique_id_type _unique_id
A globally unique id, guaranteed not to change as the mesh is repartitioned or adapted.
Definition: dof_object.h:436
static const unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
Definition: dof_object.h:352

◆ var_to_vg_and_offset()

std::pair< unsigned int, unsigned int > libMesh::DofObject::var_to_vg_and_offset ( const unsigned int  s,
const unsigned int  var 
) const
inherited
Returns
A pair consisting of the variable group number and the offset index from the start of that group for variable var on system s associated with this DofObject

Definition at line 887 of file dof_object.h.

References libMesh::DofObject::n_var_groups(), and libMesh::DofObject::n_vars().

Referenced by libMesh::DofObject::dof_number().

889 {
890  std::pair<unsigned int, unsigned int> returnval(0,0);
891 
892  unsigned int & vg = returnval.first;
893  unsigned int & offset = returnval.second;
894 
895  unsigned int vg_start = 0;
896  for (; ; vg++)
897  {
898  libmesh_assert_less(vg, this->n_var_groups(s));
899 
900  const unsigned int vg_end = vg_start + this->n_vars(s,vg);
901  if (var < vg_end)
902  {
903  offset = var - vg_start;
904  return returnval;
905  }
906  vg_start = vg_end;
907  }
908 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_vars(const unsigned int s, const unsigned int vg) const
Definition: dof_object.h:768

◆ vg_dof_base()

dof_id_type libMesh::DofObject::vg_dof_base ( const unsigned int  s,
const unsigned int  vg 
) const
inherited

VariableGroup DoF indices are indexed as id = base + var_in_vg*ncomp + comp This method allows for direct access to the base.

Definition at line 980 of file dof_object.h.

References libMesh::DofObject::_idx_buf, libMesh::DofObject::n_systems(), libMesh::DofObject::n_var_groups(), and libMesh::DofObject::start_idx().

Referenced by libMesh::DofObject::set_vg_dof_base(), and DofObjectTest< DerivedClass >::testManualDofCalculation().

982 {
983  libmesh_assert_less (s, this->n_systems());
984  libmesh_assert_less (vg, this->n_var_groups(s));
985 
986  const unsigned int
987  start_idx_sys = this->start_idx(s);
988 
989  libmesh_assert_less ((start_idx_sys + 2*vg + 1), _idx_buf.size());
990 
991  // #ifdef DEBUG
992  // std::cout << " [ ";
993  // for (std:size_t i=0; i<_idx_buf.size(); i++)
994  // std::cout << _idx_buf[i] << " ";
995  // std::cout << "]\n";
996  // #endif
997 
998  return _idx_buf[start_idx_sys + 2*vg + 1];
999 }
unsigned int n_var_groups(const unsigned int s) const
Definition: dof_object.h:758
unsigned int n_systems() const
Definition: dof_object.h:749
unsigned int start_idx(const unsigned int s) const
The starting index for system s.
Definition: dof_object.h:936
index_buffer_t _idx_buf
Definition: dof_object.h:508

◆ volume()

virtual Real libMesh::Tri6::volume ( ) const
overridevirtual

An optimized method for approximating the area of a TRI6 using quadrature.

Reimplemented from libMesh::Elem.

◆ which_child_am_i()

unsigned int libMesh::Elem::which_child_am_i ( const Elem e) const
inherited
Returns
The child index which e corresponds to.

I.e. if c = a->which_child_am_i(e); then a->child_ptr(c) will be e.

Definition at line 2526 of file elem.h.

References libMesh::Elem::child_ptr(), libMesh::Elem::has_children(), libMesh::invalid_uint, and libMesh::Elem::n_children().

Referenced by libMesh::Parallel::sync_element_data_by_parent_id().

2527 {
2528  libmesh_assert(e);
2529  libmesh_assert (this->has_children());
2530 
2531  unsigned int nc = this->n_children();
2532  for (unsigned int c=0; c != nc; c++)
2533  if (this->child_ptr(c) == e)
2534  return c;
2535 
2536  libmesh_error_msg("ERROR: which_child_am_i() was called with a non-child!");
2537 
2538  return libMesh::invalid_uint;
2539 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
virtual unsigned int n_children() const =0
bool has_children() const
Definition: elem.h:2334
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:2484

◆ which_neighbor_am_i()

unsigned int libMesh::Elem::which_neighbor_am_i ( const Elem e) const
inherited

This function tells you which neighbor e is.

I.e. if s = a->which_neighbor_am_i(e); then a->neighbor(s) will be an ancestor of e.

Definition at line 2220 of file elem.h.

References libMesh::invalid_uint, libMesh::Elem::level(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor_ptr(), and libMesh::Elem::parent().

2221 {
2222  libmesh_assert(e);
2223 
2224  const Elem * eparent = e;
2225 
2226  while (eparent->level() > this->level())
2227  {
2228  eparent = eparent->parent();
2229  libmesh_assert(eparent);
2230  }
2231 
2232  for (unsigned int s=0, n_s = this->n_sides(); s != n_s; ++s)
2233  if (this->neighbor_ptr(s) == eparent)
2234  return s;
2235 
2236  return libMesh::invalid_uint;
2237 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1767
virtual unsigned int n_sides() const =0
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2006
unsigned int level() const
Definition: elem.h:2427

◆ which_node_am_i()

virtual unsigned int libMesh::Tri6::which_node_am_i ( unsigned int  side,
unsigned int  side_node 
) const
overridevirtual
Returns
Tri6::side_nodes_map[side][side_node] after doing some range checking.

Reimplemented from libMesh::Tri.

◆ which_side_am_i()

unsigned int libMesh::Elem::which_side_am_i ( const Elem e) const
inherited

This function tells you which side the boundary element e is.

I.e. if e = a->build_side_ptr(s) or e = a->side_ptr(s); then a->which_side_am_i(e) will be s.

Note
An exact floating point comparison of the nodal positions of e is made with the nodal positions of this in order to perform this test. The idea is that the test will return a valid side id if e either directly shares Node pointers with this, or was created by exactly copying some of the nodes of this (e.g. through BoundaryMesh::sync()). In these circumstances, non-fuzzy floating point equality is expected.
Returns
The side of this the element which e is, otherwise invalid_uint.

Definition at line 2242 of file elem.h.

References libMesh::invalid_uint, libMesh::Elem::is_node_on_side(), libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), and libMesh::Elem::point().

2243 {
2244  libmesh_assert(e);
2245 
2246  const unsigned int ns = this->n_sides();
2247  const unsigned int nn = this->n_nodes();
2248 
2249  const unsigned int en = e->n_nodes();
2250 
2251  // e might be on any side until proven otherwise
2252  std::vector<bool> might_be_side(ns, true);
2253 
2254  for (unsigned int i=0; i != en; ++i)
2255  {
2256  Point side_point = e->point(i);
2257  unsigned int local_node_id = libMesh::invalid_uint;
2258 
2259  // Look for a node of this that's contiguous with node i of
2260  // e. Note that the exact floating point comparison of Point
2261  // positions is intentional, see the class documentation for
2262  // this function.
2263  for (unsigned int j=0; j != nn; ++j)
2264  if (this->point(j) == side_point)
2265  local_node_id = j;
2266 
2267  // If a node of e isn't contiguous with some node of this, then
2268  // e isn't a side of this.
2269  if (local_node_id == libMesh::invalid_uint)
2270  return libMesh::invalid_uint;
2271 
2272  // If a node of e isn't contiguous with some node on side s of
2273  // this, then e isn't on side s.
2274  for (unsigned int s=0; s != ns; ++s)
2275  if (!this->is_node_on_side(local_node_id, s))
2276  might_be_side[s] = false;
2277  }
2278 
2279  for (unsigned int s=0; s != ns; ++s)
2280  if (might_be_side[s])
2281  {
2282 #ifdef DEBUG
2283  for (unsigned int s2=s+1; s2 < ns; ++s2)
2284  libmesh_assert (!might_be_side[s2]);
2285 #endif
2286  return s;
2287  }
2288 
2289  // Didn't find any matching side
2290  return libMesh::invalid_uint;
2291 }
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value.
Definition: libmesh.h:245
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const =0
virtual unsigned int n_nodes() const =0
virtual unsigned int n_sides() const =0
const Point & point(const unsigned int i) const
Definition: elem.h:1848

◆ write_connectivity()

void libMesh::Elem::write_connectivity ( std::ostream &  out,
const IOPackage  iop 
) const
inherited

Writes the element connectivity for various IO packages to the passed ostream "out".

Not virtual, since it is implemented in the base class.

Member Data Documentation

◆ _children

Elem** libMesh::Elem::_children
protectedinherited

◆ _counts [1/2]

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _counts [2/2]

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _elemlinks

Elem** libMesh::Elem::_elemlinks
protectedinherited

Pointers to this element's parent and neighbors, and for lower-dimensional elements' interior_parent.

Definition at line 1657 of file elem.h.

Referenced by libMesh::Elem::Elem(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::neighbor_ptr_range(), libMesh::Elem::parent(), libMesh::Elem::set_neighbor(), and libMesh::Elem::set_parent().

◆ _elemlinks_data

Elem* libMesh::Tri::_elemlinks_data[4+(LIBMESH_DIM >2)]
protectedinherited

Data for links to parent/neighbor/interior_parent elements.

Definition at line 165 of file face_tri.h.

◆ _embedding_matrix

const float libMesh::Tri6::_embedding_matrix[num_children][num_nodes][num_nodes]
staticprotected

Matrix that computes new nodal locations/solution values from current nodes/solution.

Definition at line 232 of file face_tri6.h.

Referenced by embedding_matrix().

◆ _enable_print_counter [1/2]

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

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

Definition at line 141 of file reference_counter.h.

◆ _enable_print_counter [2/2]

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

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

Definition at line 141 of file reference_counter.h.

◆ _master_points

const Real libMesh::Tri::_master_points[6][3]
staticprotectedinherited

Master element node locations.

Definition at line 170 of file face_tri.h.

Referenced by libMesh::Tri::master_point().

◆ _mutex [1/2]

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

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _mutex [2/2]

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

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects [1/2]

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

The number of objects.

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

Definition at line 130 of file reference_counter.h.

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

◆ _n_objects [2/2]

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

The number of objects.

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

Definition at line 130 of file reference_counter.h.

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

◆ _nodelinks_data

Node* libMesh::Tri6::_nodelinks_data[num_nodes]
protected

Data for links to nodes.

Definition at line 214 of file face_tri6.h.

◆ _nodes

Node** libMesh::Elem::_nodes
protectedinherited

◆ _p_level

unsigned char libMesh::Elem::_p_level
protectedinherited

p refinement level - the difference between the polynomial degree on this element and the minimum polynomial degree on the mesh.

This is stored as an unsigned char to save space. In theory, these last four bytes might have been padding anyway.

Definition at line 1692 of file elem.h.

Referenced by libMesh::Elem::hack_p_level(), libMesh::Elem::max_descendant_p_level(), libMesh::Elem::p_level(), and libMesh::Elem::set_p_level().

◆ _pflag

unsigned char libMesh::Elem::_pflag
protectedinherited

p refinement flag.

This is stored as an unsigned char to save space.

Definition at line 1682 of file elem.h.

Referenced by libMesh::Elem::p_refinement_flag(), and libMesh::Elem::set_p_refinement_flag().

◆ _rflag

unsigned char libMesh::Elem::_rflag
protectedinherited

h refinement flag.

This is stored as an unsigned char to save space.

Definition at line 1676 of file elem.h.

Referenced by libMesh::Elem::refinement_flag(), and libMesh::Elem::set_refinement_flag().

◆ _sbd_id

subdomain_id_type libMesh::Elem::_sbd_id
protectedinherited

The subdomain to which this element belongs.

Definition at line 1669 of file elem.h.

Referenced by libMesh::Elem::subdomain_id().

◆ _second_order_adjacent_vertices

const unsigned short int libMesh::Tri6::_second_order_adjacent_vertices[num_sides][2]
staticprivate

Matrix that tells which vertices define the location of mid-side (or second-order) nodes.

Definition at line 244 of file face_tri6.h.

◆ _second_order_vertex_child_index

const unsigned short int libMesh::Tri6::_second_order_vertex_child_index[num_nodes]
staticprivate

Vector that names the child vertex index for each second order node.

Definition at line 254 of file face_tri6.h.

◆ _second_order_vertex_child_number

const unsigned short int libMesh::Tri6::_second_order_vertex_child_number[num_nodes]
staticprivate

Vector that names a child sharing each second order node.

Definition at line 249 of file face_tri6.h.

◆ invalid_id

const dof_id_type libMesh::DofObject::invalid_id = static_cast<dof_id_type>(-1)
staticinherited

◆ invalid_processor_id

const processor_id_type libMesh::DofObject::invalid_processor_id = static_cast<processor_id_type>(-1)
staticinherited

◆ invalid_subdomain_id

const subdomain_id_type libMesh::Elem::invalid_subdomain_id
staticinherited

A static integral constant representing an invalid subdomain id.

See also DofObject::{invalid_id, invalid_unique_id, invalid_processor_id}.

Note
We don't use the static_cast(-1) trick here since subdomain_id_type is sometimes a signed integer for compatibility reasons (see libmesh/id_types.h).
Normally you can declare static const integral types directly in the header file (C++ standard, 9.4.2/4) but std::numeric_limits<T>::max() is not considered a "constant expression". This one is therefore defined in elem.C. http://stackoverflow.com/questions/2738435/using-numeric-limitsmax-in-constant-expressions

Definition at line 262 of file elem.h.

◆ invalid_unique_id

const unique_id_type libMesh::DofObject::invalid_unique_id = static_cast<unique_id_type>(-1)
staticinherited

An invalid unique_id to distinguish an uninitialized DofObject.

Definition at line 352 of file dof_object.h.

Referenced by libMesh::DofObject::unique_id(), and libMesh::DofObject::valid_unique_id().

◆ LIBMESH_ENABLE_TOPOLOGY_CACHES

libMesh::Tri6::LIBMESH_ENABLE_TOPOLOGY_CACHES
protected

Definition at line 234 of file face_tri6.h.

◆ max_n_nodes

const unsigned int libMesh::Elem::max_n_nodes = 27
staticinherited

The maximum number of nodes any element can contain.

This is useful for replacing heap vectors with stack arrays.

Definition at line 600 of file elem.h.

Referenced by libMesh::Elem::Elem().

◆ nodes_per_side

const int libMesh::Tri6::nodes_per_side = 3
static

Definition at line 189 of file face_tri6.h.

◆ num_children

const int libMesh::Tri6::num_children = 4
static

Definition at line 188 of file face_tri6.h.

◆ num_nodes

const int libMesh::Tri6::num_nodes = 6
static

Geometric constants for Tri6.

Definition at line 186 of file face_tri6.h.

Referenced by n_nodes().

◆ num_sides

const int libMesh::Tri6::num_sides = 3
static

Definition at line 187 of file face_tri6.h.

◆ old_dof_object

DofObject* libMesh::DofObject::old_dof_object
inherited

This object on the last mesh.

Useful for projecting solutions from one mesh to another.

Definition at line 79 of file dof_object.h.

Referenced by libMesh::OldSolutionBase< Output, point_output >::check_old_context(), and libMesh::OldSolutionValue< Output, point_output >::eval_at_node().

◆ side_nodes_map

const unsigned int libMesh::Tri6::side_nodes_map[num_sides][nodes_per_side]
static

This maps the $ j^{th} $ node of the $ i^{th} $ side to element node numbers.

Definition at line 195 of file face_tri6.h.

◆ type_to_n_edges_map

const unsigned int libMesh::Elem::type_to_n_edges_map[INVALID_ELEM]
staticinherited

This array maps the integer representation of the ElemType enum to the number of edges on the element.

Definition at line 669 of file elem.h.

◆ type_to_n_nodes_map

const unsigned int libMesh::Elem::type_to_n_nodes_map[INVALID_ELEM]
staticinherited

This array maps the integer representation of the ElemType enum to the number of nodes in the element.

Definition at line 589 of file elem.h.

◆ type_to_n_sides_map

const unsigned int libMesh::Elem::type_to_n_sides_map[INVALID_ELEM]
staticinherited

This array maps the integer representation of the ElemType enum to the number of sides on the element.

Definition at line 620 of file elem.h.


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