Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Nektar::FieldUtils::FieldConvertComm Class Reference

#include <Module.h>

Inheritance diagram for Nektar::FieldUtils::FieldConvertComm:
Inheritance graph
[legend]
Collaboration diagram for Nektar::FieldUtils::FieldConvertComm:
Collaboration graph
[legend]

Public Member Functions

 FieldConvertComm (int argc, char *argv[], int size, int rank)
 
 FieldConvertComm (int size, int rank)
 
virtual ~FieldConvertComm ()
 
void v_SplitComm (int pRows, int pColumns)
 
- Public Member Functions inherited from Nektar::LibUtilities::CommSerial
 CommSerial (int argc, char *argv[])
 
virtual ~CommSerial ()
 
- Public Member Functions inherited from Nektar::LibUtilities::Comm
 Comm (int narg, char *arg[])
 
virtual ~Comm ()
 
void Finalise ()
 
int GetSize ()
 Returns number of processes. More...
 
int GetRank ()
 
const std::string & GetType () const
 
void Block ()
 Block execution until all processes reach this point. More...
 
NekDouble Wtime ()
 Return the time in seconds. More...
 
template<class T >
void Send (int pProc, T &pData)
 
template<class T >
void Recv (int pProc, T &pData)
 
template<class T >
void SendRecv (int pSendProc, T &pSendData, int pRecvProc, T &pRecvData)
 
template<class T >
void SendRecvReplace (int pSendProc, int pRecvProc, T &pData)
 
template<class T >
void AllReduce (T &pData, enum ReduceOperator pOp)
 
template<class T >
void AlltoAll (T &pSendData, T &pRecvData)
 
template<class T >
void AlltoAllv (Array< OneD, T > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, T > &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap)
 
template<class T >
void Bcast (T &data, int rootProc)
 
template<class T >
void Exscan (T &pData, const enum ReduceOperator pOp, T &ans)
 
template<class T >
Gather (const int rootProc, T &val)
 
template<class T >
Scatter (const int rootProc, T &pData)
 
CommSharedPtr CommCreateIf (int flag)
 If the flag is non-zero create a new communicator. More...
 
void SplitComm (int pRows, int pColumns)
 Splits this communicator into a grid of size pRows*pColumns and creates row and column communicators. By default the communicator is a single row. More...
 
CommSharedPtr GetRowComm ()
 Retrieve the row communicator to which this process belongs. More...
 
CommSharedPtr GetColumnComm ()
 Retrieve the column communicator to which this process belongs. More...
 
bool TreatAsRankZero (void)
 
bool RemoveExistingFiles (void)
 

Protected Member Functions

int v_GetRank (void)
 
bool v_TreatAsRankZero (void)
 
bool v_RemoveExistingFiles (void)
 
- Protected Member Functions inherited from Nektar::LibUtilities::CommSerial
virtual void v_Finalise ()
 
virtual void v_Block ()
 
virtual NekDouble v_Wtime ()
 
virtual void v_Send (void *buf, int count, CommDataType dt, int dest)
 
virtual void v_Recv (void *buf, int count, CommDataType dt, int source)
 
virtual void v_SendRecv (void *sendbuf, int sendcount, CommDataType sendtype, int dest, void *recvbuf, int recvcount, CommDataType recvtype, int source)
 
virtual void v_SendRecvReplace (void *buf, int count, CommDataType dt, int pSendProc, int pRecvProc)
 
virtual void v_AllReduce (void *buf, int count, CommDataType dt, enum ReduceOperator pOp)
 
virtual void v_AlltoAll (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype)
 
virtual void v_AlltoAllv (void *sendbuf, int sendcounts[], int sensdispls[], CommDataType sendtype, void *recvbuf, int recvcounts[], int rdispls[], CommDataType recvtype)
 
virtual void v_Bcast (void *buffer, int count, CommDataType dt, int root)
 
virtual void v_Exscan (Array< OneD, unsigned long long > &pData, const enum ReduceOperator pOp, Array< OneD, unsigned long long > &ans)
 
virtual void v_Gather (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype, int root)
 
virtual void v_Scatter (void *sendbuf, int sendcount, CommDataType sendtype, void *recvbuf, int recvcount, CommDataType recvtype, int root)
 
