mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: prefer listReduce() to using listCombineReduce() when possible
- potentially allows access into the builtin MPI operations
This commit is contained in:
@ -229,7 +229,7 @@ void Foam::VF::raySearchEngine::createAgglomeration(const IOobject& io)
|
||||
Pstream::allGatherList(allSf_);
|
||||
Pstream::allGatherList(allAgg_);
|
||||
|
||||
Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
Pstream::listGather(patchAreas_, sumOp<scalar>());
|
||||
Pstream::broadcast(patchAreas_);
|
||||
|
||||
globalNumbering_ = globalIndex(nCoarseFace_);
|
||||
@ -262,8 +262,11 @@ void Foam::VF::raySearchEngine::createGeometry()
|
||||
Pstream::allGatherList(allCf_);
|
||||
Pstream::allGatherList(allSf_);
|
||||
|
||||
Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
Pstream::broadcast(patchAreas_);
|
||||
// Pstream::listCombineGather(patchAreas_, plusEqOp<scalar>());
|
||||
// Pstream::broadcast(patchAreas_);
|
||||
|
||||
// Basic type and op_sum, so can use listReduce (ie, mpiAllReduce)
|
||||
Pstream::listReduce(patchAreas_, sumOp<scalar>());
|
||||
|
||||
globalNumbering_ = globalIndex(nFace_);
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ bool setFaceFieldType
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineReduce(nChanged, plusEqOp<label>());
|
||||
Pstream::listReduce(nChanged, sumOp<label>());
|
||||
|
||||
auto& fieldBf = field.boundaryFieldRef();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user