From f94ce803739daa02656492422b99629f41c7dde4 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 May 2012 16:24:01 +0100 Subject: [PATCH 01/16] BUG: cylindricalInletVelocity: use of tmp after storage has been reused --- .../cylindricalInletVelocityFvPatchVectorField.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C index 0348035314..d41c428e74 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs() vector hatAxis = axis_/mag(axis_); const vectorField r(patch().Cf() - centre_); - tmp d = r - (hatAxis & r)*hatAxis; + const vectorField d = r - (hatAxis & r)*hatAxis; tmp tangVel ( From 41308b96961bfd09f515225e61b97e430b741487 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 16 May 2012 10:16:18 +0100 Subject: [PATCH 02/16] ENH: collapseEdges: parallel operation --- .../advanced/collapseEdges/collapseEdges.C | 1363 +++++++++-------- .../pointEdgeCollapse/pointEdgeCollapseI.H | 37 +- 2 files changed, 693 insertions(+), 707 deletions(-) diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 899159b2a2..f970c1d836 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -28,27 +28,22 @@ Description - merge two edges if they are in line. Maximum angle provided as argument. - remove unused points. - Cannot remove cells. Can remove faces and points but does not check + Optionally removes cells. Can remove faces and points but does not check for nonsense resulting topology. When collapsing an edge with one point on the boundary it will leave the boundary point intact. When both points inside it chooses random. When - both points on boundary random again. Note: it should in fact use features - where if one point is on a feature it collapses to that one. Alas we don't - have features on a polyMesh. + both points on boundary random again. \*---------------------------------------------------------------------------*/ #include "argList.H" #include "Time.H" #include "polyTopoChange.H" -#include "polyTopoChanger.H" -#include "polyMesh.H" #include "fvMesh.H" #include "mapPolyMesh.H" #include "mathematicalConstants.H" #include "PackedBoolList.H" -#include "SortableList.H" #include "unitConversion.H" #include "globalMeshData.H" #include "globalIndex.H" @@ -56,32 +51,10 @@ Description #include "pointEdgeCollapse.H" #include "motionSmoother.H" -#include "OFstream.H" -#include "meshTools.H" - using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -label findIndex -( - const labelList& elems, - const label start, - const label size, - const label val -) -{ - for (label i = start; i < size; i++) - { - if (elems[i] == val) - { - return i; - } - } - return -1; -} - - void filterFace ( const label faceI, @@ -121,7 +94,7 @@ void filterFace } else { - if (findIndex(f, 0, newFp, collapsePoint) == -1) + if (findIndex(SubList