OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
communicator.hpp File Reference

MPI communicator wrapper class. More...

#include <memory>
#include <mpi.h>
Include dependency graph for communicator.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pfc::mpi::communicator
 

Detailed Description

MPI communicator wrapper class.

This header provides the communicator class, which wraps MPI_Comm for safe, RAII-style MPI communicator management.

The communicator class:

  • Wraps MPI_Comm in a std::shared_ptr for automatic cleanup
  • Provides rank() and size() convenience methods
  • Supports implicit conversion to MPI_Comm for use with MPI functions
int rank = comm.rank();
int size = comm.size();
MPI_Barrier(comm); // Implicit conversion
Definition communicator.hpp:42
MPI communicator wrapper class.
See also
mpi/environment.hpp for MPI initialization
mpi.hpp for top-level MPI utilities
Author
OpenPFC Development Team
Date
2025