mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use send/recv serializers for globalIndex and mapDistribute etc
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -568,12 +568,8 @@ void syncPoints
|
||||
}
|
||||
}
|
||||
|
||||
OPstream toNbr
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
procPatch.neighbProcNo()
|
||||
);
|
||||
toNbr << patchInfo;
|
||||
// buffered send
|
||||
OPstream::bsend(patchInfo, procPatch.neighbProcNo());
|
||||
}
|
||||
}
|
||||
|
||||
@ -587,17 +583,12 @@ void syncPoints
|
||||
|
||||
if (pp.nPoints() && !procPatch.owner())
|
||||
{
|
||||
pointField nbrPatchInfo(procPatch.nPoints());
|
||||
{
|
||||
// We do not know the number of points on the other side
|
||||
// so cannot use UIPstream::read
|
||||
IPstream fromNbr
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
procPatch.neighbProcNo()
|
||||
);
|
||||
fromNbr >> nbrPatchInfo;
|
||||
}
|
||||
pointField nbrPatchInfo;
|
||||
|
||||
// We do not know the number of points on the other side
|
||||
// so cannot use UIPstream::read
|
||||
IPstream::recv(nbrPatchInfo, procPatch.neighbProcNo());
|
||||
|
||||
// Null any value which is not on neighbouring processor
|
||||
nbrPatchInfo.setSize(procPatch.nPoints(), nullValue);
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -379,11 +379,10 @@ void getInterfaceSizes
|
||||
if (Pstream::master())
|
||||
{
|
||||
// Receive and add to my sizes
|
||||
for (const int slave : Pstream::subProcs())
|
||||
for (const int proci : UPstream::subProcs())
|
||||
{
|
||||
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||
|
||||
EdgeMap<Map<label>> slaveSizes(fromSlave);
|
||||
EdgeMap<Map<label>> slaveSizes;
|
||||
IPstream::recv(slaveSizes, proci);
|
||||
|
||||
forAllConstIters(slaveSizes, slaveIter)
|
||||
{
|
||||
@ -421,15 +420,8 @@ void getInterfaceSizes
|
||||
}
|
||||
else
|
||||
{
|
||||
// Send to master
|
||||
{
|
||||
OPstream toMaster
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
Pstream::masterNo()
|
||||
);
|
||||
toMaster << regionsToSize;
|
||||
}
|
||||
// buffered send to master
|
||||
OPstream::bsend(regionsToSize, UPstream::masterNo());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user