#include <Grid.H>
Classes | |
struct | messagebuffers |
Public Member Functions | |
halo () | |
halo (const pcpp::IndexIntervalType &inGlobalExtent, const pcpp::IndexIntervalType &inPartitionExtent) | |
void | SetGridInterval (const pcpp::IndexIntervalType &inExtent) |
void | SetPartitionInterval (const pcpp::IndexIntervalType &inExtent) |
bool | SetFill (bool yesno) |
bool | Fill () |
void | SetLocalBufferSizes (const std::vector< size_t > &inBufferSizes) |
void | SetLocalPartitionExtent (const pcpp::IndexIntervalType &inExtent) |
std::vector< pcpp::IndexIntervalType > | CreateRemoteHaloExtents (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent, std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateRemoteHaloExtents (std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateLocalHaloExtents (const pcpp::IndexIntervalType &globalExtent, const pcpp::IndexIntervalType &partitionExtent, std::vector< size_t > &haloSizes) |
std::vector< pcpp::IndexIntervalType > | CreateLocalHaloExtents (std::vector< size_t > &haloSizes) |
int | CreateSimpleSendIndices () |
Creates the flat buffer indices for each whole local halo extent. More... | |
int | CreateSimpleRecvIndices () |
int | CreateThreadSendIndices (int threadId) |
Creates send buffers for each whole local halo extent. More... | |
int | CreateThreadRecvIndices (int threadId) |
Create receive buffers for state data from neighboring processors. More... | |
int | UnpackSimpleRecvBuffers (int threadId) |
void | SetRemoteHaloExtents (const std::vector< pcpp::IndexIntervalType > haloExtents) |
void | SetThreadExtent (int myThreadId, pcpp::IndexIntervalType threadInterval) |
void | SetNumThreads (int numThreadsIn) |
int | NumThreads () |
void | SetLocalHaloExtents (const std::vector< pcpp::IndexIntervalType > haloExtents) |
int | DestroyMessageBuffer (int messageId) |
int | CreateMessageBuffers (int numComponents, int componentSize=8) |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const double *sourceBuffer) |
Pack generic send buffers for specified message. More... | |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const int *sourceBuffer) |
Pack generic send buffers for specified message. More... | |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const double *sourceBuffer, const int threadId) |
Pack generic send buffers for specified message. More... | |
int | PackMessageBuffers (const int messageId, const int componentId, const int numComponents, const int *sourceBuffer, const int threadId) |
Pack generic send buffers for specified message. More... | |
int | SendMessage (const int messageId, const std::vector< int > &neighborRanks, fixtures::CommunicatorType &inComm) |
int | ReceiveMessage (const int messageId, const std::vector< int > &neighborRanks, fixtures::CommunicatorType &inComm) |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, double *targetBuffer) |
Unpack generic recv buffers for specified message. More... | |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, double *targetBuffer, const int threadId) |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, int *targetBuffer) |
Unpack generic recv buffers for specified message. More... | |
int | UnPackMessageBuffers (const int messageId, const int componentId, const int numComponents, int *targetBuffer, const int threadId) |
void | SetNeighbors (const std::vector< bool > &inNeighbors) |
pcpp::IndexIntervalType & | GlobalExtent () |
pcpp::IndexIntervalType & | PartitionExtent () |
std::vector< pcpp::IndexIntervalType > & | RemoteHaloExtents () |
std::vector< pcpp::IndexIntervalType > & | LocalHaloExtents () |
const std::vector< pcpp::IndexIntervalType > & | RemoteHaloBufferExtents () const |
const std::vector< pcpp::IndexIntervalType > & | LocalHaloBufferExtents () const |
std::vector< messagebuffers > & | CommunicationBuffers () |
const std::vector< std::vector< size_t > > & | SendIndices () const |
const std::vector< std::vector< size_t > > & | RecvIndices () const |
std::vector< int > & | PeriodicDirs () |
void | SetPeriodicDirs (const std::vector< int > &inPeriodic) |
void | ReportSimpleBufferContents (std::ostream &outStream) |
void | DestroyAll () |
~halo () | |
|
inline |
|
inline |
Definition at line 157 of file Grid.H.
Referenced by TestGrid_PBS_IntegratedHalo().
std::vector< pcpp::IndexIntervalType > CreateLocalHaloExtents | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent, | ||
std::vector< size_t > & | haloSizes | ||
) |
Definition at line 2592 of file Grid.C.
References base::numDim.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
std::vector< pcpp::IndexIntervalType > CreateLocalHaloExtents | ( | std::vector< size_t > & | haloSizes | ) |
int CreateMessageBuffers | ( | int | numComponents, |
int | componentSize = 8 |
||
) |
Definition at line 2850 of file Grid.C.
References halo::messagebuffers::componentSize, numComponents, halo::messagebuffers::numComponents, halo::messagebuffers::numPointsRecv, halo::messagebuffers::numPointsSend, halo::messagebuffers::recvBuffers, halo::messagebuffers::recvFlagBuffers, halo::messagebuffers::sendBuffers, and halo::messagebuffers::sendFlagBuffers.
Referenced by parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::ExchangeNodalData(), rhs< GridT, StateT, OperatorT >::HaloSetup(), and TestGrid_PBS_IntegratedHalo().
std::vector< pcpp::IndexIntervalType > CreateRemoteHaloExtents | ( | const pcpp::IndexIntervalType & | globalExtent, |
const pcpp::IndexIntervalType & | partitionExtent, | ||
std::vector< size_t > & | haloSizes | ||
) |
Definition at line 2513 of file Grid.C.
References base::numDim.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
std::vector< pcpp::IndexIntervalType > CreateRemoteHaloExtents | ( | std::vector< size_t > & | haloSizes | ) |
int CreateSimpleRecvIndices | ( | ) |
Definition at line 2775 of file Grid.C.
References sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
int CreateSimpleSendIndices | ( | ) |
Creates the flat buffer indices for each whole local halo extent.
Definition at line 2659 of file Grid.C.
References bufferInterval, sizeextent::GetFlatIndices(), and sizeextent::InitSimple().
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
int CreateThreadRecvIndices | ( | int | threadId | ) |
Create receive buffers for state data from neighboring processors.
inCollisions | Must have extents wrt global indexing |
Definition at line 3252 of file Grid.C.
References sizeextent::GetFlatIndices(), sizeextent::InitSimple(), sizeextent::NNodes(), and sizeextent::Overlap().
int CreateThreadSendIndices | ( | int | threadId | ) |
Creates send buffers for each whole local halo extent.
Definition at line 2702 of file Grid.C.
References bufferInterval, sizeextent::GetFlatIndices(), sizeextent::InitSimple(), sizeextent::NNodes(), and sizeextent::Overlap().
void DestroyAll | ( | ) |
Definition at line 2887 of file Grid.C.
References halo::messagebuffers::recvBuffers, halo::messagebuffers::recvFlagBuffers, halo::messagebuffers::sendBuffers, and halo::messagebuffers::sendFlagBuffers.
int DestroyMessageBuffer | ( | int | messageId | ) |
Definition at line 2809 of file Grid.C.
References halo::messagebuffers::recvBuffers, halo::messagebuffers::recvFlagBuffers, halo::messagebuffers::sendBuffers, and halo::messagebuffers::sendFlagBuffers.
Referenced by parallel_blockstructured::ExchangeCoordinates(), and parallel_blockstructured::ExchangeNodalData().
|
inline |
|
inline |
Definition at line 155 of file Grid.H.
Referenced by TestGrid_PBS_IntegratedHalo().
|
inline |
|
inline |
Definition at line 114 of file Grid.H.
References numComponents.
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const double * | sourceBuffer | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 2937 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
Referenced by parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::ExchangeNodalData(), and TestGrid_PBS_IntegratedHalo().
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const int * | sourceBuffer | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 2969 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const double * | sourceBuffer, | ||
const int | threadId | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 3001 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
int PackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
const int * | sourceBuffer, | ||
const int | threadId | ||
) |
Pack generic send buffers for specified message.
For the message specified by messageId, pack a message starting at componentId, and packing numComponents components from the data contained in sourceBuffer. The sourceBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific source buffer indices are pulled from member data item sendIndices, which must have been setup already by calling CreateSimpleSendIndices.
Definition at line 3035 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
|
inline |
|
inline |
Definition at line 160 of file Grid.H.
Referenced by rhs< GridT, StateT, OperatorT >::HaloSetup().
int ReceiveMessage | ( | const int | messageId, |
const std::vector< int > & | neighborRanks, | ||
fixtures::CommunicatorType & | inComm | ||
) |
Definition at line 3096 of file Grid.C.
References CommunicatorObject::ARecvBuf(), numComponents, and CommunicatorObject::WaitAll().
Referenced by parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::ExchangeNodalData(), and TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 159 of file Grid.H.
Referenced by TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 154 of file Grid.H.
Referenced by TestGrid_PBS_IntegratedHalo().
|
inline |
void ReportSimpleBufferContents | ( | std::ostream & | outStream | ) |
|
inline |
Definition at line 158 of file Grid.H.
Referenced by TestGrid_PBS_IntegratedHalo().
int SendMessage | ( | const int | messageId, |
const std::vector< int > & | neighborRanks, | ||
fixtures::CommunicatorType & | inComm | ||
) |
Definition at line 3061 of file Grid.C.
References CommunicatorObject::ASendBuf(), and numComponents.
Referenced by parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::ExchangeNodalData(), and TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 82 of file Grid.H.
Referenced by parallel_blockstructured::ParallelSetup().
void SetLocalBufferSizes | ( | const std::vector< size_t > & | inBufferSizes | ) |
Definition at line 2423 of file Grid.C.
References parallel_blockstructured::numPointsBuffer.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
void SetLocalHaloExtents | ( | const std::vector< pcpp::IndexIntervalType > | haloExtents | ) |
Definition at line 2492 of file Grid.C.
References sizeextent::Copy(), and base::numDim.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 90 of file Grid.H.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 145 of file Grid.H.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
|
inline |
Definition at line 83 of file Grid.H.
Referenced by parallel_blockstructured::ParallelSetup().
|
inline |
void SetRemoteHaloExtents | ( | const std::vector< pcpp::IndexIntervalType > | haloExtents | ) |
Definition at line 2432 of file Grid.C.
References sizeextent::Copy(), sizeextent::NNodes(), and base::numDim.
Referenced by parallel_blockstructured::ParallelSetup(), and TestGrid_PBS_IntegratedHalo().
void SetThreadExtent | ( | int | myThreadId, |
pcpp::IndexIntervalType | threadInterval | ||
) |
Definition at line 2461 of file Grid.C.
References base::numDim.
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
double * | targetBuffer | ||
) |
Unpack generic recv buffers for specified message.
For the message specified by messageId, unpack a message starting at componentId, and unpacking numComponents components from the data contained in the message receive buffers into the targetBuffer. The targetBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific target buffer indices are pulled from member data item recvIndices, which must have been setup already by calling CreateSimpleRecvIndices.
Definition at line 3145 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
Referenced by parallel_blockstructured::ExchangeCoordinates(), parallel_blockstructured::ExchangeNodalData(), and TestGrid_PBS_IntegratedHalo().
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
double * | targetBuffer, | ||
const int | threadId | ||
) |
Definition at line 3197 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
int * | targetBuffer | ||
) |
Unpack generic recv buffers for specified message.
For the message specified by messageId, unpack a message starting at componentId, and unpacking numComponents components from the data contained in the message receive buffers into the targetBuffer. The targetBuffer is assumed to have a size indicated by the numPointsBuffer, which came from bufferSizes - both member data. The specific target buffer indices are pulled from member data item recvIndices, which must have been setup already by calling CreateSimpleRecvIndices.
Definition at line 3175 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
int UnPackMessageBuffers | ( | const int | messageId, |
const int | componentId, | ||
const int | numComponents, | ||
int * | targetBuffer, | ||
const int | threadId | ||
) |
Definition at line 3223 of file Grid.C.
References numComponents, and parallel_blockstructured::numPointsBuffer.
int UnpackSimpleRecvBuffers | ( | int | threadId | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |