Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Nektar::LibUtilities::CommSerial Class Reference

A global linear system. More...

#include <CommSerial.h>

Inheritance diagram for Nektar::LibUtilities::CommSerial:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LibUtilities::CommSerial:
Collaboration graph
[legend]

Public Member Functions

 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.
int GetRank ()
const std::string & GetType () const
void Block ()
 Block execution until all processes reach this point.
void Send (int pProc, Array< OneD, NekDouble > &pData)
void Send (int pProc, Array< OneD, int > &pData)
void Send (int pProc, std::vector< unsigned int > &pData)
void Recv (int pProc, Array< OneD, NekDouble > &pData)
void Recv (int pProc, Array< OneD, int > &pData)
void Recv (int pProc, std::vector< unsigned int > &pData)
void SendRecv (int pSendProc, Array< OneD, NekDouble > &pSendData, int pRecvProc, Array< OneD, NekDouble > &pRecvData)
void SendRecv (int pSendProc, Array< OneD, int > &pSendData, int pRecvProc, Array< OneD, int > &pRecvData)
void SendRecvReplace (int pSendProc, int pRecvProc, Array< OneD, NekDouble > &pSendData)
void SendRecvReplace (int pSendProc, int pRecvProc, Array< OneD, int > &pSendData)
void AllReduce (NekDouble &pData, enum ReduceOperator pOp)
void AllReduce (int &pData, enum ReduceOperator pOp)
void AllReduce (Array< OneD, NekDouble > &pData, enum ReduceOperator pOp)
void AllReduce (Array< OneD, int > &pData, enum ReduceOperator pOp)
void AllReduce (std::vector< unsigned int > &pData, enum ReduceOperator pOp)
void AlltoAll (Array< OneD, NekDouble > &pSendData, Array< OneD, NekDouble > &pRecvData)
void AlltoAll (Array< OneD, int > &pSendData, Array< OneD, int > &pRecvData)
void AlltoAllv (Array< OneD, NekDouble > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, NekDouble > &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap)
void AlltoAllv (Array< OneD, int > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, int > &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap)
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.
CommSharedPtr GetRowComm ()
 Retrieve the row communicator to which this process belongs.
CommSharedPtr GetColumnComm ()
 Retrieve the column communicator to which this process belongs.
bool TreatAsRankZero (void)
bool RemoveExistingFiles (void)

Static Public Member Functions

static CommSharedPtr create (int narg, char *arg[])
 Creates an instance of this class.

Static Public Attributes

static std::string className
 Name of class.

Protected Member Functions

virtual void v_Finalise ()
virtual int v_GetRank ()
virtual bool v_TreatAsRankZero (void)
virtual void v_Block ()
virtual void v_Send (int pProc, Array< OneD, NekDouble > &pData)
virtual void v_Send (int pProc, Array< OneD, int > &pData)
virtual void v_Send (int pProc, std::vector< unsigned int > &pData)
virtual void v_Recv (int pProc, Array< OneD, NekDouble > &pData)
virtual void v_Recv (int pProc, Array< OneD, int > &pData)
virtual void v_Recv (int pProc, std::vector< unsigned int > &pData)
virtual void v_SendRecv (int pSendProc, Array< OneD, NekDouble > &pSendData, int pRecvProc, Array< OneD, NekDouble > &pRecvData)
virtual void v_SendRecv (int pSendProc, Array< OneD, int > &pSendData, int pRecvProc, Array< OneD, int > &pRecvData)
virtual void v_SendRecvReplace (int pSendProc, int pRecvProc, Array< OneD, NekDouble > &pSendData)
virtual void v_SendRecvReplace (int pSendProc, int pRecvProc, Array< OneD, int > &pSendData)
virtual void v_AllReduce (NekDouble &pData, enum ReduceOperator pOp)
virtual void v_AllReduce (int &pData, enum ReduceOperator pOp)
virtual void v_AllReduce (Array< OneD, NekDouble > &pData, enum ReduceOperator pOp)
virtual void v_AllReduce (Array< OneD, int > &pData, enum ReduceOperator pOp)
virtual void v_AllReduce (std::vector< unsigned int > &pData, enum ReduceOperator pOp)
virtual void v_AlltoAll (Array< OneD, NekDouble > &pSendData, Array< OneD, NekDouble > &pRecvData)
virtual void v_AlltoAll (Array< OneD, int > &pSendData, Array< OneD, int > &pRecvData)
virtual void v_AlltoAllv (Array< OneD, NekDouble > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, NekDouble > &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap)
virtual void v_AlltoAllv (Array< OneD, int > &pSendData, Array< OneD, int > &pSendDataSizeMap, Array< OneD, int > &pSendDataOffsetMap, Array< OneD, int > &pRecvData, Array< OneD, int > &pRecvDataSizeMap, Array< OneD, int > &pRecvDataOffsetMap)
virtual void v_SplitComm (int pRows, int pColumns)
- Protected Member Functions inherited from Nektar::LibUtilities::Comm
 Comm ()
virtual bool v_RemoveExistingFiles (void)

