Updated UPstream::commsTypes to use the C++11 enum class

This commit is contained in:
Henry Weller
2017-03-10 19:54:55 +00:00
parent 812a9a53ed
commit 96ad725a0b
134 changed files with 1012 additions and 686 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -184,7 +184,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType=
Pstream::commsTypes::blocking
);
//- Return face-gradient transform diagonal

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,11 @@ int main(int argc, char *argv[])
Serr<< "slave sending to master "
<< Pstream::masterNo() << endl;
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
FixedList<label, 2> list3;
list3[0] = 0;
@ -109,7 +113,7 @@ int main(int argc, char *argv[])
)
{
Serr << "master receiving from slave " << slave << endl;
IPstream fromSlave(Pstream::blocking, slave);
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
FixedList<label, 2> list3(fromSlave);
Serr<< list3 << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ scalar sumReduce
scalar slaveValue;
UIPstream::read
(
Pstream::blocking,
Pstream::commsTypes::blocking,
slave,
reinterpret_cast<char*>(&slaveValue),
sizeof(scalar),
@ -87,7 +87,7 @@ scalar sumReduce
{
UOPstream::write
(
UPstream::blocking,
UPstream::commsTypes::blocking,
slave,
reinterpret_cast<const char*>(&sum),
sizeof(scalar),
@ -101,7 +101,7 @@ scalar sumReduce
{
UOPstream::write
(
UPstream::blocking,
UPstream::commsTypes::blocking,
UPstream::masterNo(),
reinterpret_cast<const char*>(&localValue),
sizeof(scalar),
@ -113,7 +113,7 @@ scalar sumReduce
{
UIPstream::read
(
UPstream::blocking,
UPstream::commsTypes::blocking,
UPstream::masterNo(),
reinterpret_cast<char*>(&sum),
sizeof(scalar),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
Pstream::myProcNo()
);
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
if (Pstream::myProcNo() != Pstream::masterNo())
{
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
// Send allData back
PstreamBuffers pBufs2(Pstream::nonBlocking);
PstreamBuffers pBufs2(Pstream::commsTypes::nonBlocking);
if (Pstream::myProcNo() == Pstream::masterNo())
{
for
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
// Do a non-blocking send inbetween
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -147,13 +147,21 @@ int main(int argc, char *argv[])
{
Perr<< "slave sending to master "
<< Pstream::masterNo() << endl;
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
toMaster << data;
}
Perr<< "slave receiving from master "
<< Pstream::masterNo() << endl;
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
fromMaster >> data;
Perr<< data << endl;
@ -168,7 +176,7 @@ int main(int argc, char *argv[])
)
{
Perr << "master receiving from slave " << slave << endl;
IPstream fromSlave(Pstream::blocking, slave);
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
fromSlave >> data;
Perr<< data << endl;
@ -182,7 +190,7 @@ int main(int argc, char *argv[])
)
{
Perr << "master sending to slave " << slave << endl;
OPstream toSlave(Pstream::blocking, slave);
OPstream toSlave(Pstream::commsTypes::blocking, slave);
toSlave << data;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,7 +63,7 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
slave++, procIndex++
)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
fromSlave >> this->operator[](procIndex);
}
@ -75,7 +75,7 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
slave++, procIndex++
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
if (redistribute)
{
@ -92,13 +92,21 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
{
// Slave: send my local data to master
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster << localData;
}
// Receive data from master
{
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
if (redistribute)
{
fromMaster >> *this;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -641,7 +641,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
labelList rotation(faces.size(), label(0));
labelList faceMap(faces.size(), label(-1));
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send ordering
forAll(sortMesh.boundaryMesh(), patchi)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -417,7 +417,7 @@ void Foam::mergeAndWrite
// Receive slave ones
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointField slavePts(fromSlave);
labelList slaveIDs(fromSlave);
@ -433,7 +433,7 @@ void Foam::mergeAndWrite
// be improved.
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
myPoints.byteSize() + myIDs.byteSize()
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -348,7 +348,11 @@ void syncPoints
}
}
OPstream toNbr(Pstream::blocking, procPatch.neighbProcNo());
OPstream toNbr
(
Pstream::commsTypes::blocking,
procPatch.neighbProcNo()
);
toNbr << patchInfo;
}
}
@ -376,7 +380,7 @@ void syncPoints
// so cannot use Pstream::read.
IPstream fromNbr
(
Pstream::blocking,
Pstream::commsTypes::blocking,
procPatch.neighbProcNo()
);
fromNbr >> nbrPatchInfo;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -394,7 +394,7 @@ void getInterfaceSizes
slave++
)
{
IPstream fromSlave(Pstream::blocking, slave);
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
EdgeMap<Map<label>> slaveSizes(fromSlave);
@ -439,7 +439,11 @@ void getInterfaceSizes
{
// Send to master
{
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
toMaster << regionsToSize;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,14 +97,18 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
slave++
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << patchEntries;
}
}
else
{
// Receive patches
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
fromMaster >> patchEntries;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -304,7 +304,7 @@ void readFields
{
if (!haveMesh[proci])
{
OPstream toProc(Pstream::blocking, proci);
OPstream toProc(Pstream::commsTypes::blocking, proci);
toProc<< tsubfld();
}
}
@ -320,7 +320,11 @@ void readFields
const word& name = masterNames[i];
// Receive field
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
dictionary fieldDict(fromMaster);
fields.set

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -110,7 +110,7 @@ void writeField
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
scalarField slaveData(fromSlave);
ensightFile.write(slaveData);
}
@ -120,7 +120,11 @@ void writeField
{
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< vf.component(cmpt);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -694,7 +694,7 @@ void Foam::ensightMesh::writeAllPolys
// Slaves
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList polys(fromSlave);
cellList cellFaces(fromSlave);
@ -708,7 +708,11 @@ void Foam::ensightMesh::writeAllPolys
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< meshCellSets_.polys << cellFaces;
}
@ -727,7 +731,7 @@ void Foam::ensightMesh::writeAllPolys
// Slaves
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList polys(fromSlave);
cellList cellFaces(fromSlave);
faceList faces(fromSlave);
@ -743,7 +747,11 @@ void Foam::ensightMesh::writeAllPolys
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< meshCellSets_.polys << cellFaces << faces;
}
@ -763,7 +771,7 @@ void Foam::ensightMesh::writeAllPolys
// Slaves
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
labelList polys(fromSlave);
cellList cellFaces(fromSlave);
faceList faces(fromSlave);
@ -781,7 +789,11 @@ void Foam::ensightMesh::writeAllPolys
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< meshCellSets_.polys << cellFaces << faces << faceOwner;
}
}
@ -807,7 +819,7 @@ void Foam::ensightMesh::writeAllPrims
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
cellShapeList cellShapes(fromSlave);
writePrims(cellShapes, ensightGeometryFile);
@ -815,7 +827,11 @@ void Foam::ensightMesh::writeAllPrims
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< cellShapes;
}
}
@ -867,7 +883,7 @@ void Foam::ensightMesh::writeAllFacePrims
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList patchFaces(fromSlave);
writeFacePrims(patchFaces, ensightGeometryFile);
@ -875,7 +891,11 @@ void Foam::ensightMesh::writeAllFacePrims
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< UIndirectList<face>(patchFaces, prims);
}
}
@ -932,7 +952,7 @@ void Foam::ensightMesh::writeAllNSided
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList patchFaces(fromSlave);
writeNSidedNPointsPerFace
@ -944,7 +964,11 @@ void Foam::ensightMesh::writeAllNSided
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< UIndirectList<face>(patchFaces, prims);
}
@ -959,7 +983,7 @@ void Foam::ensightMesh::writeAllNSided
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
faceList patchFaces(fromSlave);
writeNSidedPoints(patchFaces, ensightGeometryFile);
@ -967,7 +991,11 @@ void Foam::ensightMesh::writeAllNSided
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< UIndirectList<face>(patchFaces, prims);
}
}
@ -997,7 +1025,7 @@ void Foam::ensightMesh::writeAllPoints
ensightGeometryFile.write(uniquePoints.component(d));
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
scalarField patchPointsComponent(fromSlave);
ensightGeometryFile.write(patchPointsComponent);
}
@ -1007,7 +1035,11 @@ void Foam::ensightMesh::writeAllPoints
{
for (direction d=0; d<vector::nComponents; d++)
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster<< uniquePoints.component(d);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,8 +43,8 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
label nReq = Pstream::nRequests();
@ -67,7 +67,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
if
(
Pstream::parRun()
&& Pstream::defaultCommsType == Pstream::nonBlocking
&& Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
Pstream::waitRequests(nReq);
@ -87,7 +87,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule =
fld.mesh().globalData().patchSchedule();
@ -105,11 +105,11 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
{
if (patchSchedule[patchEvali].init)
{
tgtField.initEvaluate(Pstream::scheduled);
tgtField.initEvaluate(Pstream::commsTypes::scheduled);
}
else
{
tgtField.evaluate(Pstream::scheduled);
tgtField.evaluate(Pstream::commsTypes::scheduled);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,7 +112,7 @@ void Foam::ParSortableList<Type>::checkAndSend
}
{
OPstream toSlave(Pstream::blocking, destProci);
OPstream toSlave(Pstream::commsTypes::blocking, destProci);
toSlave << values << indices;
}
}
@ -306,7 +306,7 @@ void Foam::ParSortableList<Type>::sort()
Pout<< "Receiving from " << proci << endl;
}
IPstream fromSlave(Pstream::blocking, proci);
IPstream fromSlave(Pstream::commsTypes::blocking, proci);
fromSlave >> recValues >> recIndices;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,7 +99,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
// not. Could reset all the ITstreams to ascii?
IPstream fromAbove
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
myComm.above(),
0,
Pstream::msgType(),
@ -121,7 +121,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
}
OPstream toBelow
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
myComm.below()[belowI],
0,
Pstream::msgType(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -83,7 +83,7 @@ void Foam::PstreamBuffers::finishedSends(const bool block)
{
finishedSendsCalled_ = true;
if (commsType_ == UPstream::nonBlocking)
if (commsType_ == UPstream::commsTypes::nonBlocking)
{
Pstream::exchange<DynamicList<char>, char>
(
@ -101,7 +101,7 @@ void Foam::PstreamBuffers::finishedSends(labelList& recvSizes, const bool block)
{
finishedSendsCalled_ = true;
if (commsType_ == UPstream::nonBlocking)
if (commsType_ == UPstream::commsTypes::nonBlocking)
{
Pstream::exchangeSizes(sendBuf_, recvSizes, comm_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ Description
Example usage:
PstreamBuffers pBuffers(Pstream::nonBlocking);
PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking);
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -113,7 +113,7 @@ Foam::UOPstream::UOPstream(const int toProcNo, PstreamBuffers& buffers)
sendBuf_(buffers.sendBuf_[toProcNo]),
tag_(buffers.tag_),
comm_(buffers.comm_),
sendAtDestruct_(buffers.commsType_ != UPstream::nonBlocking)
sendAtDestruct_(buffers.commsType_ != UPstream::commsTypes::nonBlocking)
{
setOpened();
setGood();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ class UPstream
public:
//- Types of communications
enum commsTypes
enum class commsTypes
{
blocking,
scheduled,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ void Foam::Pstream::combineGather
T value;
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<char*>(&value),
sizeof(T),
@ -83,7 +83,14 @@ void Foam::Pstream::combineGather
}
else
{
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
IPstream fromBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
T value(fromBelow);
if (debug & 2)
@ -109,7 +116,7 @@ void Foam::Pstream::combineGather
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<const char*>(&Value),
sizeof(T),
@ -121,7 +128,7 @@ void Foam::Pstream::combineGather
{
OPstream toAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -189,7 +196,7 @@ void Foam::Pstream::combineScatter
{
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<char*>(&Value),
sizeof(T),
@ -201,7 +208,7 @@ void Foam::Pstream::combineScatter
{
IPstream fromAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -231,7 +238,7 @@ void Foam::Pstream::combineScatter
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<const char*>(&Value),
sizeof(T),
@ -241,7 +248,14 @@ void Foam::Pstream::combineScatter
}
else
{
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
OPstream toBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
toBelow << Value;
}
}
@ -294,7 +308,7 @@ void Foam::Pstream::listCombineGather
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<char*>(receivedValues.begin()),
receivedValues.byteSize(),
@ -315,7 +329,14 @@ void Foam::Pstream::listCombineGather
}
else
{
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
IPstream fromBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
List<T> receivedValues(fromBelow);
if (debug & 2)
@ -344,7 +365,7 @@ void Foam::Pstream::listCombineGather
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<const char*>(Values.begin()),
Values.byteSize(),
@ -356,7 +377,7 @@ void Foam::Pstream::listCombineGather
{
OPstream toAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -424,7 +445,7 @@ void Foam::Pstream::listCombineScatter
{
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<char*>(Values.begin()),
Values.byteSize(),
@ -436,7 +457,7 @@ void Foam::Pstream::listCombineScatter
{
IPstream fromAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -466,7 +487,7 @@ void Foam::Pstream::listCombineScatter
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<const char*>(Values.begin()),
Values.byteSize(),
@ -476,7 +497,14 @@ void Foam::Pstream::listCombineScatter
}
else
{
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
OPstream toBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
toBelow << Values;
}
}
@ -535,7 +563,14 @@ void Foam::Pstream::mapCombineGather
{
label belowID = myComm.below()[belowI];
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
IPstream fromBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
Container receivedValues(fromBelow);
if (debug & 2)
@ -575,7 +610,14 @@ void Foam::Pstream::mapCombineGather
<< " data:" << Values << endl;
}
OPstream toAbove(UPstream::scheduled, myComm.above(), 0, tag, comm);
OPstream toAbove
(
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
comm
);
toAbove << Values;
}
}
@ -635,7 +677,7 @@ void Foam::Pstream::mapCombineScatter
{
IPstream fromAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -660,7 +702,14 @@ void Foam::Pstream::mapCombineScatter
Pout<< " sending to " << belowID << " data:" << Values << endl;
}
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
OPstream toBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
toBelow << Values;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,7 @@ void Foam::Pstream::exchange
recvBufs[proci].setSize(nRecv);
UIPstream::read
(
UPstream::nonBlocking,
UPstream::commsTypes::nonBlocking,
proci,
reinterpret_cast<char*>(recvBufs[proci].begin()),
nRecv*sizeof(T),
@ -101,7 +101,7 @@ void Foam::Pstream::exchange
(
!UOPstream::write
(
UPstream::nonBlocking,
UPstream::commsTypes::nonBlocking,
proci,
reinterpret_cast<const char*>(sendBufs[proci].begin()),
sendBufs[proci].size()*sizeof(T),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -66,7 +66,7 @@ void Pstream::gather
{
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.below()[belowI],
reinterpret_cast<char*>(&value),
sizeof(T),
@ -78,7 +78,7 @@ void Pstream::gather
{
IPstream fromBelow
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.below()[belowI],
0,
tag,
@ -97,7 +97,7 @@ void Pstream::gather
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<const char*>(&Value),
sizeof(T),
@ -109,7 +109,7 @@ void Pstream::gather
{
OPstream toAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -163,7 +163,7 @@ void Pstream::scatter
{
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<char*>(&Value),
sizeof(T),
@ -175,7 +175,7 @@ void Pstream::scatter
{
IPstream fromAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -194,7 +194,7 @@ void Pstream::scatter
{
UOPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.below()[belowI],
reinterpret_cast<const char*>(&Value),
sizeof(T),
@ -206,7 +206,7 @@ void Pstream::scatter
{
OPstream toBelow
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.below()[belowI],
0,
tag,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -79,7 +79,7 @@ void Pstream::gatherList
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<char*>(receivedValues.begin()),
receivedValues.byteSize(),
@ -96,7 +96,14 @@ void Pstream::gatherList
}
else
{
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
IPstream fromBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
fromBelow >> Values[belowID];
if (debug & 2)
@ -148,7 +155,7 @@ void Pstream::gatherList
OPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<const char*>(sendingValues.begin()),
sendingValues.byteSize(),
@ -160,7 +167,7 @@ void Pstream::gatherList
{
OPstream toAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -234,7 +241,7 @@ void Pstream::scatterList
UIPstream::read
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
reinterpret_cast<char*>(receivedValues.begin()),
receivedValues.byteSize(),
@ -251,7 +258,7 @@ void Pstream::scatterList
{
IPstream fromAbove
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
myComm.above(),
0,
tag,
@ -290,7 +297,7 @@ void Pstream::scatterList
OPstream::write
(
UPstream::scheduled,
UPstream::commsTypes::scheduled,
belowID,
reinterpret_cast<const char*>(sendingValues.begin()),
sendingValues.byteSize(),
@ -300,7 +307,14 @@ void Pstream::scatterList
}
else
{
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
OPstream toBelow
(
UPstream::commsTypes::scheduled,
belowID,
0,
tag,
comm
);
// Send data destined for all other processors below belowID
forAll(notBelowLeaves, leafI)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -238,7 +238,7 @@ bool Foam::regIOobject::read()
// not currently supported
IPstream fromAbove
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
myComm.above(),
0,
Pstream::msgType(),
@ -254,7 +254,7 @@ bool Foam::regIOobject::read()
{
OPstream toBelow
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
myComm.below()[belowI],
0,
Pstream::msgType(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -422,8 +422,8 @@ evaluate()
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
label nReq = Pstream::nRequests();
@ -437,7 +437,7 @@ evaluate()
if
(
Pstream::parRun()
&& Pstream::defaultCommsType == Pstream::nonBlocking
&& Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
Pstream::waitRequests(nReq);
@ -448,7 +448,7 @@ evaluate()
this->operator[](patchi).evaluate(Pstream::defaultCommsType);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule =
bmesh_.mesh().globalData().patchSchedule();
@ -458,12 +458,12 @@ evaluate()
if (patchSchedule[patchEvali].init)
{
this->operator[](patchSchedule[patchEvali].patch)
.initEvaluate(Pstream::scheduled);
.initEvaluate(Pstream::commsTypes::scheduled);
}
else
{
this->operator[](patchSchedule[patchEvali].patch)
.evaluate(Pstream::scheduled);
.evaluate(Pstream::commsTypes::scheduled);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,7 +124,8 @@ public:
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -116,7 +116,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
) = 0;
//- Initialise swap of patch point values

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -162,7 +162,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -161,7 +161,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,14 +122,11 @@ public:
// Member functions
// Evaluation functions
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,14 +122,11 @@ public:
// Member functions
// Evaluation functions
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -157,7 +157,7 @@ public:
}
//- Constraint handling
// Constraint handling
//- Return the constraint type this pointPatchField implements
virtual const word& constraintType() const
@ -171,7 +171,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -113,7 +113,7 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
)
);
if (commsType == Pstream::nonBlocking)
if (commsType == Pstream::commsTypes::nonBlocking)
{
receiveBuf_.setSize(pf.size());
IPstream::read
@ -149,7 +149,7 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated
if (Pstream::parRun())
{
// If nonblocking data has already been received into receiveBuf_
if (commsType != Pstream::nonBlocking)
if (commsType != Pstream::commsTypes::nonBlocking)
{
receiveBuf_.setSize(this->size());
IPstream::read

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -166,7 +166,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,13 +134,11 @@ public:
return symmetryPlanePointPatch::typeName;
}
// Evaluation functions
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,21 +122,17 @@ public:
// Member functions
//- Constraint handling
//- Return the constraint type this pointPatchField implements
virtual const word& constraintType() const
{
return type();
}
//- Return the constraint type this pointPatchField implements
virtual const word& constraintType() const
{
return type();
}
// Evaluation functions
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -231,7 +231,7 @@ public:
//- Evaluate the patch field, sets Updated to false
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Write

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -139,14 +139,11 @@ public:
// Member functions
// Evaluation functions
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Write
virtual void write(Ostream&) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -418,14 +418,16 @@ public:
//- Initialise evaluation of the patch field (do nothing)
virtual void initEvaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -703,7 +703,7 @@ void Foam::argList::parse
{
options_.set("case", roots[slave-1]/globalCase_);
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << args_ << options_;
}
options_.erase("case");
@ -750,7 +750,7 @@ void Foam::argList::parse
slave++
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << args_ << options_;
}
}
@ -758,7 +758,11 @@ void Foam::argList::parse
else
{
// Collect the master's argument list
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
fromMaster >> args_ >> options_;
// Establish rootPath_/globalCase_/case_ for slave
@ -792,7 +796,7 @@ void Foam::argList::parse
slave++
)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
string slaveBuild;
string slaveMachine;
@ -815,7 +819,11 @@ void Foam::argList::parse
}
else
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster << string(Foam::FOAMbuild) << hostName() << pid();
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,7 +97,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
(
IPstream
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
slave,
0, // bufSize
Pstream::msgType(),
@ -111,7 +111,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
{
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
0, // bufSize
Pstream::msgType(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ void Foam::LUscalarMatrix::solve
{
IPstream::read
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
slave,
reinterpret_cast<char*>
(
@ -78,7 +78,7 @@ void Foam::LUscalarMatrix::solve
{
OPstream::write
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
reinterpret_cast<const char*>(x.begin()),
x.byteSize(),
@ -106,7 +106,7 @@ void Foam::LUscalarMatrix::solve
{
OPstream::write
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
slave,
reinterpret_cast<const char*>
(
@ -122,7 +122,7 @@ void Foam::LUscalarMatrix::solve
{
IPstream::read
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
reinterpret_cast<char*>(x.begin()),
x.byteSize(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,8 +38,8 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
{
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(interfaces_, interfacei)
@ -57,7 +57,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = this->patchSchedule();
@ -78,7 +78,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
psiif,
interfaceCoeffs[interfacei],
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
Pstream::blocking
Pstream::commsTypes::blocking
);
}
}
@ -103,12 +103,12 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
{
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
// Block until all sends/receives have been finished
if (Pstream::defaultCommsType == Pstream::nonBlocking)
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
{
IPstream::waitRequests();
OPstream::waitRequests();
@ -129,7 +129,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = this->patchSchedule();
@ -148,7 +148,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
psiif,
interfaceCoeffs[interfacei],
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
Pstream::scheduled
Pstream::commsTypes::scheduled
);
}
else
@ -159,7 +159,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
psiif,
interfaceCoeffs[interfacei],
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
Pstream::scheduled
Pstream::commsTypes::scheduled
);
}
}
@ -182,7 +182,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
psiif,
interfaceCoeffs[interfacei],
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
Pstream::blocking
Pstream::commsTypes::blocking
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,11 @@ void Foam::processorLduInterface::send
{
label nBytes = f.byteSize();
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
if
(
commsType == Pstream::commsTypes::blocking
|| commsType == Pstream::commsTypes::scheduled
)
{
OPstream::write
(
@ -50,7 +54,7 @@ void Foam::processorLduInterface::send
comm()
);
}
else if (commsType == Pstream::nonBlocking)
else if (commsType == Pstream::commsTypes::nonBlocking)
{
resizeBuf(receiveBuf_, nBytes);
@ -80,7 +84,7 @@ void Foam::processorLduInterface::send
else
{
FatalErrorInFunction
<< "Unsupported communications type " << commsType
<< "Unsupported communications type " << int(commsType)
<< exit(FatalError);
}
}
@ -93,7 +97,11 @@ void Foam::processorLduInterface::receive
UList<Type>& f
) const
{
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
if
(
commsType == Pstream::commsTypes::blocking
|| commsType == Pstream::commsTypes::scheduled
)
{
IPstream::read
(
@ -105,14 +113,14 @@ void Foam::processorLduInterface::receive
comm()
);
}
else if (commsType == Pstream::nonBlocking)
else if (commsType == Pstream::commsTypes::nonBlocking)
{
memcpy(f.begin(), receiveBuf_.begin(), f.byteSize());
}
else
{
FatalErrorInFunction
<< "Unsupported communications type " << commsType
<< "Unsupported communications type " << int(commsType)
<< exit(FatalError);
}
}
@ -158,7 +166,11 @@ void Foam::processorLduInterface::compressedSend
reinterpret_cast<Type&>(fArray[nm1]) = f.last();
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
if
(
commsType == Pstream::commsTypes::blocking
|| commsType == Pstream::commsTypes::scheduled
)
{
OPstream::write
(
@ -170,7 +182,7 @@ void Foam::processorLduInterface::compressedSend
comm()
);
}
else if (commsType == Pstream::nonBlocking)
else if (commsType == Pstream::commsTypes::nonBlocking)
{
resizeBuf(receiveBuf_, nBytes);
@ -197,7 +209,7 @@ void Foam::processorLduInterface::compressedSend
else
{
FatalErrorInFunction
<< "Unsupported communications type " << commsType
<< "Unsupported communications type " << int(commsType)
<< exit(FatalError);
}
}
@ -222,7 +234,11 @@ void Foam::processorLduInterface::compressedReceive
label nFloats = nm1 + nlast;
label nBytes = nFloats*sizeof(float);
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
if
(
commsType == Pstream::commsTypes::blocking
|| commsType == Pstream::commsTypes::scheduled
)
{
resizeBuf(receiveBuf_, nBytes);
@ -236,10 +252,10 @@ void Foam::processorLduInterface::compressedReceive
comm()
);
}
else if (commsType != Pstream::nonBlocking)
else if (commsType != Pstream::commsTypes::nonBlocking)
{
FatalErrorInFunction
<< "Unsupported communications type " << commsType
<< "Unsupported communications type " << int(commsType)
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,8 +38,8 @@ void Foam::lduMatrix::initMatrixInterfaces
{
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(interfaces, interfacei)
@ -57,7 +57,7 @@ void Foam::lduMatrix::initMatrixInterfaces
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = this->patchSchedule();
@ -78,7 +78,7 @@ void Foam::lduMatrix::initMatrixInterfaces
psiif,
coupleCoeffs[interfacei],
cmpt,
Pstream::blocking
Pstream::commsTypes::blocking
);
}
}
@ -102,7 +102,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
const direction cmpt
) const
{
if (Pstream::defaultCommsType == Pstream::blocking)
if (Pstream::defaultCommsType == Pstream::commsTypes::blocking)
{
forAll(interfaces, interfacei)
{
@ -119,7 +119,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
}
}
}
else if (Pstream::defaultCommsType == Pstream::nonBlocking)
else if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
{
// Try and consume interfaces as they become available
bool allUpdated = false;
@ -198,7 +198,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
}
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = this->patchSchedule();
@ -217,7 +217,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
psiif,
coupleCoeffs[interfacei],
cmpt,
Pstream::scheduled
Pstream::commsTypes::scheduled
);
}
else
@ -228,7 +228,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
psiif,
coupleCoeffs[interfacei],
cmpt,
Pstream::scheduled
Pstream::commsTypes::scheduled
);
}
}
@ -251,7 +251,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
psiif,
coupleCoeffs[interfacei],
cmpt,
Pstream::blocking
Pstream::commsTypes::blocking
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -279,7 +279,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
{
fineInterfaces[inti].initInternalFieldTransfer
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
restrictMap
);
}
@ -322,7 +322,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
fineInterfaces[inti].interfaceInternalField(restrictMap),
fineInterfaces[inti].internalFieldTransfer
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
restrictMap
),
fineLevelIndex,
@ -488,7 +488,7 @@ void Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing
procRestrictAddressing,
UPstream::msgType(),
Pstream::nonBlocking //Pstream::scheduled
Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled
);
@ -645,7 +645,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel)
// label& slaveVal = vals[i];
// IPstream::read
// (
// Pstream::scheduled,
// Pstream::commsTypes::scheduled,
// procIDs[i],
// reinterpret_cast<char*>(&slaveVal),
// sizeof(slaveVal),
@ -658,7 +658,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel)
// {
// OPstream::write
// (
// Pstream::scheduled,
// Pstream::commsTypes::scheduled,
// procIDs[0],
// reinterpret_cast<const char*>(&myVal),
// sizeof(myVal),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,7 @@ void Foam::GAMGAgglomeration::gatherList
{
IPstream fromSlave
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[i],
0,
tag,
@ -62,7 +62,7 @@ void Foam::GAMGAgglomeration::gatherList
{
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[0],
0,
tag,
@ -128,7 +128,7 @@ void Foam::GAMGAgglomeration::restrictField
procIDs,
cf,
UPstream::msgType(),
Pstream::nonBlocking //Pstream::scheduled
Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled
);
}
}
@ -201,7 +201,7 @@ void Foam::GAMGAgglomeration::prolongField
cf,
allCf,
UPstream::msgType(),
Pstream::nonBlocking //Pstream::scheduled
Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled
);
forAll(fineToCoarse, i)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -150,7 +150,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
{
interfaces[inti].initInternalFieldTransfer
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
globalIndices
);
}
@ -172,7 +172,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
(
interfaces[inti].internalFieldTransfer
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
globalIndices
)
)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -318,7 +318,7 @@ void Foam::GAMGSolver::gatherMatrices
IPstream fromSlave
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[proci],
0, // bufSize
Pstream::msgType(),
@ -387,7 +387,7 @@ void Foam::GAMGSolver::gatherMatrices
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[0],
0,
Pstream::msgType(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -104,14 +104,18 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_);
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
scalarReceiveBuf_.setSize(scalarSendBuf_.size());
outstandingRecvRequest_ = UPstream::nRequests();
IPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procInterface_.neighbProcNo(),
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
scalarReceiveBuf_.byteSize(),
@ -122,7 +126,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
outstandingSendRequest_ = UPstream::nRequests();
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procInterface_.neighbProcNo(),
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
scalarSendBuf_.byteSize(),
@ -160,7 +164,11 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
const labelUList& faceCells = procInterface_.faceCells();
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,7 +124,11 @@ Foam::ProcessorTopology<Container, ProcPatch>::ProcessorTopology
Pstream::scatterList(*this, Pstream::msgType(), comm);
}
if (Pstream::parRun() && Pstream::defaultCommsType == Pstream::scheduled)
if
(
Pstream::parRun()
&& Pstream::defaultCommsType == Pstream::commsTypes::scheduled
)
{
label patchEvali = 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -993,7 +993,7 @@ void Foam::lduPrimitiveMesh::gather
IPstream fromSlave
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[i],
0, // bufSize
Pstream::msgType(),
@ -1066,7 +1066,7 @@ void Foam::lduPrimitiveMesh::gather
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
procIDs[0],
0,
Pstream::msgType(),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,8 +80,8 @@ void Foam::pointBoundaryMesh::calcGeometry()
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -96,7 +96,7 @@ void Foam::pointBoundaryMesh::calcGeometry()
operator[](patchi).calcGeometry(pBufs);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
@ -126,8 +126,8 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -142,7 +142,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
operator[](patchi).movePoints(pBufs, p);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
@ -172,8 +172,8 @@ void Foam::pointBoundaryMesh::updateMesh()
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -188,7 +188,7 @@ void Foam::pointBoundaryMesh::updateMesh()
operator[](patchi).updateMesh(pBufs);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -161,7 +161,8 @@ public:
const UList<Type>& fld,
List<Type>& allFld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
);
//- Collect data in processor order on master (== procIDs[0]).
@ -174,7 +175,8 @@ public:
const UList<Type>& fld,
List<Type>& allFld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
) const
{
gather(offsets_, comm, procIDs, fld, allFld, tag, commsType);
@ -190,7 +192,8 @@ public:
const labelList& procIDs,
List<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
);
//- Inplace collect data in processor order on master
@ -202,7 +205,8 @@ public:
const labelList& procIDs,
List<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
) const
{
gather(offsets_, comm, procIDs, fld, tag, commsType);
@ -218,7 +222,8 @@ public:
const UList<Type>& allFld,
UList<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
);
//- Distribute data in processor order. Requires fld to be sized!
@ -230,7 +235,8 @@ public:
const UList<Type>& allFld,
UList<Type>& fld,
const int tag = UPstream::msgType(),
const Pstream::commsTypes commsType=Pstream::nonBlocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::nonBlocking
) const
{
scatter(offsets_, comm, procIDs, allFld, fld, tag, commsType);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,11 @@ void Foam::globalIndex::gather
// Assign my local data
SubList<Type>(allFld, fld.size(), 0) = fld;
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
if
(
commsType == Pstream::commsTypes::scheduled
|| commsType == Pstream::commsTypes::blocking
)
{
for (label i = 1; i < procIDs.size(); i++)
{
@ -113,7 +117,11 @@ void Foam::globalIndex::gather
}
else
{
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
if
(
commsType == Pstream::commsTypes::scheduled
|| commsType == Pstream::commsTypes::blocking
)
{
if (contiguous<Type>())
{
@ -209,7 +217,11 @@ void Foam::globalIndex::scatter
{
fld.deepCopy(SubList<Type>(allFld, off[1]-off[0]));
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
if
(
commsType == Pstream::commsTypes::scheduled
|| commsType == Pstream::commsTypes::blocking
)
{
for (label i = 1; i < procIDs.size(); i++)
{
@ -286,7 +298,11 @@ void Foam::globalIndex::scatter
}
else
{
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
if
(
commsType == Pstream::commsTypes::scheduled
|| commsType == Pstream::commsTypes::blocking
)
{
if (contiguous<Type>())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,7 +84,7 @@ void Foam::globalMeshData::initProcAddr()
if (Pstream::parRun())
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send indices of my processor patches to my neighbours
forAll(processorPatches_, i)
@ -401,7 +401,7 @@ void Foam::globalMeshData::calcSharedEdges() const
)
{
// Receive the edges using shared points from the slave.
IPstream fromSlave(Pstream::blocking, slave);
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
EdgeMap<labelList> procSharedEdges(fromSlave);
if (debug)
@ -450,7 +450,7 @@ void Foam::globalMeshData::calcSharedEdges() const
)
{
// Receive the edges using shared points from the slave.
OPstream toSlave(Pstream::blocking, slave);
OPstream toSlave(Pstream::commsTypes::blocking, slave);
toSlave << globalShared;
}
}
@ -459,14 +459,20 @@ void Foam::globalMeshData::calcSharedEdges() const
{
// Send local edges to master
{
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
toMaster << localShared;
}
// Receive merged edges from master.
{
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
fromMaster >> globalShared;
}
}
@ -1920,7 +1926,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
slave++
)
{
IPstream fromSlave(Pstream::blocking, slave);
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
labelList nbrSharedPointAddr;
pointField nbrSharedPoints;
@ -1944,7 +1950,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
{
OPstream toSlave
(
Pstream::blocking,
Pstream::commsTypes::blocking,
slave,
sharedPoints.size()*sizeof(Zero)
);
@ -1956,8 +1962,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
// Slave:
// send points
{
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
toMaster
<< pointAddr
<< UIndirectList<point>(mesh_.points(), pointLabels)();
@ -1965,7 +1974,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
// Receive sharedPoints
{
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::blocking,
Pstream::masterNo()
);
fromMaster >> sharedPoints;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -901,8 +901,8 @@ void Foam::globalPoints::calculateSharedPoints
PstreamBuffers pBufs
(
(
Pstream::defaultCommsType == Pstream::scheduled
? Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::scheduled
? Pstream::commsTypes::nonBlocking
: Pstream::defaultCommsType
)
);
@ -939,8 +939,8 @@ void Foam::globalPoints::calculateSharedPoints
PstreamBuffers pBufs
(
(
Pstream::defaultCommsType == Pstream::scheduled
? Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::scheduled
? Pstream::commsTypes::nonBlocking
: Pstream::defaultCommsType
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,7 +84,7 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
slave++
)
{
IPstream fromSlave(Pstream::scheduled, slave, 0, tag);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave, 0, tag);
List<labelPair> nbrData(fromSlave);
forAll(nbrData, i)
@ -105,20 +105,26 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
slave++
)
{
OPstream toSlave(Pstream::scheduled, slave, 0, tag);
OPstream toSlave(Pstream::commsTypes::scheduled, slave, 0, tag);
toSlave << allComms;
}
}
else
{
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo(), 0, tag);
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
0,
tag
);
toMaster << allComms;
}
{
IPstream fromMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
0,
tag
@ -861,7 +867,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag)
recvFields[domain].setSize(map.size());
IPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<char*>(recvFields[domain].begin()),
recvFields[domain].size()*sizeof(bool),
@ -894,7 +900,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag)
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<const char*>(subField.begin()),
subField.size()*sizeof(bool),
@ -1028,7 +1034,7 @@ void Foam::mapDistributeBase::compact
recvFields[domain].setSize(map.size());
IPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<char*>(recvFields[domain].begin()),
recvFields[domain].size()*sizeof(bool),
@ -1060,7 +1066,7 @@ void Foam::mapDistributeBase::compact
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<const char*>(subField.begin()),
subField.size()*sizeof(bool),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -364,8 +364,9 @@ public:
const int tag = UPstream::msgType()
);
//- Distribute data. Note:schedule only used for Pstream::scheduled
// for now, all others just use send-to-all, receive-from-all.
//- Distribute data. Note:schedule only used for
// Pstream::commsTypes::scheduled for now, all others just use
// send-to-all, receive-from-all.
template<class T, class negateOp>
static void distribute
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -159,7 +159,7 @@ void Foam::mapDistributeBase::distribute
return;
}
if (commsType == Pstream::blocking)
if (commsType == Pstream::commsTypes::blocking)
{
// Since buffered sending can reuse the field to collect the
// received data.
@ -171,7 +171,7 @@ void Foam::mapDistributeBase::distribute
if (domain != Pstream::myProcNo() && map.size())
{
OPstream toNbr(Pstream::blocking, domain, 0, tag);
OPstream toNbr(Pstream::commsTypes::blocking, domain, 0, tag);
List<T> subField(map.size());
forAll(subField, i)
@ -219,7 +219,7 @@ void Foam::mapDistributeBase::distribute
if (domain != Pstream::myProcNo() && map.size())
{
IPstream fromNbr(Pstream::blocking, domain, 0, tag);
IPstream fromNbr(Pstream::commsTypes::blocking, domain, 0, tag);
List<T> subField(fromNbr);
checkReceivedSize(domain, map.size(), subField.size());
@ -236,7 +236,7 @@ void Foam::mapDistributeBase::distribute
}
}
}
else if (commsType == Pstream::scheduled)
else if (commsType == Pstream::commsTypes::scheduled)
{
// Need to make sure I don't overwrite field with received data
// since the data might need to be sent to another processor. So
@ -285,7 +285,13 @@ void Foam::mapDistributeBase::distribute
{
// I am send first, receive next
{
OPstream toNbr(Pstream::scheduled, recvProc, 0, tag);
OPstream toNbr
(
Pstream::commsTypes::scheduled,
recvProc,
0,
tag
);
const labelList& map = subMap[recvProc];
List<T> subField(map.size());
@ -302,7 +308,13 @@ void Foam::mapDistributeBase::distribute
toNbr << subField;
}
{
IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag);
IPstream fromNbr
(
Pstream::commsTypes::scheduled,
recvProc,
0,
tag
);
List<T> subField(fromNbr);
const labelList& map = constructMap[recvProc];
@ -324,7 +336,13 @@ void Foam::mapDistributeBase::distribute
{
// I am receive first, send next
{
IPstream fromNbr(Pstream::scheduled, sendProc, 0, tag);
IPstream fromNbr
(
Pstream::commsTypes::scheduled,
sendProc,
0,
tag
);
List<T> subField(fromNbr);
const labelList& map = constructMap[sendProc];
@ -342,7 +360,13 @@ void Foam::mapDistributeBase::distribute
);
}
{
OPstream toNbr(Pstream::scheduled, sendProc, 0, tag);
OPstream toNbr
(
Pstream::commsTypes::scheduled,
sendProc,
0,
tag
);
const labelList& map = subMap[sendProc];
List<T> subField(map.size());
@ -362,13 +386,13 @@ void Foam::mapDistributeBase::distribute
}
field.transfer(newField);
}
else if (commsType == Pstream::nonBlocking)
else if (commsType == Pstream::commsTypes::nonBlocking)
{
label nOutstanding = Pstream::nRequests();
if (!contiguous<T>())
{
PstreamBuffers pBufs(Pstream::nonBlocking, tag);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
// Stream data into buffer
for (label domain = 0; domain < Pstream::nProcs(); domain++)
@ -484,7 +508,7 @@ void Foam::mapDistributeBase::distribute
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<const char*>(subField.begin()),
subField.byteSize(),
@ -506,7 +530,7 @@ void Foam::mapDistributeBase::distribute
recvFields[domain].setSize(map.size());
IPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<char*>(recvFields[domain].begin()),
recvFields[domain].byteSize(),
@ -591,7 +615,7 @@ void Foam::mapDistributeBase::distribute
else
{
FatalErrorInFunction
<< "Unknown communication schedule " << commsType
<< "Unknown communication schedule " << int(commsType)
<< abort(FatalError);
}
}
@ -638,7 +662,7 @@ void Foam::mapDistributeBase::distribute
return;
}
if (commsType == Pstream::blocking)
if (commsType == Pstream::commsTypes::blocking)
{
// Since buffered sending can reuse the field to collect the
// received data.
@ -650,7 +674,7 @@ void Foam::mapDistributeBase::distribute
if (domain != Pstream::myProcNo() && map.size())
{
OPstream toNbr(Pstream::blocking, domain, 0, tag);
OPstream toNbr(Pstream::commsTypes::blocking, domain, 0, tag);
List<T> subField(map.size());
forAll(subField, i)
{
@ -690,7 +714,7 @@ void Foam::mapDistributeBase::distribute
if (domain != Pstream::myProcNo() && map.size())
{
IPstream fromNbr(Pstream::blocking, domain, 0, tag);
IPstream fromNbr(Pstream::commsTypes::blocking, domain, 0, tag);
List<T> subField(fromNbr);
checkReceivedSize(domain, map.size(), subField.size());
@ -707,7 +731,7 @@ void Foam::mapDistributeBase::distribute
}
}
}
else if (commsType == Pstream::scheduled)
else if (commsType == Pstream::commsTypes::scheduled)
{
// Need to make sure I don't overwrite field with received data
// since the data might need to be sent to another processor. So
@ -759,7 +783,13 @@ void Foam::mapDistributeBase::distribute
{
// I am send first, receive next
{
OPstream toNbr(Pstream::scheduled, recvProc, 0, tag);
OPstream toNbr
(
Pstream::commsTypes::scheduled,
recvProc,
0,
tag
);
const labelList& map = subMap[recvProc];
@ -777,7 +807,13 @@ void Foam::mapDistributeBase::distribute
toNbr << subField;
}
{
IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag);
IPstream fromNbr
(
Pstream::commsTypes::scheduled,
recvProc,
0,
tag
);
List<T> subField(fromNbr);
const labelList& map = constructMap[recvProc];
@ -798,7 +834,13 @@ void Foam::mapDistributeBase::distribute
{
// I am receive first, send next
{
IPstream fromNbr(Pstream::scheduled, sendProc, 0, tag);
IPstream fromNbr
(
Pstream::commsTypes::scheduled,
sendProc,
0,
tag
);
List<T> subField(fromNbr);
const labelList& map = constructMap[sendProc];
@ -815,7 +857,13 @@ void Foam::mapDistributeBase::distribute
);
}
{
OPstream toNbr(Pstream::scheduled, sendProc, 0, tag);
OPstream toNbr
(
Pstream::commsTypes::scheduled,
sendProc,
0,
tag
);
const labelList& map = subMap[sendProc];
@ -836,13 +884,13 @@ void Foam::mapDistributeBase::distribute
}
field.transfer(newField);
}
else if (commsType == Pstream::nonBlocking)
else if (commsType == Pstream::commsTypes::nonBlocking)
{
label nOutstanding = Pstream::nRequests();
if (!contiguous<T>())
{
PstreamBuffers pBufs(Pstream::nonBlocking, tag);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
// Stream data into buffer
for (label domain = 0; domain < Pstream::nProcs(); domain++)
@ -961,7 +1009,7 @@ void Foam::mapDistributeBase::distribute
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<const char*>(subField.begin()),
subField.size()*sizeof(T),
@ -983,7 +1031,7 @@ void Foam::mapDistributeBase::distribute
recvFields[domain].setSize(map.size());
UIPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
domain,
reinterpret_cast<char*>(recvFields[domain].begin()),
recvFields[domain].size()*sizeof(T),
@ -1067,7 +1115,7 @@ void Foam::mapDistributeBase::distribute
else
{
FatalErrorInFunction
<< "Unknown communication schedule " << commsType
<< "Unknown communication schedule " << int(commsType)
<< abort(FatalError);
}
}
@ -1155,11 +1203,11 @@ void Foam::mapDistributeBase::distribute
const int tag
) const
{
if (Pstream::defaultCommsType == Pstream::nonBlocking)
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
{
distribute
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
constructSize_,
subMap_,
@ -1171,11 +1219,11 @@ void Foam::mapDistributeBase::distribute
tag
);
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
schedule(),
constructSize_,
subMap_,
@ -1191,7 +1239,7 @@ void Foam::mapDistributeBase::distribute
{
distribute
(
Pstream::blocking,
Pstream::commsTypes::blocking,
List<labelPair>(),
constructSize_,
subMap_,
@ -1245,11 +1293,11 @@ void Foam::mapDistributeBase::reverseDistribute
const int tag
) const
{
if (Pstream::defaultCommsType == Pstream::nonBlocking)
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
{
distribute
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
constructSize,
constructMap_,
@ -1261,11 +1309,11 @@ void Foam::mapDistributeBase::reverseDistribute
tag
);
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
schedule(),
constructSize,
constructMap_,
@ -1281,7 +1329,7 @@ void Foam::mapDistributeBase::reverseDistribute
{
distribute
(
Pstream::blocking,
Pstream::commsTypes::blocking,
List<labelPair>(),
constructSize,
constructMap_,
@ -1308,11 +1356,11 @@ void Foam::mapDistributeBase::reverseDistribute
const int tag
) const
{
if (Pstream::defaultCommsType == Pstream::nonBlocking)
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
{
distribute
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
List<labelPair>(),
constructSize,
constructMap_,
@ -1326,11 +1374,11 @@ void Foam::mapDistributeBase::reverseDistribute
tag
);
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
distribute
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
schedule(),
constructSize,
constructMap_,
@ -1348,7 +1396,7 @@ void Foam::mapDistributeBase::reverseDistribute
{
distribute
(
Pstream::blocking,
Pstream::commsTypes::blocking,
List<labelPair>(),
constructSize,
constructMap_,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -223,8 +223,8 @@ void Foam::polyBoundaryMesh::calcGeometry()
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -239,7 +239,7 @@ void Foam::polyBoundaryMesh::calcGeometry()
operator[](patchi).calcGeometry(pBufs);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
@ -1010,8 +1010,8 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -1026,7 +1026,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
operator[](patchi).movePoints(pBufs, p);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
@ -1060,8 +1060,8 @@ void Foam::polyBoundaryMesh::updateMesh()
if
(
Pstream::defaultCommsType == Pstream::blocking
|| Pstream::defaultCommsType == Pstream::nonBlocking
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
)
{
forAll(*this, patchi)
@ -1076,7 +1076,7 @@ void Foam::polyBoundaryMesh::updateMesh()
operator[](patchi).updateMesh(pBufs);
}
}
else if (Pstream::defaultCommsType == Pstream::scheduled)
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -129,7 +129,7 @@ void Foam::syncTools::syncPointMap
if (Pstream::parRun())
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send
@ -311,7 +311,7 @@ void Foam::syncTools::syncPointMap
slave++
)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
Map<T> nbrValues(fromSlave);
// Merge neighbouring values with my values
@ -335,7 +335,7 @@ void Foam::syncTools::syncPointMap
slave++
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << sharedPointValues;
}
}
@ -343,14 +343,18 @@ void Foam::syncTools::syncPointMap
{
// Slave: send to master
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster << sharedPointValues;
}
// Receive merged values
{
IPstream fromMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
fromMaster >> sharedPointValues;
@ -405,7 +409,7 @@ void Foam::syncTools::syncEdgeMap
if (Pstream::parRun())
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send
@ -687,7 +691,7 @@ void Foam::syncTools::syncEdgeMap
slave++
)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
EdgeMap<T> nbrValues(fromSlave);
// Merge neighbouring values with my values
@ -712,7 +716,7 @@ void Foam::syncTools::syncEdgeMap
)
{
OPstream toSlave(Pstream::scheduled, slave);
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
toSlave << sharedEdgeValues;
}
}
@ -720,12 +724,20 @@ void Foam::syncTools::syncEdgeMap
{
// Send to master
{
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
OPstream toMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
toMaster << sharedEdgeValues;
}
// Receive merged values
{
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
IPstream fromMaster
(
Pstream::commsTypes::scheduled,
Pstream::masterNo()
);
fromMaster >> sharedEdgeValues;
}
}
@ -799,7 +811,7 @@ void Foam::syncTools::syncEdgeMap
//
// if (Pstream::parRun())
// {
// PstreamBuffers pBufs(Pstream::nonBlocking);
// PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
//
// // Send
//
@ -1302,7 +1314,7 @@ void Foam::syncTools::syncBoundaryFaceList
if (parRun)
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send
@ -1422,7 +1434,7 @@ void Foam::syncTools::syncFaceList
if (parRun)
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -182,7 +182,7 @@ void Foam::PatchTools::gatherAndMerge
// Receive slave ones
for (int slave=1; slave<Pstream::nProcs(); slave++)
{
IPstream fromSlave(Pstream::scheduled, slave);
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
pointField slavePoints(fromSlave);
List<FaceType> slaveFaces(fromSlave);
@ -210,7 +210,7 @@ void Foam::PatchTools::gatherAndMerge
// be improved.
OPstream toMaster
(
Pstream::scheduled,
Pstream::commsTypes::scheduled,
Pstream::masterNo(),
myPoints.byteSize() + 4*sizeof(label)*myFaces.size()
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,7 @@ Foam::UIPstream::UIPstream
setOpened();
setGood();
if (commsType == UPstream::nonBlocking)
if (commsType == commsTypes::nonBlocking)
{
// Message is already received into externalBuf
}
@ -135,7 +135,11 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
clearAtEnd_(true),
messageSize_(0)
{
if (commsType() != UPstream::scheduled && !buffers.finishedSendsCalled_)
if
(
commsType() != UPstream::commsTypes::scheduled
&& !buffers.finishedSendsCalled_
)
{
FatalErrorInFunction
<< "PstreamBuffers::finishedSends() never called." << endl
@ -147,7 +151,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
setOpened();
setGood();
if (commsType() == UPstream::nonBlocking)
if (commsType() == commsTypes::nonBlocking)
{
// Message is already received into externalBuf
messageSize_ = buffers.recvBuf_[fromProcNo].size();
@ -251,7 +255,7 @@ Foam::label Foam::UIPstream::read
error::printStack(Pout);
}
if (commsType == blocking || commsType == scheduled)
if (commsType == commsTypes::blocking || commsType == commsTypes::scheduled)
{
MPI_Status status;
@ -301,7 +305,7 @@ Foam::label Foam::UIPstream::read
return messageSize;
}
else if (commsType == nonBlocking)
else if (commsType == commsTypes::nonBlocking)
{
MPI_Request request;
@ -344,7 +348,7 @@ Foam::label Foam::UIPstream::read
{
FatalErrorInFunction
<< "Unsupported communications type "
<< commsType
<< int(commsType)
<< Foam::abort(FatalError);
return 0;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,7 +68,7 @@ bool Foam::UOPstream::write
bool transferFailed = true;
if (commsType == blocking)
if (commsType == commsTypes::blocking)
{
transferFailed = MPI_Bsend
(
@ -88,7 +88,7 @@ bool Foam::UOPstream::write
<< Foam::endl;
}
}
else if (commsType == scheduled)
else if (commsType == commsTypes::scheduled)
{
transferFailed = MPI_Send
(
@ -108,7 +108,7 @@ bool Foam::UOPstream::write
<< Foam::endl;
}
}
else if (commsType == nonBlocking)
else if (commsType == commsTypes::nonBlocking)
{
MPI_Request request;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -221,17 +221,14 @@ public:
// Member functions
// Evaluation functions
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Transfer data for external source
virtual void transferData(OFstream& os) const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Transfer data for external source
virtual void transferData(OFstream& os) const;
//- Write
virtual void write(Ostream&) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -148,19 +148,14 @@ public:
// Member functions
// Evaluation functions
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
);
//- Evaluate the patchField
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
);
// I-O
//- Write
virtual void write(Ostream&) const;
//- Write
virtual void write(Ostream&) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1763,7 +1763,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
// Allocate buffers
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// What to send to neighbouring domains
@ -1792,7 +1792,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
}
// Pstream for sending mesh and fields
//OPstream str(Pstream::blocking, recvProc);
//OPstream str(Pstream::commsTypes::blocking, recvProc);
UOPstream str(recvProc, pBufs);
// Mesh subsetting engine

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,7 +105,7 @@ void Foam::fvMeshSubset::doCoupledPatches
if (syncPar && Pstream::parRun())
{
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send face usage across processor patches
forAll(oldPatches, oldPatchi)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -459,12 +459,12 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields
if (patchSchedule[patchEvalI].init)
{
displacementBf[patchi]
.initEvaluate(Pstream::scheduled);
.initEvaluate(Pstream::commsTypes::scheduled);
}
else
{
displacementBf[patchi]
.evaluate(Pstream::scheduled);
.evaluate(Pstream::commsTypes::scheduled);
}
}
}
@ -597,12 +597,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
if (patchSchedule[patchEvalI].init)
{
displacementBf[patchi]
.initEvaluate(Pstream::blocking);
.initEvaluate(Pstream::commsTypes::blocking);
}
else
{
displacementBf[patchi]
.evaluate(Pstream::blocking);
.evaluate(Pstream::commsTypes::blocking);
}
}
}
@ -618,12 +618,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
if (patchSchedule[patchEvalI].init)
{
displacementBf[patchi]
.initEvaluate(Pstream::blocking);
.initEvaluate(Pstream::commsTypes::blocking);
}
else
{
displacementBf[patchi]
.evaluate(Pstream::blocking);
.evaluate(Pstream::commsTypes::blocking);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,12 +64,12 @@ void Foam::motionSmootherAlgo::checkConstraints
forAllReverse(bFld, patchi)
{
bFld[patchi].initEvaluate(Pstream::blocking); // buffered
bFld[patchi].initEvaluate(Pstream::commsTypes::blocking); // buffered
}
forAllReverse(bFld, patchi)
{
bFld[patchi].evaluate(Pstream::blocking);
bFld[patchi].evaluate(Pstream::commsTypes::blocking);
}

View File

@ -1429,7 +1429,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// Send to neighbours
OPstream toNbr(Pstream::blocking, proci);
OPstream toNbr(Pstream::commsTypes::blocking, proci);
toNbr << newSplitCells << newVisibleCells;
}
@ -1447,7 +1447,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{
IPstream fromNbr(Pstream::blocking, proci);
IPstream fromNbr(Pstream::commsTypes::blocking, proci);
List<splitCell8> newSplitCells(fromNbr);
labelList newVisibleCells(fromNbr);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1931,7 +1931,7 @@ void Foam::polyTopoChange::reorderCoupledFaces
// Rotation on new faces.
labelList rotation(faces_.size(), 0);
PstreamBuffers pBufs(Pstream::nonBlocking);
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
// Send ordering
forAll(boundary, patchi)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,19 +122,17 @@ public:
// Member functions
// Evaluation functions
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -204,7 +204,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return face-gradient transform diagonal

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -136,13 +136,11 @@ public:
// Member functions
// Evaluation functions
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -198,7 +198,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -242,7 +242,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -176,14 +176,16 @@ public:
//- Initialise the evaluation of the patch field
virtual void initEvaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}
//- Evaluate the patch field, sets Updated to false
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -149,7 +149,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return the matrix diagonal coefficients corresponding to the

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,7 +64,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
<< exit(FatalIOError);
}
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,7 +68,7 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
if (!dict.found("value") && this->coupled())
{
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
if (!dict.found("value") && this->coupled())
{
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
cyclicFvPatchField<Type>(p, iF, dict)
{
// Call this evaluation in derived classes
//this->evaluate(Pstream::blocking);
//this->evaluate(Pstream::commsTypes::blocking);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,7 +63,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::jumpCyclicAMIFvPatchField
cyclicAMIFvPatchField<Type>(p, iF, dict)
{
// Call this evaluation in derived classes
//this->evaluate(Pstream::blocking);
//this->evaluate(Pstream::commsTypes::blocking);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -225,14 +225,18 @@ void Foam::processorFvPatchField<Type>::initEvaluate
{
this->patchInternalField(sendBuf_);
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path. Receive into *this
this->setSize(sendBuf_.size());
outstandingRecvRequest_ = UPstream::nRequests();
UIPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(this->begin()),
this->byteSize(),
@ -243,7 +247,7 @@ void Foam::processorFvPatchField<Type>::initEvaluate
outstandingSendRequest_ = UPstream::nRequests();
UOPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(sendBuf_.begin()),
this->byteSize(),
@ -267,7 +271,11 @@ void Foam::processorFvPatchField<Type>::evaluate
{
if (Pstream::parRun())
{
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path. Received into *this
@ -318,7 +326,11 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
{
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if (debug && !this->ready())
@ -334,7 +346,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
outstandingRecvRequest_ = UPstream::nRequests();
UIPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
scalarReceiveBuf_.byteSize(),
@ -345,7 +357,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
outstandingSendRequest_ = UPstream::nRequests();
UOPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
scalarSendBuf_.byteSize(),
@ -379,7 +391,11 @@ void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
const labelUList& faceCells = this->patch().faceCells();
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if
@ -437,7 +453,11 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
{
this->patch().patchInternalField(psiInternal, sendBuf_);
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if (debug && !this->ready())
@ -453,7 +473,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
outstandingRecvRequest_ = UPstream::nRequests();
IPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(receiveBuf_.begin()),
receiveBuf_.byteSize(),
@ -464,7 +484,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
outstandingSendRequest_ = UPstream::nRequests();
OPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(sendBuf_.begin()),
sendBuf_.byteSize(),
@ -497,7 +517,11 @@ void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
const labelUList& faceCells = this->patch().faceCells();
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,11 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
{
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if (debug && !this->ready())
@ -60,7 +64,7 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
outstandingRecvRequest_ = UPstream::nRequests();
UIPstream::read
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
scalarReceiveBuf_.byteSize(),
@ -71,7 +75,7 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
outstandingSendRequest_ = UPstream::nRequests();
UOPstream::write
(
Pstream::nonBlocking,
Pstream::commsTypes::nonBlocking,
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
scalarSendBuf_.byteSize(),
@ -105,7 +109,11 @@ void processorFvPatchField<scalar>::updateInterfaceMatrix
const labelUList& faceCells = this->patch().faceCells();
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
if
(
commsType == Pstream::commsTypes::nonBlocking
&& !Pstream::floatTransfer
)
{
// Fast path.
if

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -66,7 +66,7 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
<< exit(FatalIOError);
}
if (Pstream::defaultCommsType == Pstream::scheduled)
if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
{
WarningInFunction
<< "Scheduled communication with split cyclics not supported."

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -143,19 +143,17 @@ public:
// Member functions
// Evaluation functions
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -138,19 +138,17 @@ public:
// Member functions
// Evaluation functions
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Return gradient at boundary
virtual tmp<Field<Type>> snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
//- Return face-gradient transform diagonal
virtual tmp<Field<Type>> snGradTransformDiag() const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -227,7 +227,7 @@ public:
//- Evaluate the patch field, sets Updated to false
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Write

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -239,7 +239,7 @@ public:
// to false.
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Write

View File

@ -1,8 +1,8 @@
/*---------------------------------------------------------------------------*\
/*---------------------------------------------------------------------------* \
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -308,38 +308,32 @@ public:
// Member functions
// Access
//- Return the log flag
bool log() const
{
return log_;
}
//- Return the log flag
bool log() const
{
return log_;
}
//- Return the master flag
bool master() const
{
return master_;
}
//- Return the master flag
bool master() const
{
return master_;
}
//- Return the master flag
bool& master()
{
return master_;
}
//- Return the master flag
bool& master()
{
return master_;
}
// Evaluation functions
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Transfer data for external source
virtual void transferData(OFstream& os) const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
);
//- Transfer data for external source
virtual void transferData(OFstream& os) const;
//- Write the geometry to the comms dir
void writeGeometry() const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -117,7 +117,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
}
else
{
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
}
else
{
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,7 +78,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
}
else
{
this->evaluate(Pstream::blocking);
this->evaluate(Pstream::commsTypes::blocking);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -194,7 +194,8 @@ public:
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return face-gradient transform diagonal

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,7 @@ flowRateInletVelocityFvPatchVectorField
}
else
{
evaluate(Pstream::blocking);
evaluate(Pstream::commsTypes::blocking);
}
}

Some files were not shown because too many files have changed in this diff Show More