mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Updated UPstream::commsTypes to use the C++11 enum class
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -184,7 +184,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,11 @@ int main(int argc, char *argv[])
|
|||||||
Serr<< "slave sending to master "
|
Serr<< "slave sending to master "
|
||||||
<< Pstream::masterNo() << endl;
|
<< Pstream::masterNo() << endl;
|
||||||
|
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
|
|
||||||
FixedList<label, 2> list3;
|
FixedList<label, 2> list3;
|
||||||
list3[0] = 0;
|
list3[0] = 0;
|
||||||
@ -109,7 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Serr << "master receiving from slave " << slave << endl;
|
Serr << "master receiving from slave " << slave << endl;
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||||
FixedList<label, 2> list3(fromSlave);
|
FixedList<label, 2> list3(fromSlave);
|
||||||
|
|
||||||
Serr<< list3 << endl;
|
Serr<< list3 << endl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ scalar sumReduce
|
|||||||
scalar slaveValue;
|
scalar slaveValue;
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
slave,
|
slave,
|
||||||
reinterpret_cast<char*>(&slaveValue),
|
reinterpret_cast<char*>(&slaveValue),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -87,7 +87,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::blocking,
|
UPstream::commsTypes::blocking,
|
||||||
slave,
|
slave,
|
||||||
reinterpret_cast<const char*>(&sum),
|
reinterpret_cast<const char*>(&sum),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -101,7 +101,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::blocking,
|
UPstream::commsTypes::blocking,
|
||||||
UPstream::masterNo(),
|
UPstream::masterNo(),
|
||||||
reinterpret_cast<const char*>(&localValue),
|
reinterpret_cast<const char*>(&localValue),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
@ -113,7 +113,7 @@ scalar sumReduce
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::blocking,
|
UPstream::commsTypes::blocking,
|
||||||
UPstream::masterNo(),
|
UPstream::masterNo(),
|
||||||
reinterpret_cast<char*>(&sum),
|
reinterpret_cast<char*>(&sum),
|
||||||
sizeof(scalar),
|
sizeof(scalar),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
|||||||
Pstream::myProcNo()
|
Pstream::myProcNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
if (Pstream::myProcNo() != Pstream::masterNo())
|
if (Pstream::myProcNo() != Pstream::masterNo())
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Send allData back
|
// Send allData back
|
||||||
PstreamBuffers pBufs2(Pstream::nonBlocking);
|
PstreamBuffers pBufs2(Pstream::commsTypes::nonBlocking);
|
||||||
if (Pstream::myProcNo() == Pstream::masterNo())
|
if (Pstream::myProcNo() == Pstream::masterNo())
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
@ -149,7 +149,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Do a non-blocking send inbetween
|
// Do a non-blocking send inbetween
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,13 +147,21 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Perr<< "slave sending to master "
|
Perr<< "slave sending to master "
|
||||||
<< Pstream::masterNo() << endl;
|
<< Pstream::masterNo() << endl;
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << data;
|
toMaster << data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Perr<< "slave receiving from master "
|
Perr<< "slave receiving from master "
|
||||||
<< Pstream::masterNo() << endl;
|
<< Pstream::masterNo() << endl;
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> data;
|
fromMaster >> data;
|
||||||
|
|
||||||
Perr<< data << endl;
|
Perr<< data << endl;
|
||||||
@ -168,7 +176,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Perr << "master receiving from slave " << slave << endl;
|
Perr << "master receiving from slave " << slave << endl;
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||||
fromSlave >> data;
|
fromSlave >> data;
|
||||||
|
|
||||||
Perr<< data << endl;
|
Perr<< data << endl;
|
||||||
@ -182,7 +190,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
Perr << "master sending to slave " << slave << endl;
|
Perr << "master sending to slave " << slave << endl;
|
||||||
OPstream toSlave(Pstream::blocking, slave);
|
OPstream toSlave(Pstream::commsTypes::blocking, slave);
|
||||||
toSlave << data;
|
toSlave << data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -63,7 +63,7 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
|
|||||||
slave++, procIndex++
|
slave++, procIndex++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
fromSlave >> this->operator[](procIndex);
|
fromSlave >> this->operator[](procIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
|
|||||||
slave++, procIndex++
|
slave++, procIndex++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::scheduled, slave);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
|
|
||||||
if (redistribute)
|
if (redistribute)
|
||||||
{
|
{
|
||||||
@ -92,13 +92,21 @@ Gather<T0>::Gather(const T0& localData, const bool redistribute)
|
|||||||
{
|
{
|
||||||
// Slave: send my local data to master
|
// Slave: send my local data to master
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << localData;
|
toMaster << localData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Receive data from master
|
// Receive data from master
|
||||||
{
|
{
|
||||||
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
if (redistribute)
|
if (redistribute)
|
||||||
{
|
{
|
||||||
fromMaster >> *this;
|
fromMaster >> *this;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -641,7 +641,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
|
|||||||
labelList rotation(faces.size(), label(0));
|
labelList rotation(faces.size(), label(0));
|
||||||
labelList faceMap(faces.size(), label(-1));
|
labelList faceMap(faces.size(), label(-1));
|
||||||
|
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send ordering
|
// Send ordering
|
||||||
forAll(sortMesh.boundaryMesh(), patchi)
|
forAll(sortMesh.boundaryMesh(), patchi)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -417,7 +417,7 @@ void Foam::mergeAndWrite
|
|||||||
// Receive slave ones
|
// Receive slave ones
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
|
|
||||||
pointField slavePts(fromSlave);
|
pointField slavePts(fromSlave);
|
||||||
labelList slaveIDs(fromSlave);
|
labelList slaveIDs(fromSlave);
|
||||||
@ -433,7 +433,7 @@ void Foam::mergeAndWrite
|
|||||||
// be improved.
|
// be improved.
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
myPoints.byteSize() + myIDs.byteSize()
|
myPoints.byteSize() + myIDs.byteSize()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -348,7 +348,11 @@ void syncPoints
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OPstream toNbr(Pstream::blocking, procPatch.neighbProcNo());
|
OPstream toNbr
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
procPatch.neighbProcNo()
|
||||||
|
);
|
||||||
toNbr << patchInfo;
|
toNbr << patchInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -376,7 +380,7 @@ void syncPoints
|
|||||||
// so cannot use Pstream::read.
|
// so cannot use Pstream::read.
|
||||||
IPstream fromNbr
|
IPstream fromNbr
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
procPatch.neighbProcNo()
|
procPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
fromNbr >> nbrPatchInfo;
|
fromNbr >> nbrPatchInfo;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -394,7 +394,7 @@ void getInterfaceSizes
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||||
|
|
||||||
EdgeMap<Map<label>> slaveSizes(fromSlave);
|
EdgeMap<Map<label>> slaveSizes(fromSlave);
|
||||||
|
|
||||||
@ -439,7 +439,11 @@ void getInterfaceSizes
|
|||||||
{
|
{
|
||||||
// Send to master
|
// Send to master
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << regionsToSize;
|
toMaster << regionsToSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,14 +97,18 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::scheduled, slave);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
toSlave << patchEntries;
|
toSlave << patchEntries;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Receive patches
|
// Receive patches
|
||||||
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> patchEntries;
|
fromMaster >> patchEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -304,7 +304,7 @@ void readFields
|
|||||||
{
|
{
|
||||||
if (!haveMesh[proci])
|
if (!haveMesh[proci])
|
||||||
{
|
{
|
||||||
OPstream toProc(Pstream::blocking, proci);
|
OPstream toProc(Pstream::commsTypes::blocking, proci);
|
||||||
toProc<< tsubfld();
|
toProc<< tsubfld();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,7 +320,11 @@ void readFields
|
|||||||
const word& name = masterNames[i];
|
const word& name = masterNames[i];
|
||||||
|
|
||||||
// Receive field
|
// Receive field
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
dictionary fieldDict(fromMaster);
|
dictionary fieldDict(fromMaster);
|
||||||
|
|
||||||
fields.set
|
fields.set
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -110,7 +110,7 @@ void writeField
|
|||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
scalarField slaveData(fromSlave);
|
scalarField slaveData(fromSlave);
|
||||||
ensightFile.write(slaveData);
|
ensightFile.write(slaveData);
|
||||||
}
|
}
|
||||||
@ -120,7 +120,11 @@ void writeField
|
|||||||
{
|
{
|
||||||
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
|
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);
|
toMaster<< vf.component(cmpt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -694,7 +694,7 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
// Slaves
|
// Slaves
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
labelList polys(fromSlave);
|
labelList polys(fromSlave);
|
||||||
cellList cellFaces(fromSlave);
|
cellList cellFaces(fromSlave);
|
||||||
|
|
||||||
@ -708,7 +708,11 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< meshCellSets_.polys << cellFaces;
|
toMaster<< meshCellSets_.polys << cellFaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -727,7 +731,7 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
// Slaves
|
// Slaves
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
labelList polys(fromSlave);
|
labelList polys(fromSlave);
|
||||||
cellList cellFaces(fromSlave);
|
cellList cellFaces(fromSlave);
|
||||||
faceList faces(fromSlave);
|
faceList faces(fromSlave);
|
||||||
@ -743,7 +747,11 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< meshCellSets_.polys << cellFaces << faces;
|
toMaster<< meshCellSets_.polys << cellFaces << faces;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -763,7 +771,7 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
// Slaves
|
// Slaves
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
labelList polys(fromSlave);
|
labelList polys(fromSlave);
|
||||||
cellList cellFaces(fromSlave);
|
cellList cellFaces(fromSlave);
|
||||||
faceList faces(fromSlave);
|
faceList faces(fromSlave);
|
||||||
@ -781,7 +789,11 @@ void Foam::ensightMesh::writeAllPolys
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< meshCellSets_.polys << cellFaces << faces << faceOwner;
|
toMaster<< meshCellSets_.polys << cellFaces << faces << faceOwner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -807,7 +819,7 @@ void Foam::ensightMesh::writeAllPrims
|
|||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
cellShapeList cellShapes(fromSlave);
|
cellShapeList cellShapes(fromSlave);
|
||||||
|
|
||||||
writePrims(cellShapes, ensightGeometryFile);
|
writePrims(cellShapes, ensightGeometryFile);
|
||||||
@ -815,7 +827,11 @@ void Foam::ensightMesh::writeAllPrims
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< cellShapes;
|
toMaster<< cellShapes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -867,7 +883,7 @@ void Foam::ensightMesh::writeAllFacePrims
|
|||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
faceList patchFaces(fromSlave);
|
faceList patchFaces(fromSlave);
|
||||||
|
|
||||||
writeFacePrims(patchFaces, ensightGeometryFile);
|
writeFacePrims(patchFaces, ensightGeometryFile);
|
||||||
@ -875,7 +891,11 @@ void Foam::ensightMesh::writeAllFacePrims
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< UIndirectList<face>(patchFaces, prims);
|
toMaster<< UIndirectList<face>(patchFaces, prims);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -932,7 +952,7 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
faceList patchFaces(fromSlave);
|
faceList patchFaces(fromSlave);
|
||||||
|
|
||||||
writeNSidedNPointsPerFace
|
writeNSidedNPointsPerFace
|
||||||
@ -944,7 +964,11 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< UIndirectList<face>(patchFaces, prims);
|
toMaster<< UIndirectList<face>(patchFaces, prims);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,7 +983,7 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
|
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
faceList patchFaces(fromSlave);
|
faceList patchFaces(fromSlave);
|
||||||
|
|
||||||
writeNSidedPoints(patchFaces, ensightGeometryFile);
|
writeNSidedPoints(patchFaces, ensightGeometryFile);
|
||||||
@ -967,7 +991,11 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster<< UIndirectList<face>(patchFaces, prims);
|
toMaster<< UIndirectList<face>(patchFaces, prims);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -997,7 +1025,7 @@ void Foam::ensightMesh::writeAllPoints
|
|||||||
ensightGeometryFile.write(uniquePoints.component(d));
|
ensightGeometryFile.write(uniquePoints.component(d));
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
scalarField patchPointsComponent(fromSlave);
|
scalarField patchPointsComponent(fromSlave);
|
||||||
ensightGeometryFile.write(patchPointsComponent);
|
ensightGeometryFile.write(patchPointsComponent);
|
||||||
}
|
}
|
||||||
@ -1007,7 +1035,11 @@ void Foam::ensightMesh::writeAllPoints
|
|||||||
{
|
{
|
||||||
for (direction d=0; d<vector::nComponents; d++)
|
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);
|
toMaster<< uniquePoints.component(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,8 +43,8 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
label nReq = Pstream::nRequests();
|
||||||
@ -67,7 +67,7 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::parRun()
|
Pstream::parRun()
|
||||||
&& Pstream::defaultCommsType == Pstream::nonBlocking
|
&& Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Pstream::waitRequests(nReq);
|
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 =
|
const lduSchedule& patchSchedule =
|
||||||
fld.mesh().globalData().patchSchedule();
|
fld.mesh().globalData().patchSchedule();
|
||||||
@ -105,11 +105,11 @@ void evaluateConstraintTypes(GeometricField<Type, fvPatchField, volMesh>& fld)
|
|||||||
{
|
{
|
||||||
if (patchSchedule[patchEvali].init)
|
if (patchSchedule[patchEvali].init)
|
||||||
{
|
{
|
||||||
tgtField.initEvaluate(Pstream::scheduled);
|
tgtField.initEvaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tgtField.evaluate(Pstream::scheduled);
|
tgtField.evaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,7 +112,7 @@ void Foam::ParSortableList<Type>::checkAndSend
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::blocking, destProci);
|
OPstream toSlave(Pstream::commsTypes::blocking, destProci);
|
||||||
toSlave << values << indices;
|
toSlave << values << indices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ void Foam::ParSortableList<Type>::sort()
|
|||||||
Pout<< "Receiving from " << proci << endl;
|
Pout<< "Receiving from " << proci << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPstream fromSlave(Pstream::blocking, proci);
|
IPstream fromSlave(Pstream::commsTypes::blocking, proci);
|
||||||
|
|
||||||
fromSlave >> recValues >> recIndices;
|
fromSlave >> recValues >> recIndices;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -99,7 +99,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
|
|||||||
// not. Could reset all the ITstreams to ascii?
|
// not. Could reset all the ITstreams to ascii?
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
@ -121,7 +121,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
|
|||||||
}
|
}
|
||||||
OPstream toBelow
|
OPstream toBelow
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -83,7 +83,7 @@ void Foam::PstreamBuffers::finishedSends(const bool block)
|
|||||||
{
|
{
|
||||||
finishedSendsCalled_ = true;
|
finishedSendsCalled_ = true;
|
||||||
|
|
||||||
if (commsType_ == UPstream::nonBlocking)
|
if (commsType_ == UPstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
Pstream::exchange<DynamicList<char>, char>
|
Pstream::exchange<DynamicList<char>, char>
|
||||||
(
|
(
|
||||||
@ -101,7 +101,7 @@ void Foam::PstreamBuffers::finishedSends(labelList& recvSizes, const bool block)
|
|||||||
{
|
{
|
||||||
finishedSendsCalled_ = true;
|
finishedSendsCalled_ = true;
|
||||||
|
|
||||||
if (commsType_ == UPstream::nonBlocking)
|
if (commsType_ == UPstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
Pstream::exchangeSizes(sendBuf_, recvSizes, comm_);
|
Pstream::exchangeSizes(sendBuf_, recvSizes, comm_);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,7 +35,7 @@ Description
|
|||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
PstreamBuffers pBuffers(Pstream::nonBlocking);
|
PstreamBuffers pBuffers(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,7 +113,7 @@ Foam::UOPstream::UOPstream(const int toProcNo, PstreamBuffers& buffers)
|
|||||||
sendBuf_(buffers.sendBuf_[toProcNo]),
|
sendBuf_(buffers.sendBuf_[toProcNo]),
|
||||||
tag_(buffers.tag_),
|
tag_(buffers.tag_),
|
||||||
comm_(buffers.comm_),
|
comm_(buffers.comm_),
|
||||||
sendAtDestruct_(buffers.commsType_ != UPstream::nonBlocking)
|
sendAtDestruct_(buffers.commsType_ != UPstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
setOpened();
|
setOpened();
|
||||||
setGood();
|
setGood();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,7 +62,7 @@ class UPstream
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Types of communications
|
//- Types of communications
|
||||||
enum commsTypes
|
enum class commsTypes
|
||||||
{
|
{
|
||||||
blocking,
|
blocking,
|
||||||
scheduled,
|
scheduled,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ void Foam::Pstream::combineGather
|
|||||||
T value;
|
T value;
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<char*>(&value),
|
reinterpret_cast<char*>(&value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -83,7 +83,14 @@ void Foam::Pstream::combineGather
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
|
IPstream fromBelow
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
belowID,
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
T value(fromBelow);
|
T value(fromBelow);
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
@ -109,7 +116,7 @@ void Foam::Pstream::combineGather
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<const char*>(&Value),
|
reinterpret_cast<const char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -121,7 +128,7 @@ void Foam::Pstream::combineGather
|
|||||||
{
|
{
|
||||||
OPstream toAbove
|
OPstream toAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -189,7 +196,7 @@ void Foam::Pstream::combineScatter
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<char*>(&Value),
|
reinterpret_cast<char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -201,7 +208,7 @@ void Foam::Pstream::combineScatter
|
|||||||
{
|
{
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -231,7 +238,7 @@ void Foam::Pstream::combineScatter
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<const char*>(&Value),
|
reinterpret_cast<const char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -241,7 +248,14 @@ void Foam::Pstream::combineScatter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
|
OPstream toBelow
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
belowID,
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
toBelow << Value;
|
toBelow << Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,7 +308,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
|
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<char*>(receivedValues.begin()),
|
reinterpret_cast<char*>(receivedValues.begin()),
|
||||||
receivedValues.byteSize(),
|
receivedValues.byteSize(),
|
||||||
@ -315,7 +329,14 @@ void Foam::Pstream::listCombineGather
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
|
IPstream fromBelow
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
belowID,
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
List<T> receivedValues(fromBelow);
|
List<T> receivedValues(fromBelow);
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
@ -344,7 +365,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<const char*>(Values.begin()),
|
reinterpret_cast<const char*>(Values.begin()),
|
||||||
Values.byteSize(),
|
Values.byteSize(),
|
||||||
@ -356,7 +377,7 @@ void Foam::Pstream::listCombineGather
|
|||||||
{
|
{
|
||||||
OPstream toAbove
|
OPstream toAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -424,7 +445,7 @@ void Foam::Pstream::listCombineScatter
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<char*>(Values.begin()),
|
reinterpret_cast<char*>(Values.begin()),
|
||||||
Values.byteSize(),
|
Values.byteSize(),
|
||||||
@ -436,7 +457,7 @@ void Foam::Pstream::listCombineScatter
|
|||||||
{
|
{
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -466,7 +487,7 @@ void Foam::Pstream::listCombineScatter
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<const char*>(Values.begin()),
|
reinterpret_cast<const char*>(Values.begin()),
|
||||||
Values.byteSize(),
|
Values.byteSize(),
|
||||||
@ -476,7 +497,14 @@ void Foam::Pstream::listCombineScatter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toBelow(UPstream::scheduled, belowID, 0, tag, comm);
|
OPstream toBelow
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
belowID,
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
toBelow << Values;
|
toBelow << Values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -535,7 +563,14 @@ void Foam::Pstream::mapCombineGather
|
|||||||
{
|
{
|
||||||
label belowID = myComm.below()[belowI];
|
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);
|
Container receivedValues(fromBelow);
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
@ -575,7 +610,14 @@ void Foam::Pstream::mapCombineGather
|
|||||||
<< " data:" << Values << endl;
|
<< " data:" << Values << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPstream toAbove(UPstream::scheduled, myComm.above(), 0, tag, comm);
|
OPstream toAbove
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
myComm.above(),
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
toAbove << Values;
|
toAbove << Values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -635,7 +677,7 @@ void Foam::Pstream::mapCombineScatter
|
|||||||
{
|
{
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -660,7 +702,14 @@ void Foam::Pstream::mapCombineScatter
|
|||||||
Pout<< " sending to " << belowID << " data:" << Values << endl;
|
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;
|
toBelow << Values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,7 +79,7 @@ void Foam::Pstream::exchange
|
|||||||
recvBufs[proci].setSize(nRecv);
|
recvBufs[proci].setSize(nRecv);
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::nonBlocking,
|
UPstream::commsTypes::nonBlocking,
|
||||||
proci,
|
proci,
|
||||||
reinterpret_cast<char*>(recvBufs[proci].begin()),
|
reinterpret_cast<char*>(recvBufs[proci].begin()),
|
||||||
nRecv*sizeof(T),
|
nRecv*sizeof(T),
|
||||||
@ -101,7 +101,7 @@ void Foam::Pstream::exchange
|
|||||||
(
|
(
|
||||||
!UOPstream::write
|
!UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::nonBlocking,
|
UPstream::commsTypes::nonBlocking,
|
||||||
proci,
|
proci,
|
||||||
reinterpret_cast<const char*>(sendBufs[proci].begin()),
|
reinterpret_cast<const char*>(sendBufs[proci].begin()),
|
||||||
sendBufs[proci].size()*sizeof(T),
|
sendBufs[proci].size()*sizeof(T),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,7 +66,7 @@ void Pstream::gather
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
reinterpret_cast<char*>(&value),
|
reinterpret_cast<char*>(&value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -78,7 +78,7 @@ void Pstream::gather
|
|||||||
{
|
{
|
||||||
IPstream fromBelow
|
IPstream fromBelow
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -97,7 +97,7 @@ void Pstream::gather
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<const char*>(&Value),
|
reinterpret_cast<const char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -109,7 +109,7 @@ void Pstream::gather
|
|||||||
{
|
{
|
||||||
OPstream toAbove
|
OPstream toAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -163,7 +163,7 @@ void Pstream::scatter
|
|||||||
{
|
{
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<char*>(&Value),
|
reinterpret_cast<char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -175,7 +175,7 @@ void Pstream::scatter
|
|||||||
{
|
{
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -194,7 +194,7 @@ void Pstream::scatter
|
|||||||
{
|
{
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
reinterpret_cast<const char*>(&Value),
|
reinterpret_cast<const char*>(&Value),
|
||||||
sizeof(T),
|
sizeof(T),
|
||||||
@ -206,7 +206,7 @@ void Pstream::scatter
|
|||||||
{
|
{
|
||||||
OPstream toBelow
|
OPstream toBelow
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,7 +79,7 @@ void Pstream::gatherList
|
|||||||
|
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<char*>(receivedValues.begin()),
|
reinterpret_cast<char*>(receivedValues.begin()),
|
||||||
receivedValues.byteSize(),
|
receivedValues.byteSize(),
|
||||||
@ -96,7 +96,14 @@ void Pstream::gatherList
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IPstream fromBelow(UPstream::scheduled, belowID, 0, tag, comm);
|
IPstream fromBelow
|
||||||
|
(
|
||||||
|
UPstream::commsTypes::scheduled,
|
||||||
|
belowID,
|
||||||
|
0,
|
||||||
|
tag,
|
||||||
|
comm
|
||||||
|
);
|
||||||
fromBelow >> Values[belowID];
|
fromBelow >> Values[belowID];
|
||||||
|
|
||||||
if (debug & 2)
|
if (debug & 2)
|
||||||
@ -148,7 +155,7 @@ void Pstream::gatherList
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<const char*>(sendingValues.begin()),
|
reinterpret_cast<const char*>(sendingValues.begin()),
|
||||||
sendingValues.byteSize(),
|
sendingValues.byteSize(),
|
||||||
@ -160,7 +167,7 @@ void Pstream::gatherList
|
|||||||
{
|
{
|
||||||
OPstream toAbove
|
OPstream toAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -234,7 +241,7 @@ void Pstream::scatterList
|
|||||||
|
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
reinterpret_cast<char*>(receivedValues.begin()),
|
reinterpret_cast<char*>(receivedValues.begin()),
|
||||||
receivedValues.byteSize(),
|
receivedValues.byteSize(),
|
||||||
@ -251,7 +258,7 @@ void Pstream::scatterList
|
|||||||
{
|
{
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -290,7 +297,7 @@ void Pstream::scatterList
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
UPstream::scheduled,
|
UPstream::commsTypes::scheduled,
|
||||||
belowID,
|
belowID,
|
||||||
reinterpret_cast<const char*>(sendingValues.begin()),
|
reinterpret_cast<const char*>(sendingValues.begin()),
|
||||||
sendingValues.byteSize(),
|
sendingValues.byteSize(),
|
||||||
@ -300,7 +307,14 @@ void Pstream::scatterList
|
|||||||
}
|
}
|
||||||
else
|
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
|
// Send data destined for all other processors below belowID
|
||||||
forAll(notBelowLeaves, leafI)
|
forAll(notBelowLeaves, leafI)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -238,7 +238,7 @@ bool Foam::regIOobject::read()
|
|||||||
// not currently supported
|
// not currently supported
|
||||||
IPstream fromAbove
|
IPstream fromAbove
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
myComm.above(),
|
myComm.above(),
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
@ -254,7 +254,7 @@ bool Foam::regIOobject::read()
|
|||||||
{
|
{
|
||||||
OPstream toBelow
|
OPstream toBelow
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
myComm.below()[belowI],
|
myComm.below()[belowI],
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -422,8 +422,8 @@ evaluate()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label nReq = Pstream::nRequests();
|
label nReq = Pstream::nRequests();
|
||||||
@ -437,7 +437,7 @@ evaluate()
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::parRun()
|
Pstream::parRun()
|
||||||
&& Pstream::defaultCommsType == Pstream::nonBlocking
|
&& Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Pstream::waitRequests(nReq);
|
Pstream::waitRequests(nReq);
|
||||||
@ -448,7 +448,7 @@ evaluate()
|
|||||||
this->operator[](patchi).evaluate(Pstream::defaultCommsType);
|
this->operator[](patchi).evaluate(Pstream::defaultCommsType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
const lduSchedule& patchSchedule =
|
const lduSchedule& patchSchedule =
|
||||||
bmesh_.mesh().globalData().patchSchedule();
|
bmesh_.mesh().globalData().patchSchedule();
|
||||||
@ -458,12 +458,12 @@ evaluate()
|
|||||||
if (patchSchedule[patchEvali].init)
|
if (patchSchedule[patchEvali].init)
|
||||||
{
|
{
|
||||||
this->operator[](patchSchedule[patchEvali].patch)
|
this->operator[](patchSchedule[patchEvali].patch)
|
||||||
.initEvaluate(Pstream::scheduled);
|
.initEvaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->operator[](patchSchedule[patchEvali].patch)
|
this->operator[](patchSchedule[patchEvali].patch)
|
||||||
.evaluate(Pstream::scheduled);
|
.evaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,7 +124,8 @@ public:
|
|||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -116,7 +116,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
//- Initialise swap of patch point values
|
//- Initialise swap of patch point values
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -162,7 +162,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -161,7 +161,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,14 +122,11 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,14 +122,11 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -157,7 +157,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Constraint handling
|
// Constraint handling
|
||||||
|
|
||||||
//- Return the constraint type this pointPatchField implements
|
//- Return the constraint type this pointPatchField implements
|
||||||
virtual const word& constraintType() const
|
virtual const word& constraintType() const
|
||||||
@ -171,7 +171,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,7 +113,7 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking)
|
if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
receiveBuf_.setSize(pf.size());
|
receiveBuf_.setSize(pf.size());
|
||||||
IPstream::read
|
IPstream::read
|
||||||
@ -149,7 +149,7 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated
|
|||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
// If nonblocking data has already been received into receiveBuf_
|
// If nonblocking data has already been received into receiveBuf_
|
||||||
if (commsType != Pstream::nonBlocking)
|
if (commsType != Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
receiveBuf_.setSize(this->size());
|
receiveBuf_.setSize(this->size());
|
||||||
IPstream::read
|
IPstream::read
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -166,7 +166,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -134,12 +134,10 @@ public:
|
|||||||
return symmetryPlanePointPatch::typeName;
|
return symmetryPlanePointPatch::typeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,20 +122,16 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
//- Constraint handling
|
|
||||||
|
|
||||||
//- Return the constraint type this pointPatchField implements
|
//- Return the constraint type this pointPatchField implements
|
||||||
virtual const word& constraintType() const
|
virtual const word& constraintType() const
|
||||||
{
|
{
|
||||||
return type();
|
return type();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -231,7 +231,7 @@ public:
|
|||||||
//- Evaluate the patch field, sets Updated to false
|
//- Evaluate the patch field, sets Updated to false
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,15 +139,12 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Update the patch field
|
//- Update the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -418,14 +418,16 @@ public:
|
|||||||
//- Initialise evaluation of the patch field (do nothing)
|
//- Initialise evaluation of the patch field (do nothing)
|
||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -703,7 +703,7 @@ void Foam::argList::parse
|
|||||||
{
|
{
|
||||||
options_.set("case", roots[slave-1]/globalCase_);
|
options_.set("case", roots[slave-1]/globalCase_);
|
||||||
|
|
||||||
OPstream toSlave(Pstream::scheduled, slave);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
toSlave << args_ << options_;
|
toSlave << args_ << options_;
|
||||||
}
|
}
|
||||||
options_.erase("case");
|
options_.erase("case");
|
||||||
@ -750,7 +750,7 @@ void Foam::argList::parse
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::scheduled, slave);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
toSlave << args_ << options_;
|
toSlave << args_ << options_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -758,7 +758,11 @@ void Foam::argList::parse
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Collect the master's argument list
|
// Collect the master's argument list
|
||||||
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> args_ >> options_;
|
fromMaster >> args_ >> options_;
|
||||||
|
|
||||||
// Establish rootPath_/globalCase_/case_ for slave
|
// Establish rootPath_/globalCase_/case_ for slave
|
||||||
@ -792,7 +796,7 @@ void Foam::argList::parse
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
|
|
||||||
string slaveBuild;
|
string slaveBuild;
|
||||||
string slaveMachine;
|
string slaveMachine;
|
||||||
@ -815,7 +819,11 @@ void Foam::argList::parse
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << string(Foam::FOAMbuild) << hostName() << pid();
|
toMaster << string(Foam::FOAMbuild) << hostName() << pid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
|
|||||||
(
|
(
|
||||||
IPstream
|
IPstream
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
slave,
|
slave,
|
||||||
0, // bufSize
|
0, // bufSize
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
@ -111,7 +111,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
|
|||||||
{
|
{
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
0, // bufSize
|
0, // bufSize
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,7 +62,7 @@ void Foam::LUscalarMatrix::solve
|
|||||||
{
|
{
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
slave,
|
slave,
|
||||||
reinterpret_cast<char*>
|
reinterpret_cast<char*>
|
||||||
(
|
(
|
||||||
@ -78,7 +78,7 @@ void Foam::LUscalarMatrix::solve
|
|||||||
{
|
{
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
reinterpret_cast<const char*>(x.begin()),
|
reinterpret_cast<const char*>(x.begin()),
|
||||||
x.byteSize(),
|
x.byteSize(),
|
||||||
@ -106,7 +106,7 @@ void Foam::LUscalarMatrix::solve
|
|||||||
{
|
{
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
slave,
|
slave,
|
||||||
reinterpret_cast<const char*>
|
reinterpret_cast<const char*>
|
||||||
(
|
(
|
||||||
@ -122,7 +122,7 @@ void Foam::LUscalarMatrix::solve
|
|||||||
{
|
{
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
reinterpret_cast<char*>(x.begin()),
|
reinterpret_cast<char*>(x.begin()),
|
||||||
x.byteSize(),
|
x.byteSize(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,8 +38,8 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
|
|||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(interfaces_, interfacei)
|
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();
|
const lduSchedule& patchSchedule = this->patchSchedule();
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
||||||
Pstream::blocking
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,12 +103,12 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Block until all sends/receives have been finished
|
// Block until all sends/receives have been finished
|
||||||
if (Pstream::defaultCommsType == Pstream::nonBlocking)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
IPstream::waitRequests();
|
IPstream::waitRequests();
|
||||||
OPstream::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();
|
const lduSchedule& patchSchedule = this->patchSchedule();
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
||||||
Pstream::scheduled
|
Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -159,7 +159,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
||||||
Pstream::scheduled
|
Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
interfaceCoeffs[interfacei],
|
interfaceCoeffs[interfacei],
|
||||||
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
//Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]),
|
||||||
Pstream::blocking
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,11 @@ void Foam::processorLduInterface::send
|
|||||||
{
|
{
|
||||||
label nBytes = f.byteSize();
|
label nBytes = f.byteSize();
|
||||||
|
|
||||||
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::blocking
|
||||||
|
|| commsType == Pstream::commsTypes::scheduled
|
||||||
|
)
|
||||||
{
|
{
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
@ -50,7 +54,7 @@ void Foam::processorLduInterface::send
|
|||||||
comm()
|
comm()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (commsType == Pstream::nonBlocking)
|
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
resizeBuf(receiveBuf_, nBytes);
|
resizeBuf(receiveBuf_, nBytes);
|
||||||
|
|
||||||
@ -80,7 +84,7 @@ void Foam::processorLduInterface::send
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unsupported communications type " << commsType
|
<< "Unsupported communications type " << int(commsType)
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,7 +97,11 @@ void Foam::processorLduInterface::receive
|
|||||||
UList<Type>& f
|
UList<Type>& f
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::blocking
|
||||||
|
|| commsType == Pstream::commsTypes::scheduled
|
||||||
|
)
|
||||||
{
|
{
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
@ -105,14 +113,14 @@ void Foam::processorLduInterface::receive
|
|||||||
comm()
|
comm()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (commsType == Pstream::nonBlocking)
|
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
memcpy(f.begin(), receiveBuf_.begin(), f.byteSize());
|
memcpy(f.begin(), receiveBuf_.begin(), f.byteSize());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unsupported communications type " << commsType
|
<< "Unsupported communications type " << int(commsType)
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,7 +166,11 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
|
|
||||||
reinterpret_cast<Type&>(fArray[nm1]) = f.last();
|
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
|
OPstream::write
|
||||||
(
|
(
|
||||||
@ -170,7 +182,7 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
comm()
|
comm()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (commsType == Pstream::nonBlocking)
|
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
resizeBuf(receiveBuf_, nBytes);
|
resizeBuf(receiveBuf_, nBytes);
|
||||||
|
|
||||||
@ -197,7 +209,7 @@ void Foam::processorLduInterface::compressedSend
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unsupported communications type " << commsType
|
<< "Unsupported communications type " << int(commsType)
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +234,11 @@ void Foam::processorLduInterface::compressedReceive
|
|||||||
label nFloats = nm1 + nlast;
|
label nFloats = nm1 + nlast;
|
||||||
label nBytes = nFloats*sizeof(float);
|
label nBytes = nFloats*sizeof(float);
|
||||||
|
|
||||||
if (commsType == Pstream::blocking || commsType == Pstream::scheduled)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::blocking
|
||||||
|
|| commsType == Pstream::commsTypes::scheduled
|
||||||
|
)
|
||||||
{
|
{
|
||||||
resizeBuf(receiveBuf_, nBytes);
|
resizeBuf(receiveBuf_, nBytes);
|
||||||
|
|
||||||
@ -236,10 +252,10 @@ void Foam::processorLduInterface::compressedReceive
|
|||||||
comm()
|
comm()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (commsType != Pstream::nonBlocking)
|
else if (commsType != Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unsupported communications type " << commsType
|
<< "Unsupported communications type " << int(commsType)
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,8 +38,8 @@ void Foam::lduMatrix::initMatrixInterfaces
|
|||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(interfaces, interfacei)
|
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();
|
const lduSchedule& patchSchedule = this->patchSchedule();
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ void Foam::lduMatrix::initMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
Pstream::blocking
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
const direction cmpt
|
const direction cmpt
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (Pstream::defaultCommsType == Pstream::blocking)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::blocking)
|
||||||
{
|
{
|
||||||
forAll(interfaces, interfacei)
|
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
|
// Try and consume interfaces as they become available
|
||||||
bool allUpdated = false;
|
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();
|
const lduSchedule& patchSchedule = this->patchSchedule();
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
Pstream::scheduled
|
Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -228,7 +228,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
Pstream::scheduled
|
Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,7 +251,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
|||||||
psiif,
|
psiif,
|
||||||
coupleCoeffs[interfacei],
|
coupleCoeffs[interfacei],
|
||||||
cmpt,
|
cmpt,
|
||||||
Pstream::blocking
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -279,7 +279,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
|||||||
{
|
{
|
||||||
fineInterfaces[inti].initInternalFieldTransfer
|
fineInterfaces[inti].initInternalFieldTransfer
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
restrictMap
|
restrictMap
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -322,7 +322,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
|||||||
fineInterfaces[inti].interfaceInternalField(restrictMap),
|
fineInterfaces[inti].interfaceInternalField(restrictMap),
|
||||||
fineInterfaces[inti].internalFieldTransfer
|
fineInterfaces[inti].internalFieldTransfer
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
restrictMap
|
restrictMap
|
||||||
),
|
),
|
||||||
fineLevelIndex,
|
fineLevelIndex,
|
||||||
@ -488,7 +488,7 @@ void Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing
|
|||||||
procRestrictAddressing,
|
procRestrictAddressing,
|
||||||
|
|
||||||
UPstream::msgType(),
|
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];
|
// label& slaveVal = vals[i];
|
||||||
// IPstream::read
|
// IPstream::read
|
||||||
// (
|
// (
|
||||||
// Pstream::scheduled,
|
// Pstream::commsTypes::scheduled,
|
||||||
// procIDs[i],
|
// procIDs[i],
|
||||||
// reinterpret_cast<char*>(&slaveVal),
|
// reinterpret_cast<char*>(&slaveVal),
|
||||||
// sizeof(slaveVal),
|
// sizeof(slaveVal),
|
||||||
@ -658,7 +658,7 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel)
|
|||||||
// {
|
// {
|
||||||
// OPstream::write
|
// OPstream::write
|
||||||
// (
|
// (
|
||||||
// Pstream::scheduled,
|
// Pstream::commsTypes::scheduled,
|
||||||
// procIDs[0],
|
// procIDs[0],
|
||||||
// reinterpret_cast<const char*>(&myVal),
|
// reinterpret_cast<const char*>(&myVal),
|
||||||
// sizeof(myVal),
|
// sizeof(myVal),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ void Foam::GAMGAgglomeration::gatherList
|
|||||||
{
|
{
|
||||||
IPstream fromSlave
|
IPstream fromSlave
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[i],
|
procIDs[i],
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -62,7 +62,7 @@ void Foam::GAMGAgglomeration::gatherList
|
|||||||
{
|
{
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[0],
|
procIDs[0],
|
||||||
0,
|
0,
|
||||||
tag,
|
tag,
|
||||||
@ -128,7 +128,7 @@ void Foam::GAMGAgglomeration::restrictField
|
|||||||
procIDs,
|
procIDs,
|
||||||
cf,
|
cf,
|
||||||
UPstream::msgType(),
|
UPstream::msgType(),
|
||||||
Pstream::nonBlocking //Pstream::scheduled
|
Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@ void Foam::GAMGAgglomeration::prolongField
|
|||||||
cf,
|
cf,
|
||||||
allCf,
|
allCf,
|
||||||
UPstream::msgType(),
|
UPstream::msgType(),
|
||||||
Pstream::nonBlocking //Pstream::scheduled
|
Pstream::commsTypes::nonBlocking //Pstream::commsTypes::scheduled
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(fineToCoarse, i)
|
forAll(fineToCoarse, i)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -150,7 +150,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
|
|||||||
{
|
{
|
||||||
interfaces[inti].initInternalFieldTransfer
|
interfaces[inti].initInternalFieldTransfer
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
globalIndices
|
globalIndices
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells
|
|||||||
(
|
(
|
||||||
interfaces[inti].internalFieldTransfer
|
interfaces[inti].internalFieldTransfer
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
globalIndices
|
globalIndices
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -318,7 +318,7 @@ void Foam::GAMGSolver::gatherMatrices
|
|||||||
|
|
||||||
IPstream fromSlave
|
IPstream fromSlave
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[proci],
|
procIDs[proci],
|
||||||
0, // bufSize
|
0, // bufSize
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
@ -387,7 +387,7 @@ void Foam::GAMGSolver::gatherMatrices
|
|||||||
|
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[0],
|
procIDs[0],
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,14 +104,18 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
|
|||||||
|
|
||||||
procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_);
|
procInterface_.interfaceInternalField(psiInternal, scalarSendBuf_);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
scalarReceiveBuf_.setSize(scalarSendBuf_.size());
|
scalarReceiveBuf_.setSize(scalarSendBuf_.size());
|
||||||
outstandingRecvRequest_ = UPstream::nRequests();
|
outstandingRecvRequest_ = UPstream::nRequests();
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procInterface_.neighbProcNo(),
|
procInterface_.neighbProcNo(),
|
||||||
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
||||||
scalarReceiveBuf_.byteSize(),
|
scalarReceiveBuf_.byteSize(),
|
||||||
@ -122,7 +126,7 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
|
|||||||
outstandingSendRequest_ = UPstream::nRequests();
|
outstandingSendRequest_ = UPstream::nRequests();
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procInterface_.neighbProcNo(),
|
procInterface_.neighbProcNo(),
|
||||||
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
||||||
scalarSendBuf_.byteSize(),
|
scalarSendBuf_.byteSize(),
|
||||||
@ -160,7 +164,11 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
|
|||||||
|
|
||||||
const labelUList& faceCells = procInterface_.faceCells();
|
const labelUList& faceCells = procInterface_.faceCells();
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if
|
if
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,7 +124,11 @@ Foam::ProcessorTopology<Container, ProcPatch>::ProcessorTopology
|
|||||||
Pstream::scatterList(*this, Pstream::msgType(), comm);
|
Pstream::scatterList(*this, Pstream::msgType(), comm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::parRun() && Pstream::defaultCommsType == Pstream::scheduled)
|
if
|
||||||
|
(
|
||||||
|
Pstream::parRun()
|
||||||
|
&& Pstream::defaultCommsType == Pstream::commsTypes::scheduled
|
||||||
|
)
|
||||||
{
|
{
|
||||||
label patchEvali = 0;
|
label patchEvali = 0;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -993,7 +993,7 @@ void Foam::lduPrimitiveMesh::gather
|
|||||||
|
|
||||||
IPstream fromSlave
|
IPstream fromSlave
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[i],
|
procIDs[i],
|
||||||
0, // bufSize
|
0, // bufSize
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
@ -1066,7 +1066,7 @@ void Foam::lduPrimitiveMesh::gather
|
|||||||
|
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
procIDs[0],
|
procIDs[0],
|
||||||
0,
|
0,
|
||||||
Pstream::msgType(),
|
Pstream::msgType(),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,8 +80,8 @@ void Foam::pointBoundaryMesh::calcGeometry()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -96,7 +96,7 @@ void Foam::pointBoundaryMesh::calcGeometry()
|
|||||||
operator[](patchi).calcGeometry(pBufs);
|
operator[](patchi).calcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
@ -126,8 +126,8 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -142,7 +142,7 @@ void Foam::pointBoundaryMesh::movePoints(const pointField& p)
|
|||||||
operator[](patchi).movePoints(pBufs, 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();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
@ -172,8 +172,8 @@ void Foam::pointBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -188,7 +188,7 @@ void Foam::pointBoundaryMesh::updateMesh()
|
|||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).updateMesh(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -161,7 +161,8 @@ public:
|
|||||||
const UList<Type>& fld,
|
const UList<Type>& fld,
|
||||||
List<Type>& allFld,
|
List<Type>& allFld,
|
||||||
const int tag = UPstream::msgType(),
|
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]).
|
//- Collect data in processor order on master (== procIDs[0]).
|
||||||
@ -174,7 +175,8 @@ public:
|
|||||||
const UList<Type>& fld,
|
const UList<Type>& fld,
|
||||||
List<Type>& allFld,
|
List<Type>& allFld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
const Pstream::commsTypes commsType=Pstream::nonBlocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::nonBlocking
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
gather(offsets_, comm, procIDs, fld, allFld, tag, commsType);
|
gather(offsets_, comm, procIDs, fld, allFld, tag, commsType);
|
||||||
@ -190,7 +192,8 @@ public:
|
|||||||
const labelList& procIDs,
|
const labelList& procIDs,
|
||||||
List<Type>& fld,
|
List<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
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
|
//- Inplace collect data in processor order on master
|
||||||
@ -202,7 +205,8 @@ public:
|
|||||||
const labelList& procIDs,
|
const labelList& procIDs,
|
||||||
List<Type>& fld,
|
List<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
const Pstream::commsTypes commsType=Pstream::nonBlocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::nonBlocking
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
gather(offsets_, comm, procIDs, fld, tag, commsType);
|
gather(offsets_, comm, procIDs, fld, tag, commsType);
|
||||||
@ -218,7 +222,8 @@ public:
|
|||||||
const UList<Type>& allFld,
|
const UList<Type>& allFld,
|
||||||
UList<Type>& fld,
|
UList<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
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!
|
//- Distribute data in processor order. Requires fld to be sized!
|
||||||
@ -230,7 +235,8 @@ public:
|
|||||||
const UList<Type>& allFld,
|
const UList<Type>& allFld,
|
||||||
UList<Type>& fld,
|
UList<Type>& fld,
|
||||||
const int tag = UPstream::msgType(),
|
const int tag = UPstream::msgType(),
|
||||||
const Pstream::commsTypes commsType=Pstream::nonBlocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::nonBlocking
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
scatter(offsets_, comm, procIDs, allFld, fld, tag, commsType);
|
scatter(offsets_, comm, procIDs, allFld, fld, tag, commsType);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,11 @@ void Foam::globalIndex::gather
|
|||||||
// Assign my local data
|
// Assign my local data
|
||||||
SubList<Type>(allFld, fld.size(), 0) = fld;
|
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++)
|
for (label i = 1; i < procIDs.size(); i++)
|
||||||
{
|
{
|
||||||
@ -113,7 +117,11 @@ void Foam::globalIndex::gather
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::scheduled
|
||||||
|
|| commsType == Pstream::commsTypes::blocking
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (contiguous<Type>())
|
if (contiguous<Type>())
|
||||||
{
|
{
|
||||||
@ -209,7 +217,11 @@ void Foam::globalIndex::scatter
|
|||||||
{
|
{
|
||||||
fld.deepCopy(SubList<Type>(allFld, off[1]-off[0]));
|
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++)
|
for (label i = 1; i < procIDs.size(); i++)
|
||||||
{
|
{
|
||||||
@ -286,7 +298,11 @@ void Foam::globalIndex::scatter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (commsType == Pstream::scheduled || commsType == Pstream::blocking)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::scheduled
|
||||||
|
|| commsType == Pstream::commsTypes::blocking
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (contiguous<Type>())
|
if (contiguous<Type>())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ void Foam::globalMeshData::initProcAddr()
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send indices of my processor patches to my neighbours
|
// Send indices of my processor patches to my neighbours
|
||||||
forAll(processorPatches_, i)
|
forAll(processorPatches_, i)
|
||||||
@ -401,7 +401,7 @@ void Foam::globalMeshData::calcSharedEdges() const
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Receive the edges using shared points from the slave.
|
// Receive the edges using shared points from the slave.
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||||
EdgeMap<labelList> procSharedEdges(fromSlave);
|
EdgeMap<labelList> procSharedEdges(fromSlave);
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -450,7 +450,7 @@ void Foam::globalMeshData::calcSharedEdges() const
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Receive the edges using shared points from the slave.
|
// Receive the edges using shared points from the slave.
|
||||||
OPstream toSlave(Pstream::blocking, slave);
|
OPstream toSlave(Pstream::commsTypes::blocking, slave);
|
||||||
toSlave << globalShared;
|
toSlave << globalShared;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,14 +459,20 @@ void Foam::globalMeshData::calcSharedEdges() const
|
|||||||
{
|
{
|
||||||
// Send local edges to master
|
// Send local edges to master
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << localShared;
|
toMaster << localShared;
|
||||||
}
|
}
|
||||||
// Receive merged edges from master.
|
// Receive merged edges from master.
|
||||||
{
|
{
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> globalShared;
|
fromMaster >> globalShared;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1920,7 +1926,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::blocking, slave);
|
IPstream fromSlave(Pstream::commsTypes::blocking, slave);
|
||||||
|
|
||||||
labelList nbrSharedPointAddr;
|
labelList nbrSharedPointAddr;
|
||||||
pointField nbrSharedPoints;
|
pointField nbrSharedPoints;
|
||||||
@ -1944,7 +1950,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
|
|||||||
{
|
{
|
||||||
OPstream toSlave
|
OPstream toSlave
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
slave,
|
slave,
|
||||||
sharedPoints.size()*sizeof(Zero)
|
sharedPoints.size()*sizeof(Zero)
|
||||||
);
|
);
|
||||||
@ -1956,8 +1962,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
|
|||||||
// Slave:
|
// Slave:
|
||||||
// send points
|
// send points
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::blocking, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster
|
toMaster
|
||||||
<< pointAddr
|
<< pointAddr
|
||||||
<< UIndirectList<point>(mesh_.points(), pointLabels)();
|
<< UIndirectList<point>(mesh_.points(), pointLabels)();
|
||||||
@ -1965,7 +1974,11 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
|
|||||||
|
|
||||||
// Receive sharedPoints
|
// Receive sharedPoints
|
||||||
{
|
{
|
||||||
IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::blocking,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> sharedPoints;
|
fromMaster >> sharedPoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -901,8 +901,8 @@ void Foam::globalPoints::calculateSharedPoints
|
|||||||
PstreamBuffers pBufs
|
PstreamBuffers pBufs
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::scheduled
|
Pstream::defaultCommsType == Pstream::commsTypes::scheduled
|
||||||
? Pstream::nonBlocking
|
? Pstream::commsTypes::nonBlocking
|
||||||
: Pstream::defaultCommsType
|
: Pstream::defaultCommsType
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -939,8 +939,8 @@ void Foam::globalPoints::calculateSharedPoints
|
|||||||
PstreamBuffers pBufs
|
PstreamBuffers pBufs
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::scheduled
|
Pstream::defaultCommsType == Pstream::commsTypes::scheduled
|
||||||
? Pstream::nonBlocking
|
? Pstream::commsTypes::nonBlocking
|
||||||
: Pstream::defaultCommsType
|
: Pstream::defaultCommsType
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave, 0, tag);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave, 0, tag);
|
||||||
List<labelPair> nbrData(fromSlave);
|
List<labelPair> nbrData(fromSlave);
|
||||||
|
|
||||||
forAll(nbrData, i)
|
forAll(nbrData, i)
|
||||||
@ -105,20 +105,26 @@ Foam::List<Foam::labelPair> Foam::mapDistributeBase::schedule
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::scheduled, slave, 0, tag);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave, 0, tag);
|
||||||
toSlave << allComms;
|
toSlave << allComms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo(), 0, tag);
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo(),
|
||||||
|
0,
|
||||||
|
tag
|
||||||
|
);
|
||||||
toMaster << allComms;
|
toMaster << allComms;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IPstream fromMaster
|
IPstream fromMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
0,
|
0,
|
||||||
tag
|
tag
|
||||||
@ -861,7 +867,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag)
|
|||||||
recvFields[domain].setSize(map.size());
|
recvFields[domain].setSize(map.size());
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<char*>(recvFields[domain].begin()),
|
reinterpret_cast<char*>(recvFields[domain].begin()),
|
||||||
recvFields[domain].size()*sizeof(bool),
|
recvFields[domain].size()*sizeof(bool),
|
||||||
@ -894,7 +900,7 @@ void Foam::mapDistributeBase::compact(const boolList& elemIsUsed, const int tag)
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<const char*>(subField.begin()),
|
reinterpret_cast<const char*>(subField.begin()),
|
||||||
subField.size()*sizeof(bool),
|
subField.size()*sizeof(bool),
|
||||||
@ -1028,7 +1034,7 @@ void Foam::mapDistributeBase::compact
|
|||||||
recvFields[domain].setSize(map.size());
|
recvFields[domain].setSize(map.size());
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<char*>(recvFields[domain].begin()),
|
reinterpret_cast<char*>(recvFields[domain].begin()),
|
||||||
recvFields[domain].size()*sizeof(bool),
|
recvFields[domain].size()*sizeof(bool),
|
||||||
@ -1060,7 +1066,7 @@ void Foam::mapDistributeBase::compact
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<const char*>(subField.begin()),
|
reinterpret_cast<const char*>(subField.begin()),
|
||||||
subField.size()*sizeof(bool),
|
subField.size()*sizeof(bool),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -364,8 +364,9 @@ public:
|
|||||||
const int tag = UPstream::msgType()
|
const int tag = UPstream::msgType()
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Distribute data. Note:schedule only used for Pstream::scheduled
|
//- Distribute data. Note:schedule only used for
|
||||||
// for now, all others just use send-to-all, receive-from-all.
|
// Pstream::commsTypes::scheduled for now, all others just use
|
||||||
|
// send-to-all, receive-from-all.
|
||||||
template<class T, class negateOp>
|
template<class T, class negateOp>
|
||||||
static void distribute
|
static void distribute
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -159,7 +159,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commsType == Pstream::blocking)
|
if (commsType == Pstream::commsTypes::blocking)
|
||||||
{
|
{
|
||||||
// Since buffered sending can reuse the field to collect the
|
// Since buffered sending can reuse the field to collect the
|
||||||
// received data.
|
// received data.
|
||||||
@ -171,7 +171,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
if (domain != Pstream::myProcNo() && map.size())
|
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());
|
List<T> subField(map.size());
|
||||||
forAll(subField, i)
|
forAll(subField, i)
|
||||||
@ -219,7 +219,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
if (domain != Pstream::myProcNo() && map.size())
|
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);
|
List<T> subField(fromNbr);
|
||||||
|
|
||||||
checkReceivedSize(domain, map.size(), subField.size());
|
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
|
// Need to make sure I don't overwrite field with received data
|
||||||
// since the data might need to be sent to another processor. So
|
// 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
|
// 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];
|
const labelList& map = subMap[recvProc];
|
||||||
List<T> subField(map.size());
|
List<T> subField(map.size());
|
||||||
@ -302,7 +308,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
toNbr << subField;
|
toNbr << subField;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag);
|
IPstream fromNbr
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
recvProc,
|
||||||
|
0,
|
||||||
|
tag
|
||||||
|
);
|
||||||
List<T> subField(fromNbr);
|
List<T> subField(fromNbr);
|
||||||
|
|
||||||
const labelList& map = constructMap[recvProc];
|
const labelList& map = constructMap[recvProc];
|
||||||
@ -324,7 +336,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
{
|
{
|
||||||
// I am receive first, send next
|
// 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);
|
List<T> subField(fromNbr);
|
||||||
|
|
||||||
const labelList& map = constructMap[sendProc];
|
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];
|
const labelList& map = subMap[sendProc];
|
||||||
List<T> subField(map.size());
|
List<T> subField(map.size());
|
||||||
@ -362,13 +386,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
}
|
}
|
||||||
field.transfer(newField);
|
field.transfer(newField);
|
||||||
}
|
}
|
||||||
else if (commsType == Pstream::nonBlocking)
|
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
label nOutstanding = Pstream::nRequests();
|
label nOutstanding = Pstream::nRequests();
|
||||||
|
|
||||||
if (!contiguous<T>())
|
if (!contiguous<T>())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking, tag);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
|
||||||
|
|
||||||
// Stream data into buffer
|
// Stream data into buffer
|
||||||
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
||||||
@ -484,7 +508,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<const char*>(subField.begin()),
|
reinterpret_cast<const char*>(subField.begin()),
|
||||||
subField.byteSize(),
|
subField.byteSize(),
|
||||||
@ -506,7 +530,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
recvFields[domain].setSize(map.size());
|
recvFields[domain].setSize(map.size());
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<char*>(recvFields[domain].begin()),
|
reinterpret_cast<char*>(recvFields[domain].begin()),
|
||||||
recvFields[domain].byteSize(),
|
recvFields[domain].byteSize(),
|
||||||
@ -591,7 +615,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown communication schedule " << commsType
|
<< "Unknown communication schedule " << int(commsType)
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -638,7 +662,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commsType == Pstream::blocking)
|
if (commsType == Pstream::commsTypes::blocking)
|
||||||
{
|
{
|
||||||
// Since buffered sending can reuse the field to collect the
|
// Since buffered sending can reuse the field to collect the
|
||||||
// received data.
|
// received data.
|
||||||
@ -650,7 +674,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
if (domain != Pstream::myProcNo() && map.size())
|
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());
|
List<T> subField(map.size());
|
||||||
forAll(subField, i)
|
forAll(subField, i)
|
||||||
{
|
{
|
||||||
@ -690,7 +714,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
if (domain != Pstream::myProcNo() && map.size())
|
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);
|
List<T> subField(fromNbr);
|
||||||
|
|
||||||
checkReceivedSize(domain, map.size(), subField.size());
|
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
|
// Need to make sure I don't overwrite field with received data
|
||||||
// since the data might need to be sent to another processor. So
|
// 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
|
// 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];
|
const labelList& map = subMap[recvProc];
|
||||||
|
|
||||||
@ -777,7 +807,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
toNbr << subField;
|
toNbr << subField;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
IPstream fromNbr(Pstream::scheduled, recvProc, 0, tag);
|
IPstream fromNbr
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
recvProc,
|
||||||
|
0,
|
||||||
|
tag
|
||||||
|
);
|
||||||
List<T> subField(fromNbr);
|
List<T> subField(fromNbr);
|
||||||
const labelList& map = constructMap[recvProc];
|
const labelList& map = constructMap[recvProc];
|
||||||
|
|
||||||
@ -798,7 +834,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
{
|
{
|
||||||
// I am receive first, send next
|
// 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);
|
List<T> subField(fromNbr);
|
||||||
const labelList& map = constructMap[sendProc];
|
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];
|
const labelList& map = subMap[sendProc];
|
||||||
|
|
||||||
@ -836,13 +884,13 @@ void Foam::mapDistributeBase::distribute
|
|||||||
}
|
}
|
||||||
field.transfer(newField);
|
field.transfer(newField);
|
||||||
}
|
}
|
||||||
else if (commsType == Pstream::nonBlocking)
|
else if (commsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
label nOutstanding = Pstream::nRequests();
|
label nOutstanding = Pstream::nRequests();
|
||||||
|
|
||||||
if (!contiguous<T>())
|
if (!contiguous<T>())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking, tag);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking, tag);
|
||||||
|
|
||||||
// Stream data into buffer
|
// Stream data into buffer
|
||||||
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
for (label domain = 0; domain < Pstream::nProcs(); domain++)
|
||||||
@ -961,7 +1009,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<const char*>(subField.begin()),
|
reinterpret_cast<const char*>(subField.begin()),
|
||||||
subField.size()*sizeof(T),
|
subField.size()*sizeof(T),
|
||||||
@ -983,7 +1031,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
recvFields[domain].setSize(map.size());
|
recvFields[domain].setSize(map.size());
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
domain,
|
domain,
|
||||||
reinterpret_cast<char*>(recvFields[domain].begin()),
|
reinterpret_cast<char*>(recvFields[domain].begin()),
|
||||||
recvFields[domain].size()*sizeof(T),
|
recvFields[domain].size()*sizeof(T),
|
||||||
@ -1067,7 +1115,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown communication schedule " << commsType
|
<< "Unknown communication schedule " << int(commsType)
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1155,11 +1203,11 @@ void Foam::mapDistributeBase::distribute
|
|||||||
const int tag
|
const int tag
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (Pstream::defaultCommsType == Pstream::nonBlocking)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize_,
|
constructSize_,
|
||||||
subMap_,
|
subMap_,
|
||||||
@ -1171,11 +1219,11 @@ void Foam::mapDistributeBase::distribute
|
|||||||
tag
|
tag
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
schedule(),
|
schedule(),
|
||||||
constructSize_,
|
constructSize_,
|
||||||
subMap_,
|
subMap_,
|
||||||
@ -1191,7 +1239,7 @@ void Foam::mapDistributeBase::distribute
|
|||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize_,
|
constructSize_,
|
||||||
subMap_,
|
subMap_,
|
||||||
@ -1245,11 +1293,11 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
const int tag
|
const int tag
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (Pstream::defaultCommsType == Pstream::nonBlocking)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
@ -1261,11 +1309,11 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
tag
|
tag
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
schedule(),
|
schedule(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
@ -1281,7 +1329,7 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
@ -1308,11 +1356,11 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
const int tag
|
const int tag
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (Pstream::defaultCommsType == Pstream::nonBlocking)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
@ -1326,11 +1374,11 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
tag
|
tag
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
schedule(),
|
schedule(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
@ -1348,7 +1396,7 @@ void Foam::mapDistributeBase::reverseDistribute
|
|||||||
{
|
{
|
||||||
distribute
|
distribute
|
||||||
(
|
(
|
||||||
Pstream::blocking,
|
Pstream::commsTypes::blocking,
|
||||||
List<labelPair>(),
|
List<labelPair>(),
|
||||||
constructSize,
|
constructSize,
|
||||||
constructMap_,
|
constructMap_,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -223,8 +223,8 @@ void Foam::polyBoundaryMesh::calcGeometry()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -239,7 +239,7 @@ void Foam::polyBoundaryMesh::calcGeometry()
|
|||||||
operator[](patchi).calcGeometry(pBufs);
|
operator[](patchi).calcGeometry(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
@ -1010,8 +1010,8 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -1026,7 +1026,7 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p)
|
|||||||
operator[](patchi).movePoints(pBufs, 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();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
@ -1060,8 +1060,8 @@ void Foam::polyBoundaryMesh::updateMesh()
|
|||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
Pstream::defaultCommsType == Pstream::blocking
|
Pstream::defaultCommsType == Pstream::commsTypes::blocking
|
||||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
|| Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll(*this, patchi)
|
forAll(*this, patchi)
|
||||||
@ -1076,7 +1076,7 @@ void Foam::polyBoundaryMesh::updateMesh()
|
|||||||
operator[](patchi).updateMesh(pBufs);
|
operator[](patchi).updateMesh(pBufs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Pstream::defaultCommsType == Pstream::scheduled)
|
else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -129,7 +129,7 @@ void Foam::syncTools::syncPointMap
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ void Foam::syncTools::syncPointMap
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
Map<T> nbrValues(fromSlave);
|
Map<T> nbrValues(fromSlave);
|
||||||
|
|
||||||
// Merge neighbouring values with my values
|
// Merge neighbouring values with my values
|
||||||
@ -335,7 +335,7 @@ void Foam::syncTools::syncPointMap
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
OPstream toSlave(Pstream::scheduled, slave);
|
OPstream toSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
toSlave << sharedPointValues;
|
toSlave << sharedPointValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,14 +343,18 @@ void Foam::syncTools::syncPointMap
|
|||||||
{
|
{
|
||||||
// Slave: send to master
|
// Slave: send to master
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << sharedPointValues;
|
toMaster << sharedPointValues;
|
||||||
}
|
}
|
||||||
// Receive merged values
|
// Receive merged values
|
||||||
{
|
{
|
||||||
IPstream fromMaster
|
IPstream fromMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo()
|
Pstream::masterNo()
|
||||||
);
|
);
|
||||||
fromMaster >> sharedPointValues;
|
fromMaster >> sharedPointValues;
|
||||||
@ -405,7 +409,7 @@ void Foam::syncTools::syncEdgeMap
|
|||||||
|
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
|
|
||||||
@ -687,7 +691,7 @@ void Foam::syncTools::syncEdgeMap
|
|||||||
slave++
|
slave++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
EdgeMap<T> nbrValues(fromSlave);
|
EdgeMap<T> nbrValues(fromSlave);
|
||||||
|
|
||||||
// Merge neighbouring values with my values
|
// 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;
|
toSlave << sharedEdgeValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -720,12 +724,20 @@ void Foam::syncTools::syncEdgeMap
|
|||||||
{
|
{
|
||||||
// Send to master
|
// Send to master
|
||||||
{
|
{
|
||||||
OPstream toMaster(Pstream::scheduled, Pstream::masterNo());
|
OPstream toMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
toMaster << sharedEdgeValues;
|
toMaster << sharedEdgeValues;
|
||||||
}
|
}
|
||||||
// Receive merged values
|
// Receive merged values
|
||||||
{
|
{
|
||||||
IPstream fromMaster(Pstream::scheduled, Pstream::masterNo());
|
IPstream fromMaster
|
||||||
|
(
|
||||||
|
Pstream::commsTypes::scheduled,
|
||||||
|
Pstream::masterNo()
|
||||||
|
);
|
||||||
fromMaster >> sharedEdgeValues;
|
fromMaster >> sharedEdgeValues;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -799,7 +811,7 @@ void Foam::syncTools::syncEdgeMap
|
|||||||
//
|
//
|
||||||
// if (Pstream::parRun())
|
// if (Pstream::parRun())
|
||||||
// {
|
// {
|
||||||
// PstreamBuffers pBufs(Pstream::nonBlocking);
|
// PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
//
|
//
|
||||||
// // Send
|
// // Send
|
||||||
//
|
//
|
||||||
@ -1302,7 +1314,7 @@ void Foam::syncTools::syncBoundaryFaceList
|
|||||||
|
|
||||||
if (parRun)
|
if (parRun)
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
|
|
||||||
@ -1422,7 +1434,7 @@ void Foam::syncTools::syncFaceList
|
|||||||
|
|
||||||
if (parRun)
|
if (parRun)
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -182,7 +182,7 @@ void Foam::PatchTools::gatherAndMerge
|
|||||||
// Receive slave ones
|
// Receive slave ones
|
||||||
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
for (int slave=1; slave<Pstream::nProcs(); slave++)
|
||||||
{
|
{
|
||||||
IPstream fromSlave(Pstream::scheduled, slave);
|
IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
|
||||||
|
|
||||||
pointField slavePoints(fromSlave);
|
pointField slavePoints(fromSlave);
|
||||||
List<FaceType> slaveFaces(fromSlave);
|
List<FaceType> slaveFaces(fromSlave);
|
||||||
@ -210,7 +210,7 @@ void Foam::PatchTools::gatherAndMerge
|
|||||||
// be improved.
|
// be improved.
|
||||||
OPstream toMaster
|
OPstream toMaster
|
||||||
(
|
(
|
||||||
Pstream::scheduled,
|
Pstream::commsTypes::scheduled,
|
||||||
Pstream::masterNo(),
|
Pstream::masterNo(),
|
||||||
myPoints.byteSize() + 4*sizeof(label)*myFaces.size()
|
myPoints.byteSize() + 4*sizeof(label)*myFaces.size()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,7 +60,7 @@ Foam::UIPstream::UIPstream
|
|||||||
setOpened();
|
setOpened();
|
||||||
setGood();
|
setGood();
|
||||||
|
|
||||||
if (commsType == UPstream::nonBlocking)
|
if (commsType == commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
// Message is already received into externalBuf
|
// Message is already received into externalBuf
|
||||||
}
|
}
|
||||||
@ -135,7 +135,11 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
|
|||||||
clearAtEnd_(true),
|
clearAtEnd_(true),
|
||||||
messageSize_(0)
|
messageSize_(0)
|
||||||
{
|
{
|
||||||
if (commsType() != UPstream::scheduled && !buffers.finishedSendsCalled_)
|
if
|
||||||
|
(
|
||||||
|
commsType() != UPstream::commsTypes::scheduled
|
||||||
|
&& !buffers.finishedSendsCalled_
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "PstreamBuffers::finishedSends() never called." << endl
|
<< "PstreamBuffers::finishedSends() never called." << endl
|
||||||
@ -147,7 +151,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
|
|||||||
setOpened();
|
setOpened();
|
||||||
setGood();
|
setGood();
|
||||||
|
|
||||||
if (commsType() == UPstream::nonBlocking)
|
if (commsType() == commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
// Message is already received into externalBuf
|
// Message is already received into externalBuf
|
||||||
messageSize_ = buffers.recvBuf_[fromProcNo].size();
|
messageSize_ = buffers.recvBuf_[fromProcNo].size();
|
||||||
@ -251,7 +255,7 @@ Foam::label Foam::UIPstream::read
|
|||||||
error::printStack(Pout);
|
error::printStack(Pout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commsType == blocking || commsType == scheduled)
|
if (commsType == commsTypes::blocking || commsType == commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
|
|
||||||
@ -301,7 +305,7 @@ Foam::label Foam::UIPstream::read
|
|||||||
|
|
||||||
return messageSize;
|
return messageSize;
|
||||||
}
|
}
|
||||||
else if (commsType == nonBlocking)
|
else if (commsType == commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
MPI_Request request;
|
MPI_Request request;
|
||||||
|
|
||||||
@ -344,7 +348,7 @@ Foam::label Foam::UIPstream::read
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unsupported communications type "
|
<< "Unsupported communications type "
|
||||||
<< commsType
|
<< int(commsType)
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,7 +68,7 @@ bool Foam::UOPstream::write
|
|||||||
|
|
||||||
bool transferFailed = true;
|
bool transferFailed = true;
|
||||||
|
|
||||||
if (commsType == blocking)
|
if (commsType == commsTypes::blocking)
|
||||||
{
|
{
|
||||||
transferFailed = MPI_Bsend
|
transferFailed = MPI_Bsend
|
||||||
(
|
(
|
||||||
@ -88,7 +88,7 @@ bool Foam::UOPstream::write
|
|||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (commsType == scheduled)
|
else if (commsType == commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
transferFailed = MPI_Send
|
transferFailed = MPI_Send
|
||||||
(
|
(
|
||||||
@ -108,7 +108,7 @@ bool Foam::UOPstream::write
|
|||||||
<< Foam::endl;
|
<< Foam::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (commsType == nonBlocking)
|
else if (commsType == commsTypes::nonBlocking)
|
||||||
{
|
{
|
||||||
MPI_Request request;
|
MPI_Request request;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -221,18 +221,15 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Transfer data for external source
|
//- Transfer data for external source
|
||||||
virtual void transferData(OFstream& os) const;
|
virtual void transferData(OFstream& os) const;
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,17 +148,12 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patchField
|
//- Evaluate the patchField
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::Pstream::blocking
|
const Pstream::commsTypes commsType = Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// I-O
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1763,7 +1763,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
|||||||
|
|
||||||
|
|
||||||
// Allocate buffers
|
// Allocate buffers
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
|
|
||||||
// What to send to neighbouring domains
|
// What to send to neighbouring domains
|
||||||
@ -1792,7 +1792,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pstream for sending mesh and fields
|
// Pstream for sending mesh and fields
|
||||||
//OPstream str(Pstream::blocking, recvProc);
|
//OPstream str(Pstream::commsTypes::blocking, recvProc);
|
||||||
UOPstream str(recvProc, pBufs);
|
UOPstream str(recvProc, pBufs);
|
||||||
|
|
||||||
// Mesh subsetting engine
|
// Mesh subsetting engine
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -105,7 +105,7 @@ void Foam::fvMeshSubset::doCoupledPatches
|
|||||||
|
|
||||||
if (syncPar && Pstream::parRun())
|
if (syncPar && Pstream::parRun())
|
||||||
{
|
{
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send face usage across processor patches
|
// Send face usage across processor patches
|
||||||
forAll(oldPatches, oldPatchi)
|
forAll(oldPatches, oldPatchi)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -459,12 +459,12 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields
|
|||||||
if (patchSchedule[patchEvalI].init)
|
if (patchSchedule[patchEvalI].init)
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.initEvaluate(Pstream::scheduled);
|
.initEvaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.evaluate(Pstream::scheduled);
|
.evaluate(Pstream::commsTypes::scheduled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -597,12 +597,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
|||||||
if (patchSchedule[patchEvalI].init)
|
if (patchSchedule[patchEvalI].init)
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.initEvaluate(Pstream::blocking);
|
.initEvaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.evaluate(Pstream::blocking);
|
.evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -618,12 +618,12 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions
|
|||||||
if (patchSchedule[patchEvalI].init)
|
if (patchSchedule[patchEvalI].init)
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.initEvaluate(Pstream::blocking);
|
.initEvaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
displacementBf[patchi]
|
displacementBf[patchi]
|
||||||
.evaluate(Pstream::blocking);
|
.evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,12 +64,12 @@ void Foam::motionSmootherAlgo::checkConstraints
|
|||||||
|
|
||||||
forAllReverse(bFld, patchi)
|
forAllReverse(bFld, patchi)
|
||||||
{
|
{
|
||||||
bFld[patchi].initEvaluate(Pstream::blocking); // buffered
|
bFld[patchi].initEvaluate(Pstream::commsTypes::blocking); // buffered
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllReverse(bFld, patchi)
|
forAllReverse(bFld, patchi)
|
||||||
{
|
{
|
||||||
bFld[patchi].evaluate(Pstream::blocking);
|
bFld[patchi].evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1429,7 +1429,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
|
|
||||||
|
|
||||||
// Send to neighbours
|
// Send to neighbours
|
||||||
OPstream toNbr(Pstream::blocking, proci);
|
OPstream toNbr(Pstream::commsTypes::blocking, proci);
|
||||||
toNbr << newSplitCells << newVisibleCells;
|
toNbr << newSplitCells << newVisibleCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,7 +1447,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
|
|||||||
|
|
||||||
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
for (label proci = 0; proci < Pstream::nProcs(); proci++)
|
||||||
{
|
{
|
||||||
IPstream fromNbr(Pstream::blocking, proci);
|
IPstream fromNbr(Pstream::commsTypes::blocking, proci);
|
||||||
List<splitCell8> newSplitCells(fromNbr);
|
List<splitCell8> newSplitCells(fromNbr);
|
||||||
labelList newVisibleCells(fromNbr);
|
labelList newVisibleCells(fromNbr);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1931,7 +1931,7 @@ void Foam::polyTopoChange::reorderCoupledFaces
|
|||||||
// Rotation on new faces.
|
// Rotation on new faces.
|
||||||
labelList rotation(faces_.size(), 0);
|
labelList rotation(faces_.size(), 0);
|
||||||
|
|
||||||
PstreamBuffers pBufs(Pstream::nonBlocking);
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
// Send ordering
|
// Send ordering
|
||||||
forAll(boundary, patchi)
|
forAll(boundary, patchi)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,15 +122,13 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type>> snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -204,7 +204,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,12 +136,10 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -198,7 +198,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -242,7 +242,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -176,14 +176,16 @@ public:
|
|||||||
//- Initialise the evaluation of the patch field
|
//- Initialise the evaluation of the patch field
|
||||||
virtual void initEvaluate
|
virtual void initEvaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//- Evaluate the patch field, sets Updated to false
|
//- Evaluate the patch field, sets Updated to false
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,7 +149,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return the matrix diagonal coefficients corresponding to the
|
//- Return the matrix diagonal coefficients corresponding to the
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,7 +64,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,7 +68,7 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
|||||||
|
|
||||||
if (!dict.found("value") && this->coupled())
|
if (!dict.found("value") && this->coupled())
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
|||||||
|
|
||||||
if (!dict.found("value") && this->coupled())
|
if (!dict.found("value") && this->coupled())
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,7 +62,7 @@ Foam::jumpCyclicFvPatchField<Type>::jumpCyclicFvPatchField
|
|||||||
cyclicFvPatchField<Type>(p, iF, dict)
|
cyclicFvPatchField<Type>(p, iF, dict)
|
||||||
{
|
{
|
||||||
// Call this evaluation in derived classes
|
// Call this evaluation in derived classes
|
||||||
//this->evaluate(Pstream::blocking);
|
//this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -63,7 +63,7 @@ Foam::jumpCyclicAMIFvPatchField<Type>::jumpCyclicAMIFvPatchField
|
|||||||
cyclicAMIFvPatchField<Type>(p, iF, dict)
|
cyclicAMIFvPatchField<Type>(p, iF, dict)
|
||||||
{
|
{
|
||||||
// Call this evaluation in derived classes
|
// Call this evaluation in derived classes
|
||||||
//this->evaluate(Pstream::blocking);
|
//this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -225,14 +225,18 @@ void Foam::processorFvPatchField<Type>::initEvaluate
|
|||||||
{
|
{
|
||||||
this->patchInternalField(sendBuf_);
|
this->patchInternalField(sendBuf_);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path. Receive into *this
|
// Fast path. Receive into *this
|
||||||
this->setSize(sendBuf_.size());
|
this->setSize(sendBuf_.size());
|
||||||
outstandingRecvRequest_ = UPstream::nRequests();
|
outstandingRecvRequest_ = UPstream::nRequests();
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<char*>(this->begin()),
|
reinterpret_cast<char*>(this->begin()),
|
||||||
this->byteSize(),
|
this->byteSize(),
|
||||||
@ -243,7 +247,7 @@ void Foam::processorFvPatchField<Type>::initEvaluate
|
|||||||
outstandingSendRequest_ = UPstream::nRequests();
|
outstandingSendRequest_ = UPstream::nRequests();
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<const char*>(sendBuf_.begin()),
|
reinterpret_cast<const char*>(sendBuf_.begin()),
|
||||||
this->byteSize(),
|
this->byteSize(),
|
||||||
@ -267,7 +271,11 @@ void Foam::processorFvPatchField<Type>::evaluate
|
|||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path. Received into *this
|
// Fast path. Received into *this
|
||||||
|
|
||||||
@ -318,7 +326,11 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
{
|
{
|
||||||
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
|
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if (debug && !this->ready())
|
if (debug && !this->ready())
|
||||||
@ -334,7 +346,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
outstandingRecvRequest_ = UPstream::nRequests();
|
outstandingRecvRequest_ = UPstream::nRequests();
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
||||||
scalarReceiveBuf_.byteSize(),
|
scalarReceiveBuf_.byteSize(),
|
||||||
@ -345,7 +357,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
outstandingSendRequest_ = UPstream::nRequests();
|
outstandingSendRequest_ = UPstream::nRequests();
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
||||||
scalarSendBuf_.byteSize(),
|
scalarSendBuf_.byteSize(),
|
||||||
@ -379,7 +391,11 @@ void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
|
|||||||
|
|
||||||
const labelUList& faceCells = this->patch().faceCells();
|
const labelUList& faceCells = this->patch().faceCells();
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if
|
if
|
||||||
@ -437,7 +453,11 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
{
|
{
|
||||||
this->patch().patchInternalField(psiInternal, sendBuf_);
|
this->patch().patchInternalField(psiInternal, sendBuf_);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if (debug && !this->ready())
|
if (debug && !this->ready())
|
||||||
@ -453,7 +473,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
outstandingRecvRequest_ = UPstream::nRequests();
|
outstandingRecvRequest_ = UPstream::nRequests();
|
||||||
IPstream::read
|
IPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<char*>(receiveBuf_.begin()),
|
reinterpret_cast<char*>(receiveBuf_.begin()),
|
||||||
receiveBuf_.byteSize(),
|
receiveBuf_.byteSize(),
|
||||||
@ -464,7 +484,7 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
|
|||||||
outstandingSendRequest_ = UPstream::nRequests();
|
outstandingSendRequest_ = UPstream::nRequests();
|
||||||
OPstream::write
|
OPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<const char*>(sendBuf_.begin()),
|
reinterpret_cast<const char*>(sendBuf_.begin()),
|
||||||
sendBuf_.byteSize(),
|
sendBuf_.byteSize(),
|
||||||
@ -497,7 +517,11 @@ void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
|
|||||||
|
|
||||||
const labelUList& faceCells = this->patch().faceCells();
|
const labelUList& faceCells = this->patch().faceCells();
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if
|
if
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,7 +44,11 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
|
|||||||
{
|
{
|
||||||
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
|
this->patch().patchInternalField(psiInternal, scalarSendBuf_);
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if (debug && !this->ready())
|
if (debug && !this->ready())
|
||||||
@ -60,7 +64,7 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
|
|||||||
outstandingRecvRequest_ = UPstream::nRequests();
|
outstandingRecvRequest_ = UPstream::nRequests();
|
||||||
UIPstream::read
|
UIPstream::read
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
reinterpret_cast<char*>(scalarReceiveBuf_.begin()),
|
||||||
scalarReceiveBuf_.byteSize(),
|
scalarReceiveBuf_.byteSize(),
|
||||||
@ -71,7 +75,7 @@ void processorFvPatchField<scalar>::initInterfaceMatrixUpdate
|
|||||||
outstandingSendRequest_ = UPstream::nRequests();
|
outstandingSendRequest_ = UPstream::nRequests();
|
||||||
UOPstream::write
|
UOPstream::write
|
||||||
(
|
(
|
||||||
Pstream::nonBlocking,
|
Pstream::commsTypes::nonBlocking,
|
||||||
procPatch_.neighbProcNo(),
|
procPatch_.neighbProcNo(),
|
||||||
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
reinterpret_cast<const char*>(scalarSendBuf_.begin()),
|
||||||
scalarSendBuf_.byteSize(),
|
scalarSendBuf_.byteSize(),
|
||||||
@ -105,7 +109,11 @@ void processorFvPatchField<scalar>::updateInterfaceMatrix
|
|||||||
|
|
||||||
const labelUList& faceCells = this->patch().faceCells();
|
const labelUList& faceCells = this->patch().faceCells();
|
||||||
|
|
||||||
if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
|
if
|
||||||
|
(
|
||||||
|
commsType == Pstream::commsTypes::nonBlocking
|
||||||
|
&& !Pstream::floatTransfer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Fast path.
|
// Fast path.
|
||||||
if
|
if
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,7 +66,7 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField
|
|||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Pstream::defaultCommsType == Pstream::scheduled)
|
if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Scheduled communication with split cyclics not supported."
|
<< "Scheduled communication with split cyclics not supported."
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -143,15 +143,13 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type>> snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -138,15 +138,13 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Return gradient at boundary
|
//- Return gradient at boundary
|
||||||
virtual tmp<Field<Type>> snGrad() const;
|
virtual tmp<Field<Type>> snGrad() const;
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -227,7 +227,7 @@ public:
|
|||||||
//- Evaluate the patch field, sets Updated to false
|
//- Evaluate the patch field, sets Updated to false
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -239,7 +239,7 @@ public:
|
|||||||
// to false.
|
// to false.
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -308,8 +308,6 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the log flag
|
//- Return the log flag
|
||||||
bool log() const
|
bool log() const
|
||||||
{
|
{
|
||||||
@ -328,19 +326,15 @@ public:
|
|||||||
return master_;
|
return master_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
|
||||||
|
|
||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Transfer data for external source
|
//- Transfer data for external source
|
||||||
virtual void transferData(OFstream& os) const;
|
virtual void transferData(OFstream& os) const;
|
||||||
|
|
||||||
|
|
||||||
//- Write the geometry to the comms dir
|
//- Write the geometry to the comms dir
|
||||||
void writeGeometry() const;
|
void writeGeometry() const;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -117,7 +117,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,7 +78,7 @@ Foam::fixedJumpFvPatchField<Type>::fixedJumpFvPatchField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,7 +78,7 @@ Foam::fixedJumpAMIFvPatchField<Type>::fixedJumpAMIFvPatchField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->evaluate(Pstream::blocking);
|
this->evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -194,7 +194,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType =
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,7 @@ flowRateInletVelocityFvPatchVectorField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
evaluate(Pstream::blocking);
|
evaluate(Pstream::commsTypes::blocking);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user