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>
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
This is the base class from which all geometric element types are derived.
This is the MeshBase class.
virtual bool is_serial() const
This class defines an abstract interface for Mesh output.
An object whose state is distributed along a set of processors.
MeshIO class used for writing XDR (eXternal Data Representation) and XDA mesh files.
std::string & boundary_condition_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.
std::string _bc_file_name
void set_write_parallel(bool do_parallel=true)
Insist that we should/shouldn't write parallel files.
bool binary() const
Get/Set the flag indicating if we should read/write binary.
bool legacy() const
Get/Set the flag indicating if we should read/write legacy.
void read_serialized_edge_bcs(Xdr &io, T type_size)
Read the edge boundary conditions for a parallel, distributed mesh.
std::string & subdomain_map_file_name()
bool write_parallel() const
Report whether we should write parallel files.
bool version_at_least_1_3_0() const
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 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...
largest_id_type xdr_id_type
virtual ~XdrIO()
Destructor.
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.
bool version_at_least_1_8_0() const
void write_serialized_nodesets(Xdr &io, const new_header_id_type n_nodesets) const
Write the boundary conditions for a parallel, distributed mesh.
bool version_at_least_0_9_6() const
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 version_at_least_0_9_2() const
std::string _subdomain_map_file
void read_serialized_nodesets(Xdr &io, T type_size)
Read the nodeset conditions for a parallel, distributed mesh.
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.
std::string & polynomial_level_file_name()
const std::string & boundary_condition_file_name() const
Get/Set the boundary condition 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_shellface_bcs(Xdr &io, const new_header_id_type n_shellface_bcs) const
Write the "shell face" boundary conditions for a parallel, distributed mesh.
uint32_t old_header_id_type
std::string _partition_map_file
void read_serialized_shellface_bcs(Xdr &io, T type_size)
Read the "shell face" boundary conditions for a parallel, distributed mesh.
void read_serialized_subdomain_names(Xdr &io)
Read subdomain name information - NEW in 0.9.2 format.
const std::string & polynomial_level_file_name() const
Get/Set the polynomial degree file name.
const std::string & version() const
Get/Set the version string.
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 set_auto_parallel()
Insist that we should write parallel files if and only if the mesh is an already distributed Distribu...
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.
unsigned int _field_width
void write_serialized_subdomain_names(Xdr &io) const
Write subdomain name information - NEW in 0.9.2 format.
static const std::size_t io_blksize
Define the block size to use for chunked IO.
void read_serialized_side_bcs(Xdr &io, T type_size)
Read the side boundary conditions for a parallel, distributed mesh.
virtual void write(const std::string &) override
This method implements writing a mesh to a specified file.
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.
const std::string & partition_map_file_name() const
Get/Set the partitioning file name.
const std::string & subdomain_map_file_name() const
Get/Set the subdomain file name.
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.
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.
bool version_at_least_1_1_0() const
uint64_t new_header_id_type
std::string _p_level_file
std::string & partition_map_file_name()
virtual void read(const std::string &) override
This method implements reading a mesh from a specified file.
This class implements a C++ interface to the XDR (eXternal Data Representation) format.
The libMesh namespace provides an interface to certain functionality in the library.
const dof_id_type n_nodes