diff --git a/applications/utilities/mesh/generation/foamyHexMesh/Make/options b/applications/utilities/mesh/generation/foamyHexMesh/Make/options index f0483b99be..256fa40164 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/Make/options +++ b/applications/utilities/mesh/generation/foamyHexMesh/Make/options @@ -13,6 +13,7 @@ EXE_INC = \ ${CGAL_EXACT} \ ${CGAL_INEXACT} \ ${CGAL_INC} \ + ${c++CGALWARN} \ -IconformalVoronoiMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/Make/options b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/Make/options index 8cfdbd04fd..ac0dfdc4f8 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/Make/options +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/Make/options @@ -14,6 +14,7 @@ EXE_INC = \ ${CGAL_EXACT} \ ${CGAL_INEXACT} \ ${CGAL_INC} \ + ${c++CGALWARN} \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ diff --git a/applications/utilities/mesh/generation/foamyQuadMesh/Make/options b/applications/utilities/mesh/generation/foamyQuadMesh/Make/options index 62aec78cdb..7c52fa131a 100755 --- a/applications/utilities/mesh/generation/foamyQuadMesh/Make/options +++ b/applications/utilities/mesh/generation/foamyQuadMesh/Make/options @@ -9,6 +9,7 @@ EXE_INC = \ ${EXE_FROUNDING_MATH} \ ${EXE_NDEBUG} \ ${CGAL_INC} \ + ${c++CGALWARN} \ -I$(FOAM_APP)/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/lnInclude \ -I../cvMesh/vectorTools \ -IconformalVoronoi2DMesh/lnInclude \ diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/Make/files b/applications/utilities/mesh/manipulation/orientFaceZone/Make/files index 07214af76c..f5a0821f85 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/Make/files +++ b/applications/utilities/mesh/manipulation/orientFaceZone/Make/files @@ -1,4 +1,3 @@ -patchFaceOrientation.C orientFaceZone.C EXE = $(FOAM_APPBIN)/orientFaceZone diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/Make/options b/applications/utilities/mesh/manipulation/orientFaceZone/Make/options index 9f08e8d2a8..30fde688e5 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/Make/options +++ b/applications/utilities/mesh/manipulation/orientFaceZone/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/mesh/autoMesh/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude EXE_LIBS = \ -lmeshTools \ + -lautoMesh \ -ltriSurface diff --git a/src/OpenFOAM/memory/autoPtr/autoPtrI.H b/src/OpenFOAM/memory/autoPtr/autoPtrI.H index 55e032fcd4..3557ffc49b 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtrI.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtrI.H @@ -52,10 +52,14 @@ inline Foam::autoPtr::autoPtr(const autoPtr& ap, const bool reUse) ptr_ = ap.ptr_; ap.ptr_ = 0; } - else + else if (ap.valid()) { ptr_ = ap().clone().ptr(); } + else + { + ptr_ = NULL; + } } diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake index abbcf4664b..4fc3ed6029 100755 --- a/src/fvAgglomerationMethods/Allwmake +++ b/src/fvAgglomerationMethods/Allwmake @@ -12,4 +12,22 @@ fi wmake $makeType pairPatchAgglomeration + +## get SCOTCH_VERSION, SCOTCH_ARCH_PATH +#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh` +#then +# . $settings +# echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" +#else +# echo +# echo "Error: no config/scotch.sh settings" +# echo +#fi +# +#if [ -n "$SCOTCH_ARCH_PATH" ] +#then +# wmake $makeType scotchGamgAgglomeration +#fi + + # ----------------------------------------------------------------- end-of-file diff --git a/src/mesh/autoMesh/Make/files b/src/mesh/autoMesh/Make/files index d5bfe6f751..dd0bfd0391 100644 --- a/src/mesh/autoMesh/Make/files +++ b/src/mesh/autoMesh/Make/files @@ -17,6 +17,8 @@ $(autoHexMesh)/meshRefinement/meshRefinement.C $(autoHexMesh)/meshRefinement/meshRefinementMerge.C $(autoHexMesh)/meshRefinement/meshRefinementProblemCells.C $(autoHexMesh)/meshRefinement/meshRefinementRefine.C +$(autoHexMesh)/meshRefinement/patchFaceOrientation.C + $(autoHexMesh)/refinementFeatures/refinementFeatures.C $(autoHexMesh)/refinementSurfaces/surfaceZonesInfo.C $(autoHexMesh)/refinementSurfaces/refinementSurfaces.C diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C index 0e2fcd07ce..f9676fcbe6 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C @@ -112,8 +112,6 @@ const if (localCellI != -1) { - Pout<< "Found point " << keepPoint << " in cell " << localCellI - << " on processor " << Pstream::myProcNo() << endl; globalCellI = globalCells.toGlobal(localCellI); } @@ -130,6 +128,14 @@ const << exit(FatalError); } + + label procI = globalCells.whichProcID(globalCellI); + label procCellI = globalCells.toLocal(procI, globalCellI); + + Info<< "Found point " << keepPoint << " in cell " << procCellI + << " on processor " << procI << endl; + + if (globalCells.isLocal(globalCellI)) { cellLabels[i] = localCellI; diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index f7815a16d8..2583c2ddfe 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -379,6 +379,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit Foam::autoPtr Foam::regionSplit::calcRegionSplit ( + const bool doGlobalRegions, const boolList& blockedFace, const List& explicitConnections, @@ -395,7 +396,7 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit cellRegion ); - if (!Pstream::parRun()) + if (!doGlobalRegions) { return autoPtr(new globalIndex(nLocalRegions)); } @@ -422,7 +423,7 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit // (this will create gaps in the global region list so they will get // merged later on) - while (Pstream::parRun()) + while (true) { if (debug) { @@ -690,13 +691,14 @@ Foam::autoPtr Foam::regionSplit::calcRegionSplit // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::regionSplit::regionSplit(const polyMesh& mesh) +Foam::regionSplit::regionSplit(const polyMesh& mesh, const bool doGlobalRegions) : MeshObject(mesh), labelList(mesh.nCells(), -1) { globalNumberingPtr_ = calcRegionSplit ( + doGlobalRegions, //do global regions boolList(0, false), //blockedFaces List(0), //explicitConnections, *this @@ -707,7 +709,8 @@ Foam::regionSplit::regionSplit(const polyMesh& mesh) Foam::regionSplit::regionSplit ( const polyMesh& mesh, - const boolList& blockedFace + const boolList& blockedFace, + const bool doGlobalRegions ) : MeshObject(mesh), @@ -715,6 +718,7 @@ Foam::regionSplit::regionSplit { globalNumberingPtr_ = calcRegionSplit ( + doGlobalRegions, blockedFace, //blockedFaces List(0), //explicitConnections, *this @@ -726,7 +730,8 @@ Foam::regionSplit::regionSplit ( const polyMesh& mesh, const boolList& blockedFace, - const List& explicitConnections + const List& explicitConnections, + const bool doGlobalRegions ) : MeshObject(mesh), @@ -734,6 +739,7 @@ Foam::regionSplit::regionSplit { globalNumberingPtr_ = calcRegionSplit ( + doGlobalRegions, blockedFace, //blockedFaces explicitConnections, //explicitConnections, *this diff --git a/src/meshTools/regionSplit/regionSplit.H b/src/meshTools/regionSplit/regionSplit.H index b7be9dd32e..83302529df 100644 --- a/src/meshTools/regionSplit/regionSplit.H +++ b/src/meshTools/regionSplit/regionSplit.H @@ -87,6 +87,9 @@ Description proc0 | proc1 | proc2 + Can optionally keep all regions local to the processor. + + SourceFiles regionSplit.C @@ -155,6 +158,7 @@ class regionSplit //- Calculate global region split. Return globalIndex. autoPtr calcRegionSplit ( + const bool doGlobalRegions, const boolList& blockedFace, const List& explicitConnections, labelList& cellRegion @@ -170,11 +174,20 @@ public: // Constructors //- Construct from mesh - regionSplit(const polyMesh&); + regionSplit + ( + const polyMesh&, + const bool doGlobalRegions = Pstream::parRun() + ); //- Construct from mesh and whether face is blocked // NOTE: blockedFace has to be consistent across coupled faces! - regionSplit(const polyMesh&, const boolList& blockedFace); + regionSplit + ( + const polyMesh&, + const boolList& blockedFace, + const bool doGlobalRegions = Pstream::parRun() + ); //- Construct from mesh and whether face is blocked. Additional explicit // connections between normal boundary faces. @@ -183,7 +196,8 @@ public: ( const polyMesh&, const boolList& blockedFace, - const List& + const List&, + const bool doGlobalRegions = Pstream::parRun() ); @@ -195,6 +209,12 @@ public: return globalNumberingPtr_(); } + //- Return local number of regions + label nLocalRegions() const + { + return globalNumbering().localSize(Pstream::myProcNo()); + } + //- Return total number of regions label nRegions() const { diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 8021284723..4e19610373 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -167,7 +167,7 @@ void Foam::decompositionMethod::calcCellCells ( const polyMesh& mesh, const labelList& agglom, - const label nCoarse, + const label nLocalCoarse, const bool parallel, CompactListList