virtual CommSharedPtr v_CommCreateIf (int flag)
 
- Protected Member Functions inherited from Nektar::LibUtilities::Comm
 Comm ()
 

Private Attributes

int m_rank
 

Additional Inherited Members

- Static Public Member Functions inherited from Nektar::LibUtilities::CommSerial
static CommSharedPtr create (int narg, char *arg[])
 Creates an instance of this class. More...
 
- Static Public Attributes inherited from Nektar::LibUtilities::CommSerial
static std::string className
 Name of class. More...
 
- Protected Attributes inherited from Nektar::LibUtilities::Comm
int m_size
 Number of processes. More...
 
std::string m_type
 Type of communication. More...
 
CommSharedPtr m_commRow
 Row communicator. More...
 
CommSharedPtr m_commColumn
 Column communicator. More...
 

Detailed Description

Definition at line 238 of file FieldUtils/Module.h.

Constructor & Destructor Documentation

Nektar::FieldUtils::FieldConvertComm::FieldConvertComm ( int  argc,
char *  argv[],
int  size,
int  rank 
)
inline

Definition at line 241 of file FieldUtils/Module.h.

242  : CommSerial(argc, argv)
243  {
244  m_size = size;
245  m_rank = rank;
246  m_type = "FieldConvert parallel";
247  }
std::string m_type
Type of communication.
Definition: Comm.h:131
CommSerial(int argc, char *argv[])
Definition: CommSerial.cpp:49
int m_size
Number of processes.
Definition: Comm.h:130
Nektar::FieldUtils::FieldConvertComm::FieldConvertComm ( int  size,
int  rank 
)
inline

Definition at line 248 of file FieldUtils/Module.h.

248  : CommSerial(0, NULL)
249  {
250  m_size = size;
251  m_rank = rank;
252  m_type = "FieldConvert parallel";
253  }
std::string m_type
Type of communication.
Definition: Comm.h:131
CommSerial(int argc, char *argv[])
Definition: CommSerial.cpp:49
int m_size
Number of processes.
Definition: Comm.h:130
virtual Nektar::FieldUtils::FieldConvertComm::~FieldConvertComm ( )
inlinevirtual

Definition at line 254 of file FieldUtils/Module.h.

255  {
256  }

Member Function Documentation

int Nektar::FieldUtils::FieldConvertComm::v_GetRank ( void  )
inlineprotectedvirtual

Reimplemented from Nektar::LibUtilities::CommSerial.

Definition at line 267 of file FieldUtils/Module.h.

268  {
269  return m_rank;
270  }
bool Nektar::FieldUtils::FieldConvertComm::v_RemoveExistingFiles ( void  )
inlineprotectedvirtual

Reimplemented from Nektar::LibUtilities::Comm.

Definition at line 277 of file FieldUtils/Module.h.

278  {
279  return false;
280  }
void Nektar::FieldUtils::FieldConvertComm::v_SplitComm ( int  pRows,
int  pColumns 
)
inlinevirtual

Reimplemented from Nektar::LibUtilities::CommSerial.

Definition at line 257 of file FieldUtils/Module.h.

258  {
259  // Compute row and column in grid.
260  m_commRow = boost::shared_ptr<FieldConvertComm>(
261  new FieldConvertComm(pColumns, m_rank));
262  m_commColumn =
263  boost::shared_ptr<FieldConvertComm>(new FieldConvertComm(pRows, 0));
264  }
CommSharedPtr m_commColumn
Column communicator.
Definition: Comm.h:133
FieldConvertComm(int argc, char *argv[], int size, int rank)
CommSharedPtr m_commRow
Row communicator.
Definition: Comm.h:132
bool Nektar::FieldUtils::FieldConvertComm::v_TreatAsRankZero ( void  )
inlineprotectedvirtual

Reimplemented from Nektar::LibUtilities::CommSerial.

Definition at line 272 of file FieldUtils/Module.h.

273  {
274  return true;
275  }

Member Data Documentation

int Nektar::FieldUtils::FieldConvertComm::m_rank
private

Definition at line 283 of file FieldUtils/Module.h.