libMesh::MeshSerializer Class Reference

#include <mesh_serializer.h>

Public Member Functions

 MeshSerializer (MeshBase &mesh, bool need_serial=true)
 ~MeshSerializer ()

Private Attributes

bool reparallelize

Detailed Description

Temporarily serialize a ParallelMesh for output; a distributed mesh is allgathered by the MeshSerializer constructor if need_serial is true, then remote elements are deleted again by the destructor.

Definition at line 38 of file mesh_serializer.h.

Constructor & Destructor Documentation

libMesh::MeshSerializer::MeshSerializer ( MeshBase mesh,
bool  need_serial = true 

Definition at line 27 of file mesh_serializer.C.

References _mesh, libMesh::MeshBase::allgather(), libMesh::ParallelObject::comm(), libMesh::MeshBase::is_serial(), libMesh::libmesh_parallel_only(), and reparallelize.

27  :
28  _mesh(mesh),
29  reparallelize(false)
30  {
32  if (need_serial && !_mesh.is_serial()) {
33  reparallelize = true;
34  _mesh.allgather();
35  }
36  }
libMesh::MeshSerializer::~MeshSerializer ( )

Definition at line 40 of file mesh_serializer.C.

References _mesh, libMesh::MeshBase::delete_remote_elements(), and reparallelize.

41  {
42  if (reparallelize)
44  }

Member Data Documentation

MeshBase& libMesh::MeshSerializer::_mesh

Definition at line 46 of file mesh_serializer.h.

Referenced by MeshSerializer(), and ~MeshSerializer().

bool libMesh::MeshSerializer::reparallelize

Definition at line 47 of file mesh_serializer.h.

Referenced by MeshSerializer(), and ~MeshSerializer().

The documentation for this class was generated from the following files:

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:27 UTC

Hosted By: Logo