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 | List of all members
libMesh::Tet4 Class Referencefinal


The Tet4 is an element in 3D composed of 4 nodes. More...

#include <cell_tet4.h>

Inheritance diagram for libMesh::Tet4:
[legend]

Public Types

enum  Diagonal { DIAG_02_13 =0, DIAG_03_12 =1, DIAG_01_23 =2, INVALID_DIAG =99 }
 This enumeration keeps track of which diagonal is selected during refinement. More...
 
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

 Tet4 (Elem *p=nullptr)
 Constructor. More...
 
 Tet4 (Tet4 &&)=delete
 
 Tet4 (const Tet4 &)=delete
 
Tet4operator= (const Tet4 &)=delete
 
Tet4operator= (Tet4 &&)=delete
 
virtual ~Tet4 ()=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 is_child_on_side (const unsigned int c, const unsigned int s) const override
 
virtual bool has_affine_map () const override
 
virtual bool is_linear () const override
 
virtual Order default_order () const override
 
virtual std::unique_ptr< Elembuild_side_ptr (const unsigned int i, bool proxy=true) override
 Builds a TRI3 built coincident with face i. More...
 
virtual void build_side_ptr (std::unique_ptr< Elem > &elem, const unsigned int i) override
 Rebuilds a TRI3 built coincident with face i. More...
 
virtual std::unique_ptr< Elembuild_edge_ptr (const unsigned int i) override
 Builds a EDGE2 built coincident with face i. More...
 
virtual void connectivity (const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
 
virtual Real volume () const override
 An optimized method for computing the area of a 4-node tetrahedron. More...
 
std::pair< Real, Realmin_and_max_angle () const
 
virtual dof_id_type key () const override
 
virtual bool contains_point (const Point &p, Real tol) const override
 Uses simple geometric tests to determine if the point p is inside the tetrahedron. More...
 
virtual dof_id_type key (const unsigned int s) const override
 Don't hide Tet::key(side) defined in the base class. More...
 
virtual dof_id_type key (const unsigned int s) const =0
 Don't hide Tet::key(side) defined in the base class. More...
 
virtual dof_id_type key () const
 Don't hide Tet::key(side) defined in the base class. More...
 
virtual Point master_point (const unsigned int i) const override final
 
virtual unsigned int n_sides () const override final
 
virtual unsigned int n_vertices () const override final
 
virtual unsigned int n_edges () const override final
 
virtual unsigned int n_faces () const override final
 
virtual unsigned int n_children () const override final
 
virtual bool is_edge_on_side (const unsigned int e, const unsigned int s) const override final
 
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< Elemside_ptr (const unsigned int i) override final
 
virtual void side_ptr (std::unique_ptr< Elem > &side, const unsigned int i) override final
 Rebuilds a primitive (3-noded) triangle for face i. More...
 
std::unique_ptr< const Elemside_ptr (unsigned int i) const
 
void side_ptr (std::unique_ptr< const Elem > &side, const unsigned int i) const
 
virtual Real quality (const ElemQuality q) const override
 
virtual std::pair< Real, Realqual_bounds (const ElemQuality q) const override
 
Diagonal diagonal_selection () const
 
void select_diagonal (const Diagonal diag) const
 Allows the user to select the diagonal for the refinement. More...
 
virtual unsigned int embedding_matrix_version () const override final
 Tetrahedral elements permute the embedding matrix depending on which interior diagonal is used to subdivide into child elements. More...
 
virtual unsigned short dim () const override
 
virtual BoundingBox loose_bounding_box () const override
 
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_point_neighbors (std::set< Elem *> &neighbor_set, Elem *start_elem)
 Non-const version of function above. 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 find_interior_neighbors (std::set< Elem *> &neighbor_set)
 Non-const version of function above that fills up a vector of non-const Elem pointers instead. 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
 
void build_side_ptr (std::unique_ptr< const Elem > &side, const unsigned int i) const
 
std::unique_ptr< Elembuild_side (const unsigned int i, bool proxy=true) const
 
std::unique_ptr< const Elembuild_edge_ptr (const unsigned int i) 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 close_to_point (const Point &p, Real tol) 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
 
virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const
 
virtual unsigned short int second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const
 
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex (const unsigned int n) 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, bool reset=true) const
 Fills the vector family with the children of this element, recursively. More...
 
