libMesh
Namespaces | Functions
mesh_tools.h File Reference

Go to the source code of this file.

Namespaces

 libMesh
 The libMesh namespace provides an interface to certain functionality in the library.
 
 libMesh::MeshTools
 Utility functions for operations on a Mesh object.
 
 libMesh::MeshTools::Private
 

Functions

dof_id_type libMesh::MeshTools::total_weight (const MeshBase &mesh)
 
dof_id_type libMesh::MeshTools::weight (const MeshBase &mesh, const processor_id_type pid)
 
dof_id_type libMesh::MeshTools::weight (const MeshBase &mesh)
 
void libMesh::MeshTools::build_nodes_to_elem_map (const MeshBase &mesh, std::vector< std::vector< dof_id_type >> &nodes_to_elem_map)
 After calling this function the input vector nodes_to_elem_map will contain the node to element connectivity. More...
 
void libMesh::MeshTools::build_nodes_to_elem_map (const MeshBase &mesh, std::vector< std::vector< const Elem *>> &nodes_to_elem_map)
 The same, except element pointers are returned instead of indices. More...
 
void libMesh::MeshTools::build_nodes_to_elem_map (const MeshBase &mesh, std::unordered_map< dof_id_type, std::vector< dof_id_type >> &nodes_to_elem_map)
 After calling this function the input map nodes_to_elem_map will contain the node to element connectivity. More...
 
void libMesh::MeshTools::build_nodes_to_elem_map (const MeshBase &mesh, std::unordered_map< dof_id_type, std::vector< const Elem *>> &nodes_to_elem_map)
 The same, except element pointers are returned instead of indices. More...
 
std::unordered_set< dof_id_typelibMesh::MeshTools::find_boundary_nodes (const MeshBase &mesh)
 Calling this function on a 2D mesh will convert all the elements to triangles. More...
 
std::unordered_set< dof_id_typelibMesh::MeshTools::find_block_boundary_nodes (const MeshBase &mesh)
 Returns a std::set containing Node IDs for all of the block boundary nodes. More...
 
libMesh::BoundingBox libMesh::MeshTools::create_bounding_box (const MeshBase &mesh)
 
Sphere libMesh::MeshTools::bounding_sphere (const MeshBase &mesh)
 
libMesh::BoundingBox libMesh::MeshTools::create_nodal_bounding_box (const MeshBase &mesh)
 
libMesh::BoundingBox libMesh::MeshTools::create_local_bounding_box (const MeshBase &mesh)
 
libMesh::BoundingBox libMesh::MeshTools::create_processor_bounding_box (const MeshBase &mesh, const processor_id_type pid)
 
Sphere libMesh::MeshTools::processor_bounding_sphere (const MeshBase &mesh, const processor_id_type pid)
 
libMesh::BoundingBox libMesh::MeshTools::create_subdomain_bounding_box (const MeshBase &mesh, const subdomain_id_type sid)
 
Sphere libMesh::MeshTools::subdomain_bounding_sphere (const MeshBase &mesh, const subdomain_id_type sid)
 
void libMesh::MeshTools::elem_types (const MeshBase &mesh, std::vector< ElemType > &et)
 Fills in a vector of all element types in the mesh. More...
 
dof_id_type libMesh::MeshTools::n_elem_of_type (const MeshBase &mesh, const ElemType type)
 
dof_id_type libMesh::MeshTools::n_active_elem_of_type (const MeshBase &mesh, const ElemType type)
 
dof_id_type libMesh::MeshTools::n_non_subactive_elem_of_type_at_level (const MeshBase &mesh, const ElemType type, const unsigned int level)
 
unsigned int libMesh::MeshTools::n_levels (const MeshBase &mesh)
 
unsigned int libMesh::MeshTools::n_local_levels (const MeshBase &mesh)
 
unsigned int libMesh::MeshTools::n_active_levels (const MeshBase &mesh)
 
unsigned int libMesh::MeshTools::n_active_local_levels (const MeshBase &mesh)
 
unsigned int libMesh::MeshTools::n_p_levels (const MeshBase &mesh)
 
unsigned int libMesh::MeshTools::paranoid_n_levels (const MeshBase &mesh)
 
