mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use returnReduceAnd(), returnReduceOr() functions
DOC: document which MPI send/recv are associated with commType
This commit is contained in:
committed by
Andrew Heather
parent
473e14418a
commit
70208a7399
@ -156,7 +156,7 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces()
|
||||
|
||||
// Could also check this
|
||||
#if 0
|
||||
if (!returnReduce(bool(numFaces), orOp<bool>()))
|
||||
if (!returnReduceOr(numFaces))
|
||||
{
|
||||
WarningInFunction
|
||||
<< type() << ' ' << name() << ": "
|
||||
@ -314,7 +314,7 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::setPatchFaces()
|
||||
|
||||
// Could also check this
|
||||
#if 0
|
||||
if (!returnReduce(bool(numFaces), orOp<bool>()))
|
||||
if (!returnReduceOr(numFaces))
|
||||
{
|
||||
WarningInFunction
|
||||
<< type() << ' ' << name() << ": "
|
||||
@ -807,7 +807,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::weightingFactor
|
||||
// scalar * unit-normal
|
||||
|
||||
// Can skip this check - already used canWeight()
|
||||
/// if (returnReduce(weightField.empty(), andOp<bool>()))
|
||||
/// if (returnReduceAnd(weightField.empty()))
|
||||
/// {
|
||||
/// // No weight field - revert to unweighted form?
|
||||
/// return tmp<scalarField>::New(Sf.size(), scalar(1));
|
||||
@ -835,7 +835,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::areaWeightingFactor
|
||||
// scalar * Area
|
||||
|
||||
// Can skip this check - already used canWeight()
|
||||
/// if (returnReduce(weightField.empty(), andOp<bool>()))
|
||||
/// if (returnReduceAnd(weightField.empty()))
|
||||
/// {
|
||||
/// // No weight field - revert to unweighted form
|
||||
/// return mag(Sf);
|
||||
@ -862,7 +862,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::weightingFactor
|
||||
// vector (dot) unit-normal
|
||||
|
||||
// Can skip this check - already used canWeight()
|
||||
/// if (returnReduce(weightField.empty(), andOp<bool>()))
|
||||
/// if (returnReduceAnd(weightField.empty()))
|
||||
/// {
|
||||
/// // No weight field - revert to unweighted form
|
||||
/// return tmp<scalarField>::New(Sf.size(), scalar(1));
|
||||
@ -903,7 +903,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::areaWeightingFactor
|
||||
// vector (dot) Area
|
||||
|
||||
// Can skip this check - already used canWeight()
|
||||
/// if (returnReduce(weightField.empty(), andOp<bool>()))
|
||||
/// if (returnReduceAnd(weightField.empty()))
|
||||
/// {
|
||||
/// // No weight field - revert to unweighted form
|
||||
/// return mag(Sf);
|
||||
@ -1297,7 +1297,7 @@ bool Foam::functionObjects::fieldValues::surfaceFieldValue::write()
|
||||
|
||||
|
||||
// Process the fields
|
||||
if (returnReduce(!vectorWeights.empty(), orOp<bool>()))
|
||||
if (returnReduceOr(!vectorWeights.empty()))
|
||||
{
|
||||
if (scalarWeights.size())
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,7 +60,7 @@ inline bool Foam::functionObjects::fieldValues::surfaceFieldValue::canWeight
|
||||
) const
|
||||
{
|
||||
// Non-empty on some processor
|
||||
return returnReduce(!fld.empty(), orOp<bool>());
|
||||
return returnReduceOr(!fld.empty());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -49,7 +49,7 @@ inline bool Foam::functionObjects::fieldValues::volFieldValue::canWeight
|
||||
) const
|
||||
{
|
||||
// Non-empty on some processor
|
||||
return returnReduce(!fld.empty(), orOp<bool>());
|
||||
return returnReduceOr(!fld.empty());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +54,7 @@ bool Foam::functionObjects::reference::calc()
|
||||
|
||||
Log << endl;
|
||||
|
||||
return returnReduce(processed, orOp<bool>());
|
||||
return returnReduceOr(processed);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -70,7 +70,7 @@ int Foam::functionObjects::zeroGradient::apply
|
||||
|
||||
const VolFieldType& input = lookupObject<VolFieldType>(inputName);
|
||||
|
||||
if (!returnReduce(accept(input), orOp<bool>()))
|
||||
if (!returnReduceOr(accept(input)))
|
||||
{
|
||||
state = -1;
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user