Additional Inherited Members

- Protected Attributes inherited from Nektar::LibUtilities::Comm
int m_size
 Number of processes.
std::string m_type
 Type of communication.
CommSharedPtr m_commRow
 Row communicator.
CommSharedPtr m_commColumn
 Column communicator.

Detailed Description

A global linear system.

Definition at line 55 of file CommSerial.h.

Constructor & Destructor Documentation

Nektar::LibUtilities::CommSerial::CommSerial ( int  argc,
char *  argv[] 
)

Definition at line 48 of file CommSerial.cpp.

References Nektar::LibUtilities::Comm::m_size, and Nektar::LibUtilities::Comm::m_type.

:
Comm(argc, argv)
{
m_size = 1;
m_type = "Serial";
}
Nektar::LibUtilities::CommSerial::~CommSerial ( )
virtual

Definition at line 55 of file CommSerial.cpp.

{
}

Member Function Documentation

static CommSharedPtr Nektar::LibUtilities::CommSerial::create ( int  narg,
char *  arg[] 
)
inlinestatic

Creates an instance of this class.

Definition at line 59 of file CommSerial.h.

{
return MemoryManager<CommSerial>::AllocateSharedPtr(narg,arg);
}
void Nektar::LibUtilities::CommSerial::v_AllReduce ( NekDouble pData,
enum ReduceOperator  pOp 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 187 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AllReduce ( int &  pData,
enum ReduceOperator  pOp 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 196 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AllReduce ( Array< OneD, NekDouble > &  pData,
enum ReduceOperator  pOp 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 205 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AllReduce ( Array< OneD, int > &  pData,
enum ReduceOperator  pOp 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 214 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AllReduce ( std::vector< unsigned int > &  pData,
enum ReduceOperator  pOp 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 223 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AlltoAll ( Array< OneD, NekDouble > &  pSendData,
Array< OneD, NekDouble > &  pRecvData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 232 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AlltoAll ( Array< OneD, int > &  pSendData,
Array< OneD, int > &  pRecvData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 241 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AlltoAllv ( Array< OneD, NekDouble > &  pSendData,
Array< OneD, int > &  pSendDataSizeMap,
Array< OneD, int > &  pSendDataOffsetMap,
Array< OneD, NekDouble > &  pRecvData,
Array< OneD, int > &  pRecvDataSizeMap,
Array< OneD, int > &  pRecvDataOffsetMap 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 250 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_AlltoAllv ( Array< OneD, int > &  pSendData,
Array< OneD, int > &  pSendDataSizeMap,
Array< OneD, int > &  pSendDataOffsetMap,
Array< OneD, int > &  pRecvData,
Array< OneD, int > &  pRecvDataSizeMap,
Array< OneD, int > &  pRecvDataOffsetMap 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 264 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Block ( )
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 89 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Finalise ( )
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 63 of file CommSerial.cpp.

{
}
int Nektar::LibUtilities::CommSerial::v_GetRank ( void  )
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Reimplemented in Nektar::Utilities::FieldConvertComm.

Definition at line 71 of file CommSerial.cpp.

{
return 0;
}
void Nektar::LibUtilities::CommSerial::v_Recv ( int  pProc,
Array< OneD, NekDouble > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 105 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Recv ( int  pProc,
Array< OneD, int > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 121 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Recv ( int  pProc,
std::vector< unsigned int > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 137 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Send ( int  pProc,
Array< OneD, NekDouble > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 97 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Send ( int  pProc,
Array< OneD, int > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 113 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_Send ( int  pProc,
std::vector< unsigned int > &  pData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 129 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_SendRecv ( int  pSendProc,
Array< OneD, NekDouble > &  pSendData,
int  pRecvProc,
Array< OneD, NekDouble > &  pRecvData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 145 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_SendRecv ( int  pSendProc,
Array< OneD, int > &  pSendData,
int  pRecvProc,
Array< OneD, int > &  pRecvData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 156 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_SendRecvReplace ( int  pSendProc,
int  pRecvProc,
Array< OneD, NekDouble > &  pSendData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 167 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_SendRecvReplace ( int  pSendProc,
int  pRecvProc,
Array< OneD, int > &  pSendData 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Definition at line 177 of file CommSerial.cpp.

{
}
void Nektar::LibUtilities::CommSerial::v_SplitComm ( int  pRows,
int  pColumns 
)
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Reimplemented in Nektar::Utilities::FieldConvertComm.

Definition at line 278 of file CommSerial.cpp.

References ASSERTL0.

{
ASSERTL0(false, "Cannot split a serial process.");
}
bool Nektar::LibUtilities::CommSerial::v_TreatAsRankZero ( void  )
protectedvirtual

Implements Nektar::LibUtilities::Comm.

Reimplemented in Nektar::Utilities::FieldConvertComm.

Definition at line 80 of file CommSerial.cpp.

{
return true;
}

Member Data Documentation

std::string Nektar::LibUtilities::CommSerial::className
static
Initial value:
"Serial",
"Single-process serial communication.")

Name of class.

Definition at line 65 of file CommSerial.h.