void libMesh::MeshTools::get_not_subactive_node_ids (const MeshBase &mesh, std::set< dof_id_type > &not_subactive_node_ids)
 Builds a set of node IDs for nodes which belong to non-subactive elements. More...
 
dof_id_type libMesh::MeshTools::n_elem (const MeshBase::const_element_iterator &begin, const MeshBase::const_element_iterator &end)
 Count up the number of elements of a specific type (as defined by an iterator range). More...
 
dof_id_type libMesh::MeshTools::n_nodes (const MeshBase::const_node_iterator &begin, const MeshBase::const_node_iterator &end)
 Count up the number of nodes of a specific type (as defined by an iterator range). More...
 
unsigned int libMesh::MeshTools::max_level (const MeshBase &mesh)
 Find the maximum h-refinement level in a mesh. More...
 
void libMesh::MeshTools::find_nodal_neighbors (const MeshBase &mesh, const Node &n, const std::vector< std::vector< const Elem *>> &nodes_to_elem_map, std::vector< const Node *> &neighbors)
 Given a mesh and a node in the mesh, the vector will be filled with every node directly attached to the given one. More...
 
void libMesh::MeshTools::find_nodal_neighbors (const MeshBase &mesh, const Node &n, const std::unordered_map< dof_id_type, std::vector< const Elem *>> &nodes_to_elem_map, std::vector< const Node *> &neighbors)
 Given a mesh and a node in the mesh, the vector will be filled with every node directly attached to the given one. More...
 
void libMesh::MeshTools::find_hanging_nodes_and_parents (const MeshBase &mesh, std::map< dof_id_type, std::vector< dof_id_type >> &hanging_nodes)
 Given a mesh hanging_nodes will be filled with an associative array keyed off the global id of all the hanging nodes in the mesh. More...
 
void libMesh::MeshTools::correct_node_proc_ids (MeshBase &)
 Changes the processor ids on each node so be the same as the id of the lowest element touching that node. More...
 
void libMesh::MeshTools::clear_spline_nodes (MeshBase &)
 Remove spline node (for IsoGeometric Analysis meshes) elements and nodes and constraints from the mesh. More...
 
bool libMesh::MeshTools::valid_is_prepared (const MeshBase &mesh)
 A function for testing whether a mesh's cached is_prepared() setting is not a false positive. More...
 
void libMesh::MeshTools::Private::globally_renumber_nodes_and_elements (MeshBase &)
 There is no reason for a user to ever call this function. More...
 
void libMesh::MeshTools::libmesh_assert_equal_n_systems (const MeshBase &mesh)
 The following functions, only available in builds with NDEBUG undefined, are for asserting internal consistency that we hope should never be broken in opt. More...
 
void libMesh::MeshTools::libmesh_assert_old_dof_objects (const MeshBase &mesh)
 A function for testing that all non-recently-created DofObjects within a mesh have old_dof_object data. More...
 
void libMesh::MeshTools::libmesh_assert_valid_node_pointers (const MeshBase &mesh)
 A function for walking across the mesh to try and ferret out invalidated or misassigned pointers. More...
 
void libMesh::MeshTools::libmesh_assert_valid_remote_elems (const MeshBase &mesh)
 A function for verifying that active local elements' neighbors are never remote elements. More...
 
void libMesh::MeshTools::libmesh_assert_valid_elem_ids (const MeshBase &mesh)
 A function for verifying that ids and processor assignment of elements are correctly sorted (monotone increasing) More...
 
void libMesh::MeshTools::libmesh_assert_valid_amr_elem_ids (const MeshBase &mesh)
 A function for verifying that ids of elements are correctly sorted for AMR (parents have lower ids than children) More...
 
void libMesh::MeshTools::libmesh_assert_valid_amr_interior_parents (const MeshBase &mesh)
 A function for verifying that any interior_parent pointers on elements are consistent with AMR (parents' interior_parents are interior_parents' parents) More...
 
void libMesh::MeshTools::libmesh_assert_valid_constraint_rows (const MeshBase &mesh)
 A function for verifying that all mesh constraint rows express relations between nodes and elements that are semilocal (local or ghosted) to the current processor's portion of the mesh. More...
 
