mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: PstreamBuffers: added clear function
This commit is contained in:
@ -145,4 +145,19 @@ void Foam::PstreamBuffers::finishedSends(labelListList& sizes, const bool block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::PstreamBuffers::clear()
|
||||||
|
{
|
||||||
|
forAll(sendBuf_, i)
|
||||||
|
{
|
||||||
|
sendBuf_[i].clear();
|
||||||
|
}
|
||||||
|
forAll(recvBuf_, i)
|
||||||
|
{
|
||||||
|
recvBuf_[i].clear();
|
||||||
|
}
|
||||||
|
recvBufPos_ = 0;
|
||||||
|
finishedSendsCalled_ = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -112,8 +112,6 @@ class PstreamBuffers
|
|||||||
|
|
||||||
bool finishedSendsCalled_;
|
bool finishedSendsCalled_;
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data
|
// Static data
|
||||||
@ -155,6 +153,9 @@ public:
|
|||||||
// non-blocking.
|
// non-blocking.
|
||||||
void finishedSends(labelListList& sizes, const bool block = true);
|
void finishedSends(labelListList& sizes, const bool block = true);
|
||||||
|
|
||||||
|
//- Clear storage and reset
|
||||||
|
void clear();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user