From 402a2fefeeaf34cdac8ca5121afb111980b9e939 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sat, 6 Nov 2010 16:47:46 +0000 Subject: [PATCH] Mac OS X port: fixed to tet edge swapping, with Sandeep Menon --- src/OSspecific/POSIX/multiThreader/threadHandlerI.H | 3 ++- .../dynamicTopoFvMesh/dynamicTopoFvMesh.C | 9 ++++++--- .../dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMesh.C | 1 + .../dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.C | 10 ++++++++++ .../dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.H | 12 ++++-------- .../dynamicFvMesh/dynamicTopoFvMesh/meshOpsI.H | 2 +- 6 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/OSspecific/POSIX/multiThreader/threadHandlerI.H b/src/OSspecific/POSIX/multiThreader/threadHandlerI.H index 4fe38a266..f4b6f6e66 100644 --- a/src/OSspecific/POSIX/multiThreader/threadHandlerI.H +++ b/src/OSspecific/POSIX/multiThreader/threadHandlerI.H @@ -43,7 +43,8 @@ threadHandler::threadHandler threader_(threader), argList_(0), nThreads_(threader.getNumThreads()), - pthreadID_(-1), + pthreadID_(0),//HJ, bug fix - please review (-1 not allowed) +// pthreadID_(-1), master_(false), predicate_(false) {} diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMesh.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMesh.C index 06f5a7409..317bba07a 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMesh.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMesh.C @@ -33,7 +33,7 @@ Author University of Massachusetts Amherst All rights reserved -\*----------------------------------------------------------------------------*/ +\*---------------------------------------------------------------------------*/ #include "dynamicTopoFvMesh.H" #include "addToRunTimeSelectionTable.H" @@ -1519,12 +1519,15 @@ void dynamicTopoFvMesh::initializeThreadingEnvironment if (threadI == 0) { - handlerPtr_[0].setID(-1); + // HJ, bug fix - please review: negative number not allowed + // HJ, 6/Nov/2010 + handlerPtr_[0].setID(0); +// handlerPtr_[0].setID(-1); handlerPtr_[0].setMaster(); } else { - handlerPtr_[threadI].setID(threader_->getID(threadI-1)); + handlerPtr_[threadI].setID(threader_->getID(threadI - 1)); handlerPtr_[threadI].setSlave(); } } diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMesh.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMesh.C index 167c5977f..1af71df22 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMesh.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMesh.C @@ -42,6 +42,7 @@ defineTypeNameAndDebug(eMesh, 0); word eMesh::meshSubDir = "eMesh"; + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void eMesh::clearGeom() const diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.C index f5508c962..feb8c5439 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.C @@ -80,6 +80,16 @@ ePatch::ePatch size_(readLabel(dict.lookup("size"))) {} + +ePatch::ePatch(const ePatch& p) +: + patchIdentifier(p, p.index()), + boundaryMesh_(p.boundaryMesh_), + start_(p.start()), + size_(p.size()) +{} + + ePatch::ePatch(const ePatch& p, const eBoundaryMesh& bm) : patchIdentifier(p, p.index()), diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.H b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.H index 94813b5f0..39743beaf 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.H +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/ePatches/ePatch/ePatch.H @@ -69,13 +69,6 @@ private: //- Size of the patch label size_; - // Demand-driven private data - - - // Private Member Functions - - //- Disallow construct as copy - ePatch(const ePatch&); protected: @@ -170,6 +163,9 @@ public: const eBoundaryMesh& bm ); + //- Construct as copy + ePatch(const ePatch&); + //- Construct as copy, resetting the boundary mesh ePatch(const ePatch&, const eBoundaryMesh&); @@ -189,7 +185,7 @@ public: ); - //- Return a pointer to a new patch created + //- Return a pointer to a new patch created // on freestore from dictionary static autoPtr New ( diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/meshOpsI.H b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/meshOpsI.H index e71ca805d..d683bc072 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/meshOpsI.H +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/meshOpsI.H @@ -232,7 +232,7 @@ inline label tetApexPoint apexPoint = findIsolatedPoint(baseFace, faceToCheck); - if (foundApex > -1) + if (apexPoint > -1) { foundApex = true; break;