mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: specify "U[IO]Pstream" instead of "[IO]Pstream" for (read|write)
- consistency. Replace some instances of 'slave' with proc
This commit is contained in:
@ -606,7 +606,7 @@ void syncPoints
|
||||
pointField nbrPatchInfo(procPatch.nPoints());
|
||||
{
|
||||
// We do not know the number of points on the other side
|
||||
// so cannot use Pstream::read.
|
||||
// so cannot use UIPstream::read
|
||||
IPstream fromNbr
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
|
||||
@ -789,7 +789,7 @@ bool Foam::decomposedBlockData::writeBlocks
|
||||
for (label proci = 1; proci < nProcs; ++proci)
|
||||
{
|
||||
elems.resize(recvSizes[proci]);
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
UPstream::commsTypes::scheduled,
|
||||
proci,
|
||||
|
||||
@ -119,7 +119,7 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
|
||||
if (commsType == Pstream::commsTypes::nonBlocking)
|
||||
{
|
||||
receiveBuf_.setSize(pf.size());
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
procPatch_.neighbProcNo(),
|
||||
@ -129,7 +129,7 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
|
||||
procPatch_.comm()
|
||||
);
|
||||
}
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
procPatch_.neighbProcNo(),
|
||||
@ -155,7 +155,7 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated
|
||||
if (commsType != Pstream::commsTypes::nonBlocking)
|
||||
{
|
||||
receiveBuf_.setSize(this->size());
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
procPatch_.neighbProcNo(),
|
||||
|
||||
@ -86,7 +86,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
|
||||
|
||||
if (Pstream::master(comm_))
|
||||
{
|
||||
for (const int slave : Pstream::subProcs(comm_))
|
||||
for (const int proci : Pstream::subProcs(comm_))
|
||||
{
|
||||
lduMatrices.set
|
||||
(
|
||||
@ -96,7 +96,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
|
||||
IPstream
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
slave,
|
||||
proci,
|
||||
0, // bufSize
|
||||
Pstream::msgType(),
|
||||
comm_
|
||||
|
||||
@ -54,17 +54,17 @@ void Foam::LUscalarMatrix::solve
|
||||
|
||||
SubList<Type>(X, x.size()) = x;
|
||||
|
||||
for (const int slave : Pstream::subProcs(comm_))
|
||||
for (const int proci : Pstream::subProcs(comm_))
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
slave,
|
||||
proci,
|
||||
reinterpret_cast<char*>
|
||||
(
|
||||
&(X[procOffsets_[slave]])
|
||||
&(X[procOffsets_[proci]])
|
||||
),
|
||||
(procOffsets_[slave+1]-procOffsets_[slave])*sizeof(Type),
|
||||
(procOffsets_[proci+1]-procOffsets_[proci])*sizeof(Type),
|
||||
Pstream::msgType(),
|
||||
comm_
|
||||
);
|
||||
@ -72,7 +72,7 @@ void Foam::LUscalarMatrix::solve
|
||||
}
|
||||
else
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
Pstream::masterNo(),
|
||||
@ -89,17 +89,17 @@ void Foam::LUscalarMatrix::solve
|
||||
|
||||
x = SubList<Type>(X, x.size());
|
||||
|
||||
for (const int slave : Pstream::subProcs(comm_))
|
||||
for (const int proci : Pstream::subProcs(comm_))
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
slave,
|
||||
proci,
|
||||
reinterpret_cast<const char*>
|
||||
(
|
||||
&(X[procOffsets_[slave]])
|
||||
&(X[procOffsets_[proci]])
|
||||
),
|
||||
(procOffsets_[slave+1]-procOffsets_[slave])*sizeof(Type),
|
||||
(procOffsets_[proci+1]-procOffsets_[proci])*sizeof(Type),
|
||||
Pstream::msgType(),
|
||||
comm_
|
||||
);
|
||||
@ -107,7 +107,7 @@ void Foam::LUscalarMatrix::solve
|
||||
}
|
||||
else
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
Pstream::masterNo(),
|
||||
|
||||
@ -47,7 +47,7 @@ void Foam::processorLduInterface::send
|
||||
|| commsType == Pstream::commsTypes::scheduled
|
||||
)
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -61,7 +61,7 @@ void Foam::processorLduInterface::send
|
||||
{
|
||||
resizeBuf(receiveBuf_, nBytes);
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -77,7 +77,7 @@ void Foam::processorLduInterface::send
|
||||
static_cast<void*>(sendBuf_.data()), f.cdata(), nBytes
|
||||
);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -109,7 +109,7 @@ void Foam::processorLduInterface::receive
|
||||
|| commsType == Pstream::commsTypes::scheduled
|
||||
)
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -181,7 +181,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
|| commsType == Pstream::commsTypes::scheduled
|
||||
)
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -195,7 +195,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
{
|
||||
resizeBuf(receiveBuf_, nBytes);
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -205,7 +205,7 @@ void Foam::processorLduInterface::compressedSend
|
||||
comm()
|
||||
);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
@ -252,7 +252,7 @@ void Foam::processorLduInterface::compressedReceive
|
||||
{
|
||||
resizeBuf(receiveBuf_, nBytes);
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
neighbProcNo(),
|
||||
|
||||
@ -318,7 +318,7 @@ void Foam::GAMGSolver::gatherMatrices
|
||||
{
|
||||
label otherI = proci-1;
|
||||
|
||||
IPstream fromSlave
|
||||
IPstream fromProc
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
procIDs[proci],
|
||||
@ -327,14 +327,14 @@ void Foam::GAMGSolver::gatherMatrices
|
||||
meshComm
|
||||
);
|
||||
|
||||
otherMats.set(otherI, new lduMatrix(dummyMesh, fromSlave));
|
||||
otherMats.set(otherI, new lduMatrix(dummyMesh, fromProc));
|
||||
|
||||
// Receive number of/valid interfaces
|
||||
boolList& procTransforms = otherTransforms[otherI];
|
||||
List<label>& procRanks = otherRanks[otherI];
|
||||
|
||||
fromSlave >> procTransforms;
|
||||
fromSlave >> procRanks;
|
||||
fromProc >> procTransforms;
|
||||
fromProc >> procRanks;
|
||||
|
||||
// Size coefficients
|
||||
otherBouCoeffs.set
|
||||
@ -354,12 +354,12 @@ void Foam::GAMGSolver::gatherMatrices
|
||||
otherBouCoeffs[otherI].set
|
||||
(
|
||||
intI,
|
||||
new scalarField(fromSlave)
|
||||
new scalarField(fromProc)
|
||||
);
|
||||
otherIntCoeffs[otherI].set
|
||||
(
|
||||
intI,
|
||||
new scalarField(fromSlave)
|
||||
new scalarField(fromProc)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
|
||||
// Fast path.
|
||||
scalarReceiveBuf_.setSize(scalarSendBuf_.size());
|
||||
outstandingRecvRequest_ = UPstream::nRequests();
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procInterface_.neighbProcNo(),
|
||||
@ -121,7 +121,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
|
||||
);
|
||||
|
||||
outstandingSendRequest_ = UPstream::nRequests();
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procInterface_.neighbProcNo(),
|
||||
|
||||
@ -1092,15 +1092,15 @@ void Foam::lduPrimitiveMesh::gather
|
||||
|
||||
if (Pstream::myProcNo(comm) == procIDs[0])
|
||||
{
|
||||
// Master.
|
||||
otherMeshes.setSize(procIDs.size()-1);
|
||||
|
||||
// Slave meshes
|
||||
for (label i = 1; i < procIDs.size(); ++i)
|
||||
{
|
||||
//Pout<< "on master :"
|
||||
// << " receiving from slave " << procIDs[i] << endl;
|
||||
// << " receiving from proc " << procIDs[i] << endl;
|
||||
|
||||
IPstream fromSlave
|
||||
IPstream fromProc
|
||||
(
|
||||
Pstream::commsTypes::scheduled,
|
||||
procIDs[i],
|
||||
@ -1109,10 +1109,10 @@ void Foam::lduPrimitiveMesh::gather
|
||||
comm
|
||||
);
|
||||
|
||||
label nCells = readLabel(fromSlave);
|
||||
labelList lowerAddr(fromSlave);
|
||||
labelList upperAddr(fromSlave);
|
||||
boolList validInterface(fromSlave);
|
||||
label nCells = readLabel(fromProc);
|
||||
labelList lowerAddr(fromProc);
|
||||
labelList upperAddr(fromProc);
|
||||
boolList validInterface(fromProc);
|
||||
|
||||
|
||||
// Construct mesh without interfaces
|
||||
@ -1135,7 +1135,7 @@ void Foam::lduPrimitiveMesh::gather
|
||||
{
|
||||
if (validInterface[intI])
|
||||
{
|
||||
word coupleType(fromSlave);
|
||||
word coupleType(fromProc);
|
||||
|
||||
newInterfaces.set
|
||||
(
|
||||
@ -1145,7 +1145,7 @@ void Foam::lduPrimitiveMesh::gather
|
||||
coupleType,
|
||||
intI,
|
||||
otherMeshes[i-1].rawInterfaces(),
|
||||
fromSlave
|
||||
fromProc
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ void Foam::mapDistributeBase::exchangeMasks
|
||||
{
|
||||
if (proci != myRank && recvMasks[proci].size())
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
UPstream::commsTypes::nonBlocking,
|
||||
proci,
|
||||
@ -174,7 +174,7 @@ void Foam::mapDistributeBase::exchangeMasks
|
||||
{
|
||||
if (proci != myRank && sendMasks[proci].size())
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
UPstream::commsTypes::nonBlocking,
|
||||
proci,
|
||||
|
||||
@ -520,7 +520,7 @@ void Foam::mapDistributeBase::distribute
|
||||
sendFields[domain] =
|
||||
accessAndFlip(field, map, subHasFlip, negOp);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
domain,
|
||||
@ -543,8 +543,7 @@ void Foam::mapDistributeBase::distribute
|
||||
if (domain != myRank && map.size())
|
||||
{
|
||||
recvFields[domain].resize(map.size());
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
domain,
|
||||
@ -556,7 +555,6 @@ void Foam::mapDistributeBase::distribute
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set up 'send' to myself
|
||||
{
|
||||
sendFields[myRank] =
|
||||
@ -982,7 +980,7 @@ void Foam::mapDistributeBase::distribute
|
||||
sendFields[domain] =
|
||||
accessAndFlip(field, map, subHasFlip, negOp);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
domain,
|
||||
@ -1004,7 +1002,7 @@ void Foam::mapDistributeBase::distribute
|
||||
|
||||
if (domain != myRank && map.size())
|
||||
{
|
||||
recvFields[domain].setSize(map.size());
|
||||
recvFields[domain].resize(map.size());
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
@ -1018,7 +1016,6 @@ void Foam::mapDistributeBase::distribute
|
||||
}
|
||||
|
||||
// Set up 'send' to myself
|
||||
|
||||
{
|
||||
sendFields[myRank] =
|
||||
accessAndFlip(field, subMap[myRank], subHasFlip, negOp);
|
||||
|
||||
@ -1029,7 +1029,7 @@ void Foam::syncTools::syncBoundaryFaceList
|
||||
pp.start()-boundaryOffset
|
||||
);
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch.neighbProcNo(),
|
||||
@ -1055,7 +1055,7 @@ void Foam::syncTools::syncBoundaryFaceList
|
||||
pp.start()-boundaryOffset
|
||||
);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch.neighbProcNo(),
|
||||
@ -1261,7 +1261,7 @@ void Foam::syncTools::syncFaceList
|
||||
recvInfos.set(patchi, new PackedList<Width>(patchSize));
|
||||
PackedList<Width>& recvInfo = recvInfos[patchi];
|
||||
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch.neighbProcNo(),
|
||||
@ -1296,7 +1296,7 @@ void Foam::syncTools::syncFaceList
|
||||
);
|
||||
PackedList<Width>& sendInfo = sendInfos[patchi];
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch.neighbProcNo(),
|
||||
|
||||
@ -100,7 +100,7 @@ void Foam::globalIndex::gatherValues
|
||||
{
|
||||
if (is_contiguous<Type>::value)
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
procIDs[i],
|
||||
@ -123,7 +123,7 @@ void Foam::globalIndex::gatherValues
|
||||
|
||||
if (is_contiguous<Type>::value)
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
procIDs[0],
|
||||
@ -198,7 +198,7 @@ void Foam::globalIndex::gather
|
||||
}
|
||||
else if (is_contiguous<Type>::value)
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
procIDs[i],
|
||||
@ -223,7 +223,7 @@ void Foam::globalIndex::gather
|
||||
}
|
||||
else if (is_contiguous<Type>::value)
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
procIDs[0],
|
||||
@ -889,7 +889,7 @@ void Foam::globalIndex::scatter
|
||||
}
|
||||
else if (is_contiguous<Type>::value)
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
procIDs[i],
|
||||
@ -926,7 +926,7 @@ void Foam::globalIndex::scatter
|
||||
}
|
||||
else if (is_contiguous<Type>::value)
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
procIDs[0],
|
||||
|
||||
@ -1177,7 +1177,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const
|
||||
);
|
||||
|
||||
{
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
procPatch.neighbProcNo(),
|
||||
@ -1190,7 +1190,7 @@ void Foam::faMesh::calcPointAreaNormals(vectorField& result) const
|
||||
patchPointNormals.resize(nbrPatchPoints.size());
|
||||
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
procPatch.neighbProcNo(),
|
||||
|
||||
@ -506,7 +506,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||
|
||||
receiveBuf_.setSize(sendBuf_.size());
|
||||
outstandingRecvRequest_ = UPstream::nRequests();
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch_.neighbProcNo(),
|
||||
@ -517,7 +517,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||
);
|
||||
|
||||
outstandingSendRequest_ = UPstream::nRequests();
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procPatch_.neighbProcNo(),
|
||||
|
||||
@ -85,11 +85,11 @@ void Foam::functionObjects::dataCloud::writeListParallel
|
||||
Field<Type> recvField;
|
||||
|
||||
// Receive and write
|
||||
for (const int slave : Pstream::subProcs())
|
||||
for (const int proci : Pstream::subProcs())
|
||||
{
|
||||
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||
IPstream fromProc(Pstream::commsTypes::blocking, proci);
|
||||
|
||||
fromSlave >> recvPoints >> recvField;
|
||||
fromProc >> recvPoints >> recvField;
|
||||
|
||||
writeList(os, recvPoints, recvField);
|
||||
}
|
||||
@ -142,11 +142,11 @@ void Foam::functionObjects::dataCloud::writeListParallel
|
||||
Field<Type> recvField;
|
||||
|
||||
// Receive and write
|
||||
for (const int slave : Pstream::subProcs())
|
||||
for (const int proci : Pstream::subProcs())
|
||||
{
|
||||
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||
IPstream fromProc(Pstream::commsTypes::blocking, proci);
|
||||
|
||||
fromSlave >> recvPoints >> recvField;
|
||||
fromProc >> recvPoints >> recvField;
|
||||
|
||||
writeList(os, recvPoints, recvField);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate
|
||||
// Fast path.
|
||||
scalarReceiveBuf_.setSize(scalarSendBuf_.size());
|
||||
outstandingRecvRequest_ = UPstream::nRequests();
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procInterface_.neighbProcNo(),
|
||||
@ -122,7 +122,7 @@ void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate
|
||||
);
|
||||
|
||||
outstandingSendRequest_ = UPstream::nRequests();
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
Pstream::commsTypes::nonBlocking,
|
||||
procInterface_.neighbProcNo(),
|
||||
|
||||
@ -94,7 +94,7 @@ Foam::label Foam::metisLikeDecomp::decomposeGeneral
|
||||
}
|
||||
else
|
||||
{
|
||||
IPstream::read
|
||||
UIPstream::read
|
||||
(
|
||||
commsType,
|
||||
proci,
|
||||
@ -118,7 +118,7 @@ Foam::label Foam::metisLikeDecomp::decomposeGeneral
|
||||
{
|
||||
SubList<label> procSlot(xadj, numCells);
|
||||
|
||||
OPstream::write
|
||||
UOPstream::write
|
||||
(
|
||||
commsType,
|
||||
UPstream::masterNo(),
|
||||
|
||||
@ -184,7 +184,7 @@ void Foam::isoSurfacePoint::syncUnseparatedPoints
|
||||
pointField nbrPatchInfo(procPatch.nPoints());
|
||||
{
|
||||
// We do not know the number of points on the other side
|
||||
// so cannot use Pstream::read.
|
||||
// so cannot use UIPstream::read
|
||||
IPstream fromNbr
|
||||
(
|
||||
Pstream::commsTypes::blocking,
|
||||
|
||||
Reference in New Issue
Block a user