From f1e0067c3d8cf8a647cc39262b6943b3d97d6727 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 11:36:44 +0000 Subject: [PATCH 01/11] ENH: cellDistFuncs: use on-the-fly pointCells calculation --- src/meshTools/cellDist/cellDistFuncs.C | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/meshTools/cellDist/cellDistFuncs.C b/src/meshTools/cellDist/cellDistFuncs.C index cd575e683a..2637c4e99e 100644 --- a/src/meshTools/cellDist/cellDistFuncs.C +++ b/src/meshTools/cellDist/cellDistFuncs.C @@ -330,7 +330,6 @@ void Foam::cellDistFuncs::correctBoundaryPointCells { // Correct all (non-visited) cells with point on wall - const labelListList& pointCells = mesh().pointCells(); const vectorField& cellCentres = mesh().cellCentres(); forAll(mesh().boundaryMesh(), patchI) @@ -346,7 +345,7 @@ void Foam::cellDistFuncs::correctBoundaryPointCells { label vertI = meshPoints[meshPointI]; - const labelList& neighbours = pointCells[vertI]; + const labelList& neighbours = mesh().pointCells(vertI); forAll(neighbours, neighbourI) { From af4c4812de6393ccb23e65987c31ba66a499c5f9 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 15:08:30 +0000 Subject: [PATCH 02/11] BUG: foamPrintJobs: handle hostnames being strings, not words --- bin/foamCheckJobs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/foamCheckJobs b/bin/foamCheckJobs index 408dee5898..02923b9289 100755 --- a/bin/foamCheckJobs +++ b/bin/foamCheckJobs @@ -236,9 +236,9 @@ rm -f $TMPFILE; touch $TMPFILE RUNJOBS=`getAllJobs $FOAM_JOB_DIR/runningJobs` for f in $RUNJOBS do - machinePid=`basename $f` - machine=`echo $machinePid | sed -e 's/\.[0-9][0-9]*$//'` - pid=`echo $machinePid | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` + machinePid=`basename $f | sed -e 's/^"//' -e 's/"$//'` + machine=`echo "$machinePid" | sed -e 's/\.[0-9][0-9]*$//'` + pid=`echo "$machinePid" | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` fgrep "$machine" $TMPFILE >/dev/null 2>&1 if [ $? -ne 0 ] From 9011d3f901f57e61f4016f6ee9f73519a87ef999 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 15:10:37 +0000 Subject: [PATCH 03/11] ENH: solidBodyFvMotionMesh: added check on points --- .../solidBodyMotionFvMesh/solidBodyMotionFvMesh.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C index be7c7d2bfc..99ac356481 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C @@ -77,6 +77,18 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) zoneID_(-1), pointIDs_() { + if (undisplacedPoints_.size() != nPoints()) + { + FatalIOErrorIn + ( + "solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)", + dynamicMeshCoeffs_ + ) << "Read " << undisplacedPoints_.size() + << " undisplaced points from " << undisplacedPoints_.objectPath() + << " but the current mesh has " << nPoints() + << exit(FatalError); + } + word cellZoneName = dynamicMeshCoeffs_.lookupOrDefault("cellZone", "none"); From 70ec93bbe72811a4de59b1bdbe362ee31d6783c7 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 15:11:15 +0000 Subject: [PATCH 04/11] BUG: AMIInterpolation: tmp handling --- .../AMIInterpolation/AMIInterpolation/AMIInterpolation.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index cae738707d..aa99f46593 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -1950,7 +1950,7 @@ Foam::AMIInterpolation::interpolateToSource const BinaryOp& bop ) const { - return interpolateToSource(tFld, bop); + return interpolateToSource(tFld(), bop); } @@ -1987,7 +1987,7 @@ Foam::AMIInterpolation::interpolateToTarget const BinaryOp& bop ) const { - return interpolateToTarget(tFld, bop); + return interpolateToTarget(tFld(), bop); } From 33b1e00f4b129215e687a057018335b1feeac123 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 15:15:09 +0000 Subject: [PATCH 05/11] BUG: foamPrintJobs: user name printing --- bin/foamPrintJobs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/foamPrintJobs b/bin/foamPrintJobs index 1ddc9d0fc0..7213e95e1f 100755 --- a/bin/foamPrintJobs +++ b/bin/foamPrintJobs @@ -214,7 +214,7 @@ then fi nProcs=`rightStr 3 "$nProcs"` - user=`getEntry $f 'username'` + user=`getEntry $f 'userName'` user=${user:-'---'} user=`leftStr 8 "$user"` @@ -273,7 +273,7 @@ then fi nProcs=`rightStr 3 "$nProcs"` - user=`getEntry $f 'username'` + user=`getEntry $f 'userName'` user=${user:-'---'} user=`leftStr 8 "$user"` From 26aa427dd3842bdbfd507451ca64a1d95cc8c637 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Nov 2011 16:48:59 +0000 Subject: [PATCH 06/11] ENH: addPatchCellLayer: avoid use of mesh.edgeFaces() --- .../polyTopoChange/addPatchCellLayer.C | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index d70c2794c8..0029fbe56e 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -650,6 +650,9 @@ void Foam::addPatchCellLayer::calcSidePatch // ------------------------------------------------------ const labelListList& edgeFaces = pp.edgeFaces(); + + DynamicList