Go to the documentation of this file.
20 #ifndef LIBMESH_CHECKPOINT_IO_H
21 #define LIBMESH_CHECKPOINT_IO_H
25 #include "libmesh/compare_elems_by_level.h"
26 #include "libmesh/mesh_input.h"
27 #include "libmesh/mesh_output.h"
28 #include "libmesh/parallel_object.h"
102 virtual void read (
const std::string & input_name)
override;
117 virtual void write (
const std::string &
name)
override;
208 const std::set<const Elem *, CompareElemIdsByLevel> & elements)
const;
214 const std::set<const Elem *, CompareElemIdsByLevel> & elements)
const;
220 const std::set<const Node *> & nodeset)
const;
226 const std::set<const Elem *, CompareElemIdsByLevel> & elements,
227 const std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> & bc_triples)
const;
233 const std::set<const Node *> & nodeset,
234 const std::vector<std::tuple<dof_id_type, boundary_id_type>> & bc_tuples)
const;
250 template <
typename file_
id_type>
256 template <
typename file_
id_type>
262 template <
typename file_
id_type>
268 template <
typename file_
id_type>
278 template <
typename file_
id_type>
284 template <
typename file_
id_type>
290 template <
typename file_
id_type>
296 template <
typename file_
id_type>
302 template <
typename file_
id_type>
308 template <
typename file_
id_type>
311 std::vector<std::string> & node_integer_names,
312 std::vector<std::string> & elem_integer_names);
341 #endif // LIBMESH_CHECKPOINT_IO_H
processor_id_type select_split_config(const std::string &input_name, header_id_type &data_size)
void read_bcs(Xdr &io)
Read the boundary conditions for a parallel, distributed mesh.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
processor_id_type & current_n_processors()
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
Write the nodal boundary conditions for part of a mesh.
bool parallel() const
Get/Set the flag indicating if we should read/write binary.
std::vector< processor_id_type > _my_processor_ids
The libMesh namespace provides an interface to certain functionality in the library.
This class implements a C++ interface to the XDR (eXternal Data Representation) format.
const std::string & version() const
Get/Set the version string.
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end.
void write_bc_names(Xdr &io, const BoundaryInfo &info, bool is_sideset) const
Write boundary names information (sideset and nodeset)
largest_id_type xdr_id_type
void read_subdomain_names(Xdr &io)
Read subdomain name information.
static void cleanup(const std::string &input_name, processor_id_type n_procs)
Used to remove a checkpoint directory and its corresponding files.
This is the MeshBase class.
void write_nodes(Xdr &io, const std::set< const Node * > &nodeset) const
Write the nodal locations for part of a mesh.
void read_nodes(Xdr &io)
Read the nodal locations for a parallel, distributed mesh.
uint8_t processor_id_type
bool binary() const
Get/Set the flag indicating if we should read/write binary.
bool version_at_least_1_5() const
std::unique_ptr< CheckpointIO > split_mesh(MeshBase &mesh, processor_id_type nsplits)
split_mesh takes the given initialized/opened mesh and partitions it into nsplits pieces or chunks.
void read_connectivity(Xdr &io)
Read the connectivity for a parallel, distributed mesh.
void read_bc_names(Xdr &io, BoundaryInfo &info, bool is_sideset)
Read boundary names information (sideset and nodeset)
unsigned int n_active_levels_in(MeshBase::const_element_iterator begin, MeshBase::const_element_iterator end) const
virtual ~CheckpointIO()
Destructor.
void read_nodesets(Xdr &io)
Read the nodeset conditions for a parallel, distributed mesh.
The definition of the const_element_iterator struct.
virtual void read(const std::string &input_name) override
This method implements reading a mesh from a specified file.
void read_remote_elem(Xdr &io, bool expect_all_remote)
Read the remote_elem neighbor and child links for a parallel, distributed mesh.
void write_remote_elem(Xdr &io, const std::set< const Elem *, CompareElemIdsByLevel > &elements) const
Write the remote_elem neighbor and child links for part of a mesh.
const processor_id_type & current_n_processors() const
Get/Set the n_processors to use.
const std::vector< processor_id_type > & current_processor_ids() const
Get/Set the processor id or processor ids to use.
CheckpointIO(MeshBase &, const bool=false)
Constructor.
std::vector< processor_id_type > & current_processor_ids()
This class defines an abstract interface for Mesh output.
void write_subdomain_names(Xdr &io) const
Write subdomain name information.
processor_id_type _my_n_processors
file_id_type read_header(const std::string &name)
Read header data on processor 0, then broadcast.
virtual void write(const std::string &name) override
This method implements writing a mesh to a specified file.
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
Write the side boundary conditions for part of a mesh.
void write_connectivity(Xdr &io, const std::set< const Elem *, CompareElemIdsByLevel > &elements) const
Write the connectivity for part of a mesh.
An object whose state is distributed along a set of processors.
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
The CheckpointIO class can be used to write simplified restart files that can be used to restart simu...
void read_subfile(Xdr &io, bool expect_all_remote)
Read a non-header file.
void read_integers_names(Xdr &io, std::vector< std::string > &node_integer_names, std::vector< std::string > &elem_integer_names)
Read extra integers names information.