DOLFIN
DOLFIN C++ interface
Classes | Public Member Functions | Public Attributes | List of all members
dolfin::LocalMeshData Class Reference

This class stores mesh data on a local processor corresponding to a portion of a (larger) global mesh. More...

#include <LocalMeshData.h>

Inheritance diagram for dolfin::LocalMeshData:
Inheritance graph
[legend]
Collaboration diagram for dolfin::LocalMeshData:
Collaboration graph
[legend]

Classes

struct  Geometry
 Holder for geometry data. More...
 
struct  Topology
 Holder for topology data. More...
 

Public Member Functions

 LocalMeshData (const MPI_Comm mpi_comm)
 Create empty local mesh data.
 
 LocalMeshData (const Mesh &mesh)
 Create local mesh data for given mesh.
 
 ~LocalMeshData ()
 Destructor.
 
void check () const
 
std::string str (bool verbose) const
 Return informal string representation (pretty-print)
 
void clear ()
 Clear all data.
 
void extract_mesh_data (const Mesh &mesh)
 Copy data from mesh.
 
void broadcast_mesh_data (const MPI_Comm mpi_comm)
 
void receive_mesh_data (const MPI_Comm mpi_comm)
 Receive mesh data from main process.
 
void reorder ()
 Reorder cell data.
 
MPI_Comm mpi_comm () const
 Return MPI communicator.
 
- Public Member Functions inherited from dolfin::Variable
 Variable ()
 Create unnamed variable.
 
 Variable (const std::string name, const std::string label)
 Create variable with given name and label.
 
 Variable (const Variable &variable)
 Copy constructor.
 
virtual ~Variable ()
 Destructor.
 
const Variableoperator= (const Variable &variable)
 Assignment operator.
 
void rename (const std::string name, const std::string label)
 Rename variable.
 
std::string name () const
 Return name.
 
std::string label () const
 Return label (description)
 
std::size_t id () const
 

Public Attributes

Geometry geometry
 Geometry data.
 
Topology topology
 Holder for topology data.
 
std::map< std::size_t, std::vector< std::pair< std::pair< std::size_t, std::size_t >, std::size_t > > > domain_data
 Mesh domain data [dim](line, (cell_index, local_index, value))
 
- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

This class stores mesh data on a local processor corresponding to a portion of a (larger) global mesh.

Note that the data stored in this class does typically not correspond to a topologically connected mesh; it merely stores a list of vertex coordinates, a list of cell-vertex mappings and a list of global vertex numbers for the locally stored vertices.

It is typically used for parsing meshes in parallel from mesh XML files. After local mesh data has been parsed on each processor, a subsequent repartitioning takes place: first a geometric partitioning of the vertices followed by a redistribution of vertex and cell data, and then a topological partitioning again followed by redistribution of vertex and cell data, at that point corresponding to topologically connected meshes instead of local mesh data.

Member Function Documentation

◆ broadcast_mesh_data()

void LocalMeshData::broadcast_mesh_data ( const MPI_Comm  mpi_comm)

Broadcast mesh data from main process (used when Mesh is created on one process)

◆ check()

void LocalMeshData::check ( ) const

Check that all essential data has been initialized, and throw error if there is a problem


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