void family_tree (std::vector< Elem *> &family, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void total_family_tree (std::vector< const Elem *> &family, bool reset=true) const
 Same as the family_tree() member, but also adds any subactive descendants. More...
 
void total_family_tree (std::vector< Elem *> &family, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void active_family_tree (std::vector< const Elem *> &active_family, bool reset=true) const
 Same as the family_tree() member, but only adds the active children. More...
 
void active_family_tree (std::vector< Elem *> &active_family, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void family_tree_by_side (std::vector< const Elem *> &family, unsigned int side, bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to side. More...
 
void family_tree_by_side (std::vector< Elem *> &family, unsigned int side, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void active_family_tree_by_side (std::vector< const Elem *> &family, unsigned int side, bool reset=true) const
 Same as the active_family_tree() member, but only adds elements which are next to side. More...
 
void active_family_tree_by_side (std::vector< Elem *> &family, unsigned int side, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to neighbor. More...
 
void family_tree_by_neighbor (std::vector< Elem *> &family, Elem *neighbor, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void total_family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, bool reset=true) const
 Same as the family_tree_by_neighbor() member, but also adds any subactive descendants. More...
 
void total_family_tree_by_neighbor (std::vector< Elem *> &family, Elem *neighbor, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void family_tree_by_subneighbor (std::vector< const Elem *> &family, const Elem *neighbor, const Elem *subneighbor, bool reset=true) const
 Same as the family_tree() member, but only adds elements which are next to subneighbor. More...
 
void family_tree_by_subneighbor (std::vector< Elem *> &family, Elem *neighbor, Elem *subneighbor, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void total_family_tree_by_subneighbor (std::vector< const Elem *> &family, const Elem *neighbor, const Elem *subneighbor, bool reset=true) const
 Same as the family_tree_by_subneighbor() member, but also adds any subactive descendants. More...
 
void total_family_tree_by_subneighbor (std::vector< Elem *> &family, Elem *neighbor, Elem *subneighbor, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. More...
 
void active_family_tree_by_neighbor (std::vector< const Elem *> &family, const Elem *neighbor, bool reset=true) const
 Same as the active_family_tree() member, but only adds elements which are next to neighbor. More...
 
void active_family_tree_by_neighbor (std::vector< Elem *> &family, Elem *neighbor, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. 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, bool reset=true) const
 Same as the active_family_tree_by_neighbor() member, but the neighbor here may be a topological (e.g. More...
 
void active_family_tree_by_topological_neighbor (std::vector< Elem *> &family, Elem *neighbor, const MeshBase &mesh, const PointLocatorBase &point_locator, const PeriodicBoundaries *pb, bool reset=true)
 Non-const version of function above; fills a vector of non-const pointers. 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
 
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 = 4
 Geometric constants for Tet4. More...
 
static const int num_sides = 4
 
static const int num_edges = 6
 
static const int num_children = 8
 
static const int nodes_per_side = 3
 
static const int nodes_per_edge = 2
 
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 unsigned int edge_nodes_map [num_edges][nodes_per_edge]
 This maps the $ j^{th} $ node of the $ i^{th} $ edge 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...
 
bool is_child_on_side_helper (const unsigned int c, const unsigned int s, const unsigned int checked_nodes[][3]) const
 Called by descendant classes with appropriate data to determine if child c is on side s. More...
 
void choose_diagonal () const
 Derived classes use this function to select an initial diagonal during refinement. More...
 
template<typename Subclass >
void simple_build_side_ptr (std::unique_ptr< Elem > &side, const unsigned int i, ElemType sidetype)
 An implementation for simple (all sides equal) elements. More...
 
template<typename Subclass , typename Mapclass >
void simple_side_ptr (std::unique_ptr< Elem > &side, const unsigned int i, ElemType sidetype)
 An implementation for simple (all sides equal) elements. 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 [5+(LIBMESH_DIM >3)]
 Data for links to parent/neighbor/interior_parent elements. More...
 
Diagonal _diagonal_selection
 The currently-selected diagonal used during refinement. 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 [10][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...
 

Detailed Description


The Tet4 is an element in 3D composed of 4 nodes.

It is numbered like this:

*   TET4:
*         3
*         o                 zeta
*        /|\                 ^
*       / | \                |
*      /  |  \               |
*   0 o...|...o 2            o---> eta
*      \  |  /                \
*       \ | /                  \
*        \|/                    xi (out of page)
*         o
*         1
* 

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

Author
Benjamin S. Kirk
Date
2002 A 3D tetrahedral element with 4 nodes.

Definition at line 53 of file cell_tet4.h.

Member Typedef Documentation

◆ ConstNeighborPtrIter

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

Definition at line 325 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 324 of file elem.h.

◆ Predicate

Useful iterator typedefs.

Definition at line 1591 of file elem.h.

Member Enumeration Documentation

◆ Diagonal

enum libMesh::Tet::Diagonal
inherited

This enumeration keeps track of which diagonal is selected during refinement.

In general there are three possible diagonals to choose when splitting the octahedron, and by choosing the shortest one we obtain the best element shape.

Enumerator
DIAG_02_13 
DIAG_03_12 
DIAG_01_23 
INVALID_DIAG 

Definition at line 149 of file cell_tet.h.

150  {
151  DIAG_02_13=0, // diagonal between edges (0,2) and (1,3)
152  DIAG_03_12=1, // diagonal between edges (0,3) and (1,2)
153  DIAG_01_23=2, // diagonal between edges (0,1) and (2,3)
154  INVALID_DIAG=99 // diagonal not yet selected
155  };

◆ RefinementState

Enumeration of possible element refinement states.

Enumerator
COARSEN 
DO_NOTHING 
REFINE 
JUST_REFINED 
JUST_COARSENED 
INACTIVE 
COARSEN_INACTIVE 
INVALID_REFINEMENTSTATE 

Definition at line 1211 of file elem.h.

Constructor & Destructor Documentation

◆ Tet4() [1/3]

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

Constructor.

By default this element has no parent.

Definition at line 61 of file cell_tet4.h.

61  :
63  {}
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition: cell_tet4.h:226
Tet(const unsigned int nn, Elem *p, Node **nodelinkdata)
Default tetrahedral element, takes number of nodes and parent.
Definition: cell_tet.h:44
virtual unsigned int n_nodes() const override
Definition: cell_tet4.h:79

◆ Tet4() [2/3]

libMesh::Tet4::Tet4 ( Tet4 &&  )
delete

◆ Tet4() [3/3]

libMesh::Tet4::Tet4 ( const Tet4 )
delete

◆ ~Tet4()

virtual libMesh::Tet4::~Tet4 ( )
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 1759 of file elem.h.

1760  {
1761  static std::vector<std::vector<std::vector<std::vector<std::pair<unsigned char, unsigned char>>>>> c;
1762  libmesh_error();
1763  return c;
1764  }

◆ _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 1773 of file elem.h.

1774  {
1775  static std::vector<std::vector<std::vector<signed char>>> c;
1776  libmesh_error();
1777  return c;
1778  }

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

2519 {
2520 #ifdef LIBMESH_ENABLE_AMR
2521  if ((this->refinement_flag() == INACTIVE) ||
2522  (this->refinement_flag() == COARSEN_INACTIVE))
2523  return false;
2524  else
2525  return true;
2526 #else
2527  return true;
2528 #endif
2529 }
RefinementState refinement_flag() const
Definition: elem.h:2766

◆ active_family_tree() [1/2]

void libMesh::Elem::active_family_tree ( std::vector< const Elem *> &  active_family,
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() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ active_family_tree_by_neighbor() [1/2]

void libMesh::Elem::active_family_tree_by_neighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
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_neighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ active_family_tree_by_side() [1/2]

void libMesh::Elem::active_family_tree_by_side ( std::vector< const Elem *> &  family,
unsigned int  side,
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_side() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ active_family_tree_by_topological_neighbor() [1/2]

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,
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.

◆ active_family_tree_by_topological_neighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ 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 2420 of file elem.h.

References libMesh::Elem::build_edge_ptr().

2421 {
2422  // Call the const version of build_edge_ptr(), and const_cast the result.
2423  libmesh_deprecated();
2424  Elem * e = const_cast<Elem *>(this->build_edge_ptr(i).release());
2425  return std::unique_ptr<Elem>(e);
2426 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i)=0

◆ build_edge_ptr() [1/2]

virtual std::unique_ptr<Elem> libMesh::Tet4::build_edge_ptr ( const unsigned int  i)
overridevirtual

Builds a EDGE2 built coincident with face i.

The std::unique_ptr<Elem> handles the memory aspect.

Implements libMesh::Elem.

◆ build_edge_ptr() [2/2]

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

Definition at line 2406 of file elem.h.

References libMesh::Elem::build_edge_ptr().

2407 {
2408  // Call the non-const version of this function, return the result as
2409  // a std::unique_ptr<const Elem>.
2410  Elem * me = const_cast<Elem *>(this);
2411  const Elem * e = const_cast<const Elem *>(me->build_edge_ptr(i).release());
2412  return std::unique_ptr<const Elem>(e);
2413 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ 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 2343 of file elem.h.

References libMesh::Elem::build_side_ptr().

2344 {
2345  // Call the const version of build_side_ptr(), and const_cast the result.
2346  libmesh_deprecated();
2347  Elem * s = const_cast<Elem *>(this->build_side_ptr(i, proxy).release());
2348  return std::unique_ptr<Elem>(s);
2349 }
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:1911

◆ build_side_ptr() [1/4]

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

Builds a TRI3 built coincident with face i.

The std::unique_ptr<Elem> handles the memory aspect.

Implements libMesh::Elem.

◆ build_side_ptr() [2/4]

virtual void libMesh::Tet4::build_side_ptr ( std::unique_ptr< Elem > &  elem,
const unsigned int  i 
)
overridevirtual

Rebuilds a TRI3 built coincident with face i.

Implements libMesh::Elem.

◆ build_side_ptr() [3/4]

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

Definition at line 2315 of file elem.h.

References libMesh::Elem::build_side_ptr().

2316 {
2317  // Call the non-const version of this function, return the result as
2318  // a std::unique_ptr<const Elem>.
2319  Elem * me = const_cast<Elem *>(this);
2320  const Elem * s = const_cast<const Elem *>(me->build_side_ptr(i, proxy).release());
2321  return std::unique_ptr<const Elem>(s);
2322 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ build_side_ptr() [4/4]

void libMesh::Elem::build_side_ptr ( std::unique_ptr< const Elem > &  side,
const unsigned int  i 
) const
inherited

Definition at line 2328 of file elem.h.

References libMesh::Elem::build_side_ptr().

2330 {
2331  // Hand off to the non-const version of this function
2332  Elem * me = const_cast<Elem *>(this);
2333  std::unique_ptr<Elem> e {const_cast<Elem *>(elem.release())};
2334  me->build_side_ptr(e, i);
2335  elem.reset(e.release());
2336 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ 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 2726 of file elem.h.

References libMesh::Elem::child_ptr().

2727 {
2728  // Support the deprecated interface by calling the new,
2729  // const-correct interface and casting the result to an Elem *.
2730  libmesh_deprecated();
2731  return const_cast<Elem *>(this->child_ptr(i));
2732 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:2706

◆ 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 2205 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

2206 {
2207  for (auto n : elem->neighbor_ptr_range())
2208  if (n && n->parent() == this)
2209  return n;
2210 
2211  return nullptr;
2212 }

◆ 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 2217 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

2218 {
2219  for (auto n : elem->neighbor_ptr_range())
2220  if (n && n->parent() == this)
2221  return n;
2222 
2223  return nullptr;
2224 }

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

2707 {
2708  libmesh_assert(_children);
2709  libmesh_assert(_children[i]);
2710 
2711  return _children[i];
2712 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

◆ 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 2715 of file elem.h.

References libMesh::Elem::_children.

2716 {
2717  libmesh_assert(_children);
2718  libmesh_assert(_children[i]);
2719 
2720  return _children[i];
2721 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

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

1880 {
1881  libmesh_assert(_children);
1882  return {_children, _children + this->n_children()};
1883 }
virtual unsigned int n_children() const =0
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

◆ child_ref_range() [2/2]

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

Definition at line 1887 of file elem.h.

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

1888 {
1889  libmesh_assert(_children);
1890  return {_children, _children + this->n_children()};
1891 }
virtual unsigned int n_children() const =0
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

◆ choose_diagonal()

void libMesh::Tet::choose_diagonal ( ) const
protectedinherited

Derived classes use this function to select an initial diagonal during refinement.

The optimal choice is the shortest of the three.

Referenced by libMesh::Tet::embedding_matrix_version().

◆ 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 2882 of file elem.h.

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

2883 {
2884  return n0;
2885 }

◆ 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 2890 of file elem.h.

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

2892 {
2893  // Order the two so that n0 < n1
2894  if (n0 > n1) std::swap (n0, n1);
2895 
2896  return Utility::hashword2(n0, n1);
2897 }
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 2902 of file elem.h.

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

2905 {
2906  // Order the numbers such that n0 < n1 < n2.
2907  // We'll do it in 3 steps like this:
2908  //
2909  // n0 n1 n2
2910  // min(n0,n1) max(n0,n1) n2
2911  // min(n0,n1) min(n2,max(n0,n1) max(n2,max(n0,n1)
2912  // |\ /| |
2913  // | \ / | |
2914  // | / | |
2915  // | / \| |
2916  // gb min= min max gb max
2917 
2918  // Step 1
2919  if (n0 > n1) std::swap (n0, n1);
2920 
2921  // Step 2
2922  if (n1 > n2) std::swap (n1, n2);
2923 
2924  // Step 3
2925  if (n0 > n1) std::swap (n0, n1);
2926 
2927  libmesh_assert ((n0 < n1) && (n1 < n2));
2928 
2929  dof_id_type array[3] = {n0, n1, n2};
2930  return Utility::hashword(array, 3);
2931 }
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 2936 of file elem.h.

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

2940 {
2941  // Sort first
2942  // Step 1
2943  if (n0 > n1) std::swap (n0, n1);
2944 
2945  // Step 2
2946  if (n2 > n3) std::swap (n2, n3);
2947 
2948  // Step 3
2949  if (n0 > n2) std::swap (n0, n2);
2950 
2951  // Step 4
2952  if (n1 > n3) std::swap (n1, n3);
2953 
2954  // Finally sort step 5
2955  if (n1 > n2) std::swap (n1, n2);
2956 
2957  libmesh_assert ((n0 < n1) && (n1 < n2) && (n2 < n3));
2958 
2959  dof_id_type array[4] = {n0, n1, n2, n3};
2960  return Utility::hashword(array, 4);
2961 }
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::Tet4::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::Tet4::contains_point ( const Point p,
Real  tol 
) const
overridevirtual

Uses simple geometric tests to determine if the point p is inside the tetrahedron.

Reimplemented from libMesh::Elem.

◆ 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::Tet4::default_order ( ) const
overridevirtual
Returns
FIRST.

Implements libMesh::Elem.

◆ diagonal_selection()

Diagonal libMesh::Tet::diagonal_selection ( ) const
inherited
Returns
The diagonal that has been selected during refinement.

Definition at line 160 of file cell_tet.h.

References libMesh::Tet::_diagonal_selection.

Referenced by libMesh::Tet::embedding_matrix_version().

160 { return _diagonal_selection; }
Diagonal _diagonal_selection
The currently-selected diagonal used during refinement.
Definition: cell_tet.h:213

◆ dim()

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

Implements libMesh::Elem.

Definition at line 61 of file cell.h.

61 { return 3; }

◆ 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 2257 of file elem.h.

References libMesh::Elem::n_edges().

2258 {
2259  return {0, cast_int<unsigned short>(this->n_edges())};
2260 }
virtual unsigned int n_edges() const =0

◆ embedding_matrix()

virtual float libMesh::Tet4::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.

◆ embedding_matrix_version()

virtual unsigned int libMesh::Tet::embedding_matrix_version ( ) const
finaloverridevirtualinherited

Tetrahedral elements permute the embedding matrix depending on which interior diagonal is used to subdivide into child elements.

But we want to cache topology data based on that matrix. So we return a "version number" based on the diagonal selection.

Reimplemented from libMesh::Elem.

Definition at line 179 of file cell_tet.h.

References libMesh::Tet::choose_diagonal(), and libMesh::Tet::diagonal_selection().

180  {
181  this->choose_diagonal();
182  return this->diagonal_selection();
183  }
Diagonal diagonal_selection() const
Definition: cell_tet.h:160
void choose_diagonal() const
Derived classes use this function to select an initial diagonal during refinement.

◆ 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() [1/2]

void libMesh::Elem::family_tree ( std::vector< const Elem *> &  family,
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() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ family_tree_by_neighbor() [1/2]

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

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

◆ family_tree_by_neighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ family_tree_by_side() [1/2]

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

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

◆ family_tree_by_side() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ family_tree_by_subneighbor() [1/2]

void libMesh::Elem::family_tree_by_subneighbor ( std::vector< const Elem *> &  family,
const Elem neighbor,
const Elem subneighbor,
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)

◆ family_tree_by_subneighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ 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() [1/2]

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_interior_neighbors() [2/2]

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

Non-const version of function above that fills up a vector of non-const Elem pointers instead.

◆ find_point_neighbors() [1/4]

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/4]

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/4]

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.

◆ find_point_neighbors() [4/4]

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

Non-const version of function above.

Fills a set of non-const Elem pointers.

◆ 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 2096 of file elem.h.

References libMesh::Elem::node_ptr().

2097 {
2098  // This const function has incorrectly returned a non-const pointer
2099  // for years. Now that it is reimplemented in terms of the new
2100  // interface which does return a const pointer, we need to use a
2101  // const_cast to mimic the old (incorrect) behavior. This function
2102  // is now deprecated and eventually will be removed entirely,
2103  // obviating the need for this ugly cast.
2104  libmesh_deprecated();
2105  return const_cast<Node *>(this->node_ptr(i));
2106 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2057

◆ 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 2112 of file elem.h.

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

2113 {
2114  for (unsigned int n=0; n != this->n_nodes(); ++n)
2115  if (this->_nodes[n] == node_ptr)
2116  return n;
2117 
2118  return libMesh::invalid_uint;
2119 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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:2057

◆ get_nodes()

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

Definition at line 2049 of file elem.h.

References libMesh::Elem::_nodes.

2050 {
2051  return _nodes;
2052 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795

◆ 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 2867 of file elem.h.

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

2868 {
2869  if (p == 0)
2870  libmesh_assert_not_equal_to
2872 
2873  _p_level = cast_int<unsigned char>(p);
2874 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1836
RefinementState p_refinement_flag() const
Definition: elem.h:2782

◆ has_affine_map()

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

Reimplemented from libMesh::Elem.

Definition at line 128 of file cell_tet4.h.

128 { return true; }

◆ 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 2570 of file elem.h.

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

2571 {
2572 #ifdef LIBMESH_ENABLE_AMR
2573  if (_children == nullptr)
2574  return false;
2575  else
2576  for (auto & c : child_ref_range())
2577  if (c.has_children())
2578  return true;
2579 #endif
2580  return false;
2581 }
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
Definition: elem.h:1879
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

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

2557 {
2558 #ifdef LIBMESH_ENABLE_AMR
2559  if (_children == nullptr)
2560  return false;
2561  else
2562  return true;
2563 #else
2564  return false;
2565 #endif
2566 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

◆ 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 2193 of file elem.h.

References libMesh::Elem::neighbor_ptr_range().

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

2194 {
2195  for (auto n : this->neighbor_ptr_range())
2196  if (n == elem)
2197  return true;
2198 
2199  return false;
2200 }
SimpleRange< NeighborPtrIter > neighbor_ptr_range()
Returns a range with all neighbors of an element, usable in range-based for loops.
Definition: elem.h:3116

◆ 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::Cell::infinite ( ) const
overridevirtualinherited
Returns
false. All classes derived from Cell are finite elements.

Implements libMesh::Elem.

Definition at line 75 of file cell.h.

75 { 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 2586 of file elem.h.

References libMesh::Elem::parent().

2591 {
2592 #ifdef LIBMESH_ENABLE_AMR
2593  const Elem * e = descendant;
2594  while (e)
2595  {
2596  if (this == e)
2597  return true;
2598  e = e->parent();
2599  }
2600 #endif
2601  return false;
2602 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ 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::Tet4::is_child_on_side ( const unsigned int  c,
const unsigned int  s 
) const
overridevirtual
Returns
true if the specified child is on the specified side.

Implements libMesh::Elem.

◆ is_child_on_side_helper()

bool libMesh::Tet::is_child_on_side_helper ( const unsigned int  c,
const unsigned int  s,
const unsigned int  checked_nodes[][3] 
) const
protectedinherited

Called by descendant classes with appropriate data to determine if child c is on side s.

Only works if LIBMESH_ENABLE_AMR.

◆ is_edge()

virtual bool libMesh::Tet4::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::Tet::is_edge_on_side ( const unsigned int  e,
const unsigned int  s 
) const
finaloverridevirtualinherited
Returns
true if the specified edge is on the specified side.

Implements libMesh::Elem.

◆ is_face()

virtual bool libMesh::Tet4::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::Tet4::is_linear ( ) const
overridevirtual
Returns
true if the Lagrange shape functions on this element are linear.

Reimplemented from libMesh::Elem.

Definition at line 134 of file cell_tet4.h.

134 { return true; }

◆ 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 1636 of file elem.h.

References libMesh::Elem::infinite().

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

◆ is_node_on_edge()

virtual bool libMesh::Tet4::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.

Implements libMesh::Elem.

◆ is_node_on_side()

virtual bool libMesh::Tet4::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.

◆ 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 568 of file elem.h.

569  { 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::Tet4::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 707 of file elem.h.

References libMesh::Elem::is_vertex().

709  { 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/5]

virtual dof_id_type libMesh::Tet::key ( const unsigned int  s) const
overridevirtualinherited
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.

Implements libMesh::Elem.

◆ key() [2/5]

virtual dof_id_type libMesh::Tet::key
override

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

◆ key() [3/5]

virtual dof_id_type libMesh::Elem::key

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

◆ key() [4/5]

virtual dof_id_type libMesh::Elem::key

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

◆ key() [5/5]

virtual dof_id_type libMesh::Tet4::key ( ) const
overridevirtual
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.

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

2650 {
2651 #ifdef LIBMESH_ENABLE_AMR
2652 
2653  // if I don't have a parent I was
2654  // created directly from file
2655  // or by the user, so I am a
2656  // level-0 element
2657  if (this->parent() == nullptr)
2658  return 0;
2659 
2660  // if the parent and this element are of different
2661  // dimensionality we are at the same level as
2662  // the parent (e.g. we are the 2D side of a
2663  // 3D element)
2664  if (this->dim() != this->parent()->dim())
2665  return this->parent()->level();
2666 
2667  // otherwise we are at a level one
2668  // higher than our parent
2669  return (this->parent()->level() + 1);
2670 
2671 #else
2672 
2673  // Without AMR all elements are
2674  // at level 0.
2675  return 0;
2676 
2677 #endif
2678 }
const Elem * parent() const
Definition: elem.h:2607
unsigned int level() const
Definition: elem.h:2649
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 2037 of file elem.h.

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

2038 {
2039  for (unsigned int n=0; n != this->n_nodes(); ++n)
2040  if (this->node_id(n) == i)
2041  return n;
2042 
2043  return libMesh::invalid_uint;
2044 }
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:2014

◆ loose_bounding_box()

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

Reimplemented from libMesh::Elem.

Reimplemented in libMesh::Hex8, libMesh::Prism6, and libMesh::Pyramid5.

◆ 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::Tet::master_point ( const unsigned int  i) const
finaloverridevirtualinherited
Returns
The Point associated with local Node i, in master element rather than physical coordinates.

Implements libMesh::Elem.

Definition at line 63 of file cell_tet.h.

References libMesh::Tet::_master_points, and libMesh::Elem::n_nodes().

64  {
65  libmesh_assert_less(i, this->n_nodes());
66  return Point(_master_points[i][0],
67  _master_points[i][1],
68  _master_points[i][2]);
69  }
static const Real _master_points[10][3]
Master element node locations.
Definition: cell_tet.h:199
virtual unsigned int n_nodes() const =0

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

2803 {
2804  // This is undefined for subactive elements,
2805  // which have no active descendants
2806  libmesh_assert (!this->subactive());
2807  if (this->active())
2808  return this->p_level();
2809 
2810  unsigned int max_p_level = _p_level;
2811  for (auto & c : child_ref_range())
2812  max_p_level = std::max(max_p_level,
2813  c.max_descendant_p_level());
2814  return max_p_level;
2815 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1836
unsigned int p_level() const
Definition: elem.h:2683
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:1879
bool subactive() const
Definition: elem.h:2536
bool active() const
Definition: elem.h:2518

◆ min_and_max_angle()

std::pair<Real, Real> libMesh::Tet4::min_and_max_angle ( ) const
Returns
The min and max dihedral angles for the tetrahedron.
Note
There are 6 dihedral angles (angles between the planar faces) for the Tet4. Dihedral angles near 180 deg. are generally bad for interpolation. Small dihedral angles are not necessarily bad for interpolation, but they can affect the stiffness matrix condition number.

◆ 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::Tet::n_children ( ) const
finaloverridevirtualinherited
Returns
8.

Implements libMesh::Elem.

Definition at line 94 of file cell_tet.h.

94 { return 8; }

◆ 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::Tet::n_edges ( ) const
finaloverridevirtualinherited
Returns
6. All tetrahedra have 6 edges.

Implements libMesh::Elem.

Definition at line 84 of file cell_tet.h.

84 { return 6; }

◆ n_faces()

virtual unsigned int libMesh::Tet::n_faces ( ) const
finaloverridevirtualinherited
Returns
4. All tetrahedra have 4 faces.

Implements libMesh::Elem.

Definition at line 89 of file cell_tet.h.

89 { return 4; }

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

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

◆ n_nodes()

virtual unsigned int libMesh::Tet4::n_nodes ( ) const
overridevirtual
Returns
4.

Implements libMesh::Elem.

Definition at line 79 of file cell_tet4.h.

References num_nodes.

79 { return num_nodes; }
static const int num_nodes
Geometric constants for Tet4.
Definition: cell_tet4.h:167

◆ 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 626 of file elem.h.

References libMesh::Elem::n_nodes().

627  { 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::Elem::n_second_order_adjacent_vertices ( const unsigned int  n) const
virtualinherited
Returns
The number of adjacent vertices that uniquely define the location of the $ n^{th} $ second-order node, or 0 for linear elements.

This method is useful when converting linear elements to quadratic elements.

Note
n has to be greater than or equal to this->n_vertices().

Reimplemented in libMesh::InfHex18, libMesh::Pyramid14, libMesh::Hex27, libMesh::Prism18, libMesh::InfHex16, libMesh::Pyramid13, libMesh::Hex20, libMesh::Prism15, libMesh::Tet10, libMesh::Quad9, libMesh::Tri6, libMesh::InfPrism12, libMesh::Quad8, libMesh::InfQuad6, libMesh::Edge4, and libMesh::Edge3.

◆ n_sides()

virtual unsigned int libMesh::Tet::n_sides ( ) const
finaloverridevirtualinherited
Returns
4.

Implements libMesh::Elem.

Definition at line 74 of file cell_tet.h.

74 { return 4; }

◆ n_sub_elem()

virtual unsigned int libMesh::Tet4::n_sub_elem ( ) const
overridevirtual
Returns
1.

Implements libMesh::Elem.

Definition at line 84 of file cell_tet4.h.

84 { return 1; }

◆ 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::Tet::n_vertices ( ) const
finaloverridevirtualinherited
Returns
4. All tetrahedra have 4 vertices.

Implements libMesh::Elem.

Definition at line 79 of file cell_tet.h.

79 { return 4; }

◆ neighbor()

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

Definition at line 2171 of file elem.h.

References libMesh::Elem::neighbor_ptr().

2172 {
2173  // Support the deprecated interface by calling the new,
2174  // const-correct interface and casting the result to an Elem *.
2175  libmesh_deprecated();
2176  return const_cast<Elem *>(this->neighbor_ptr(i));
2177 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2150

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

2151 {
2152  libmesh_assert_less (i, this->n_neighbors());
2153 
2154  return _elemlinks[i+1];
2155 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1801
unsigned int n_neighbors() const
Definition: elem.h:657

◆ 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 2160 of file elem.h.

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

2161 {
2162  libmesh_assert_less (i, this->n_neighbors());
2163 
2164  return _elemlinks[i+1];
2165 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1801
unsigned int n_neighbors() const
Definition: elem.h:657

◆ 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 3116 of file elem.h.

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

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

3117 {
3118  return {_elemlinks+1, _elemlinks + 1 + this->n_neighbors()};
3119 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1801
unsigned int n_neighbors() const
Definition: elem.h:657

◆ neighbor_ptr_range() [2/2]

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

Definition at line 3123 of file elem.h.

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

3124 {
3125  return {_elemlinks+1, _elemlinks + 1 + this->n_neighbors()};
3126 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1801
unsigned int n_neighbors() const
Definition: elem.h:657

◆ 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 2027 of file elem.h.

References libMesh::Elem::node_id().

2028 {
2029  libmesh_deprecated();
2030  return this->node_id(i);
2031 }
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:2014

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

2015 {
2016  libmesh_assert_less (i, this->n_nodes());
2017  libmesh_assert(_nodes[i]);
2018  libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id);
2019 
2020  return _nodes[i]->id();
2021 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2248 of file elem.h.

References libMesh::Elem::n_nodes().

2249 {
2250  return {0, cast_int<unsigned short>(this->n_nodes())};
2251 }
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 2057 of file elem.h.

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

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

2058 {
2059  libmesh_assert_less (i, this->n_nodes());
2060  libmesh_assert(_nodes[i]);
2061 
2062  return _nodes[i];
2063 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2068 of file elem.h.

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

2069 {
2070  libmesh_assert_less (i, this->n_nodes());
2071  libmesh_assert(_nodes[i]);
2072 
2073  return _nodes[i];
2074 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2079 of file elem.h.

References libMesh::Elem::node_ptr().

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

2080 {
2081  return *this->node_ptr(i);
2082 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2057

◆ 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 2087 of file elem.h.

References libMesh::Elem::node_ptr().

2088 {
2089  return *this->node_ptr(i);
2090 }
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2057

◆ 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 2230 of file elem.h.

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

2231 {
2232  return {_nodes, _nodes+this->n_nodes()};
2233 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2239 of file elem.h.

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

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

◆ nodes_on_side()

virtual std::vector<unsigned int> libMesh::Tet4::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 2432 of file elem.h.

References libMesh::Elem::has_neighbor().

2433 {
2434  // By convention, the element is on the boundary
2435  // if it has a nullptr neighbor.
2436  return this->has_neighbor(nullptr);
2437 }
bool has_neighbor(const Elem *elem) const
Definition: elem.h:2193

◆ operator=() [1/2]

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

◆ operator=() [2/2]

Tet4& libMesh::Tet4::operator= ( Tet4 &&  )
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 1645 of file elem.h.

1645 { 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 2683 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().

2684 {
2685 #ifdef LIBMESH_ENABLE_AMR
2686  return _p_level;
2687 #else
2688  return 0;
2689 #endif
2690 }
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1836

◆ 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 2782 of file elem.h.

References libMesh::Elem::_pflag.

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

2783 {
2784  return static_cast<RefinementState>(_pflag);
2785 }
unsigned char _pflag
p refinement flag.
Definition: elem.h:1826
RefinementState
Enumeration of possible element refinement states.
Definition: elem.h:1211

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

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

◆ 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 2615 of file elem.h.

References libMesh::Elem::_elemlinks.

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

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

1993 {
1994  libmesh_assert_less (i, this->n_nodes());
1995  libmesh_assert(_nodes[i]);
1996  libmesh_assert_not_equal_to (_nodes[i]->id(), Node::invalid_id);
1997 
1998  return *_nodes[i];
1999 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2004 of file elem.h.

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

2005 {
2006  libmesh_assert_less (i, this->n_nodes());
2007 
2008  return *_nodes[i];
2009 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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

◆ 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::Tet::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::Tet::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 2697 of file elem.h.

References libMesh::Elem::_children.

2698 {
2699  if (!_children)
2700  return nullptr;
2701 
2702  return _children[i];
2703 }
Elem ** _children
Pointers to this element&#39;s children.
Definition: elem.h:1807

◆ 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 2766 of file elem.h.

References libMesh::Elem::_rflag.

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

2767 {
2768  return static_cast<RefinementState>(_rflag);
2769 }
RefinementState
Enumeration of possible element refinement states.
Definition: elem.h:1211
unsigned char _rflag
h refinement flag.
Definition: elem.h:1820

◆ 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::Elem::second_order_adjacent_vertex ( const unsigned int  n,
const unsigned int  v 
) const
virtualinherited
Returns
The element-local number of the $ v^{th} $ vertex that defines the $ n^{th} $ second-order node, or 0 for linear elements.
Note
The value is always less than this->n_vertices(), while n has to be greater than or equal to this->n_vertices().

Reimplemented in libMesh::InfHex18, libMesh::Pyramid14, libMesh::Hex27, libMesh::Prism18, libMesh::InfHex16, libMesh::Hex20, libMesh::Prism15, libMesh::Tet10, libMesh::Pyramid13, libMesh::Quad9, libMesh::Tri6, libMesh::InfPrism12, libMesh::Quad8, libMesh::InfQuad6, libMesh::Edge3, and libMesh::Edge4.

◆ second_order_child_vertex()

virtual std::pair<unsigned short int, unsigned short int> libMesh::Elem::second_order_child_vertex ( const unsigned int  n) const
virtualinherited
Returns
A pair (c,v), where c == child index, and v == element-local index of the $ n^{th} $ second-order node on the parent element. For linear elements, (0,0) is returned.
Note
The return values are always less than this->n_children() and this->child_ptr(c)->n_vertices().
n has to be greater than or equal to this->n_vertices().
On refined second-order elements, the return value will satisfy this->node_ptr(n) == this->child_ptr(c)->node_ptr(v).

Reimplemented in libMesh::InfHex18, libMesh::Hex27, libMesh::Prism18, libMesh::InfHex16, libMesh::Hex20, libMesh::Prism15, libMesh::Tet10, libMesh::Quad9, libMesh::Tri6, libMesh::InfPrism12, libMesh::Quad8, libMesh::InfQuad6, and libMesh::Edge3.

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

◆ select_diagonal()

void libMesh::Tet::select_diagonal ( const Diagonal  diag) const
inherited

Allows the user to select the diagonal for the refinement.

This function may only be called before the element is ever refined.

◆ 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 2183 of file elem.h.

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

2184 {
2185  libmesh_assert_less (i, this->n_neighbors());
2186 
2187  _elemlinks[i+1] = n;
2188 }
Elem ** _elemlinks
Pointers to this element&#39;s parent and neighbors, and for lower-dimensional elements&#39; interior_parent...
Definition: elem.h:1801
unsigned int n_neighbors() const
Definition: elem.h:657

◆ 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 2124 of file elem.h.

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

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

2125 {
2126  libmesh_assert_less (i, this->n_nodes());
2127 
2128  return _nodes[i];
2129 }
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:1795
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 2820 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().

2821 {
2822  // Maintain the parent's p level as the minimum of it's children
2823  if (this->parent() != nullptr)
2824  {
2825  unsigned int parent_p_level = this->parent()->p_level();
2826 
2827  // If our new p level is less than our parents, our parents drops
2828  if (parent_p_level > p)
2829  {
2830  this->parent()->set_p_level(p);
2831 
2832  // And we should keep track of the drop, in case we need to
2833  // do a projection later.
2835  }
2836  // If we are the lowest p level and it increases, so might
2837  // our parent's, but we have to check every other child to see
2838  else if (parent_p_level == _p_level && _p_level < p)
2839  {
2840  _p_level = cast_int<unsigned char>(p);
2841  parent_p_level = cast_int<unsigned char>(p);
2842  for (auto & c : this->parent()->child_ref_range())
2843  parent_p_level = std::min(parent_p_level,
2844  c.p_level());
2845 
2846  // When its children all have a higher p level, the parent's
2847  // should rise
2848  if (parent_p_level > this->parent()->p_level())
2849  {
2850  this->parent()->set_p_level(parent_p_level);
2851 
2852  // And we should keep track of the rise, in case we need to
2853  // do a projection later.
2855  }
2856 
2857  return;
2858  }
2859  }
2860 
2861  _p_level = cast_int<unsigned char>(p);
2862 }
void set_p_level(const unsigned int p)
Sets the value of the p-refinement level for the element.
Definition: elem.h:2820
const Elem * parent() const
Definition: elem.h:2607
unsigned char _p_level
p refinement level - the difference between the polynomial degree on this element and the minimum pol...
Definition: elem.h:1836
unsigned int p_level() const
Definition: elem.h:2683
SimpleRange< ChildRefIter > child_ref_range()
Returns a range with all children of a parent element, usable in range-based for loops.
Definition: elem.h:1879
void set_p_refinement_flag(const RefinementState pflag)
Sets the value of the p-refinement flag for the element.
Definition: elem.h:2790
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 2790 of file elem.h.

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

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

2791 {
2792  if (this->p_level() == 0)
2793  libmesh_assert_not_equal_to
2794  (pflag, Elem::JUST_REFINED);
2795 
2796  _pflag = cast_int<unsigned char>(pflag);
2797 }
unsigned char _pflag
p refinement flag.
Definition: elem.h:1826
unsigned int p_level() const
Definition: elem.h:2683

◆ 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 2623 of file elem.h.

References libMesh::Elem::_elemlinks.

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

◆ 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 2774 of file elem.h.

References libMesh::Elem::_rflag.

2775 {
2776  _rflag = cast_int<RefinementState>(rflag);
2777 }
unsigned char _rflag
h refinement flag.
Definition: elem.h:1820

◆ 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 2302 of file elem.h.

References libMesh::Elem::side_ptr().

Referenced by libMesh::Elem::simple_build_side_ptr(), and libMesh::Elem::simple_side_ptr().

2303 {
2304  // Call the const version of side_ptr(), and const_cast the result.
2305  libmesh_deprecated();
2306  Elem * s = const_cast<Elem *>(this->side_ptr(i).release());
2307  return std::unique_ptr<Elem>(s);
2308 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911
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 2266 of file elem.h.

References libMesh::Elem::n_sides().

2267 {
2268  return {0, cast_int<unsigned short>(this->n_sides())};
2269 }
virtual unsigned int n_sides() const =0

◆ side_ptr() [1/4]

virtual std::unique_ptr<Elem> libMesh::Tet::side_ptr ( const unsigned int  i)
finaloverridevirtualinherited
Returns
A primitive (3-noded) triangle for face i.

Implements libMesh::Elem.

◆ side_ptr() [2/4]

virtual void libMesh::Tet::side_ptr ( std::unique_ptr< Elem > &  side,
const unsigned int  i 
)
finaloverridevirtualinherited

Rebuilds a primitive (3-noded) triangle for face i.

Implements libMesh::Elem.

◆ side_ptr() [3/4]

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

Definition at line 2275 of file elem.h.

References libMesh::Elem::side_ptr().

2276 {
2277  // Call the non-const version of this function, return the result as
2278  // a std::unique_ptr<const Elem>.
2279  Elem * me = const_cast<Elem *>(this);
2280  const Elem * s = const_cast<const Elem *>(me->side_ptr(i).release());
2281  return std::unique_ptr<const Elem>(s);
2282 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ side_ptr() [4/4]

void libMesh::Elem::side_ptr ( std::unique_ptr< const Elem > &  side,
const unsigned int  i 
) const
inherited

Definition at line 2288 of file elem.h.

References libMesh::Elem::side_ptr().

2290 {
2291  // Hand off to the non-const version of this function
2292  Elem * me = const_cast<Elem *>(this);
2293  std::unique_ptr<Elem> e {const_cast<Elem *>(elem.release())};
2294  me->side_ptr(e, i);
2295  elem.reset(e.release());
2296 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ simple_build_side_ptr()

template<typename Subclass >
void libMesh::Elem::simple_build_side_ptr ( std::unique_ptr< Elem > &  side,
const unsigned int  i,
ElemType  sidetype 
)
protectedinherited

An implementation for simple (all sides equal) elements.

Definition at line 2357 of file elem.h.

References libMesh::Elem::n_sides(), libMesh::Elem::node_ptr(), libMesh::Elem::side(), and libMesh::Elem::subdomain_id().

2360 {
2361  libmesh_assert_less (i, this->n_sides());
2362 
2363  if (!side.get() || side->type() != sidetype)
2364  {
2365  Subclass & real_me = cast_ref<Subclass&>(*this);
2366  side = real_me.Subclass::build_side_ptr(i, false);
2367  }
2368  else
2369  {
2370  side->subdomain_id() = this->subdomain_id();
2371 
2372  for (auto n : side->node_index_range())
2373  side->set_node(n) = this->node_ptr(Subclass::side_nodes_map[i][n]);
2374  }
2375 }
virtual unsigned int n_sides() const =0
subdomain_id_type subdomain_id() const
Definition: elem.h:2134
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2057
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2302

◆ simple_side_ptr()

template<typename Subclass , typename Mapclass >
void libMesh::Elem::simple_side_ptr ( std::unique_ptr< Elem > &  side,
const unsigned int  i,
ElemType  sidetype 
)
protectedinherited

An implementation for simple (all sides equal) elements.

Definition at line 2382 of file elem.h.

References libMesh::Elem::n_sides(), libMesh::Elem::node_ptr(), libMesh::Elem::side(), and libMesh::Elem::subdomain_id().

2385 {
2386  libmesh_assert_less (i, this->n_sides());
2387 
2388  if (!side.get() || side->type() != sidetype)
2389  {
2390  Subclass & real_me = cast_ref<Subclass&>(*this);
2391  side = real_me.Subclass::side_ptr(i);
2392  }
2393  else
2394  {
2395  side->subdomain_id() = this->subdomain_id();
2396 
2397  for (auto n : side->node_index_range())
2398  side->set_node(n) = this->node_ptr(Mapclass::side_nodes_map[i][n]);
2399  }
2400 }
virtual unsigned int n_sides() const =0
subdomain_id_type subdomain_id() const
Definition: elem.h:2134
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:2057
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2302

◆ 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 2536 of file elem.h.

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

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

2537 {
2538 #ifdef LIBMESH_ENABLE_AMR
2539  if (this->active())
2540  return false;
2541  if (!this->has_children())
2542  return true;
2543  for (const Elem * my_ancestor = this->parent();
2544  my_ancestor != nullptr;
2545  my_ancestor = my_ancestor->parent())
2546  if (my_ancestor->active())
2547  return true;
2548 #endif
2549 
2550  return false;
2551 }
const Elem * parent() const
Definition: elem.h:2607
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911
bool active() const
Definition: elem.h:2518
bool has_children() const
Definition: elem.h:2556

◆ subdomain_id() [1/2]

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

Definition at line 2134 of file elem.h.

References libMesh::Elem::_sbd_id.

Referenced by libMesh::Elem::Elem(), libMesh::Elem::simple_build_side_ptr(), and libMesh::Elem::simple_side_ptr().

2135 {
2136  return _sbd_id;
2137 }
subdomain_id_type _sbd_id
The subdomain to which this element belongs.
Definition: elem.h:1813

◆ 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 2142 of file elem.h.

References libMesh::Elem::_sbd_id.

2143 {
2144  return _sbd_id;
2145 }
subdomain_id_type _sbd_id
The subdomain to which this element belongs.
Definition: elem.h:1813

◆ 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 2631 of file elem.h.

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

2632 {
2633  const Elem * tp = this;
2634 
2635  // Keep getting the element's parent
2636  // until that parent is at level-0
2637  while (tp->parent() != nullptr)
2638  tp = tp->parent();
2639 
2640  libmesh_assert(tp);
2641  libmesh_assert_equal_to (tp->level(), 0);
2642 
2643  return tp;
2644 }
Elem(const unsigned int n_nodes, const unsigned int n_sides, Elem *parent, Elem **elemlinkdata, Node **nodelinkdata)
Constructor.
Definition: elem.h:1911

◆ 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() [1/2]

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

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

◆ total_family_tree() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ total_family_tree_by_neighbor() [1/2]

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

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

◆ total_family_tree_by_neighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ total_family_tree_by_subneighbor() [1/2]

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

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

◆ total_family_tree_by_subneighbor() [2/2]

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

Non-const version of function above; fills a vector of non-const pointers.

◆ type()

virtual ElemType libMesh::Tet4::type ( ) const
overridevirtual
Returns
TET4.

Implements libMesh::Elem.

Definition at line 74 of file cell_tet4.h.

References libMesh::TET4.

74 { return TET4; }

◆ 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::Tet4::volume ( ) const
overridevirtual

An optimized method for computing the area of a 4-node tetrahedron.

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 2748 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().

2749 {
2750  libmesh_assert(e);
2751  libmesh_assert (this->has_children());
2752 
2753  unsigned int nc = this->n_children();
2754  for (unsigned int c=0; c != nc; c++)
2755  if (this->child_ptr(c) == e)
2756  return c;
2757 
2758  libmesh_error_msg("ERROR: which_child_am_i() was called with a non-child!");
2759 
2760  return libMesh::invalid_uint;
2761 }
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:2556
const Elem * child_ptr(unsigned int i) const
Definition: elem.h:2706

◆ 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 2442 of file elem.h.

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

2443 {
2444  libmesh_assert(e);
2445 
2446  const Elem * eparent = e;
2447 
2448  while (eparent->level() > this->level())
2449  {
2450  eparent = eparent->parent();
2451  libmesh_assert(eparent);
2452  }
2453 
2454  for (unsigned int s=0, n_s = this->n_sides(); s != n_s; ++s)
2455  if (this->neighbor_ptr(s) == eparent)
2456  return s;
2457 
2458  return libMesh::invalid_uint;
2459 }
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:1911
virtual unsigned int n_sides() const =0
const Elem * neighbor_ptr(unsigned int i) const
Definition: elem.h:2150
unsigned int level() const
Definition: elem.h:2649

◆ which_node_am_i()

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

Implements libMesh::Elem.

Reimplemented in libMesh::Tet10.

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

2465 {
2466  libmesh_assert(e);
2467 
2468  const unsigned int ns = this->n_sides();
2469  const unsigned int nn = this->n_nodes();
2470 
2471  const unsigned int en = e->n_nodes();
2472 
2473  // e might be on any side until proven otherwise
2474  std::vector<bool> might_be_side(ns, true);
2475 
2476  for (unsigned int i=0; i != en; ++i)
2477  {
2478  Point side_point = e->point(i);
2479  unsigned int local_node_id = libMesh::invalid_uint;
2480 
2481  // Look for a node of this that's contiguous with node i of
2482  // e. Note that the exact floating point comparison of Point
2483  // positions is intentional, see the class documentation for
2484  // this function.
2485  for (unsigned int j=0; j != nn; ++j)
2486  if (this->point(j) == side_point)
2487  local_node_id = j;
2488 
2489  // If a node of e isn't contiguous with some node of this, then
2490  // e isn't a side of this.
2491  if (local_node_id == libMesh::invalid_uint)
2492  return libMesh::invalid_uint;
2493 
2494  // If a node of e isn't contiguous with some node on side s of
2495  // this, then e isn't on side s.
2496  for (unsigned int s=0; s != ns; ++s)
2497  if (!this->is_node_on_side(local_node_id, s))
2498  might_be_side[s] = false;
2499  }
2500 
2501  for (unsigned int s=0; s != ns; ++s)
2502  if (might_be_side[s])
2503  {
2504 #ifdef DEBUG
2505  for (unsigned int s2=s+1; s2 < ns; ++s2)
2506  libmesh_assert (!might_be_side[s2]);
2507 #endif
2508  return s;
2509  }
2510 
2511  // Didn't find any matching side
2512  return libMesh::invalid_uint;
2513 }
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:1992

◆ 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

◆ _diagonal_selection

Diagonal libMesh::Tet::_diagonal_selection
mutableprotectedinherited

The currently-selected diagonal used during refinement.

Initialized to INVALID_DIAG.

Definition at line 213 of file cell_tet.h.

Referenced by libMesh::Tet::diagonal_selection().

◆ _elemlinks

Elem** libMesh::Elem::_elemlinks
protectedinherited

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

Definition at line 1801 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::Tet::_elemlinks_data[5+(LIBMESH_DIM >3)]
protectedinherited

Data for links to parent/neighbor/interior_parent elements.

Definition at line 194 of file cell_tet.h.

◆ _embedding_matrix

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

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

Definition at line 243 of file cell_tet4.h.

◆ _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::Tet::_master_points[10][3]
staticprotectedinherited

Master element node locations.

Definition at line 199 of file cell_tet.h.

Referenced by libMesh::Tet::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::Tet4::_nodelinks_data[num_nodes]
protected

Data for links to nodes.

Definition at line 226 of file cell_tet4.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 1836 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 1826 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 1820 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 1813 of file elem.h.

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

◆ edge_nodes_map

const unsigned int libMesh::Tet4::edge_nodes_map[num_edges][nodes_per_edge]
static

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

Definition at line 184 of file cell_tet4.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 263 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::Tet4::LIBMESH_ENABLE_TOPOLOGY_CACHES
protected

Definition at line 245 of file cell_tet4.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 613 of file elem.h.

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

◆ nodes_per_edge

const int libMesh::Tet4::nodes_per_edge = 2
static

Definition at line 172 of file cell_tet4.h.

◆ nodes_per_side

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

Definition at line 171 of file cell_tet4.h.

◆ num_children

const int libMesh::Tet4::num_children = 8
static

Definition at line 170 of file cell_tet4.h.

◆ num_edges

const int libMesh::Tet4::num_edges = 6
static

Definition at line 169 of file cell_tet4.h.

◆ num_nodes

const int libMesh::Tet4::num_nodes = 4
static

Geometric constants for Tet4.

Definition at line 167 of file cell_tet4.h.

Referenced by n_nodes().

◆ num_sides

const int libMesh::Tet4::num_sides = 4
static

Definition at line 168 of file cell_tet4.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::Tet4::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 178 of file cell_tet4.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 682 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 602 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 633 of file elem.h.


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