45 struct CompareGlobalIdxMappings
49 bool operator()(
const std::pair<unsigned int, unsigned int> & a,
50 const std::pair<unsigned int, unsigned int> & b)
const 51 {
return a.first < b.first; }
55 bool operator()(
const std::pair<unsigned int, unsigned int> & a,
56 const unsigned int b)
const 57 {
return a.first < b; }
65 inline unsigned int to_uint (
const T & t )
67 libmesh_assert_equal_to (t, static_cast<T>(static_cast<unsigned int>(t)));
69 return static_cast<unsigned int>(t);
74 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) && !defined(NDEBUG) 75 inline bool global_idx_mapping_equality (
const std::pair<unsigned int, unsigned int> & a,
76 const std::pair<unsigned int, unsigned int> & b)
78 return a.first == b.first;
89 #
if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API)
98 #
if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API)
104 _allow_empty_variables(false)
122 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 147 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 163 LOG_SCOPE (
"read()",
"Nemesis_IO");
166 parallel_object_only();
176 std::string nemesis_filename =
nemhelper->construct_nemesis_filename(base_filename);
179 libMesh::out <<
"Opening file: " << nemesis_filename << std::endl;
182 nemhelper->open(nemesis_filename.c_str(),
true);
213 libmesh_error_msg(
"ERROR: there should be no external nodes in an element-based partitioning!");
215 libmesh_assert_equal_to (
nemhelper->num_nodes,
219 libmesh_assert_equal_to (
nemhelper->num_elem,
253 libmesh_assert_equal_to (to_uint(
nemhelper->num_node_cmaps),
nemhelper->node_cmap_node_cnts.size());
254 libmesh_assert_equal_to (to_uint(
nemhelper->num_node_cmaps),
nemhelper->node_cmap_node_ids.size());
255 libmesh_assert_equal_to (to_uint(
nemhelper->num_node_cmaps),
nemhelper->node_cmap_proc_ids.size());
263 std::vector<unsigned char> pid_send_partner (this->
n_processors(), 0);
269 for (
unsigned int cmap=0; cmap<to_uint(
nemhelper->num_node_cmaps); cmap++)
271 libmesh_assert_less (to_uint(
nemhelper->node_cmap_ids[cmap]), this->n_processors());
273 pid_send_partner[
nemhelper->node_cmap_ids[cmap]] = 1;
278 const std::vector<unsigned char> pid_recv_partner (pid_send_partner);
282 libmesh_assert (pid_send_partner == pid_recv_partner);
290 std::vector<processor_id_type> node_ownership (
nemhelper->num_internal_nodes +
292 this->processor_id());
295 std::map<unsigned int, unsigned int> pid_to_cmap_map;
298 for (
unsigned int cmap=0; cmap<to_uint(
nemhelper->num_node_cmaps); cmap++)
301 libmesh_assert_equal_to (to_uint(
nemhelper->node_cmap_node_cnts[cmap]),
302 nemhelper->node_cmap_node_ids[cmap].size());
304 libmesh_assert_equal_to (to_uint(
nemhelper->node_cmap_node_cnts[cmap]),
305 nemhelper->node_cmap_proc_ids[cmap].size());
310 cast_int<processor_id_type>(
nemhelper->node_cmap_ids[cmap]);
312 libmesh_assert_less (adjcnt_pid_idx, this->
n_processors());
313 libmesh_assert_not_equal_to (adjcnt_pid_idx, this->
processor_id());
316 libmesh_assert (!pid_to_cmap_map.count(adjcnt_pid_idx));
318 pid_to_cmap_map[adjcnt_pid_idx] = cmap;
324 libmesh_assert_equal_to
326 cast_int<processor_id_type>(
nemhelper->node_cmap_proc_ids[cmap][
idx]));
329 const unsigned int local_node_idx =
nemhelper->node_cmap_node_ids[cmap][
idx]-1;
331 libmesh_assert_less (local_node_idx, node_ownership.size());
335 node_ownership[local_node_idx] =
336 std::min(node_ownership[local_node_idx], adjcnt_pid_idx);
342 unsigned int num_nodes_i_must_number = 0;
344 for (std::size_t
idx=0;
idx<node_ownership.size();
idx++)
346 num_nodes_i_must_number++;
349 libmesh_assert_greater_equal (num_nodes_i_must_number, to_uint(
nemhelper->num_internal_nodes));
350 libmesh_assert (num_nodes_i_must_number <= to_uint(
nemhelper->num_internal_nodes +
354 <<
"num_nodes_i_must_number=" 355 << num_nodes_i_must_number
362 std::vector<int> all_loadbal_data ( 8 );
363 all_loadbal_data[0] =
nemhelper->num_internal_nodes;
364 all_loadbal_data[1] =
nemhelper->num_border_nodes;
365 all_loadbal_data[2] =
nemhelper->num_external_nodes;
366 all_loadbal_data[3] =
nemhelper->num_internal_elems;
367 all_loadbal_data[4] =
nemhelper->num_border_elems;
368 all_loadbal_data[5] =
nemhelper->num_node_cmaps;
369 all_loadbal_data[6] =
nemhelper->num_elem_cmaps;
370 all_loadbal_data[7] = num_nodes_i_must_number;
380 std::vector<std::vector<int>>
381 needed_node_idxs (
nemhelper->num_node_cmaps);
383 std::vector<Parallel::Request>
384 needed_nodes_requests (
nemhelper->num_node_cmaps);
386 for (
unsigned int cmap=0; cmap<to_uint(
nemhelper->num_node_cmaps); cmap++)
392 needed_node_idxs[cmap].reserve (
nemhelper->node_cmap_node_cnts[cmap]);
394 const unsigned int adjcnt_pid_idx =
nemhelper->node_cmap_ids[cmap];
400 local_node_idx =
nemhelper->node_cmap_node_ids[cmap][
idx]-1,
401 owning_pid_idx = node_ownership[local_node_idx];
404 if (owning_pid_idx == adjcnt_pid_idx)
407 global_node_idx =
nemhelper->node_num_map[local_node_idx]-1;
408 needed_node_idxs[cmap].push_back(global_node_idx);
413 needed_node_idxs[cmap],
414 needed_nodes_requests[cmap],
422 std::vector<unsigned int>
425 for (
unsigned int pid=0; pid<this->
n_processors(); pid++)
426 all_num_nodes_i_must_number[pid] = all_loadbal_data[8*pid + 7];
429 libmesh_assert (std::accumulate(all_num_nodes_i_must_number.begin(),
430 all_num_nodes_i_must_number.end(),
433 unsigned int my_next_node = 0;
434 for (
unsigned int pid=0; pid<this->
processor_id(); pid++)
435 my_next_node += all_num_nodes_i_must_number[pid];
437 const unsigned int my_node_offset = my_next_node;
447 for (
unsigned int i=0; i<to_uint(
nemhelper->num_internal_nodes); ++i)
449 const unsigned int local_node_idx =
nemhelper->node_mapi[i]-1;
451 const unsigned int owning_pid_idx = node_ownership[local_node_idx];
455 libmesh_assert_equal_to (owning_pid_idx, this->
processor_id());
456 libmesh_assert_less (my_next_node, to_uint(
nemhelper->num_nodes_global));
465 this->processor_id());
468 if (added_node->
id() != my_next_node)
471 <<
", but we wanted ID " << my_next_node << std::endl;
476 nemhelper->node_num_map[local_node_idx] = my_next_node++;
484 typedef std::vector<std::pair<unsigned int, unsigned int>> global_idx_mapping_type;
485 global_idx_mapping_type old_global_to_new_global_map;
486 old_global_to_new_global_map.reserve (num_nodes_i_must_number
489 CompareGlobalIdxMappings global_idx_mapping_comp;
491 for (
unsigned int i=0; i<to_uint(
nemhelper->num_border_nodes); ++i)
494 local_node_idx =
nemhelper->node_mapb[i]-1,
495 owning_pid_idx = node_ownership[local_node_idx];
501 global_node_idx =
nemhelper->node_num_map[local_node_idx]-1;
505 old_global_to_new_global_map.push_back(std::make_pair(global_node_idx,
515 this->processor_id());
518 if (added_node->
id() != my_next_node)
521 <<
", but we wanted ID " << my_next_node << std::endl;
526 nemhelper->node_num_map[local_node_idx] = my_next_node++;
530 libmesh_assert_equal_to (num_nodes_i_must_number, (my_next_node - my_node_offset));
533 std::sort (old_global_to_new_global_map.begin(),
534 old_global_to_new_global_map.end(),
535 global_idx_mapping_comp);
538 libmesh_assert (std::unique (old_global_to_new_global_map.begin(),
539 old_global_to_new_global_map.end(),
540 global_idx_mapping_equality) ==
541 old_global_to_new_global_map.end());
545 std::map<unsigned int, std::vector<int>> requested_node_idxs;
547 std::vector<Parallel::Request> requested_nodes_requests(
nemhelper->num_node_cmaps);
556 std::vector<bool> processed_cmap (
nemhelper->num_node_cmaps,
false);
558 for (
unsigned int comm_step=0; comm_step<2*to_uint(
nemhelper->num_node_cmaps); comm_step++)
565 requesting_pid_idx =
status.source(),
566 source_pid_idx =
status.source();
569 libmesh_assert (pid_to_cmap_map.count(requesting_pid_idx));
572 const unsigned int cmap = pid_to_cmap_map[source_pid_idx];
574 if (!processed_cmap[cmap])
576 processed_cmap[cmap] =
true;
579 libmesh_assert (!requested_node_idxs.count(requesting_pid_idx));
583 std::vector<int> & xfer_buf (requested_node_idxs[requesting_pid_idx]);
586 this->
comm().
receive (requesting_pid_idx, xfer_buf, nodes_tag);
589 for (std::size_t i=0; i<xfer_buf.size(); i++)
592 const unsigned int old_global_node_idx = xfer_buf[i];
597 const global_idx_mapping_type::const_iterator it =
598 std::lower_bound (old_global_to_new_global_map.begin(),
599 old_global_to_new_global_map.end(),
601 global_idx_mapping_comp);
603 libmesh_assert (it != old_global_to_new_global_map.end());
604 libmesh_assert_equal_to (it->first, old_global_node_idx);
605 libmesh_assert_greater_equal (it->second, my_node_offset);
606 libmesh_assert_less (it->second, my_next_node);
609 xfer_buf[i] = it->second;
613 this->
comm().
send (requesting_pid_idx,
615 requested_nodes_requests[cmap],
630 libmesh_assert (needed_nodes_requests[cmap].test());
631 libmesh_assert_equal_to (to_uint(
nemhelper->node_cmap_ids[cmap]), source_pid_idx);
635 needed_node_idxs[cmap],
638 libmesh_assert_less_equal (needed_node_idxs[cmap].size(),
639 nemhelper->node_cmap_node_ids[cmap].size());
641 for (std::size_t i=0, j=0; i<
nemhelper->node_cmap_node_ids[cmap].size(); i++)
644 local_node_idx =
nemhelper->node_cmap_node_ids[cmap][i]-1,
645 owning_pid_idx = node_ownership[local_node_idx];
649 if (owning_pid_idx == source_pid_idx)
651 libmesh_assert_less (j, needed_node_idxs[cmap].size());
654 global_node_idx = needed_node_idxs[cmap][j++];
662 cast_int<dof_id_type>(global_node_idx),
663 cast_int<processor_id_type>(source_pid_idx));
666 if (added_node->
id() != global_node_idx)
669 <<
", but we wanted ID " << global_node_idx << std::endl;
674 nemhelper->node_num_map[local_node_idx] = global_node_idx;
686 libmesh_assert_equal_to ((my_next_node - my_node_offset), to_uint(
nemhelper->num_nodes));
708 requested_node_idxs.clear();
736 int sum_internal_elems=0, sum_border_elems=0;
737 for (
unsigned int j=3,c=0; c<this->
n_processors(); j+=8,++c)
738 sum_internal_elems += all_loadbal_data[j];
740 for (
unsigned int j=4,c=0; c<this->
n_processors(); j+=8,++c)
741 sum_border_elems += all_loadbal_data[j];
746 libMesh::out <<
"sum_internal_elems=" << sum_internal_elems << std::endl;
749 libMesh::out <<
"sum_border_elems=" << sum_border_elems << std::endl;
752 libmesh_assert_equal_to (sum_internal_elems+sum_border_elems,
nemhelper->num_elems_global);
768 unsigned int my_next_elem = 0;
769 for (
unsigned int pid=0; pid<this->
processor_id(); ++pid)
770 my_next_elem += (all_loadbal_data[8*pid + 3]+
771 all_loadbal_data[8*pid + 4]);
772 const unsigned int my_elem_offset = my_next_elem;
776 <<
"my_elem_offset=" << my_elem_offset << std::endl;
814 for (
unsigned int i=0; i<to_uint(
nemhelper->num_elem_blk); i++)
826 if (!
nemhelper->num_elem_this_blk)
continue;
830 cast_int<subdomain_id_type>(
nemhelper->block_ids[i]);
833 const std::string type_str (
nemhelper->elem_type.data() );
839 libMesh::out <<
"Reading a block of " << type_str <<
" elements." << std::endl;
842 for (
unsigned int j=0; j<to_uint(
nemhelper->num_elem_this_blk); j++)
845 libmesh_assert (elem);
853 elem->
set_id() = my_next_elem++;
854 #ifdef LIBMESH_ENABLE_UNIQUE_ID 869 if (elem->
id() != my_next_elem-1)
870 libmesh_error_msg(
"Unexpected ID " \
872 <<
" set by parallel mesh. (expecting " \
879 <<
"Setting nodes for Elem " << elem->
id() << std::endl;
881 for (
unsigned int k=0; k<to_uint(
nemhelper->num_nodes_per_elem); k++)
885 conv.get_node_map(k)),
886 local_node_idx =
nemhelper->connect[gi]-1,
887 global_node_idx =
nemhelper->node_num_map[local_node_idx];
895 libmesh_assert_equal_to ((my_next_elem - my_elem_offset), to_uint(
nemhelper->num_elem));
906 unsigned char max_dim_seen = 0;
909 max_dim_seen =
static_cast<unsigned char>(i);
914 this->
comm().
max(max_dim_seen);
920 <<
"max_dim_seen=" << +max_dim_seen << std::endl;
928 libmesh_error_msg(
"Cannot open dimension " \
930 <<
" mesh file when configured without " \
942 <<
"Read global sideset parameter information." << std::endl;
946 <<
"Number of global sideset IDs: " <<
nemhelper->global_sideset_ids.size() << std::endl;
963 <<
"nemhelper->num_side_sets = " <<
nemhelper->num_side_sets << std::endl;
966 <<
"nemhelper->num_elem_all_sidesets = " <<
nemhelper->num_elem_all_sidesets << std::endl;
971 for (
const auto & pr :
nemhelper->id_to_ss_names)
972 libMesh::out <<
"(" << pr.first <<
"," << pr.second <<
") ";
983 int sum_num_global_side_counts = std::accumulate(
nemhelper->num_global_side_counts.begin(),
988 int sum_num_elem_all_sidesets =
nemhelper->num_elem_all_sidesets;
989 this->
comm().
sum(sum_num_elem_all_sidesets);
991 if (sum_num_global_side_counts != sum_num_elem_all_sidesets)
992 libmesh_error_msg(
"Error! global side count reported by Nemesis does not " \
993 <<
"match the side count reported by the individual files!");
1000 for (
int offset=0, i=0; i<
nemhelper->num_side_sets; i++)
1002 offset += (i > 0 ?
nemhelper->num_sides_per_set[i-1] : 0);
1035 for (std::size_t e=0; e<
nemhelper->elem_list.size(); e++)
1060 cast_int<boundary_id_type>(
nemhelper->id_list[e]));
1070 if (nbcs !=
nemhelper->elem_list.size())
1071 libmesh_error_msg(
"[" << this->
processor_id() <<
"] " \
1072 <<
"BoundaryInfo contains " \
1074 <<
" boundary conditions, while the Exodus file had " \
1092 for (
const auto & pr :
nemhelper->id_to_ns_names)
1093 libMesh::out <<
"(" << pr.first <<
"," << pr.second <<
") ";
1107 for (
int nodeset=0; nodeset<
nemhelper->num_node_sets; nodeset++)
1110 int nodeset_id =
nemhelper->nodeset_ids[nodeset];
1115 libMesh::out <<
"nemhelper->nodeset_ids[" << nodeset <<
"]=" << nodeset_id << std::endl;
1122 for (std::size_t node=0; node<
nemhelper->node_list.size(); node++)
1126 libmesh_error_msg(
"Error, index is past the end of node_num_map array!");
1135 <<
"nodeset " << nodeset
1136 <<
", local node number: " <<
nemhelper->node_list[node]-1
1137 <<
", global node id: " << global_node_id
1143 (cast_int<dof_id_type>(global_node_id),
1144 cast_int<boundary_id_type>(nodeset_id));
1179 libmesh_error_msg(
"ERROR, Nemesis API is not defined!");
1182 #endif // #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1188 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1196 std::string nemesis_filename =
nemhelper->construct_nemesis_filename(base_filename);
1203 libmesh_warning(
"Warning: Appending in Nemesis_IO::write() does not make sense.\n" 1204 "Creating a new file instead!");
1232 libmesh_warning(
"Warning: Mesh contains edge boundary IDs, but these " 1233 "are not supported by the Nemesis format.");
1240 libmesh_error_msg(
"ERROR, Nemesis API is not defined!");
1243 #endif // #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1246 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1256 nemhelper->write_timestep(timestep, time);
1266 libmesh_error_msg(
"ERROR, Nemesis API is not defined!");
1269 #endif // #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1273 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1276 const std::vector<std::string> & names)
1280 std::string nemesis_filename =
nemhelper->construct_nemesis_filename(fname);
1289 nemhelper->open(nemesis_filename.c_str(),
false);
1306 libmesh_warning(
"Warning: Mesh contains edge boundary IDs, but these " 1307 "are not supported by the ExodusII format.");
1315 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 1316 std::vector<std::string> complex_names =
nemhelper->get_complex_names(names);
1317 nemhelper->initialize_nodal_variables(complex_names);
1319 nemhelper->initialize_nodal_variables(names);
1326 const std::vector<std::string> &)
1328 libmesh_error_msg(
"ERROR, Nemesis API is not defined.");
1335 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1339 const std::vector<std::string> & names)
1341 LOG_SCOPE(
"write_nodal_data(parallel)",
"Nemesis_IO");
1346 std::vector<std::string> output_names;
1351 output_names = names;
1364 const std::vector<std::string> &)
1366 libmesh_error_msg(
"ERROR, Nemesis API is not defined.");
1373 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1378 libmesh_error_msg(
"ERROR, Nemesis file must be initialized before outputting elemental variables.");
1381 std::vector<std::string> names;
1387 std::vector<std::string> monomials;
1395 for (
const auto & var : monomials)
1397 names.push_back(var);
1403 std::unique_ptr<NumericVector<Number>> parallel_soln =
1412 libMesh::out <<
"No CONSTANT, MONOMIAL data to be written." << std::endl;
1419 std::vector<std::set<subdomain_id_type>> vars_active_subdomains;
1429 nemhelper->initialize_element_variables(names, vars_active_subdomains);
1440 vars_active_subdomains);
1447 libmesh_not_implemented();
1454 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1457 const std::vector<Number> & soln,
1458 const std::vector<std::string> & names)
1460 LOG_SCOPE(
"write_nodal_data(serialized)",
"Nemesis_IO");
1470 const std::vector<Number> &,
1471 const std::vector<std::string> &)
1473 libmesh_error_msg(
"ERROR, Nemesis API is not defined.");
1481 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1484 const std::vector<std::string> & names)
1487 libmesh_error_msg(
"ERROR, Nemesis file must be initialized before outputting global variables.");
1489 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 1491 std::vector<std::string> complex_names =
nemhelper->get_complex_names(names);
1493 nemhelper->initialize_global_variables(complex_names);
1495 unsigned int num_values = soln.size();
1496 unsigned int num_vars = names.size();
1497 unsigned int num_elems = num_values / num_vars;
1501 std::vector<Real> complex_soln(3*num_values);
1503 for (
unsigned i=0; i<num_vars; ++i)
1505 for (
unsigned int j=0; j<num_elems; ++j)
1508 complex_soln[3*i*num_elems + j] =
value.real();
1510 for (
unsigned int j=0; j<num_elems; ++j)
1513 complex_soln[3*i*num_elems + num_elems +j] =
value.imag();
1515 for (
unsigned int j=0; j<num_elems; ++j)
1518 complex_soln[3*i*num_elems + 2*num_elems + j] =
std::abs(
value);
1527 nemhelper->initialize_global_variables( names );
1537 const std::vector<std::string> &)
1539 libmesh_error_msg(
"ERROR, Nemesis API is not defined.");
1542 #endif // #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1546 #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) 1551 libmesh_error_msg(
"ERROR, Nemesis file must be initialized before outputting information records.");
1554 nemhelper->write_information_records( records );
1562 libmesh_error_msg(
"ERROR, Nemesis API is not defined.");
1565 #endif // #if defined(LIBMESH_HAVE_EXODUS_API) && defined(LIBMESH_HAVE_NEMESIS_API) Manages the family, order, etc. parameters for a given FE.
std::size_t n_boundary_conds() const
void send(const unsigned int dest_processor_id, const T &buf, const MessageTag &tag=no_tag) const
void wait(std::vector< Request > &r)
unique_id_type & set_unique_id()
Manages multiples systems of equations.
void make_node_unique_ids_parallel_consistent(MeshBase &)
void build_variable_names(std::vector< std::string > &var_names, const FEType *type=nullptr, const std::set< std::string > *system_names=nullptr) const
virtual Node *& set_node(const unsigned int i)
A geometric point in (x,y,z) space associated with a DOF.
virtual void read(const std::string &base_filename) override
const unsigned int any_source
virtual void write_equation_systems(const std::string &, const EquationSystems &, const std::set< std::string > *system_names=nullptr)
std::size_t n_edge_conds() const
std::unique_ptr< NumericVector< Number > > build_parallel_elemental_solution_vector(std::vector< std::string > &names) const
Handles reading and writing of Exodus binary files.
void deallocate(std::vector< T > &vec)
void allgather(const T &send, std::vector< T, A > &recv) const
if(!eq) SETERRQ2(((PetscObject) dm) -> comm, PETSC_ERR_ARG_WRONG, "DM of type %s, not of type %s",((PetscObject) dm) ->type, DMLIBMESH)
The base class for all geometric element types.
uint8_t processor_id_type
ExodusII_IO_Helper::Conversion assign_conversion(std::string type_str)
void write_information_records(const std::vector< std::string > &)
void alltoall(std::vector< T, A > &r) const
const Parallel::Communicator & comm() const
MessageTag get_unique_tag(int tagvalue) const
const BoundaryInfo & get_boundary_info() const
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
void get_vars_active_subdomains(const std::vector< std::string > &names, std::vector< std::set< subdomain_id_type >> &vars_active_subdomains) const
processor_id_type n_processors() const
virtual bool is_serial() const
void add_node(const Node *node, const boundary_id_type id)
void write_timestep(const std::string &fname, const EquationSystems &es, const int timestep, const Real time)
void prepare_to_write_nodal_data(const std::string &fname, const std::vector< std::string > &names)
virtual Elem * add_elem(Elem *e)=0
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
void write_element_data(const EquationSystems &es)
OStreamProxy err(std::cerr)
void set_mesh_dimension(unsigned char d)
virtual dof_id_type parallel_n_nodes() const =0
bool _allow_empty_variables
An object whose state is distributed along a set of processors.
virtual void read(const std::string &name) override
virtual dof_id_type parallel_n_elem() const =0
void gather_neighboring_elements(DistributedMesh &) const
virtual void write_nodal_data(const std::string &fname, const std::vector< Number > &soln, const std::vector< std::string > &names) override
virtual const Elem * elem_ptr(const dof_id_type i) const =0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
virtual unsigned short dim() const =0
void write_global_data(const std::vector< Number > &, const std::vector< std::string > &)
void add_side(const dof_id_type elem, const unsigned short int side, const boundary_id_type id)
Status receive(const unsigned int dest_processor_id, T &buf, const MessageTag &tag=any_tag) const
unsigned int mesh_dimension() const
virtual void write(const std::string &base_filename) override
EXODUS_EXPORT int ex_update(int exoid)
std::unique_ptr< Nemesis_IO_Helper > nemhelper
virtual void delete_remote_elements()
void set_output_variables(const std::vector< std::string > &output_variables, bool allow_empty=true)
virtual void update_post_partitioning()
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
Nemesis_IO(MeshBase &mesh, bool single_precision=false)
OStreamProxy out(std::cout)
processor_id_type processor_id() const
virtual ElemType type() const =0
long double min(long double a, double b)
A geometric point in (x,y,z) space.
void verbose(bool set_verbosity)
std::vector< std::string > _output_variables
virtual dof_id_type n_nodes() const =0
int get_side_map(int i) const