diff --git a/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C index 74104f14c36f343a280ded68d1372dc4e9668d4d..0299cade00c112a13970ef939e3cdb6cccc63229 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/doExtrude2DMesh.C @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) // ~~~~~~~~~~~~~~~~~~~~~~ scalar minRange = GREAT; - direction extrudeDir = -1; + direction extrudeDir = 4; //illegal value. for (direction dir = 0; dir < 3; dir++) { diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 3b9903328ce91b0253468f87f9aadf044aaa82f8..9f378cbfe3f0440b85ab820a72bae1cf72a4073e 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -36,9 +36,10 @@ Description - mesh with cells put into cellZones (-makeCellZones) Note: - - Should work in parallel but cellZone interfaces cannot align with - processor boundaries so use the correct option in decomposition to - preserve those interfaces. + - Should work in parallel. + cellZones can differ on either side of processor boundaries in which case + the faces get moved from processor patch to directMapped patch. Not + ery well tested. - If a cell zone gets split into more than one region it can detect the largest matching region (-sloppyCellZones). This will accept any region that covers more than 50% of the zone. It has to be a subset @@ -514,6 +515,10 @@ void getInterfaceSizes EdgeMap<label>& interfaceSizes ) { + + // Internal faces + // ~~~~~~~~~~~~~~ + forAll(mesh.faceNeighbour(), faceI) { label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; @@ -540,6 +545,47 @@ void getInterfaceSizes } } + // Boundary faces + // ~~~~~~~~~~~~~~ + + // Neighbour cellRegion. + labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces()); + + forAll(coupledRegion, i) + { + label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()]; + coupledRegion[i] = cellRegion[cellI]; + } + syncTools::swapBoundaryFaceList(mesh, coupledRegion, false); + + forAll(coupledRegion, i) + { + label faceI = i+mesh.nInternalFaces(); + label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; + label neiRegion = coupledRegion[i]; + + if (ownRegion != neiRegion) + { + edge interface + ( + min(ownRegion, neiRegion), + max(ownRegion, neiRegion) + ); + + EdgeMap<label>::iterator iter = interfaceSizes.find(interface); + + if (iter != interfaceSizes.end()) + { + iter()++; + } + else + { + interfaceSizes.insert(interface, 1); + } + } + } + + if (sumParallel && Pstream::parRun()) { if (Pstream::master()) @@ -672,6 +718,17 @@ autoPtr<mapPolyMesh> createRegionMesh } + // Neighbour cellRegion. + labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces()); + + forAll(coupledRegion, i) + { + label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()]; + coupledRegion[i] = cellRegion[cellI]; + } + syncTools::swapBoundaryFaceList(mesh, coupledRegion, false); + + // Topology change container. Start off from existing mesh. polyTopoChange meshMod(mesh); @@ -691,16 +748,17 @@ autoPtr<mapPolyMesh> createRegionMesh { label faceI = exposedFaces[i]; - if (!mesh.isInternalFace(faceI)) + label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; + label neiRegion = -1; + + if (mesh.isInternalFace(faceI)) { - FatalErrorIn("createRegionMesh(..)") - << "Exposed face:" << faceI << " is not an internal face." - << " fc:" << mesh.faceCentres()[faceI] - << exit(FatalError); + neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; + } + else + { + neiRegion = coupledRegion[faceI-mesh.nInternalFaces()]; } - - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; - label neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; label otherRegion = -1; @@ -1357,22 +1415,14 @@ int main(int argc, char *argv[]) } } - // Different cellZones on either side of processor patch are not - // allowed for now. Convert to processorPatches or what? + // Different cellZones on either side of processor patch. forAll(neiZoneID, i) { label faceI = i+mesh.nInternalFaces(); if (zoneID[mesh.faceOwner()[faceI]] != neiZoneID[i]) { - //blockedFace[faceI] = true; - FatalErrorIn(args.executable()) - << "Coupled face " << faceI - << " fc:" << mesh.faceCentres()[faceI] - << " has cellZone " << zoneID[mesh.faceOwner()[faceI]] - << " on owner side but cellZone " << neiZoneID[i] - << " on other side. This is not allowed." - << exit(FatalError); + blockedFace[faceI] = true; } } } diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options index 421e59a7f140817e59bae04ae1837f5528023836..e473b84bb97d6b6674fe75f865e16df486bf5bb3 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options @@ -1,43 +1,59 @@ EXE_LIBS = \ + -lautoMesh \ + -lbarotropicCompressibilityModel \ -lbasicThermophysicalModels \ + -lblockMesh \ -lchemistryModel \ - -lreactionThermophysicalModels \ + -lcoalCombustion \ -lcompressibleLESModels \ + -lcompressibleRASModels \ + -lcompressibleTurbulenceModel \ + -lconversion \ -ldecompositionMethods \ -ldieselSpray \ + -ldsmc \ -ldynamicFvMesh \ -ldynamicMesh \ -ledgeMesh \ -lengine \ -lerrorEstimation \ + -lfieldFunctionObjects \ -lfiniteVolume \ -lforces \ -lfvMotionSolvers \ + -lgenericPatchFields \ -lincompressibleLESModels \ - -lincompressibleTransportModels \ - -lcompressibleRASModels \ -lincompressibleRASModels \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ -linterfaceProperties \ - -llagrangianIntermediate \ + -lIOFunctionObjects \ -llagrangian \ + -llagrangianIntermediate \ -llaminarFlameSpeedModels \ -lLESdeltas \ -lLESfilters \ -lliquidMixture \ -lliquids \ -lmeshTools \ + -lmolecularMeasurements \ + -lmolecule \ -lODE \ -lOpenFOAM \ -lpdf \ - -lphaseModel \ + -lpotential \ -lradiation \ -lrandomProcesses \ + -lreactionThermophysicalModels \ -lsampling \ -lsolidMixture \ + -lsolidParticle \ -lsolids \ -lspecie \ + -lsurfMesh \ + -lsystemCall \ + -lthermalPorousZone \ -lthermophysicalFunctions \ -ltopoChangerFvMesh \ -ltriSurface \ - -lautoMesh \ - -lblockMesh + -lutilityFunctionObjects diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H index 4855bfbb0e5e5a855fb56c53f7b3b8655a0e6add..3eb9a1e612beec67a213324dc0cf2d395abef9a3 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H @@ -57,6 +57,7 @@ class argList; class ensightMesh { +public: class nFacePrimitives { public: @@ -75,6 +76,7 @@ class ensightMesh {} }; +private: // Private data diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 14e0468c0b7b7c889f733f3dfea05bc7b7fab8cf..3a69ee880bec5872abfe53eb009d67ba1f933bd2 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -797,7 +797,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vsf[i])(), + linearInterpolate(vsf[i])(), faceLabels )() ); @@ -808,7 +808,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vvf[i])(), + linearInterpolate(vvf[i])(), faceLabels )() ); @@ -819,7 +819,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vSpheretf[i])(), + linearInterpolate(vSpheretf[i])(), faceLabels )() ); @@ -830,7 +830,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vSymmtf[i])(), + linearInterpolate(vSymmtf[i])(), faceLabels )() ); @@ -841,7 +841,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vtf[i])(), + linearInterpolate(vtf[i])(), faceLabels )() ); @@ -1094,7 +1094,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vsf[i])(), + linearInterpolate(vsf[i])(), pp )() ); @@ -1105,7 +1105,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vvf[i])(), + linearInterpolate(vvf[i])(), pp )() ); @@ -1116,7 +1116,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vSpheretf[i])(), + linearInterpolate(vSpheretf[i])(), pp )() ); @@ -1127,7 +1127,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vSymmtf[i])(), + linearInterpolate(vSymmtf[i])(), pp )() ); @@ -1138,7 +1138,7 @@ int main(int argc, char *argv[]) ( writer.getFaceField ( - fvc::interpolate(vtf[i])(), + linearInterpolate(vtf[i])(), pp )() ); diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H index 1504fb4d78363167fd2f4e934270702728afc71d..98c7660155f2f618474327a5ba553d514e23c205 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H @@ -172,7 +172,7 @@ template<class ListType> ListType createWithValues ( const label sz, - const typename ListType::const_reference initValue, + typename ListType::const_reference initValue, const UList<label>& indices, typename ListType::const_reference setValue ); diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C index db45597ba705b4b9dacf9890d2b0b24f8b68179e..14fac1ba8cfea72447f90fd8882b6e973a3e5619 100644 --- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C +++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C @@ -129,28 +129,29 @@ void Foam::SHA1::processBytes(const void *data, size_t len) } // Process available complete blocks - if (len >= 64) - { -#if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) - if (UNALIGNED_P (data)) - { - while (len > 64) +// if (len >= 64) +// { +//#if !_STRING_ARCH_unaligned +//# define alignof(type) offsetof (struct { char c; type x; }, x) +//# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +// if (UNALIGNED_P (data)) +// { +// while (len > 64) + while (len >= 64) { processBlock(memcpy (buffer_, data, 64), 64); data = reinterpret_cast<const unsigned char*>(data) + 64; len -= 64; } - } - else -#endif - { - processBlock(data, len & ~63); - data = reinterpret_cast<const unsigned char*>(data) + (len & ~63); - len &= 63; - } - } +// } +// else +//#endif +// { +// processBlock(data, len & ~63); +// data = reinterpret_cast<const unsigned char*>(data) + (len & ~63); +// len &= 63; +// } +// } // Move remaining bytes in internal buffer. if (len > 0) diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index 5d1588a39bdcbd8016c37a64f9b152634e659f3e..3455b37804ace5ccc56237017d63dee3466a6150 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -141,8 +141,7 @@ void Foam::MULES::implicitSolve { const fvMesh& mesh = psi.mesh(); - const dictionary& MULEScontrols = - mesh.solverDict(psi.name()).subDict("MULESImplicit"); + const dictionary& MULEScontrols = mesh.solverDict(psi.name()); label maxIter ( @@ -254,7 +253,7 @@ void Foam::MULES::implicitSolve solve ( psiConvectionDiffusion + fvc::div(lambda*phiCorr), - MULEScontrols.lookup("solver") + MULEScontrols ); scalar maxPsiM1 = gMax(psi.internalField()) - 1.0; diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H index 640c2aa4f4746aa0a63e0805870b6d7b67b6f00a..666c4b1b5d93eae77d50c324a93a91010c92b815 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CECCellToFaceStencil.H @@ -51,15 +51,6 @@ class CECCellToFaceStencil : public cellToFaceStencil { - // Private Member Functions - - //- Disallow default bitwise copy construct - CECCellToFaceStencil(const CECCellToFaceStencil&); - - //- Disallow default bitwise assignment - void operator=(const CECCellToFaceStencil&); - - public: // Constructors diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H index a05b1b7aa6dfcaf2425d27c68bbfa57983239347..6b8dbcaedff0f007fa93df3b5d67dc28ce77c0bb 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CFCCellToFaceStencil.H @@ -51,14 +51,6 @@ class CFCCellToFaceStencil : public cellToFaceStencil { - // Private Member Functions - - //- Disallow default bitwise copy construct - CFCCellToFaceStencil(const CFCCellToFaceStencil&); - - //- Disallow default bitwise assignment - void operator=(const CFCCellToFaceStencil&); - public: // Constructors diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H index a82886e11145aca2883ac6846d822dca268eb0bd..f3e996332de4f013434955a553d3b1d7bcec1f0a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/CPCCellToFaceStencil.H @@ -51,15 +51,6 @@ class CPCCellToFaceStencil : public cellToFaceStencil { - // Private Member Functions - - //- Disallow default bitwise copy construct - CPCCellToFaceStencil(const CPCCellToFaceStencil&); - - //- Disallow default bitwise assignment - void operator=(const CPCCellToFaceStencil&); - - public: // Constructors diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H index 6a00f702ea92cc9d19d655ad0ee19ff70e846510..d08afb8bebca125a40d6cadbdfac93daf90d0c36 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/fullStencils/FECCellToFaceStencil.H @@ -65,13 +65,6 @@ class FECCellToFaceStencil void calcFaceStencil(labelListList& faceStencil) const; - //- Disallow default bitwise copy construct - FECCellToFaceStencil(const FECCellToFaceStencil&); - - //- Disallow default bitwise assignment - void operator=(const FECCellToFaceStencil&); - - public: // Constructors diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H index 2bbf9376f438047e47ece65c6e1a9c6f5a091173..80086262e16b8e965d199a661fb7c48f7bb817cc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/fullStencils/CFCFaceToCellStencil.H @@ -56,11 +56,6 @@ class CFCFaceToCellStencil void calcCellStencil(labelListList& globalCellFaces) const; - //- Disallow default bitwise copy construct - CFCFaceToCellStencil(const CFCFaceToCellStencil&); - - //- Disallow default bitwise assignment - void operator=(const CFCFaceToCellStencil&); public: diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H index c22174451b9f6c3c8bd83afceabc3fa76ee79710..115aedc9fe8ebad921190151c0c3fffbe1503ea5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolate.H @@ -157,14 +157,14 @@ namespace fvc ); - //- Interpolate tmp field onto faces using central differencing + //- Interpolate tmp field onto faces using 'interpolate(<name>)' template<class Type> static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate ( const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf ); - //- Interpolate field onto faces using central differencing + //- Interpolate tmp field onto faces using 'interpolate(<name>)' template<class Type> static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > interpolate ( diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 873d5fb34611db8528ceb57e5af007c9fc711ccb..b300ea55251b59341110b9df77a102211edf1360 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -67,6 +67,10 @@ Foam::word Foam::PatchInteractionModel<CloudType>::interactionTypeToWord return "other"; } } +#ifdef __ICC + // Prevent Icc complaining about missing return statement. + return word::null; +#endif } diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++ index a637677c1d4d306fc87df75f2480543e513409de..6ddaa1fe6111f057ae174b0f6d30038763c35ff9 100644 --- a/wmake/rules/linux64Icc/c++ +++ b/wmake/rules/linux64Icc/c++ @@ -1,6 +1,6 @@ .SUFFIXES: .C .cxx .cc .cpp -c++WARN = -wd654,819,1125,1476,1505,1572 +c++WARN = -wd327,654,819,1125,1476,1505,1572 CC = icpc diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++ index b8e396385682ae5cb3c3f72a16e570423b208c14..625cbd186efb0f5af95d7298da0fa2251539d207 100644 --- a/wmake/rules/linuxIA64Icc/c++ +++ b/wmake/rules/linuxIA64Icc/c++ @@ -1,6 +1,6 @@ .SUFFIXES: .C .cxx .cc .cpp -c++WARN = -wd654,819,1125,1476,1505,1572 +c++WARN = -wd327,654,819,1125,1476,1505,1572 CC = icpc diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++ index 011145e81e1e2c757b6811f53d2a44cc44c66de2..dcbd72e77cf119f99a6ad56c8af40c8cca5473eb 100644 --- a/wmake/rules/linuxIcc/c++ +++ b/wmake/rules/linuxIcc/c++ @@ -1,6 +1,6 @@ .SUFFIXES: .C .cxx .cc .cpp -c++WARN = -wd654,819,1125,1476,1505,1572 +c++WARN = -wd327,654,819,1125,1476,1505,1572 #CC = icpc -gcc-version=400 CC = icpc