diff --git a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H b/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H index aceffd88105674b2c2ac00178895e709a697cd4e..e534705a2baaf1afed39d874f1d523e3bd215974 100644 --- a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H +++ b/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -66,22 +66,12 @@ public: : directAddressing_(directAddressing), distMap_(distMap), - hasUnmapped_(false) - { - if - ( - notNull(directAddressing_) - && directAddressing_.size() - && min(directAddressing_) < 0 - ) - { - hasUnmapped_ = true; - } - } + hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0) + {} + //- Destructor - virtual ~distributedUnallocatedDirectFieldMapper() - {} + virtual ~distributedUnallocatedDirectFieldMapper() = default; // Member Functions diff --git a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H b/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H index 90baab780da591d49c9e412adfaab8fb0dd04b89..7d38e871ae7b673ddc11739a15bfdcf7e489893d 100644 --- a/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H +++ b/applications/utilities/parallelProcessing/redistributePar/distributedUnallocatedDirectFvPatchFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -68,22 +68,12 @@ public: : directAddressing_(directAddressing), distMap_(distMap), - hasUnmapped_(false) - { - if - ( - notNull(directAddressing_) - && directAddressing_.size() - && min(directAddressing_) < 0 - ) - { - hasUnmapped_ = true; - } - } + hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0) + {} + //- Destructor - virtual ~distributedUnallocatedDirectFvPatchFieldMapper() - {} + virtual ~distributedUnallocatedDirectFvPatchFieldMapper() = default; // Member Functions diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C index f58689713f6a6e5f3dc97f6b2a74c8f79365339c..02c441a933cf3ab915c2d44061dce74d06453173 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -2400,7 +2400,7 @@ const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices return *(contents_[getContent(contentIndex)]); } - return Foam::emptyLabelList; + return labelList::null(); } diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 047f1176a671b950cef7ce25d7213a2b326f5b5f..65afcd52a8e0d394828344b16494d35223a2b349 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -2662,7 +2662,7 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices { if (nodes_.empty()) { - return Foam::emptyLabelList; + return labelList::null(); } labelBits index = findNode(0, sample); @@ -2677,7 +2677,7 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices return contents_[getContent(contentIndex)]; } - return Foam::emptyLabelList; + return labelList::null(); } diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index 1344814f3b747f24dafa756719b6585eabe94c10..c0828badf36efbfeb3bbd1ac3f21aabfc27c8c39 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -76,6 +76,7 @@ typedef List<char> charList; typedef List<label> labelList; //- A zero-sized list of labels +// \deprecated(2019-02) use labelList::null() instead extern const labelList emptyLabelList; diff --git a/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H b/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H index a0439f964ff84556fddcc0e19d5eb64b8edef51d..cced1da9c355ccb29e5687bb6d96f56cf9a0ba0c 100644 --- a/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H +++ b/src/OpenFOAM/fields/Fields/Field/directFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2018 OpenFOAM Foundation @@ -59,17 +59,12 @@ public: directFieldMapper(const labelUList& directAddressing) : directAddressing_(directAddressing), - hasUnmapped_(false) - { - if (directAddressing_.size() && min(directAddressing_) < 0) - { - hasUnmapped_ = true; - } - } + hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0) + {} + //- Destructor - virtual ~directFieldMapper() - {} + virtual ~directFieldMapper() = default; // Member Functions diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H index 3b3682cd215029dd878eedf99589855be604af5b..95891f80eeeb4b632f0a375eb9b9f30c3b8231a8 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/directPointPatchFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013 OpenFOAM Foundation @@ -65,17 +65,12 @@ public: directPointPatchFieldMapper(const labelUList& directAddressing) : directAddressing_(directAddressing), - hasUnmapped_(false) - { - if (directAddressing_.size() && min(directAddressing_) < 0) - { - hasUnmapped_ = true; - } - } + hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0) + {} + //- Destructor - virtual ~directPointPatchFieldMapper() - {} + virtual ~directPointPatchFieldMapper() = default; // Member Functions diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C index d54b8204dc067250629655950de04f68136f72ff..13d8e7b19995d50905418baa7edd386656742fa2 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C @@ -60,6 +60,7 @@ void Foam::pointPatchMapper::calcAddressing() const if (addr[i] < 0) { hasUnmapped_ = true; + break; } } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshDataTemplates.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshDataTemplates.C index a23d3f7ca16f17dc35b0dbd08f015dfda3e627c6..c271ed127275f51697528bff8ef88bf5963d4af2 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshDataTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshDataTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -56,7 +56,7 @@ void Foam::globalMeshData::syncData const labelList& transformSlavePoints = ( transformedSlaves.empty() - ? Foam::emptyLabelList + ? labelList::null() : transformedSlaves[i] ); @@ -119,7 +119,7 @@ void Foam::globalMeshData::syncData const labelList& transformSlavePoints = ( transformedSlaves.empty() - ? Foam::emptyLabelList + ? labelList::null() : transformedSlaves[i] ); diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H index 4de5fb9b3363451b3bb98a5f31284d094114d5e9..818c4017461196e95077bb77a0f3e2819444c463 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/directFvPatchFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013 OpenFOAM Foundation @@ -65,17 +65,12 @@ public: directFvPatchFieldMapper(const labelUList& directAddressing) : directAddressing_(directAddressing), - hasUnmapped_(false) - { - if (directAddressing_.size() && min(directAddressing_) < 0) - { - hasUnmapped_ = true; - } - } + hasUnmapped_(directAddressing_.size() && min(directAddressing_) < 0) + {} + //- Destructor - virtual ~directFvPatchFieldMapper() - {} + virtual ~directFvPatchFieldMapper() = default; // Member Functions diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H index 6c861a400336025150b9b63ac3c336f8d3f6efa8..8f50bf0438a4d736d31d33c40fc7e4913b4170e4 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -113,9 +113,9 @@ public: weights_(weights), hasUnmapped_(false) { - forAll(addressing_, i) + for (const labelList& addr : addressing) { - if (addressing_[i].empty()) + if (addr.empty()) { hasUnmapped_ = true; break; diff --git a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H index f8b0fc02f43039907a669d50837c62999fe5dd5a..917beae3ae23c7250739b52dc8c4b7872ffba4d0 100644 --- a/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H +++ b/src/sampling/meshToMesh/distributedWeightedFvPatchFieldMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2016 OpenFOAM Foundation @@ -79,11 +79,12 @@ public: weights_(weights), hasUnmapped_(false) { - forAll(addressing_, i) + for (const labelList& addr : addressing) { - if (addressing_[i].size() == 0) + if (addr.empty()) { hasUnmapped_ = true; + break; } } @@ -99,8 +100,7 @@ public: } //- Destructor - virtual ~distributedWeightedFvPatchFieldMapper() - {} + virtual ~distributedWeightedFvPatchFieldMapper() = default; // Member Functions diff --git a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H index 5202bb8673eb76a302d112e0e1e4179060408ae5..2a10e19cba61f6546f08af3d9952dadb63f24002 100644 --- a/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H +++ b/src/sampling/sampledSurface/distanceSurface/sampledDistanceSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -155,10 +155,10 @@ public: return surface().surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area vectors diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H index d7c02252098eca2a3d92c7f38fc4ff379878f6c6..be953a7ae199ee0ae867f9d1b070aae42bc5ae42 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -217,10 +217,10 @@ public: return surface().surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H index 927873b4873580d6599d2b588df24604a716f7c3..743fc5745535473908171f76fdf2427d287ad4e5 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -186,10 +186,10 @@ public: return MeshStorage::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H index a0a1b1dba215dde0ad41e6cd08814cd69696300d..e7849066efe731c22b21c4d573d14e90be3f2ff6 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceTopo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2018 OpenFOAM Foundation @@ -181,10 +181,10 @@ public: return *this; } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H index 99abe6f4bcbc0fbd7f4b2ed6a66edadd4497f5dd..0e5e8c2463a00cd3c4bccc2a698e8c1fb83db1b1 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -216,10 +216,10 @@ public: return surface().surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.H b/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.H index 575ee6936c7c9d442ffef1108284dbf7bed4a027..342af4069bfcbb132fb6d9638e2d6f47af41c90c 100644 --- a/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.H +++ b/src/sampling/sampledSurface/sampledCuttingSurface/sampledCuttingSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -166,11 +166,11 @@ public: return cuttingSurface::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information // Could instead return meshCells or cellZoneId of the meshCells. virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/sampledNone/sampledNone.H b/src/sampling/sampledSurface/sampledNone/sampledNone.H index 0743927c16f4699127ed3c60c01bee6bb400ea89..f0dc4aedb5d944fe46bb1dfaf596639ae6a1e71e 100644 --- a/src/sampling/sampledSurface/sampledNone/sampledNone.H +++ b/src/sampling/sampledSurface/sampledNone/sampledNone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -108,10 +108,10 @@ public: return Mesh::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C index f49a99659341ba0135f2ad2a01a04e8ed22702e8..561f368cdac95b1ee469cda01798d4bcd27353b2 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -193,8 +193,8 @@ bool Foam::sampledPatch::update() // remap action on triangulation void Foam::sampledPatch::remapFaces(const labelUList& faceMap) { - // recalculate the cells cut - if (notNull(faceMap) && faceMap.size()) + // Recalculate the cells cut + if (!faceMap.empty()) { MeshStorage::remapFaces(faceMap); patchFaceLabels_ = labelList diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.H b/src/sampling/sampledSurface/sampledPatch/sampledPatch.H index 68e05946cb4cd2ec6e6f7b3accdef0da4209d2d2..3362463ef3305132603ef31ffc69e536b4000594 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.H +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -216,10 +216,10 @@ public: return MeshStorage::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area vectors diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H index 2e57549d2d5d5b13b8e8a6d4d428662c4343c1cd..77ce06cb97a36d9b56007e15c5e75e45d4ae8454 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -192,11 +192,11 @@ public: return cuttingPlane::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information // Could instead return meshCells or cellZoneId of the meshCells. virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area magnitudes diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H index ce1d61864d667a3582698d5370ed3a612bb0611a..640a8c3cfbfff7cb3784970b05614ef16bbd568a 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.H +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.H @@ -297,7 +297,7 @@ public: //- when hasFaceIds is true. virtual const labelList& originalIds() const { - return Foam::emptyLabelList; + return labelList::null(); } diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H index 142532f9520d1b856276737f4431a1ee7478123b..3b79d27b22386cb23ea0f2791ae3b5713aad9548 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.H @@ -265,7 +265,7 @@ public: return MeshStorage::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { return zoneIds_; diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H index 731ea67fd17fe4fa4459244fca362d2cc458ad61..8c528db81c9b62718787f2d9477ea6eda3625d5c 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H +++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFaces.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -181,10 +181,10 @@ public: return MeshStorage::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { - return Foam::emptyLabelList; + return labelList::null(); } //- Face area vectors (normals) diff --git a/src/sampling/sampledSurface/triSurfaceMesh/sampledDiscreteSurface.H b/src/sampling/sampledSurface/triSurfaceMesh/sampledDiscreteSurface.H index d8fcd04bf93d0f0ab99499bcd81f4e726239633e..bc27db4226c440481c205c89b7988a619ff897dc 100644 --- a/src/sampling/sampledSurface/triSurfaceMesh/sampledDiscreteSurface.H +++ b/src/sampling/sampledSurface/triSurfaceMesh/sampledDiscreteSurface.H @@ -157,7 +157,7 @@ public: return MeshStorage::surfFaces(); } - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { return MeshStorage::zoneIds(); diff --git a/src/sampling/surface/cutting/cuttingSurfaceBase.C b/src/sampling/surface/cutting/cuttingSurfaceBase.C index 699f367da633eb7d4a1af7516f8e1b38a243d64d..2589ece5ac7aa0c14044e9d4b6939e508882b408 100644 --- a/src/sampling/surface/cutting/cuttingSurfaceBase.C +++ b/src/sampling/surface/cutting/cuttingSurfaceBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ void Foam::cuttingSurfaceBase::performCut void Foam::cuttingSurfaceBase::remapFaces(const labelUList& faceMap) { - if (notNull(faceMap) && !faceMap.empty()) + if (!faceMap.empty()) { MeshStorage::remapFaces(faceMap); diff --git a/src/sampling/surface/triSurfaceMesh/discreteSurface.H b/src/sampling/surface/triSurfaceMesh/discreteSurface.H index 6e440d033a1d1e13977dc1b1679af00991e4ab50..b4a8e0ce313ce15c74891a16c599a2c234466781 100644 --- a/src/sampling/surface/triSurfaceMesh/discreteSurface.H +++ b/src/sampling/surface/triSurfaceMesh/discreteSurface.H @@ -270,7 +270,7 @@ public: bool update(const treeBoundBox&); - //- Const access to per-face zone/region information + //- Per-face zone/region information virtual const labelList& zoneIds() const { return zoneIds_; diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index d3f43ec11a1fe4e9fb92dccb6d57ff30637ee6a4..a750eb2e5b4fff34f590a1d15417ca7e1c76b3c6 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -466,7 +466,7 @@ void Foam::MeshedSurface<Face>::remapFaces const labelUList& faceMap ) { - if (isNull(faceMap) || faceMap.empty()) + if (faceMap.empty()) { return; } diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index 083d47fdc4afe8ad4983e2149df6f2a1517f2bc3..2785f28132171c5beaa1f330ba49708e9682d4f1 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -386,7 +386,7 @@ void Foam::UnsortedMeshedSurface<Face>::remapFaces ) { // Re-assign the zone Ids - if (isNull(faceMap) || faceMap.empty()) + if (faceMap.empty()) { return; }