MFEM  v4.2.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::GroupTopology Class Reference

#include <communication.hpp>

Public Member Functions

 GroupTopology ()
 Constructor with the MPI communicator = 0. More...
 
 GroupTopology (MPI_Comm comm)
 Constructor given the MPI communicator 'comm'. More...
 
 GroupTopology (const GroupTopology &gt)
 Copy constructor. More...
 
void SetComm (MPI_Comm comm)
 Set the MPI communicator to 'comm'. More...
 
MPI_Comm GetComm () const
 Return the MPI communicator. More...
 
int MyRank () const
 Return the MPI rank within this object's communicator. More...
 
int NRanks () const
 Return the number of MPI ranks within this object's communicator. More...
 
void Create (ListOfIntegerSets &groups, int mpitag)
 Set up the group topology given the list of sets of shared entities. More...
 
int NGroups () const
 Return the number of groups. More...
 
int GetNumNeighbors () const
 Return the number of neighbors including the local processor. More...
 
int GetNeighborRank (int i) const
 Return the MPI rank of neighbor 'i'. More...
 
bool IAmMaster (int g) const
 Return true if I am master for group 'g'. More...
 
int GetGroupMaster (int g) const
 Return the neighbor index of the group master for a given group. Neighbor 0 is the local processor. More...
 
int GetGroupMasterRank (int g) const
 Return the rank of the group master for group 'g'. More...
 
int GetGroupMasterGroup (int g) const
 Return the group number in the master for group 'g'. More...
 
int GetGroupSize (int g) const
 Get the number of processors in a group. More...
 
const int * GetGroup (int g) const
 Return a pointer to a list of neighbors for a given group. Neighbor 0 is the local processor. More...
 
void Save (std::ostream &out) const
 Save the data in a stream. More...
 
void Load (std::istream &in)
 Load the data from a stream. More...
 
void Copy (GroupTopology &copy) const
 Copy the internal data to the external 'copy'. More...
 
virtual ~GroupTopology ()
 

Detailed Description

The shared entities (e.g. vertices, faces and edges) are split into groups, each group determined by the set of participating processors. They are numbered locally in lproc. Assumptions:

Definition at line 57 of file communication.hpp.

Constructor & Destructor Documentation

mfem::GroupTopology::GroupTopology ( )
inline

Constructor with the MPI communicator = 0.

Definition at line 75 of file communication.hpp.

mfem::GroupTopology::GroupTopology ( MPI_Comm  comm)
inline

Constructor given the MPI communicator 'comm'.

Definition at line 78 of file communication.hpp.

mfem::GroupTopology::GroupTopology ( const GroupTopology gt)

Copy constructor.

Definition at line 44 of file communication.cpp.

virtual mfem::GroupTopology::~GroupTopology ( )
inlinevirtual

Definition at line 137 of file communication.hpp.

Member Function Documentation

void mfem::GroupTopology::Copy ( GroupTopology copy) const

Copy the internal data to the external 'copy'.

Definition at line 327 of file communication.cpp.

void mfem::GroupTopology::Create ( ListOfIntegerSets groups,
int  mpitag 
)

Set up the group topology given the list of sets of shared entities.

Definition at line 92 of file communication.cpp.

MPI_Comm mfem::GroupTopology::GetComm ( ) const
inline

Return the MPI communicator.

Definition at line 87 of file communication.hpp.

const int* mfem::GroupTopology::GetGroup ( int  g) const
inline

Return a pointer to a list of neighbors for a given group. Neighbor 0 is the local processor.

Definition at line 126 of file communication.hpp.

int mfem::GroupTopology::GetGroupMaster ( int  g) const
inline

Return the neighbor index of the group master for a given group. Neighbor 0 is the local processor.

Definition at line 112 of file communication.hpp.

int mfem::GroupTopology::GetGroupMasterGroup ( int  g) const
inline

Return the group number in the master for group 'g'.

Definition at line 119 of file communication.hpp.

int mfem::GroupTopology::GetGroupMasterRank ( int  g) const
inline

Return the rank of the group master for group 'g'.

Definition at line 115 of file communication.hpp.

int mfem::GroupTopology::GetGroupSize ( int  g) const
inline

Get the number of processors in a group.

Definition at line 122 of file communication.hpp.

int mfem::GroupTopology::GetNeighborRank ( int  i) const
inline

Return the MPI rank of neighbor 'i'.

Definition at line 105 of file communication.hpp.

int mfem::GroupTopology::GetNumNeighbors ( ) const
inline

Return the number of neighbors including the local processor.

Definition at line 102 of file communication.hpp.

bool mfem::GroupTopology::IAmMaster ( int  g) const
inline

Return true if I am master for group 'g'.

Definition at line 108 of file communication.hpp.

void mfem::GroupTopology::Load ( std::istream &  in)

Load the data from a stream.

Definition at line 291 of file communication.cpp.

int mfem::GroupTopology::MyRank ( ) const
inline

Return the MPI rank within this object's communicator.

Definition at line 90 of file communication.hpp.

int mfem::GroupTopology::NGroups ( ) const
inline

Return the number of groups.

Definition at line 99 of file communication.hpp.

int mfem::GroupTopology::NRanks ( ) const
inline

Return the number of MPI ranks within this object's communicator.

Definition at line 93 of file communication.hpp.

void mfem::GroupTopology::Save ( std::ostream &  out) const

Save the data in a stream.

Definition at line 268 of file communication.cpp.

void mfem::GroupTopology::SetComm ( MPI_Comm  comm)
inline

Set the MPI communicator to 'comm'.

Definition at line 84 of file communication.hpp.


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