mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
globalMeshData: Changed the communicator for the reductions
Avoids problems with overlapping communicationbetween these reductions and the calculation of deltaCoeffs. This is a temporary fix while code reorganizations are undertaken to ensure the globalMeshData is updated before deltaCoeffs are requested. Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1780
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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2746,22 +2746,44 @@ void Foam::globalMeshData::updateMesh()
|
|||||||
Pout<< "globalMeshData : merge dist:" << tolDim << endl;
|
Pout<< "globalMeshData : merge dist:" << tolDim << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// *** Temporary hack to avoid problems with overlapping communication
|
||||||
|
// *** between these reductions and the calculation of deltaCoeffs
|
||||||
|
label comm = UPstream::worldComm + 1;
|
||||||
|
|
||||||
// Total number of faces.
|
// Total number of faces.
|
||||||
nTotalFaces_ = returnReduce(mesh_.nFaces(), sumOp<label>());
|
nTotalFaces_ = returnReduce
|
||||||
|
(
|
||||||
|
mesh_.nFaces(),
|
||||||
|
sumOp<label>(),
|
||||||
|
Pstream::msgType(),
|
||||||
|
comm
|
||||||
|
);
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "globalMeshData : nTotalFaces_:" << nTotalFaces_ << endl;
|
Pout<< "globalMeshData : nTotalFaces_:" << nTotalFaces_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
nTotalCells_ = returnReduce(mesh_.nCells(), sumOp<label>());
|
nTotalCells_ = returnReduce
|
||||||
|
(
|
||||||
|
mesh_.nCells(),
|
||||||
|
sumOp<label>(),
|
||||||
|
Pstream::msgType(),
|
||||||
|
comm
|
||||||
|
);
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "globalMeshData : nTotalCells_:" << nTotalCells_ << endl;
|
Pout<< "globalMeshData : nTotalCells_:" << nTotalCells_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
nTotalPoints_ = returnReduce(mesh_.nPoints(), sumOp<label>());
|
nTotalPoints_ = returnReduce
|
||||||
|
(
|
||||||
|
mesh_.nPoints(),
|
||||||
|
sumOp<label>(),
|
||||||
|
Pstream::msgType(),
|
||||||
|
comm
|
||||||
|
);
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user