21#include "libmesh/distributed_mesh.h"
24#include "libmesh/boundary_info.h"
25#include "libmesh/elem.h"
26#include "libmesh/libmesh_logging.h"
27#include "libmesh/mesh_communication.h"
28#include "libmesh/mesh_tools.h"
29#include "libmesh/partitioner.h"
30#include "libmesh/string_to_enum.h"
45 _is_serial_on_proc_0(true),
46 _deleted_coarse_elements(false),
47 _n_nodes(0), _n_elem(0), _max_node_id(0), _max_elem_id(0),
48 _next_free_local_node_id(this->processor_id()),
49 _next_free_local_elem_id(this->processor_id()),
50 _next_free_unpartitioned_node_id(this->n_processors()),
51 _next_free_unpartitioned_elem_id(this->n_processors())
52#ifdef LIBMESH_ENABLE_UNIQUE_ID
53 , _next_unpartitioned_unique_id(this->n_processors())
56#ifdef LIBMESH_ENABLE_UNIQUE_ID
60 const std::string default_partitioner =
"parmetis";
61 const std::string my_partitioner =
65 (Utility::string_to_enum<PartitionerType>(my_partitioner));
70 LOG_SCOPE(
"operator=(&&)",
"DistributedMesh");
93 *
this = std::move(cast_ref<DistributedMesh&>(other_mesh));
103 return "DistributedMesh class";
106#define CHECK_MEMBER(member_name) \
107 if (member_name != other_mesh.member_name) \
129 return "nodes and/or elements";
133 return "_extra_ghost_elems size";
140 return "_extra_ghost_elems entry";
168#ifdef LIBMESH_ENABLE_UNIQUE_ID
184 _is_serial_on_proc_0(other_mesh.is_serial_on_zero()),
185 _deleted_coarse_elements(true),
186 _n_nodes(0), _n_elem(0), _max_node_id(0), _max_elem_id(0),
187 _next_free_local_node_id(this->processor_id()),
188 _next_free_local_elem_id(this->processor_id()),
189 _next_free_unpartitioned_node_id(this->n_processors()),
190 _next_free_unpartitioned_elem_id(this->n_processors())
206 this_boundary_info = other_boundary_info;
230 if (!other_is_distributed_type)
233#ifdef LIBMESH_ENABLE_UNIQUE_ID
247 DistributedMesh & other_mesh = cast_ref<DistributedMesh&>(other_meshbase);
267 #ifdef LIBMESH_ENABLE_UNIQUE_ID
289#ifdef LIBMESH_ENABLE_UNIQUE_ID
338 parallel_object_only();
351#ifdef LIBMESH_ENABLE_UNIQUE_ID
366 parallel_object_only();
379 parallel_object_only();
392 for (; rit != rend; ++rit)
398 max_local = d->
id() + 1;
409#ifdef LIBMESH_ENABLE_UNIQUE_ID
413 parallel_object_only();
440 parallel_object_only();
453 parallel_object_only();
466 for (; rit != rend; ++rit)
472 max_local = d->
id() + 1;
493 libmesh_assert_equal_to (
_nodes[i]->
id(), i);
504 libmesh_assert_equal_to (
_nodes[i]->
id(), i);
514 if (
const auto it =
_nodes.find(i);
517 const Node * n = *it;
530 if (
auto it =
_nodes.find(i);
547 libmesh_assert_equal_to (
_elements[i]->
id(), i);
558 libmesh_assert_equal_to (
_elements[i]->
id(), i);
571 const Elem * e = *it;
665#ifdef LIBMESH_ENABLE_UNIQUE_ID
730#ifdef LIBMESH_ENABLE_UNIQUE_ID
831 if (old_id == new_id)
836 libmesh_assert_equal_to (el->
id(), old_id);
950#ifdef LIBMESH_ENABLE_UNIQUE_ID
1037 if (old_id == new_id)
1042 libmesh_assert_equal_to (nd->
id(), old_id);
1052#ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
1055 libmesh_assert_equal_to (*(
Point *)
_nodes[new_id],
1083 for (
auto & node :
_nodes)
1173template <
typename T>
1177 parallel_object_only();
1181 const dof_id_type pmax_id = std::max(pmax_node_id, pmax_elem_id);
1185 T * obj = objects[i];
1192 const dof_id_type dofid = obj && obj->valid_id() ?
1198 const dof_id_type procid = obj && obj->valid_processor_id() ?
1220#if defined(LIBMESH_ENABLE_UNIQUE_ID) && !defined(NDEBUG)
1242 parallel_object_only();
1263#if defined(LIBMESH_ENABLE_AMR) && !defined(NDEBUG)
1265 parallel_object_only();
1273 unsigned int refinement_flag = el ?
1275 unsigned int p_refinement_flag = el ?
1289template <
typename T>
1294 parallel_object_only();
1302 std::unordered_map<processor_id_type, dof_id_type>
1303 ghost_objects_from_proc;
1305 object_iterator it = objects.
begin();
1306 object_iterator end = objects.
end();
1314 it = objects.
erase(it);
1319 unpartitioned_objects++;
1321 ghost_objects_from_proc[obj_procid]++;
1328 std::vector<dof_id_type> objects_on_proc(this->
n_processors(), 0);
1329 auto this_it = ghost_objects_from_proc.find(this->
processor_id());
1331 ((this_it == ghost_objects_from_proc.end()) ?
1332 dof_id_type(0) : this_it->second, objects_on_proc);
1337 if (ghost_objects_from_proc.count(p))
1338 libmesh_assert_less_equal (ghost_objects_from_proc[p], objects_on_proc[p]);
1340 libmesh_assert_less_equal (0, objects_on_proc[p]);
1344 std::vector<dof_id_type> first_object_on_proc(this->
n_processors());
1346 first_object_on_proc[i] = first_object_on_proc[i-1] +
1347 objects_on_proc[i-1];
1352 unpartitioned_objects;
1358 std::map<processor_id_type, std::vector<dof_id_type>>
1363 auto ghost_end = ghost_objects_from_proc.end();
1367 if (
const auto p_it = ghost_objects_from_proc.find(p);
1369 requested_ids[p].reserve(p_it->second);
1372 end = objects.
end();
1373 for (it = objects.
begin(); it != end; ++it)
1379 obj->set_id(next_id++);
1381 requested_ids[obj->processor_id()].push_back(obj->id());
1386 auto gather_functor =
1390 &first_object_on_proc,
1395 std::vector<dof_id_type> & new_ids)
1397 std::size_t ids_size = ids.size();
1398 new_ids.resize(ids_size);
1400 for (std::size_t i=0; i != ids_size; ++i)
1402 T * obj = objects[ids[i]];
1404 libmesh_assert_equal_to (obj->processor_id(), this->processor_id());
1405 new_ids[i] = obj->id();
1407 libmesh_assert_greater_equal (new_ids[i],
1409 libmesh_assert_less (new_ids[i],
1415 auto action_functor =
1418 &first_object_on_proc,
1423 const std::vector<dof_id_type> & ids,
1424 const std::vector<dof_id_type> & data)
1429 T * obj = objects[ids[i]];
1431 libmesh_assert_equal_to (obj->processor_id(),
pid);
1432 libmesh_assert_greater_equal (data[i],
1433 first_object_on_proc[
pid]);
1434 libmesh_assert_less (data[i],
1435 first_object_on_proc[
pid] +
1436 objects_on_proc[
pid]);
1437 obj->set_id(data[i]);
1443 (this->
comm(), requested_ids, gather_functor, action_functor, ex);
1445#ifdef LIBMESH_ENABLE_UNIQUE_ID
1446 auto unique_gather_functor =
1453 std::vector<unique_id_type> & data)
1455 std::size_t ids_size = ids.size();
1456 data.resize(ids_size);
1458 for (std::size_t i=0; i != ids_size; ++i)
1460 T * obj = objects[ids[i]];
1462 libmesh_assert_equal_to (obj->processor_id(), this->processor_id());
1467 auto unique_action_functor =
1470 const std::vector<dof_id_type> & ids,
1471 const std::vector<unique_id_type> & data)
1475 T * obj = objects[ids[i]];
1477 libmesh_assert_equal_to (obj->processor_id(),
pid);
1479 obj->set_unique_id(data[i]);
1485 (this->
comm(), requested_ids, unique_gather_functor,
1486 unique_action_functor, unique_ex);
1492 next_id += objects_on_proc[i];
1493 for (it = objects.
begin(); it != end; ++it)
1499 obj->set_id(next_id++);
1504 it = objects.
begin();
1505 end = objects.
end();
1511 T * next = objects[obj->id()];
1525 libmesh_assert_not_equal_to (next->id(), obj->id());
1526 objects[obj->id()] = obj;
1528 next = objects[obj->id()];
1530 objects[obj->id()] = obj;
1536 it = objects.
erase(it);
1541 return first_free_id;
1547 parallel_object_only();
1556 LOG_SCOPE(
"renumber_nodes_and_elements()",
"DistributedMesh");
1567 std::set<dof_id_type> used_nodes;
1571 std::map<processor_id_type, std::map<dof_id_type, bool>>
1575 for (
auto & elem : this->element_ptr_range())
1576 for (
const Node & node : elem->node_ref_range())
1579 used_nodes.insert(n);
1585 auto & used_nodes_on_p = used_nodes_on_proc[p];
1587 used_nodes_on_p[n] =
true;
1589 if (!used_nodes_on_p.count(n))
1590 used_nodes_on_p[n] =
false;
1598 typedef unsigned char boolish;
1599 std::map<processor_id_type, std::vector<std::pair<dof_id_type, boolish>>>
1600 used_nodes_on_proc_vecs;
1601 for (
auto & [
pid, nodemap] : used_nodes_on_proc)
1602 used_nodes_on_proc_vecs[
pid].
assign(nodemap.begin(), nodemap.end());
1604 std::map<dof_id_type,processor_id_type> repartitioned_node_pids;
1605 std::map<processor_id_type, std::set<dof_id_type>>
1606 repartitioned_node_sets_to_push;
1608 auto ids_action_functor =
1609 [&used_nodes, &repartitioned_node_pids,
1610 &repartitioned_node_sets_to_push]
1612 const std::vector<std::pair<dof_id_type, boolish>> & ids_and_bools)
1614 for (
auto [n, sender_could_become_owner] : ids_and_bools)
1618 if (!used_nodes.count(n))
1620 if (
auto it = repartitioned_node_pids.find(n);
1621 sender_could_become_owner)
1623 if (it != repartitioned_node_pids.end() &&
1627 repartitioned_node_pids[n] =
pid;
1630 if (it == repartitioned_node_pids.end())
1631 repartitioned_node_pids[n] =
1634 repartitioned_node_sets_to_push[
pid].insert(n);
1643 (this->
comm(), used_nodes_on_proc_vecs, ids_action_functor);
1646 for (
auto & [n, p] : repartitioned_node_pids)
1649 libmesh_assert_equal_to(node.
processor_id(), this->processor_id());
1656 std::map<processor_id_type, std::vector<std::pair<dof_id_type,processor_id_type>>>
1657 repartitioned_node_vecs;
1659 for (
auto & [p, nodeset] : repartitioned_node_sets_to_push)
1661 auto & rn_vec = repartitioned_node_vecs[p];
1662 for (
auto n : nodeset)
1663 rn_vec.emplace_back(n, repartitioned_node_pids[n]);
1666 auto repartition_node_functor =
1669 const std::vector<std::pair<dof_id_type, processor_id_type>> & ids_and_pids)
1671 for (
auto [n, p] : ids_and_pids)
1681 (this->
comm(), repartitioned_node_vecs, repartition_node_functor);
1697 else if (!used_nodes.count(nd->
id()))
1743 libmesh_assert_equal_to (this->
max_node_id(), pmax_node_id);
1744 libmesh_assert_equal_to (this->
max_elem_id(), pmax_elem_id);
1765 for (
auto pr = this->
_nodes.begin(),
1766 end = this->_nodes.end(); pr != end; ++pr)
1773 libmesh_assert_equal_to(this->
node_ptr(
id), n);
1779 end = this->_elements.end(); pr != end; ++pr)
1786 libmesh_assert_equal_to(this->
elem_ptr(
id), e);
1795 parallel_object_only();
1799 static_cast<dof_id_type>(std::distance (this->active_local_elements_begin(),
1800 this->active_local_elements_end()));
1801 this->
comm().
sum(active_elements);
1809 return active_elements;
1831 libmesh_assert_equal_to (this->
max_node_id(), pmax_node_id);
1832 libmesh_assert_equal_to (this->
max_elem_id(), pmax_elem_id);
1846 while (e_it != e_end)
1854 while (n_it != n_end)
1856 n_it =
_nodes.erase(n_it);
1906 std::set<Elem *> tmp;
1909 std::inserter(tmp, tmp.begin()));
1928 libmesh_assert_equal_to (this->
max_node_id(), pmax_node_id);
1929 libmesh_assert_equal_to (this->
max_elem_id(), pmax_elem_id);
void max(const T &r, T &o, Request &req) const
void min(const T &r, T &o, Request &req) const
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
void regenerate_id_sets()
Clears and regenerates the cached sets of ids.
void remove(const Node *node)
Removes the boundary conditions associated with node node, if any exist.
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
virtual Elem * add_elem(Elem *e) override final
Add elem e to the end of the element array.
virtual void delete_elem(Elem *e) override final
Removes element e from the mesh.
dof_id_type parallel_max_node_id() const
virtual dof_id_type n_active_elem() const override final
virtual dof_id_type n_nodes() const override final
dof_id_type _n_nodes
Cached data from the last renumber_nodes_and_elements call.
virtual const Point & point(const dof_id_type i) const override final
virtual void redistribute() override
Redistribute elements between processors.
dof_id_type renumber_dof_objects(dofobject_container< T > &)
Renumber a parallel objects container.
virtual void fix_broken_node_and_element_numbering() override
There is no reason for a user to ever call this function.
virtual void clear() override
Clear all internal data.
void set_next_ids()
Derives _next_free_local_node_id, _next_free_local_elem_id, _next_free_unpartitioned_node_id,...
dof_id_type _next_free_unpartitioned_node_id
virtual void clear_extra_ghost_elems()
Clears extra ghost elements.
virtual void renumber_elem(dof_id_type old_id, dof_id_type new_id) override final
Changes the id of element old_id, both by changing elem(old_id)->id() and by moving elem(old_id) in t...
virtual const Elem * elem_ptr(const dof_id_type i) const override final
virtual void delete_node(Node *n) override final
Removes the Node n from the mesh.
virtual const Node * query_node_ptr(const dof_id_type i) const override final
void libmesh_assert_valid_parallel_flags() const
Verify refinement_flag and p_refinement_flag consistency of our elements containers.
void libmesh_assert_valid_parallel_p_levels() const
Verify p_level consistency of our elements containers.
void set_next_unique_ids(unique_id_type parallel_max_unique_id)
Derives _next_unique_id and _next_unpartitioned_unique_id from parallel_max_unique_id,...
std::set< Elem * > _extra_ghost_elems
These are extra ghost elements that we want to make sure not to delete when we call delete_remote_ele...
virtual void renumber_nodes_and_elements() override
Remove nullptr elements from arrays.
virtual dof_id_type parallel_n_elem() const override
virtual unique_id_type parallel_max_unique_id() const override
virtual dof_id_type max_node_id() const override final
virtual void set_next_unique_id(unique_id_type id) override
Sets the next available unique id to be used.
virtual bool is_serial() const override final
virtual Node * add_point(const Point &p, const dof_id_type id=DofObject::invalid_id, const processor_id_type proc_id=DofObject::invalid_processor_id) override final
functions for adding /deleting nodes elements.
virtual dof_id_type parallel_n_nodes() const override
const std::set< Elem * > & extra_ghost_elems() const
Const accessor to the ghosted elements.
dof_id_type _next_free_unpartitioned_elem_id
virtual Elem * insert_elem(Elem *e) override final
Insert elem e to the element array, preserving its id and replacing/deleting any existing element wit...
virtual std::string_view subclass_first_difference_from(const MeshBase &other_mesh_base) const override
Shim to allow operator == (&) to behave like a virtual function without having to be one.
DistributedMesh & operator=(const DistributedMesh &)=delete
Copy assignment is not allowed.
virtual dof_id_type max_elem_id() const override final
dofobject_container< Elem > _elements
The elements in the mesh.
processor_id_type pid unsigned int level std::set< subdomain_id_type > ss const DofMap &dof_map LIBMESH_COMMA unsigned int dof_map LIBMESH_COMMA var_num unsigned char rflag processor_id_type pid const DofMap &dof_map LIBMESH_COMMA unsigned int dof_map LIBMESH_COMMA var_num DECLARE_NODE_ITERATORS(multi_evaluable_, std::vector< const DofMap * > dof_maps, dof_maps) protected dofobject_container< Node > _nodes
Move node and elements from a DistributedMesh.
dof_id_type _next_free_local_elem_id
virtual void clear_elems() override
Clear internal Elem data.
virtual void update_post_partitioning() override
Recalculate cached data after elements and nodes have been repartitioned.
virtual ~DistributedMesh()
Destructor.
virtual bool is_serial_on_zero() const override final
dof_id_type parallel_max_elem_id() const
virtual void delete_remote_elements() override
Deletes all nonlocal elements of the mesh except for "ghosts" which touch a local element,...
dof_id_type _next_free_local_node_id
Guaranteed globally unused IDs for use when adding new nodes or elements.
virtual void add_extra_ghost_elem(Elem *e)
Inserts the element and adds it to a list of elements that should not get deleted or have their desce...
bool _is_serial
A boolean remembering whether we're serialized or not.
bool _deleted_coarse_elements
A boolean remembering whether we've recently deleted top-level elements or not.
DistributedMesh(const Parallel::Communicator &comm_in, unsigned char dim=1)
Constructor.
virtual void own_node(Node &n) override final
Takes ownership of node n on this partition of a distributed mesh, by setting n.processor_id() to thi...
virtual dof_id_type n_elem() const override final
virtual void update_parallel_id_counts() override
Updates parallel caches so that methods like n_elem() accurately reflect changes on other processors.
virtual void libmesh_assert_valid_parallel_ids() const override
Verify id and processor_id consistency of our elements and nodes containers.
virtual const Elem * query_elem_ptr(const dof_id_type i) const override final
unique_id_type _next_unpartitioned_unique_id
The next available unique id for assigning ids to unpartitioned DOF objects.
virtual void gather_to_zero() override
Gathers all elements and nodes of the mesh onto processor zero.
virtual void allgather() override
Gathers all elements and nodes of the mesh onto every processor.
virtual void renumber_node(dof_id_type old_id, dof_id_type new_id) override final
Changes the id of node old_id, both by changing node(old_id)->id() and by moving node(old_id) in the ...
void libmesh_assert_valid_parallel_object_ids(const dofobject_container< T > &) const
Verify id, processor_id, and if applicable unique_id consistency of a parallel objects container.
bool _is_serial_on_proc_0
A boolean remembering whether we're serialized to proc 0 or not.
virtual Node * add_node(Node *n) override final
Add Node n to the end of the vertex array.
virtual MeshBase & assign(MeshBase &&other_mesh) override
Shim to call the move assignment operator for this class.
virtual const Node * node_ptr(const dof_id_type i) const override final
virtual void clear() override
Free all new memory associated with the object, but restore its original state, with the mesh pointer...
The DofObject defines an abstract base class for objects that have degrees of freedom associated with...
processor_id_type processor_id() const
void add_extra_integers(const unsigned int n_integers)
Assigns a set of extra integers to this DofObject.
static constexpr dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
unique_id_type unique_id() const
static constexpr unique_id_type invalid_unique_id
An invalid unique_id to distinguish an uninitialized DofObject.
bool valid_unique_id() const
static constexpr processor_id_type invalid_processor_id
An invalid processor_id to distinguish DoFs that have not been assigned to a processor.
void set_unique_id(unique_id_type new_id)
Sets the unique_id for this DofObject.
This is the base class from which all geometric element types are derived.
RefinementState refinement_flag() const
const Elem * parent() const
void set_mapping_type(const ElemMappingType type)
Sets the value of the mapping type for the element.
unsigned int p_level() const
void set_mapping_data(const unsigned char data)
Sets the value of the mapping data for the element.
RefinementState p_refinement_flag() const
This is the MeshBase class.
void allow_remote_element_removal(bool allow)
If false is passed in then this mesh will no longer have remote elements deleted when being prepared ...
virtual const Node & node_ref(const dof_id_type i) const
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
Preparation preparation() const
bool allow_renumbering() const
virtual dof_id_type n_elem() const =0
bool skip_partitioning() const
bool allow_detect_interior_parents() const
void allow_find_neighbors(bool allow)
If false is passed then this mesh will no longer work to find element neighbors when being prepared f...
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use.
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map() const
virtual void redistribute()
Redistribute elements between processors.
virtual dof_id_type n_nodes() const =0
ElemMappingType default_mapping_type() const
Returns the default master space to physical space mapping basis functions to be used on newly added ...
std::vector< dof_id_type > _node_integer_default_values
The array of default initialization values for integer data associated with each node in the mesh.
unique_id_type _next_unique_id
The next available unique id for assigning ids to DOF objects.
bool _skip_renumber_nodes_and_elements
If this is true then renumbering will be kept to a minimum.
virtual dof_id_type max_node_id() const =0
dof_id_type n_unpartitioned_elem() const
virtual void update_post_partitioning()
Recalculate any cached data (or invalidate any caches that are computed on the fly) after elements an...
std::vector< std::string > _elem_integer_names
The array of names for integer data associated with each element in the mesh.
std::vector< dof_id_type > _elem_integer_default_values
The array of default initialization values for integer data associated with each element in the mesh.
dof_id_type n_local_elem() const
dof_id_type n_unpartitioned_nodes() const
virtual dof_id_type max_elem_id() const =0
virtual void clear()
Deletes all the element and node data that is currently stored.
dof_id_type n_local_nodes() const
constraint_rows_type _constraint_rows
std::unique_ptr< Partitioner > _partitioner
A partitioner to use at each prepare_for_use().
bool allow_remote_element_removal() const
bool allow_find_neighbors() const
dof_id_type _n_constraint_rows
unsigned char default_mapping_data() const
Returns any default data value used by the master space to physical space mapping.
void clear_point_locator()
Releases the current PointLocator object.
void copy_constraint_rows(const MeshBase &other_mesh)
Copy the constraints from the other mesh to this mesh.
std::vector< std::string > _node_integer_names
The array of names for integer data associated with each node in the mesh.
std::map< subdomain_id_type, std::string > & set_subdomain_name_map()
unique_id_type next_unique_id() const
dof_id_type count_constraint_rows()
Helper function for subclasses to use to set _n_constraint_rows.
Preparation _preparation
Flags indicating in what ways this mesh has been prepared.
void skip_partitioning(bool skip)
If true is passed in then nothing on this mesh will be (re)partitioned.
void allow_detect_interior_parents(bool allow)
If false is passed then this mesh will no longer work to detect interior parents when being prepared ...
bool nodes_and_elements_equal(const MeshBase &other_mesh) const
Tests for equality of all elements and nodes in the mesh.
void post_dofobject_moves(MeshBase &&other_mesh)
Moves any superclass data (e.g.
void clear_stored_ranges()
Clears stored ranges, to indicate that the mesh has changed and they should be regenerated when next ...
This is the MeshCommunication class.
void delete_remote_elements(DistributedMesh &, const std::set< Elem * > &) const
This method takes an input DistributedMesh which may be distributed among all the processors.
void redistribute(DistributedMesh &mesh, bool newly_coarsened_only=false) const
This method takes a parallel distributed mesh and redistributes the elements.
void allgather(MeshBase &mesh) const
This method takes an input DistributedMesh which may be distributed among all the processors.
void gather(const processor_id_type root_id, MeshBase &) const
This method takes an input DistributedMesh which may be distributed among all the processors.
A Node is like a Point, but with more information.
static std::unique_ptr< Node > build(const Node &n)
processor_id_type processor_id() const
const Parallel::Communicator & comm() const
processor_id_type n_processors() const
static std::unique_ptr< Partitioner > build(const PartitionerType solver_package)
Builds a Partitioner of the type specified by partitioner_type.
A Point defines a location in LIBMESH_DIM dimensional Real space.
The UnstructuredMesh class is derived from the MeshBase class.
virtual void copy_nodes_and_elements(const MeshBase &other_mesh, const bool skip_find_neighbors=false, dof_id_type element_id_offset=0, dof_id_type node_id_offset=0, unique_id_type unique_id_offset=0, std::unordered_map< subdomain_id_type, subdomain_id_type > *id_remapping=nullptr, const bool skip_preparation=false)
Deep copy of nodes and elements from another mesh object (used by subclass copy constructors and by m...
UnstructuredMesh & operator=(const UnstructuredMesh &)=delete
Copy assignment is not allowed.
virtual void find_neighbors(const bool reset_remote_elements=false, const bool reset_current_list=true, const bool assert_valid=true, const bool check_non_remote=true) override
Other functions from MeshBase requiring re-definition.
virtual void move_nodes_and_elements(MeshBase &&other_mesh)=0
Move node and elements from other_mesh to this mesh.
This mapvector templated class is intended to provide the performance characteristics of a std::map w...
void pull_parallel_vector_data(const Communicator &comm, const MapToVectors &queries, GatherFunctor &gather_data, const ActionFunctor &act_on_data, const datum *example)
void push_parallel_vector_data(const Communicator &comm, MapToVectors &&data, const ActionFunctor &act_on_data)
The libMesh namespace provides an interface to certain functionality in the library.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
T command_line_value(const std::string &, T)
uint8_t processor_id_type
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
bool has_removed_orphaned_nodes
bool has_removed_remote_elements
bool has_synched_id_counts
bool has_boundary_id_sets