diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H index 6012a219d5..e3c19117c9 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicPointPatchField_H -#define cyclicPointPatchField_H +#ifndef Foam_cyclicPointPatchField_H +#define Foam_cyclicPointPatchField_H #include "coupledPointPatchField.H" #include "cyclicPointPatch.H" @@ -142,7 +142,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(cyclicPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !cyclicPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H index 4aeee50e46..6741795e03 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef processorPointPatchField_H -#define processorPointPatchField_H +#ifndef Foam_processorPointPatchField_H +#define Foam_processorPointPatchField_H #include "coupledPointPatchField.H" #include "processorPointPatch.H" @@ -145,10 +145,10 @@ public: virtual bool doTransform() const { return - !( - procPatch_.procPolyPatch().parallel() - || pTraits::rank == 0 - ); + ( + pTraits::rank + && !procPatch_.procPolyPatch().parallel() + ); } diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H index fc63899af6..25a8ec9f6b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef processorCyclicPointPatchField_H -#define processorCyclicPointPatchField_H +#ifndef Foam_processorCyclicPointPatchField_H +#define Foam_processorCyclicPointPatchField_H #include "coupledPointPatchField.H" #include "processorCyclicPointPatch.H" @@ -149,10 +149,10 @@ public: virtual bool doTransform() const { return - !( - pTraits::rank == 0 - || procPatch_.procPolyPatch().parallel() - ); + ( + pTraits::rank + && !procPatch_.procPolyPatch().parallel() + ); } diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H index 63da81ed38..5b505bb37b 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H @@ -39,8 +39,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicFaPatchField_H -#define cyclicFaPatchField_H +#ifndef Foam_cyclicFaPatchField_H +#define Foam_cyclicFaPatchField_H #include "coupledFaPatchField.H" #include "cyclicLduInterfaceField.H" @@ -205,7 +205,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(cyclicPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !cyclicPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H index 10d01e42a1..033bf6f5df 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H @@ -38,8 +38,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef processorFaPatchField_H -#define processorFaPatchField_H +#ifndef Foam_processorFaPatchField_H +#define Foam_processorFaPatchField_H #include "coupledFaPatchField.H" #include "processorLduInterfaceField.H" @@ -254,7 +254,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(procPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !procPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H index 33abab3bc7..b2b3595ae5 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H @@ -53,8 +53,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicFvPatchField_H -#define cyclicFvPatchField_H +#ifndef Foam_cyclicFvPatchField_H +#define Foam_cyclicFvPatchField_H #include "coupledFvPatchField.H" #include "cyclicLduInterfaceField.H" @@ -220,7 +220,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(cyclicPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !cyclicPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index 9eb8e6169f..b796999044 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -183,7 +183,7 @@ Foam::cyclicACMIFvPatchField::patchNeighbourField() const if (doTransform()) { - tpnf.ref() = transform(forwardT(), tpnf()); + transform(tpnf.ref(), forwardT(), tpnf()); } return tpnf; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H index da1097b06c..a3664e5937 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H @@ -52,8 +52,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicACMIFvPatchField_H -#define cyclicACMIFvPatchField_H +#ifndef Foam_cyclicACMIFvPatchField_H +#define Foam_cyclicACMIFvPatchField_H #include "coupledFvPatchField.H" #include "cyclicACMILduInterfaceField.H" @@ -255,8 +255,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return - !(cyclicACMIPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !cyclicACMIPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index fb0b880cfc..61a7e49820 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C @@ -168,7 +168,7 @@ Foam::cyclicAMIFvPatchField::patchNeighbourField() const if (doTransform()) { - tpnf.ref() = transform(forwardT(), tpnf()); + transform(tpnf.ref(), forwardT(), tpnf()); } return tpnf; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H index 08ddce2aa7..44efff7915 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H @@ -57,9 +57,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicAMIFvPatchField_H -#define cyclicAMIFvPatchField_H - +#ifndef Foam_cyclicAMIFvPatchField_H +#define Foam_cyclicAMIFvPatchField_H #include "coupledFvPatchField.H" #include "cyclicAMILduInterfaceField.H" @@ -242,8 +241,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return - !(cyclicAMIPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !cyclicAMIPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C index f96eaa1468..dcd345fc87 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C @@ -120,7 +120,7 @@ Foam::jumpCyclicAMIFvPatchField::patchNeighbourField() const if (this->doTransform()) { - tpnf = transform(this->forwardT(), tpnf); + transform(tpnf.ref(), this->forwardT(), tpnf()); } tmp> tjf = jump(); diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H index 029683e8bb..ffa43402c6 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H @@ -47,8 +47,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef processorFvPatchField_H -#define processorFvPatchField_H +#ifndef Foam_processorFvPatchField_H +#define Foam_processorFvPatchField_H #include "coupledFvPatchField.H" #include "processorLduInterfaceField.H" @@ -251,7 +251,6 @@ public: const scalarField& coeffs, const Pstream::commsTypes commsType ) const; - //- Processor coupled interface functions @@ -277,7 +276,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(procPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !procPatch_.parallel()); } //- Return face transformation tensor @@ -291,7 +290,6 @@ public: { return pTraits::rank; } - }; diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H index b823d574d6..f8068ac40a 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.H @@ -53,8 +53,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef processorCyclicFvPatchField_H -#define processorCyclicFvPatchField_H +#ifndef Foam_processorCyclicFvPatchField_H +#define Foam_processorCyclicFvPatchField_H #include "processorCyclicFvPatch.H" #include "processorFvPatchField.H" @@ -162,7 +162,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return !(procPatch_.parallel() || pTraits::rank == 0); + return (pTraits::rank && !procPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H index 861ff876a4..0c4017cd8d 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicACMIPointPatchField_H -#define cyclicACMIPointPatchField_H +#ifndef Foam_cyclicACMIPointPatchField_H +#define Foam_cyclicACMIPointPatchField_H #include "coupledPointPatchField.H" #include "cyclicACMIPointPatch.H" @@ -189,11 +189,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return - !( - cyclicACMIPatch_.parallel() - || pTraits::rank == 0 - ); + return (pTraits::rank && !cyclicACMIPatch_.parallel()); } //- Return face transformation tensor diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H index 87fbaf5a8e..d3237db8e5 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef cyclicAMIPointPatchField_H -#define cyclicAMIPointPatchField_H +#ifndef Foam_cyclicAMIPointPatchField_H +#define Foam_cyclicAMIPointPatchField_H #include "coupledPointPatchField.H" #include "cyclicAMIPointPatch.H" @@ -189,11 +189,7 @@ public: //- Does the patch field perform the transformation virtual bool doTransform() const { - return - !( - cyclicAMIPatch_.parallel() - || pTraits::rank == 0 - ); + return (pTraits::rank && !cyclicAMIPatch_.parallel()); } //- Return face transformation tensor