void libMesh::MeshTools::libmesh_assert_contiguous_dof_ids (const MeshBase &mesh, unsigned int sysnum)
 A function for verifying that degree of freedom indexes are contiguous on each processor, as is required by libMesh numeric classes. More...
 
template<typename DofObjectSubclass >
void libMesh::MeshTools::libmesh_assert_topology_consistent_procids (const MeshBase &mesh)
 A function for verifying that processor assignment is topologically consistent on nodes (each node part of an active element on its processor) or elements (each parent has the processor id of one of its children). More...
 
void libMesh::MeshTools::libmesh_assert_canonical_node_procids (const MeshBase &mesh)
 A function for verifying that processor assignment of nodes matches the heuristic specified in Node::choose_processor_id() More...
 
void libMesh::MeshTools::libmesh_assert_valid_refinement_tree (const MeshBase &mesh)
 A function for verifying that elements on this processor have valid descendants and consistent active flags. More...
 
void libMesh::MeshTools::libmesh_assert_no_links_to_elem (const MeshBase &mesh, const Elem *bad_elem)
 The following functions, only available in builds with DEBUG defined, typically have surprisingly slow asymptotic behavior, and so are unsuitable for use even with METHOD=devel. More...
 
void libMesh::MeshTools::libmesh_assert_equal_points (const MeshBase &mesh)
 A function for testing that node locations match across processors. More...
 
void libMesh::MeshTools::libmesh_assert_equal_connectivity (const MeshBase &mesh)
 A function for testing that element nodal connectivities match across processors. More...
 
void libMesh::MeshTools::libmesh_assert_connected_nodes (const MeshBase &mesh)
 A function for verifying that all nodes are connected to at least one element. More...
 
void libMesh::MeshTools::libmesh_assert_valid_boundary_ids (const MeshBase &mesh)
 A function for verifying that boundary condition ids match across processors. More...
 
void libMesh::MeshTools::libmesh_assert_valid_dof_ids (const MeshBase &mesh, unsigned int sysnum=libMesh::invalid_uint)
 A function for verifying that degree of freedom indexing matches across processors. More...
 
void libMesh::MeshTools::libmesh_assert_valid_unique_ids (const MeshBase &mesh)
 A function for verifying that unique ids match across processors. More...
 
void libMesh::MeshTools::libmesh_assert_consistent_distributed (const MeshBase &mesh)
 A function for verifying that distribution of dof objects is parallel consistent (every processor can see every node or element it owns) More...
 
void libMesh::MeshTools::libmesh_assert_consistent_distributed_nodes (const MeshBase &mesh)
 A function for verifying that distribution of nodes is parallel consistent (every processor can see every node it owns) even before node ids have been made consistent. More...
 
void libMesh::MeshTools::libmesh_assert_parallel_consistent_new_node_procids (const MeshBase &mesh)
 A function for verifying that processor assignment is parallel consistent (every processor agrees on the processor id of each node it can see) even on nodes which have not yet received consistent DofObject::id(), using element topology to identify matching nodes. More...
 
template<typename DofObjectSubclass >
void libMesh::MeshTools::libmesh_assert_parallel_consistent_procids (const MeshBase &mesh)
 A function for verifying that processor assignment is parallel consistent (every processor agrees on the processor id of each dof object it can see) More...
 
template<typename DofObjectSubclass >
void libMesh::MeshTools::libmesh_assert_valid_procids (const MeshBase &mesh)
 A function for verifying that processor assignment is both parallel and topologically consistent. More...
 
void libMesh::MeshTools::libmesh_assert_valid_refinement_flags (const MeshBase &mesh)
 A function for verifying that refinement flags on elements are consistent between processors. More...
 
void libMesh::MeshTools::libmesh_assert_valid_neighbors (const MeshBase &mesh, bool assert_valid_remote_elems=true)
 A function for verifying that neighbor connectivity is correct (each element is a neighbor of or descendant of a neighbor of its neighbors) and consistent (each neighbor link goes to either the same neighbor or to a RemoteElem on each processor) More...