diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 9edcbf4cd5..a1d4f55668 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -63,12 +63,17 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Element type numbers + +static label MSHLINE = 1; + static label MSHTRI = 2; static label MSHQUAD = 3; static label MSHTET = 4; -static label MSHPYR = 7; -static label MSHPRISM = 6; + + static label MSHHEX = 5; +static label MSHPRISM = 6; +static label MSHPYR = 7; // Skips till end of section. Returns false if end of file. @@ -424,6 +429,11 @@ void readCells List>& zoneCells ) { + //$Elements + //number-of-elements + //elm-number elm-type number-of-tags < tag > \u2026 node-number-list + + Info<< "Starting to read cells at line " << inFile.lineNumber() << endl; const cellModel& hex = *(cellModeller::lookup("hex")); @@ -473,13 +483,12 @@ void readCells IStringStream lineStr(line); label elmNumber, elmType, regPhys; - if (versionFormat >= 2) { lineStr >> elmNumber >> elmType; label nTags; - lineStr>> nTags; + lineStr >> nTags; if (nTags > 0) { @@ -488,7 +497,7 @@ void readCells for (label i = 1; i < nTags; i++) { label dummy; - lineStr>> dummy; + lineStr >> dummy; } } } @@ -499,8 +508,12 @@ void readCells } // regPhys on surface elements is region number. - - if (elmType == MSHTRI) + if (elmType == MSHLINE) + { + label meshPti; + lineStr >> meshPti >> meshPti; + } + else if (elmType == MSHTRI) { lineStr >> triPoints[0] >> triPoints[1] >> triPoints[2]; 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 c8b9c67612..260e151e11 100755 --- a/bin/tools/doxyFilter +++ b/bin/tools/doxyFilter @@ -39,10 +39,10 @@ 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 @@ -58,7 +58,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/global/foamDoc.H b/src/OpenFOAM/global/foamDoc.H index 4937a7120a..9397cdb1a1 100644 --- a/src/OpenFOAM/global/foamDoc.H +++ b/src/OpenFOAM/global/foamDoc.H @@ -50,7 +50,7 @@ License - \subpage pageSolvers Modelling - - \subpage pageThermophsyicalModels + - \subpage pageThermophysicalModels - \subpage pageTurbulenceModelling - \subpage pageLagrangianIntermediate diff --git a/src/OpenFOAM/meshes/meshTools/mergePoints.C b/src/OpenFOAM/meshes/meshTools/mergePoints.C index b1d954c9ab..3fae798055 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/OpenFOAM/primitives/strings/word/word.H b/src/OpenFOAM/primitives/strings/word/word.H index 4b51809306..8f29bdc943 100644 --- a/src/OpenFOAM/primitives/strings/word/word.H +++ b/src/OpenFOAM/primitives/strings/word/word.H @@ -125,7 +125,8 @@ public: // Friend Operators - friend word operator&(const word&, const word&); + //- Join word a and bm capitalising first letter of b + friend word operator&(const word& a, const word& b); // IOstream operators 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/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C index 145f992725..21d52bb3dd 100644 --- a/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C +++ b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C @@ -53,7 +53,7 @@ Foam::scalar Foam::noiseModel::checkUniformTimeStep deltaT = dT; } - if (mag(deltaT - dT) > SMALL) + if (mag(dT/deltaT - 1) > 1e-8) { FatalErrorInFunction << "Unable to process data with a variable time step" diff --git a/src/thermophysicalModels/doc/thermophysicalModels.dox b/src/thermophysicalModels/doc/thermophysicalModels.dox index 9df1640a0b..d3283509be 100644 --- a/src/thermophysicalModels/doc/thermophysicalModels.dox +++ b/src/thermophysicalModels/doc/thermophysicalModels.dox @@ -23,7 +23,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -\page pageThermophsyicalModels Thermophysical Models +\page pageThermophysicalModels Thermophysical Models \section secSchemes Overview The available thermophysical models are grouped into the following categories: