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

#include <communication.hpp>

Classes

struct  OpData
 Data structure on which we define reduce operations. More...
 

Public Member Functions

 GroupCommunicator (GroupTopology &gt)
 
void Create (Array< int > &ldof_group)
 
TableGroupLDofTable ()
 
void Finalize ()
 Allocate internal buffers after the GroupLDofTable is defined. More...
 
GroupTopologyGetGroupTopology ()
 Get a reference to the group topology object. More...
 
template<class T >
void Bcast (T *data, int layout)
 Broadcast within each group where the master is the root. The data layout can be: More...
 
template<class T >
void Bcast (T *ldata)
 Broadcast within each group where the master is the root. This method is instantiated for int and double. More...
 
template<class T >
void Bcast (Array< T > &ldata)
 
template<class T >
void Reduce (T *ldata, void(*Op)(OpData< T >))
 Reduce within each group where the master is the root. More...
 
template<class T >
void Reduce (Array< T > &ldata, void(*Op)(OpData< T >))
 
 ~GroupCommunicator ()
 

Static Public Member Functions

template<class T >
static void Sum (OpData< T >)
 Reduce operation Sum, instantiated for int and double. More...
 
template<class T >
static void Min (OpData< T >)
 Reduce operation Min, instantiated for int and double. More...
 
template<class T >
static void Max (OpData< T >)
 Reduce operation Max, instantiated for int and double. More...
 
template<class T >
static void BitOR (OpData< T >)
 Reduce operation bitwise OR, instantiated for int only. More...
 

Detailed Description

Definition at line 117 of file communication.hpp.

Constructor & Destructor Documentation

mfem::GroupCommunicator::GroupCommunicator ( GroupTopology gt)

Definition at line 265 of file communication.cpp.

mfem::GroupCommunicator::~GroupCommunicator ( )

Definition at line 566 of file communication.cpp.

Member Function Documentation

template<class T >
void mfem::GroupCommunicator::Bcast ( T *  data,
int  layout 
)

Broadcast within each group where the master is the root. The data layout can be:

0 - data is an array on all ldofs 1 - data is an array on the shared ldofs as given by group_ldof

Definition at line 325 of file communication.cpp.

template<class T >
void mfem::GroupCommunicator::Bcast ( T *  ldata)
inline

Broadcast within each group where the master is the root. This method is instantiated for int and double.

Definition at line 151 of file communication.hpp.

template<class T >
void mfem::GroupCommunicator::Bcast ( Array< T > &  ldata)
inline

Definition at line 152 of file communication.hpp.

template<class T >
template void mfem::GroupCommunicator::BitOR< int > ( OpData< T >  )
static

Reduce operation bitwise OR, instantiated for int only.

Definition at line 553 of file communication.cpp.

void mfem::GroupCommunicator::Create ( Array< int > &  ldof_group)

Initialize the communicator from a local-dof to group map. Finalize is called internally.

Definition at line 273 of file communication.cpp.

void mfem::GroupCommunicator::Finalize ( )

Allocate internal buffers after the GroupLDofTable is defined.

Definition at line 299 of file communication.cpp.

GroupTopology& mfem::GroupCommunicator::GetGroupTopology ( )
inline

Get a reference to the group topology object.

Definition at line 139 of file communication.hpp.

Table& mfem::GroupCommunicator::GroupLDofTable ( )
inline

Fill-in the returned Table reference to initialize the communicator then call Finalize.

Definition at line 134 of file communication.hpp.

template<class T >
template void mfem::GroupCommunicator::Max< double > ( OpData< T >  )
static

Reduce operation Max, instantiated for int and double.

Definition at line 535 of file communication.cpp.

template<class T >
template void mfem::GroupCommunicator::Min< double > ( OpData< T >  )
static

Reduce operation Min, instantiated for int and double.

Definition at line 517 of file communication.cpp.

template<class T >
void mfem::GroupCommunicator::Reduce ( T *  ldata,
void(*)(OpData< T >)  Op 
)

Reduce within each group where the master is the root.

The reduce operation is given by the second argument (see below for list of the supported operations.) This method is instantiated for int and double.

Definition at line 419 of file communication.cpp.

template<class T >
void mfem::GroupCommunicator::Reduce ( Array< T > &  ldata,
void(*)(OpData< T >)  Op 
)
inline

Definition at line 170 of file communication.hpp.

template<class T >
template void mfem::GroupCommunicator::Sum< double > ( OpData< T >  )
static

Reduce operation Sum, instantiated for int and double.

Definition at line 503 of file communication.cpp.


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