49 #include <unordered_map> 50 #include <unordered_set> 60 if (nsplits % size == 0)
62 nchunks = nsplits / size;
63 first_chunk = libMesh::cast_int<libMesh::processor_id_type>(nchunks * rank);
70 nchunks = libMesh::cast_int<libMesh::processor_id_type>(nsplits / size + 1);
71 first_chunk = libMesh::cast_int<libMesh::processor_id_type>(nchunks * rank);
75 nchunks = nsplits / size;
77 first_chunk = libMesh::cast_int<libMesh::processor_id_type>
78 (
std::max((
int)((nchunks + 1) * (nsplits % size) + nchunks * (rank - nsplits % size)),
83 std::string extension(
const std::string & s)
85 auto pos = s.rfind(
".");
86 if (pos == std::string::npos)
88 return s.substr(pos, s.size() - pos);
93 return input_name +
"/" + std::to_string(n_procs);
99 return split_dir(input_name, n_procs) +
"/header" + extension(input_name);
103 split_file(
const std::string & input_name,
107 return split_dir(input_name, n_procs) +
"/split-" + std::to_string(n_procs) +
"-" +
108 std::to_string(proc_id) + extension(input_name);
115 if (ret != 0 && ret != -1)
117 "Failed to create mesh split directory '" << input_name <<
"': " << std::strerror(ret));
119 auto dir_name = split_dir(input_name, n_procs);
122 libmesh_warning(
"In CheckpointIO::write, directory '" 123 << dir_name <<
"' already exists, overwriting contents.");
126 "Failed to create mesh split directory '" << dir_name <<
"': " << std::strerror(ret));
148 auto cpr = libmesh_make_unique<CheckpointIO>(
mesh);
149 cpr->current_processor_ids().clear();
150 for (
processor_id_type i = my_first_chunk; i < my_first_chunk + my_num_chunks; i++)
151 cpr->current_processor_ids().push_back(i);
152 cpr->current_n_processors() = nsplits;
153 cpr->parallel() =
true;
166 _version (
"checkpoint-1.2"),
167 _my_processor_ids (1, processor_id()),
168 _my_n_processors (
mesh.is_replicated() ? 1 : n_processors())
177 _my_processor_ids (1, processor_id()),
178 _my_n_processors (
mesh.is_replicated() ? 1 : n_processors())
188 std::string header_name;
197 std::ifstream in (header_name.c_str());
201 header_name = header_file(input_name, 1);
202 std::ifstream in2 (header_name.c_str());
205 libmesh_error_msg(
"ERROR: cannot locate header file for input '" << input_name <<
"'");
213 std::string input_version;
214 io.
data(input_version);
228 input_n_procs = this->read_header<uint16_t>(header_name);
231 input_n_procs = this->read_header<uint32_t>(header_name);
234 input_n_procs = this->read_header<uint64_t>(header_name);
242 return cast_int<processor_id_type>(input_n_procs);
247 auto header = header_file(input_name, n_procs);
248 auto ret = std::remove(header.c_str());
250 libmesh_warning(
"Failed to clean up checkpoint header '" << header <<
"': " << std::strerror(ret));
254 auto split = split_file(input_name, n_procs, i);
255 ret = std::remove(
split.c_str());
257 libmesh_warning(
"Failed to clean up checkpoint split file '" <<
split <<
"': " << std::strerror(ret));
260 auto dir = split_dir(input_name, n_procs);
261 ret = rmdir(dir.c_str());
263 libmesh_warning(
"Failed to clean up checkpoint split dir '" << dir <<
"': " << std::strerror(ret));
267 rmdir(input_name.c_str());
272 LOG_SCOPE(
"write()",
"CheckpointIO");
286 std::string header_file_name = header_file(
name, use_n_procs);
287 make_dir(
name, use_n_procs);
300 io.
data(data_size,
"# integer size");
306 io.
data(mesh_dimension,
"# dimensions");
320 io.
data(n_procs,
"# n_procs");
336 std::vector<processor_id_type> ids_to_write;
340 std::unordered_map<processor_id_type, std::vector<Elem *>> elements_on_pid;
346 elements_on_pid[p].clear();
347 auto eop_end = elements_on_pid.end();
351 auto eop_it = elements_on_pid.find(p);
352 if (eop_it != eop_end)
353 eop_it->second.push_back(elem);
361 ids_to_write.push_back(0);
366 libmesh_error_msg(
"Cannot write serial checkpoint from distributed mesh");
372 std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>>
374 std::vector<std::tuple<dof_id_type, boundary_id_type>>
377 for (
const auto & my_pid : ids_to_write)
379 auto file_name = split_file(
name, use_n_procs, my_pid);
382 std::set<const Elem *, CompareElemIdsByLevel> elements;
405 const auto elements_vec_it = elements_on_pid.find(p);
406 if (elements_vec_it != elements_on_pid.end())
408 const auto & p_elements = elements_vec_it->second;
409 Elem *
const * elempp = p_elements.data();
410 Elem *
const * elemend = elempp + p_elements.size();
423 (
mesh, p, active_pid_elements_begin,
424 active_pid_elements_end, elements);
426 pid_elements_end, elements);
432 std::set<const Node *> connected_nodes;
445 this->
write_bcs (io, elements, bc_triples);
464 std::vector<largest_id_type> subdomain_ids; subdomain_ids.reserve(subdomain_map.size());
465 std::vector<std::string> subdomain_names; subdomain_names.reserve(subdomain_map.size());
471 for (
const auto & pr : subdomain_map)
472 if (!pr.second.empty())
475 subdomain_ids.push_back(pr.first);
476 subdomain_names.push_back(pr.second);
479 io.
data(n_subdomain_names,
"# subdomain id to name map");
481 if (n_subdomain_names)
483 io.
data(subdomain_ids);
484 io.
data(subdomain_names);
492 const std::set<const Node *> & nodeset)
const 496 io.
data(n_nodes_here,
"# n_nodes on proc");
499 std::vector<largest_id_type> id_pid(2);
502 std::vector<Real> coords(LIBMESH_DIM);
504 for (
const auto & node : nodeset)
506 id_pid[0] = node->id();
507 id_pid[1] = node->processor_id();
511 #ifdef LIBMESH_ENABLE_UNIQUE_ID 514 io.
data(unique_id,
"# unique id");
517 coords[0] = (*node)(0);
520 coords[1] = (*node)(1);
524 coords[2] = (*node)(2);
534 const std::set<const Elem *, CompareElemIdsByLevel> & elements)
const 540 std::vector<largest_id_type> elem_data(6);
541 std::vector<largest_id_type> conn_data;
545 io.
data(n_elems_here,
"# number of elements");
547 for (
const auto & elem : elements)
549 unsigned int n_nodes = elem->n_nodes();
551 elem_data[0] = elem->id();
552 elem_data[1] = elem->type();
553 elem_data[2] = elem->processor_id();
554 elem_data[3] = elem->subdomain_id();
556 #ifdef LIBMESH_ENABLE_AMR 557 if (elem->parent() !=
nullptr)
559 elem_data[4] = elem->parent()->id();
560 elem_data[5] = elem->parent()->which_child_am_i(elem);
571 for (
unsigned int i=0; i<
n_nodes; i++)
572 conn_data[i] = elem->node_id(i);
575 cast_int<unsigned int>(elem_data.size()),
576 cast_int<unsigned int>(elem_data.size()));
578 #ifdef LIBMESH_ENABLE_UNIQUE_ID 581 io.
data(unique_id,
"# unique id");
584 #ifdef LIBMESH_ENABLE_AMR 585 uint16_t p_level = cast_int<uint16_t>(elem->p_level());
586 io.
data(p_level,
"# p_level");
588 uint16_t rflag = elem->refinement_flag();
589 io.
data(rflag,
"# rflag");
591 uint16_t pflag = elem->p_refinement_flag();
592 io.
data(pflag,
"# pflag");
595 cast_int<unsigned int>(conn_data.size()),
596 cast_int<unsigned int>(conn_data.size()));
602 const std::set<const Elem *, CompareElemIdsByLevel> & elements)
const 607 std::vector<largest_id_type> elem_ids, parent_ids;
608 std::vector<uint16_t> elem_sides, child_numbers;
610 for (
const auto & elem : elements)
612 for (
auto n : elem->side_index_range())
616 (neigh && !elements.count(neigh)))
618 elem_ids.push_back(elem->id());
619 elem_sides.push_back(n);
623 #ifdef LIBMESH_ENABLE_AMR 624 if (elem->has_children())
626 for (
unsigned short c = 0,
627 nc = cast_int<unsigned short>(elem->n_children());
632 (child && !elements.count(child)))
634 parent_ids.push_back(elem->id());
635 child_numbers.push_back(c);
642 io.
data(elem_ids,
"# remote neighbor elem_ids");
643 io.
data(elem_sides,
"# remote neighbor elem_sides");
644 io.
data(parent_ids,
"# remote child parent_ids");
645 io.
data(child_numbers,
"# remote child_numbers");
651 const std::set<const Elem *, CompareElemIdsByLevel> & elements,
652 const std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> & bc_triples)
const 657 std::size_t bc_size = bc_triples.size();
659 std::vector<largest_id_type> element_id_list;
660 std::vector<uint16_t> side_list;
661 std::vector<largest_id_type> bc_id_list;
663 element_id_list.reserve(bc_size);
664 side_list.reserve(bc_size);
665 bc_id_list.reserve(bc_size);
667 std::unordered_set<dof_id_type> elems;
668 for (
auto & e : elements)
669 elems.insert(e->id());
671 for (
const auto & t : bc_triples)
672 if (elems.count(std::get<0>(t)))
674 element_id_list.push_back(std::get<0>(t));
675 side_list.push_back(std::get<1>(t));
676 bc_id_list.push_back(std::get<2>(t));
680 io.
data(element_id_list,
"# element ids for bcs");
681 io.
data(side_list,
"# sides of elements for bcs");
682 io.
data(bc_id_list,
"# bc ids");
688 const std::set<const Node *> & nodeset,
689 const std::vector<std::tuple<dof_id_type, boundary_id_type>> & bc_tuples)
const 697 std::size_t nodeset_size = bc_tuples.size();
699 std::vector<largest_id_type> node_id_list;
700 std::vector<largest_id_type> bc_id_list;
702 node_id_list.reserve(nodeset_size);
703 bc_id_list.reserve(nodeset_size);
705 for (
const auto & t : bc_tuples)
708 node_id_list.push_back(std::get<0>(t));
709 bc_id_list.push_back(std::get<1>(t));
712 io.
data(node_id_list,
"# node id list");
713 io.
data(bc_id_list,
"# nodeset bc id list");
720 const std::map<boundary_id_type, std::string> & boundary_map = is_sideset ?
723 std::vector<largest_id_type> boundary_ids; boundary_ids.reserve(boundary_map.size());
724 std::vector<std::string> boundary_names; boundary_names.reserve(boundary_map.size());
730 for (
const auto & pr : boundary_map)
731 if (!pr.second.empty())
734 boundary_ids.push_back(pr.first);
735 boundary_names.push_back(pr.second);
739 io.
data(n_boundary_names,
"# sideset id to name map");
741 io.
data(n_boundary_names,
"# nodeset id to name map");
743 if (n_boundary_names)
745 io.
data(boundary_ids);
746 io.
data(boundary_names);
752 LOG_SCOPE(
"read()",
"CheckpointIO");
760 auto header_name = header_file(input_name, input_n_procs);
761 bool input_parallel = input_n_procs > 0;
780 proc_id = cast_int<processor_id_type>(proc_id + stride))
782 auto file_name = split_file(input_name, input_n_procs, proc_id);
785 std::ifstream in (file_name.c_str());
788 libmesh_error_msg(
"ERROR: cannot locate specified file:\n\t" << file_name);
794 const bool expect_all_remote =
802 this->read_subfile<uint16_t>(io, expect_all_remote);
805 this->read_subfile<uint32_t>(io, expect_all_remote);
808 this->read_subfile<uint64_t>(io, expect_all_remote);
829 template <
typename file_
id_type>
835 uint16_t mesh_dimension;
838 uint16_t input_parallel;
839 file_id_type input_n_procs;
847 std::string input_version;
848 io.
data(input_version);
855 io.
data (mesh_dimension);
858 io.
data(input_parallel);
862 io.
data(input_n_procs);
865 this->read_subdomain_names<file_id_type>(io);
870 this->read_bc_names<file_id_type>(io, boundary_info,
true);
871 this->read_bc_names<file_id_type>(io, boundary_info,
false);
885 std::map<subdomain_id_type, std::string> & subdomain_map =
893 return input_parallel ? input_n_procs : 0;
898 template <
typename file_
id_type>
902 this->read_nodes<file_id_type> (io);
905 this->read_connectivity<file_id_type> (io);
908 this->read_remote_elem<file_id_type> (io, expect_all_remote);
911 this->read_bcs<file_id_type> (io);
914 this->read_nodesets<file_id_type> (io);
919 template <
typename file_
id_type>
924 std::map<subdomain_id_type, std::string> & subdomain_map =
927 std::vector<file_id_type> subdomain_ids;
928 subdomain_ids.reserve(subdomain_map.size());
930 std::vector<std::string> subdomain_names;
931 subdomain_names.reserve(subdomain_map.size());
933 file_id_type n_subdomain_names = 0;
934 io.
data(n_subdomain_names,
"# subdomain id to name map");
936 if (n_subdomain_names)
938 io.
data(subdomain_ids);
939 io.
data(subdomain_names);
942 subdomain_map[cast_int<subdomain_id_type>(subdomain_ids[i])] =
949 template <
typename file_
id_type>
955 file_id_type n_nodes_here;
956 io.
data(n_nodes_here,
"# n_nodes on proc");
959 std::vector<file_id_type> id_pid(2);
962 std::vector<Real> coords(LIBMESH_DIM);
964 for (
unsigned int i=0; i<n_nodes_here; i++)
968 #ifdef LIBMESH_ENABLE_UNIQUE_ID 969 file_id_type unique_id = 0;
970 io.
data(unique_id,
"# unique id");
973 io.
data_stream(coords.data(), LIBMESH_DIM, LIBMESH_DIM);
986 const dof_id_type id = cast_int<dof_id_type>(id_pid[0]);
1001 libmesh_assert_equal_to(pid, old_node->processor_id());
1002 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1003 libmesh_assert_equal_to(unique_id, old_node->unique_id());
1008 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1013 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1022 template <
typename file_
id_type>
1028 file_id_type n_elems_here;
1029 io.
data(n_elems_here);
1032 unsigned int highest_elem_dim = 1;
1037 bool file_is_broken =
false;
1039 for (
unsigned int i=0; i<n_elems_here; i++)
1042 std::vector<file_id_type> elem_data(6);
1044 (elem_data.data(), cast_int<unsigned int>(elem_data.size()),
1045 cast_int<unsigned int>(elem_data.size()));
1047 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1048 file_id_type unique_id = 0;
1049 io.
data(unique_id,
"# unique id");
1052 #ifdef LIBMESH_ENABLE_AMR 1053 uint16_t p_level = 0;
1054 io.
data(p_level,
"# p_level");
1056 uint16_t rflag, pflag;
1057 io.
data(rflag,
"# rflag");
1058 io.
data(pflag,
"# pflag");
1064 std::vector<file_id_type> conn_data(
n_nodes);
1066 (conn_data.data(), cast_int<unsigned int>(conn_data.size()),
1067 cast_int<unsigned int>(conn_data.size()));
1070 cast_int<dof_id_type> (elem_data[0]);
1072 static_cast<ElemType> (elem_data[1]);
1074 cast_int<processor_id_type>
1077 cast_int<subdomain_id_type>(elem_data[3]);
1081 if (i == 0 && elem_data[4] == 65535)
1082 file_is_broken =
true;
1089 (file_is_broken && elem_data[4] == 65535)) ?
1090 nullptr :
mesh.
elem_ptr(cast_int<dof_id_type>(elem_data[4]));
1091 const unsigned short int child_num =
1093 (file_is_broken && elem_data[5] == 65535)) ?
1094 static_cast<unsigned short>(-1) :
1095 cast_int<unsigned short>(elem_data[5]);
1098 libmesh_assert_equal_to
1099 (child_num, static_cast<unsigned short>(-1));
1111 libmesh_assert_equal_to(elem_type, old_elem->
type());
1112 libmesh_assert_equal_to(proc_id, old_elem->
processor_id());
1113 libmesh_assert_equal_to(subdomain_id, old_elem->
subdomain_id());
1115 libmesh_assert_equal_to(parent, old_elem->
parent());
1117 libmesh_assert(!old_elem->
parent());
1119 libmesh_assert_equal_to(old_elem->
n_nodes(), conn_data.size());
1121 for (
unsigned int n=0,
1122 n_conn = cast_int<unsigned int>(conn_data.size());
1124 libmesh_assert_equal_to
1126 cast_int<dof_id_type>(conn_data[n]));
1133 #ifdef LIBMESH_ENABLE_UNIQUE_ID 1137 if (elem->
dim() > highest_elem_dim)
1138 highest_elem_dim = elem->
dim();
1144 #ifdef LIBMESH_ENABLE_AMR 1159 libmesh_assert(elem->
n_nodes() == conn_data.size());
1162 for (
unsigned int n=0,
1163 n_conn = cast_int<unsigned int>(conn_data.size());
1176 template <
typename file_
id_type>
1183 std::vector<file_id_type> elem_ids;
1184 std::vector<uint16_t> elem_sides;
1186 io.
data(elem_ids,
"# remote neighbor elem_ids");
1187 io.
data(elem_sides,
"# remote neighbor elem_sides");
1189 libmesh_assert_equal_to(elem_ids.size(), elem_sides.size());
1198 libmesh_assert(!expect_all_remote);
1202 std::vector<file_id_type> parent_ids;
1203 std::vector<uint16_t> child_numbers;
1205 io.
data(parent_ids,
"# remote child parent_ids");
1206 io.
data(child_numbers,
"# remote child_numbers");
1208 #ifdef LIBMESH_ENABLE_AMR 1223 libmesh_assert(!expect_all_remote);
1230 template <
typename file_
id_type>
1239 std::vector<file_id_type> element_id_list;
1240 std::vector<uint16_t> side_list;
1241 std::vector<file_id_type> bc_id_list;
1243 io.
data(element_id_list,
"# element ids for bcs");
1244 io.
data(side_list,
"# sides of elements for bcs");
1245 io.
data(bc_id_list,
"# bc ids");
1249 (cast_int<dof_id_type>(element_id_list[i]), side_list[i],
1250 cast_int<boundary_id_type>(bc_id_list[i]));
1255 template <
typename file_
id_type>
1264 std::vector<file_id_type> node_id_list;
1265 std::vector<file_id_type> bc_id_list;
1267 io.
data(node_id_list,
"# node id list");
1268 io.
data(bc_id_list,
"# nodeset bc id list");
1272 (cast_int<dof_id_type>(node_id_list[i]),
1273 cast_int<boundary_id_type>(bc_id_list[i]));
1278 template <
typename file_
id_type>
1281 std::map<boundary_id_type, std::string> & boundary_map = is_sideset ?
1284 std::vector<file_id_type> boundary_ids;
1285 std::vector<std::string> boundary_names;
1287 file_id_type n_boundary_names = 0;
1290 io.
data(n_boundary_names,
"# sideset id to name map");
1292 io.
data(n_boundary_names,
"# nodeset id to name map");
1294 if (n_boundary_names)
1296 io.
data(boundary_ids);
1297 io.
data(boundary_names);
1302 boundary_map[cast_int<boundary_id_type>(boundary_ids[i])] =
std::string name(const ElemQuality q)
void data(T &a, const char *comment="")
unique_id_type & set_unique_id()
virtual void write(const std::string &name) override
const Elem * parent() const
virtual Node *& set_node(const unsigned int i)
A geometric point in (x,y,z) space associated with a DOF.
void write_remote_elem(Xdr &io, const std::set< const Elem *, CompareElemIdsByLevel > &elements) const
void write_connectivity(Xdr &io, const std::set< const Elem *, CompareElemIdsByLevel > &elements) const
processor_id_type size() const
virtual void read(const std::string &input_name) override
const std::map< boundary_id_type, std::string > & get_sideset_name_map() const
The base class for all geometric element types.
IntRange< std::size_t > index_range(const std::vector< T > &vec)
uint8_t processor_id_type
void add_child(Elem *elem)
void set_refinement_flag(const RefinementState rflag)
const Parallel::Communicator & comm() const
int mkdir(const char *pathname)
void write_bcs(Xdr &io, const std::set< const Elem *, CompareElemIdsByLevel > &elements, const std::vector< std::tuple< dof_id_type, unsigned short int, boundary_id_type >> &bc_triples) const
void read_bc_names(Xdr &io, BoundaryInfo &info, bool is_sideset)
void read_remote_elem(Xdr &io, bool expect_all_remote)
const BoundaryInfo & get_boundary_info() const
unsigned int n_active_levels_in(MeshBase::const_element_iterator begin, MeshBase::const_element_iterator end) const
long double max(long double a, double b)
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)=0
static const unsigned int type_to_n_nodes_map[INVALID_ELEM]
processor_id_type select_split_config(const std::string &input_name, header_id_type &data_size)
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
virtual void set_distributed()
virtual void partition(const unsigned int n_parts)
virtual element_iterator elements_begin()=0
std::vector< processor_id_type > _my_processor_ids
std::map< boundary_id_type, std::string > & set_sideset_name_map()
processor_id_type n_processors() const
virtual bool is_serial() const
void build_node_list(std::vector< dof_id_type > &node_id_list, std::vector< boundary_id_type > &bc_id_list) const
void add_node(const Node *node, const boundary_id_type id)
const dof_id_type n_nodes
const std::map< boundary_id_type, std::string > & get_nodeset_name_map() const
void reconnect_nodes(const std::set< const Elem *, CompareElemIdsByLevel > &connected_elements, std::set< const Node *> &connected_nodes)
virtual SimpleRange< element_iterator > element_ptr_range()=0
const std::map< subdomain_id_type, std::string > & get_subdomain_name_map() const
processor_id_type rank() const
void write_subdomain_names(Xdr &io) const
virtual unsigned int n_nodes() const =0
static const processor_id_type invalid_processor_id
processor_id_type _my_n_processors
virtual Elem * add_elem(Elem *e)=0
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
void connect_families(std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
virtual element_iterator elements_end()=0
virtual const Node * query_node_ptr(const dof_id_type i) const =0
CheckpointIO(MeshBase &, const bool=false)
Used by the Mesh to keep track of boundary nodes and elements.
SimpleRange< I > as_range(const std::pair< I, I > &p)
static void cleanup(const std::string &input_name, processor_id_type n_procs)
void write_bc_names(Xdr &io, const BoundaryInfo &info, bool is_sideset) const
void set_mesh_dimension(unsigned char d)
std::map< subdomain_id_type, std::string > & set_subdomain_name_map()
void set_neighbor(const unsigned int i, Elem *n)
An object whose state is distributed along a set of processors.
file_id_type read_header(const std::string &name)
C++ interface for the XDR (eXternal Data Representation) format.
virtual const Elem * elem_ptr(const dof_id_type i) const =0
void query_ghosting_functors(const MeshBase &mesh, processor_id_type pid, MeshBase::const_element_iterator elem_it, MeshBase::const_element_iterator elem_end, std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
void read_subdomain_names(Xdr &io)
void write_nodesets(Xdr &io, const std::set< const Node *> &nodeset, const std::vector< std::tuple< dof_id_type, boundary_id_type >> &bc_tuples) const
const Elem * neighbor_ptr(unsigned int i) const
std::unique_ptr< CheckpointIO > split_mesh(MeshBase &mesh, processor_id_type nsplits)
const Elem * raw_child_ptr(unsigned int i) const
void read_subfile(Xdr &io, bool expect_all_remote)
virtual const Elem * query_elem_ptr(const dof_id_type i) const =0
subdomain_id_type subdomain_id() const
void read_nodesets(Xdr &io)
virtual unsigned short dim() const =0
std::map< boundary_id_type, std::string > & set_nodeset_name_map()
virtual bool is_replicated() const
void broadcast(MeshBase &) const
void add_side(const dof_id_type elem, const unsigned short int side, const boundary_id_type id)
virtual const Elem & elem_ref(const dof_id_type i) const
unsigned int mesh_dimension() const
void write_nodes(Xdr &io, const std::set< const Node *> &nodeset) const
void set_p_refinement_flag(const RefinementState pflag)
void connect_children(const MeshBase &mesh, MeshBase::const_element_iterator elem_it, MeshBase::const_element_iterator elem_end, std::set< const Elem *, CompareElemIdsByLevel > &connected_elements)
virtual dof_id_type n_elem() const =0
virtual const Node * node_ptr(const dof_id_type i) const =0
processor_id_type processor_id() const
void read_connectivity(Xdr &io)
void data_stream(T *val, const unsigned int len, const unsigned int line_break=libMesh::invalid_uint)
void hack_p_level(const unsigned int p)
processor_id_type processor_id() const
virtual ElemType type() const =0
A geometric point in (x,y,z) space.
dof_id_type node_id(const unsigned int i) const
void broadcast(T &data, const unsigned int root_id=0) const
const Elem * child_ptr(unsigned int i) const
const RemoteElem * remote_elem