20 #ifndef LIBMESH_XDR_IO_H 21 #define LIBMESH_XDR_IO_H 25 #include "libmesh/libmesh.h" 26 #include "libmesh/mesh_input.h" 27 #include "libmesh/mesh_output.h" 28 #include "libmesh/parallel_object.h" 93 virtual void read (
const std::string &)
override;
98 virtual void write (
const std::string &)
override;
281 template <
typename T>
292 template <
typename T>
295 const std::vector<new_header_id_type> & meta_data,
302 const std::vector<new_header_id_type> & meta_data);
308 template <
typename T>
315 template <
typename T>
323 template <
typename T>
331 template <
typename T>
338 template <
typename T>
421 #endif // LIBMESH_XDR_IO_H void write_serialized_nodesets(Xdr &io, const new_header_id_type n_nodesets) const
Write the boundary conditions for a parallel, distributed mesh.
XdrIO(MeshBase &, const bool=false)
Constructor.
void read_serialized_nodes(Xdr &io, const dof_id_type n_nodes, const std::vector< new_header_id_type > &meta_data)
Read the nodal locations for a parallel, distributed mesh.
bool write_parallel() const
Report whether we should write parallel files.
bool version_at_least_0_9_6() const
void write_serialized_side_bcs(Xdr &io, const new_header_id_type n_side_bcs) const
Write the side boundary conditions for a parallel, distributed mesh.
void read_serialized_subdomain_names(Xdr &io)
Read subdomain name information - NEW in 0.9.2 format.
void read_serialized_bcs_helper(Xdr &io, T type_size, const std::string bc_type)
Helper function used in read_serialized_side_bcs, read_serialized_edge_bcs, and read_serialized_shell...
bool legacy() const
Get/Set the flag indicating if we should read/write legacy.
This is the base class from which all geometric element types are derived.
uint32_t old_header_id_type
void read_serialized_nodesets(Xdr &io, T type_size)
Read the nodeset conditions for a parallel, distributed mesh.
void write_serialized_subdomain_names(Xdr &io) const
Write subdomain name information - NEW in 0.9.2 format.
std::string & subdomain_map_file_name()
This class defines an abstract interface for Mesh output.
void read_serialized_side_bcs(Xdr &io, T type_size)
Read the side boundary conditions for a parallel, distributed mesh.
void read_serialized_shellface_bcs(Xdr &io, T type_size)
Read the "shell face" boundary conditions for a parallel, distributed mesh.
The libMesh namespace provides an interface to certain functionality in the library.
void write_serialized_nodes(Xdr &io, const dof_id_type n_nodes, const new_header_id_type n_node_integers) const
Write the nodal locations for a parallel, distributed mesh.
MeshIO class used for writing XDR (eXternal Data Representation) and XDA mesh files.
void read_serialized_bc_names(Xdr &io, BoundaryInfo &info, bool is_sideset)
Read boundary names information (sideset and nodeset) - NEW in 0.9.2 format.
This is the MeshBase class.
largest_id_type xdr_id_type
void read_serialized_edge_bcs(Xdr &io, T type_size)
Read the edge boundary conditions for a parallel, distributed mesh.
std::string _partition_map_file
virtual bool is_serial() const
const dof_id_type n_nodes
std::string & partition_map_file_name()
const std::string & boundary_condition_file_name() const
Get/Set the boundary condition file name.
void set_auto_parallel()
Insist that we should write parallel files if and only if the mesh is an already distributed Distribu...
bool version_at_least_1_3_0() const
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
const std::string & subdomain_map_file_name() const
Get/Set the subdomain file name.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
unsigned int _field_width
void set_write_parallel(bool do_parallel=true)
Insist that we should/shouldn't write parallel files.
std::string _bc_file_name
void read_header(Xdr &io, std::vector< T > &meta_data)
Read header information - templated to handle old (4-byte) or new (8-byte) header id types...
void write_serialized_bc_names(Xdr &io, const BoundaryInfo &info, bool is_sideset) const
Write boundary names information (sideset and nodeset) - NEW in 0.9.2 format.
bool version_at_least_1_1_0() const
An object whose state is distributed along a set of processors.
uint64_t new_header_id_type
This class implements a C++ interface to the XDR (eXternal Data Representation) format.
const std::string & partition_map_file_name() const
Get/Set the partitioning file name.
void write_serialized_connectivity(Xdr &io, const dof_id_type n_elem, const new_header_id_type n_elem_integers) const
Write the connectivity for a parallel, distributed mesh.
const std::string & version() const
Get/Set the version string.
const std::string & polynomial_level_file_name() const
Get/Set the polynomial degree file name.
static const std::size_t io_blksize
Define the block size to use for chunked IO.
std::string & polynomial_level_file_name()
std::string _subdomain_map_file
virtual ~XdrIO()
Destructor.
bool version_at_least_0_9_2() const
void pack_element(std::vector< xdr_id_type > &conn, const Elem *elem, const dof_id_type parent_id, const dof_id_type parent_pid, const new_header_id_type n_elem_integers) const
Pack an element into a transfer buffer for parallel communication.
void read_serialized_connectivity(Xdr &io, const dof_id_type n_elem, const std::vector< new_header_id_type > &meta_data, T type_size)
Read the connectivity for a parallel, distributed mesh.
void write_serialized_shellface_bcs(Xdr &io, const new_header_id_type n_shellface_bcs) const
Write the "shell face" boundary conditions for a parallel, distributed mesh.
bool binary() const
Get/Set the flag indicating if we should read/write binary.
void write_serialized_bcs_helper(Xdr &io, const new_header_id_type n_side_bcs, const std::string bc_type) const
Helper function used in write_serialized_side_bcs, write_serialized_edge_bcs, and write_serialized_sh...
void write_serialized_edge_bcs(Xdr &io, const new_header_id_type n_edge_bcs) const
Write the edge boundary conditions for a parallel, distributed mesh.
std::string _p_level_file
virtual void read(const std::string &) override
This method implements reading a mesh from a specified file.
std::string & boundary_condition_file_name()
bool version_at_least_1_8_0() const