diff --git a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H index 71ee8d60f6..b5a9d283ac 100644 --- a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H +++ b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H @@ -1,6 +1,6 @@ Info<< "Constructing single cell mesh" << nl << endl; -labelList owner(6, 0); +labelList owner(6, label(0)); labelList neighbour(0); pointField points(8); diff --git a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C index f80e4d8b21..dc058f81c8 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C +++ b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C @@ -47,7 +47,7 @@ void sammMesh::readBoundary() labelList pointLabels(4); labelList pointLabelsTri(3); - labelList patchLabels(1000, -1); + labelList patchLabels(1000, label(-1)); word patchType; patchTypes_.setSize(1000); diff --git a/applications/utilities/mesh/conversion/sammToFoam/readCells.C b/applications/utilities/mesh/conversion/sammToFoam/readCells.C index 698286cbe5..81385923b8 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/readCells.C +++ b/applications/utilities/mesh/conversion/sammToFoam/readCells.C @@ -230,7 +230,7 @@ void sammMesh::readCells() { IFstream cellsFile(cellsFileName); - labelList labels(24, -1); + labelList labels(24, label(-1)); label lineLabel, sammLabel, regionLabel, typeFlag; for (label cellI = 0; cellI < nCells; cellI++) diff --git a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C index f259ae36fa..0b4fd11ddb 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C @@ -47,7 +47,7 @@ void starMesh::readBoundary() labelList pointLabels(4); labelList pointLabelsTri(3); - labelList patchLabels(1000, -1); + labelList patchLabels(1000, label(-1)); word patchType; patchTypes_.setSize(1000); diff --git a/applications/utilities/mesh/conversion/star3ToFoam/readCells.C b/applications/utilities/mesh/conversion/star3ToFoam/readCells.C index df3c682c57..9fba892ad1 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/readCells.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/readCells.C @@ -275,7 +275,7 @@ void starMesh::readCells() { IFstream cellsFile(cellsFileName); - labelList labels(24, -1); + labelList labels(24, label(-1)); label lineLabel, starLabel, regionLabel, typeFlag; for (label cellI = 0; cellI < nCells; cellI++) diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 9c1feef73a..c02f9bf68e 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1456,7 +1456,7 @@ void setCouplingInfo { const polyBoundaryMesh& patches = mesh.boundaryMesh(); - List newPatches(patches.size(), NULL); + List newPatches(patches.size(), static_cast(NULL)); forAll(zoneToPatch, zoneI) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C index 6d3c44b8ad..1451233254 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C @@ -244,8 +244,8 @@ void Foam::domainDecomposition::decomposeMesh() { label nInterfaces = interPatchFaces[procI].size(); - subPatchIDs[procI].setSize(nInterfaces, labelList(1, -1)); - subPatchStarts[procI].setSize(nInterfaces, labelList(1, 0)); + subPatchIDs[procI].setSize(nInterfaces, labelList(1, label(-1))); + subPatchStarts[procI].setSize(nInterfaces, labelList(1, label(0))); } // Processor boundaries from split cyclics @@ -319,7 +319,7 @@ void Foam::domainDecomposition::decomposeMesh() { label nIntfcs = interPatchFaces[procI].size(); subPatchIDs[procI].setSize(nIntfcs, labelList(1, patchi)); - subPatchStarts[procI].setSize(nIntfcs, labelList(1, 0)); + subPatchStarts[procI].setSize(nIntfcs, labelList(1, label(0))); } } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.C index 21ab0f96b0..ec31f67ed5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.C @@ -114,7 +114,7 @@ Foam::fieldviewTopology::fieldviewTopology // Mark all faces that are to be seen as wall for particle // tracking and all cells that use one or more of these walls - labelList wallFace(mesh.nFaces(), NOT_A_WALL); + List wallFace(mesh.nFaces(), NOT_A_WALL); boolList wallCell(mesh.nCells(), false); if (setWallInfo) @@ -149,20 +149,20 @@ Foam::fieldviewTopology::fieldviewTopology const cellModel& hex = *(cellModeller::lookup("hex")); // Pre calculate headers for cells not on walls - labelList notWallFlags(6, NOT_A_WALL); - label tetNotWall = fv_encode_elem_header + List notWallFlags(6, NOT_A_WALL); + unsigned int tetNotWall = fv_encode_elem_header ( FV_TET_ELEM_ID, notWallFlags.begin() ); - label pyrNotWall = fv_encode_elem_header + unsigned int pyrNotWall = fv_encode_elem_header ( FV_PYRA_ELEM_ID, notWallFlags.begin() ); - label prismNotWall = fv_encode_elem_header + unsigned int prismNotWall = fv_encode_elem_header ( FV_PRISM_ELEM_ID, notWallFlags.begin() ); - label hexNotWall = fv_encode_elem_header + unsigned int hexNotWall = fv_encode_elem_header ( FV_HEX_ELEM_ID, notWallFlags.begin() ); @@ -179,7 +179,7 @@ Foam::fieldviewTopology::fieldviewTopology const faceList& allFaces = mesh.faces(); - labelList wallFlags(6); + List wallFlags(6); forAll(cellShapes, celli) { const cellShape& cellShape = cellShapes[celli]; diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.H b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.H index cf65ab5ad6..d0591a3541 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.H +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/fieldviewTopology.H @@ -55,13 +55,13 @@ class fieldviewTopology // Private data //- Hexes in fieldview format - labelList hexLabels_; + List hexLabels_; - labelList prismLabels_; + List prismLabels_; - labelList pyrLabels_; + List pyrLabels_; - labelList tetLabels_; + List tetLabels_; //- Number of non-hex/prism/pyr/tet labels label nPoly_; @@ -108,22 +108,22 @@ public: // Access - const labelList& hexLabels() const + const List& hexLabels() const { return hexLabels_; } - const labelList& prismLabels() const + const List& prismLabels() const { return prismLabels_; } - const labelList& pyrLabels() const + const List& pyrLabels() const { return pyrLabels_; } - const labelList& tetLabels() const + const List& tetLabels() const { return tetLabels_; } diff --git a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C index c44917663a..419b8568e0 100644 --- a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C +++ b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C @@ -332,7 +332,7 @@ int main(int argc, char *argv[]) vectorField normals(2*nFeatEds, vector::zero); vectorField edgeDirections(nFeatEds, vector::zero); - labelListList edgeNormals(nFeatEds, labelList(2, -1)); + labelListList edgeNormals(nFeatEds, labelList(2, label(-1))); triSurfaceSearch querySurf1(surf1); triSurfaceSearch querySurf2(surf2); diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C index 19dd60f1e8..7058ac6139 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableCore.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "HashTable.H" +#include "uLabel.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -47,7 +48,7 @@ Foam::label Foam::HashTableCore::canonicalSize(const label size) } // enforce power of two - unsigned int goodSize = size; + uLabel goodSize = size; if (goodSize & (goodSize - 1)) { diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H index dff96c4388..7b4a7bfada 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H @@ -68,7 +68,7 @@ class UIPstream const bool clearAtEnd_; - label messageSize_; + int messageSize_; // Private Member Functions diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index 67a120afdf..a45d385894 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -222,7 +222,7 @@ int Foam::UPstream::myProcNo_(0); bool Foam::UPstream::parRun_(false); // List of process IDs -Foam::List Foam::UPstream::procIDs_(1, 0); +Foam::List Foam::UPstream::procIDs_(label(1), 0); // Standard transfer message type int Foam::UPstream::msgType_(1); diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 6ab3baa700..754a2b9072 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -278,7 +278,7 @@ Foam::Time::Time writeControl_(wcTimeStep), writeInterval_(GREAT), secondaryWriteControl_(wcTimeStep), - secondaryWriteInterval_(labelMax), + secondaryWriteInterval_(labelMax/10.0), // bit less to allow calculations purgeWrite_(0), writeOnce_(false), subCycling_(false), @@ -370,7 +370,7 @@ Foam::Time::Time writeControl_(wcTimeStep), writeInterval_(GREAT), secondaryWriteControl_(wcTimeStep), - secondaryWriteInterval_(labelMax), + secondaryWriteInterval_(labelMax/10.0), purgeWrite_(0), writeOnce_(false), subCycling_(false), @@ -465,7 +465,7 @@ Foam::Time::Time writeControl_(wcTimeStep), writeInterval_(GREAT), secondaryWriteControl_(wcTimeStep), - secondaryWriteInterval_(labelMax), + secondaryWriteInterval_(labelMax/10.0), purgeWrite_(0), writeOnce_(false), subCycling_(false), @@ -562,7 +562,7 @@ Foam::Time::Time writeControl_(wcTimeStep), writeInterval_(GREAT), secondaryWriteControl_(wcTimeStep), - secondaryWriteInterval_(labelMax), + secondaryWriteInterval_(labelMax/10.0), purgeWrite_(0), writeOnce_(false), subCycling_(false), diff --git a/src/OpenFOAM/fields/Fields/transformList/transformList.H b/src/OpenFOAM/fields/Fields/transformList/transformList.H index a95e099249..2da8e39477 100644 --- a/src/OpenFOAM/fields/Fields/transformList/transformList.H +++ b/src/OpenFOAM/fields/Fields/transformList/transformList.H @@ -75,6 +75,28 @@ template void transformList(const tensorField&, EdgeMap&); +// Specialisations for bool +template<> +inline void transformList(const tensor&, UList&) +{} +template<> +inline void transformList(const tensorField&, UList&) +{} +template<> +inline void transformList(const tensor&, Map&) +{} +template<> +inline void transformList(const tensorField&, Map&) +{} +template<> +inline void transformList(const tensor&, EdgeMap&) +{} +template<> +inline void transformList(const tensorField&, EdgeMap&) +{} + + +// Specialisations for label template<> inline void transformList(const tensor&, labelUList&) {} @@ -95,6 +117,7 @@ inline void transformList(const tensorField&, EdgeMap