mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Pstream: shortcut on single processor
This commit is contained in:
@ -55,7 +55,7 @@ void Pstream::combineGather
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -182,7 +182,7 @@ void Pstream::combineScatter
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -287,7 +287,7 @@ void Pstream::listCombineGather
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -421,7 +421,7 @@ void Pstream::listCombineScatter
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -540,7 +540,7 @@ void Pstream::mapCombineGather
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -640,7 +640,7 @@ void Pstream::mapCombineScatter
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const UPstream::commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
|
|||||||
@ -81,7 +81,7 @@ void Pstream::exchange
|
|||||||
// Send sizes across. Note: blocks.
|
// Send sizes across. Note: blocks.
|
||||||
combineReduce(sizes, UPstream::listEq(), tag, comm);
|
combineReduce(sizes, UPstream::listEq(), tag, comm);
|
||||||
|
|
||||||
if (Pstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
label startOfRequests = Pstream::nRequests();
|
label startOfRequests = Pstream::nRequests();
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ void Pstream::gather
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
@ -151,7 +151,7 @@ void Pstream::scatter
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
// Get my communication order
|
// Get my communication order
|
||||||
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
|
||||||
|
|||||||
@ -53,7 +53,7 @@ void Pstream::gatherList
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
if (Values.size() != UPstream::nProcs(comm))
|
if (Values.size() != UPstream::nProcs(comm))
|
||||||
{
|
{
|
||||||
@ -212,7 +212,7 @@ void Pstream::scatterList
|
|||||||
const label comm
|
const label comm
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (UPstream::parRun())
|
if (UPstream::nProcs(comm) > 1)
|
||||||
{
|
{
|
||||||
if (Values.size() != UPstream::nProcs(comm))
|
if (Values.size() != UPstream::nProcs(comm))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user