diff --git a/bin/foamCleanPath b/bin/foamCleanPath index 86a8c171fd..d3f8007023 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -99,7 +99,7 @@ IFS=': ' # or may contain ':' separators set -- $* -# strip out wildcards via sed +# Strip out wildcards via sed. Path and wildcard cannot contain '?'. while [ "$#" -ge 1 ] do wildcard=$1 @@ -107,7 +107,7 @@ do ##DEBUG echo "remove>$wildcard<" 1>&2 if [ -n "$wildcard" ] then - dirList=$(echo "$dirList:" | sed -e "s@${wildcard}[^:]*:@@g") + dirList=$(echo "$dirList:" | sed -e "s?${wildcard}[^:]*:??g") fi done diff --git a/bin/tools/doxyFilter b/bin/tools/doxyFilter index 061c72e526..ed427da104 100755 --- a/bin/tools/doxyFilter +++ b/bin/tools/doxyFilter @@ -39,15 +39,15 @@ if [ "$#" -gt 0 ] then - realFilePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@../../..@ ) + realFilePath=$(echo "$1" | sed -e "s?^$WM_PROJECT_DIR?../../..?" ) if [ -n "$FOAM_ONLINE_REPO" ] then - filePath=$(echo $1 | sed -e s@^$WM_PROJECT_DIR@$FOAM_ONLINE_REPO@ ) + filePath=$(echo "$1" | sed -e "s?^$WM_PROJECT_DIR?$FOAM_ONLINE_REPO?" ) else filePath=$realFilePath fi - # dirName=$(echo "$filePath" | sed -e 's@/[^/]*$@@' ) + # dirName=$(echo "$filePath" | sed -e 's?/[^/]*$??' ) dirName=${filePath%/[^/]*} fileName=${filePath##*/} @@ -62,7 +62,7 @@ then # ;; esac - awk -f $WM_PROJECT_DIR/bin/tools/doxyFilter-table.awk $1 | \ + awk -f $WM_PROJECT_DIR/bin/tools/doxyFilter-table.awk "$1" | \ awk -f $awkScript | \ sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \ -e s@%realFilePath%@$realFilePath@g \ diff --git a/src/OpenFOAM/meshes/meshTools/mergePoints.C b/src/OpenFOAM/meshes/meshTools/mergePoints.C index 04d3462197..506082895d 100644 --- a/src/OpenFOAM/meshes/meshTools/mergePoints.C +++ b/src/OpenFOAM/meshes/meshTools/mergePoints.C @@ -39,23 +39,22 @@ Foam::label Foam::mergePoints const Type& origin ) { - Type compareOrigin = origin; - - if (origin == Type::max) - { - if (points.size()) - { - compareOrigin = sum(points)/points.size(); - } - } - // Create a old to new point mapping array pointMap.setSize(points.size()); pointMap = -1; if (points.empty()) { - return points.size(); + return 0; + } + + // Explicitly convert to Field to support various list types + tmp> tPoints(new Field(points)); + + Type compareOrigin = origin; + if (origin == Type::max) + { + compareOrigin = sum(tPoints())/points.size(); } // We're comparing distance squared to origin first. @@ -70,7 +69,7 @@ Foam::label Foam::mergePoints const scalar mergeTolSqr = Foam::sqr(scalar(mergeTol)); // Sort points by magSqr - const Field d(points - compareOrigin); + const Field d(tPoints - compareOrigin); List magSqrD(d.size()); forAll(d, pointI) @@ -98,12 +97,10 @@ Foam::label Foam::mergePoints label newPointI = 0; - // Handle 0th point separately (is always unique) label pointI = order[0]; pointMap[pointI] = newPointI++; - for (label sortI = 1; sortI < order.size(); sortI++) { // Get original point index diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 54c8ce1e42..6871b2f413 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -1779,8 +1779,11 @@ bool Foam::meshRefinement::calcRegionToZone // Special: face is -on faceZone -not real boundary // -not on cellZone // so make regions same on either side - regionToCellZone[ownRegion] = regionToCellZone[neiRegion]; - changed = true; + if (regionToCellZone[neiRegion] != -2) + { + regionToCellZone[ownRegion] = regionToCellZone[neiRegion]; + changed = true; + } } else if (regionToCellZone[neiRegion] == surfZoneI) { diff --git a/src/meshTools/searchableSurface/subTriSurfaceMesh.H b/src/meshTools/searchableSurface/subTriSurfaceMesh.H index 9d0f508e14..ca7104b92c 100644 --- a/src/meshTools/searchableSurface/subTriSurfaceMesh.H +++ b/src/meshTools/searchableSurface/subTriSurfaceMesh.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-2016 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Note Example usage: \verbatim - spheres.stl + spheres_solid1 { type subTriSurfaceMesh; diff --git a/src/postProcessing/functionObjects/utilities/ddt2/ddt2.C b/src/postProcessing/functionObjects/utilities/ddt2/ddt2.C index 58edbf3627..c3cf49bf2b 100644 --- a/src/postProcessing/functionObjects/utilities/ddt2/ddt2.C +++ b/src/postProcessing/functionObjects/utilities/ddt2/ddt2.C @@ -27,7 +27,6 @@ License #include "volFields.H" #include "dictionary.H" -#include "FieldFunctions.H" #include "fvcDdt.H" #include "steadyStateDdtScheme.H"