diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.H index 278859ac55..f9b9835f58 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicTransform.H @@ -154,7 +154,6 @@ public: ); - // Destructor virtual ~cyclicTransform(); diff --git a/src/meshTools/Make/files b/src/meshTools/Make/files index 75de118fba..21b4df99cb 100644 --- a/src/meshTools/Make/files +++ b/src/meshTools/Make/files @@ -250,7 +250,6 @@ patchToPatch/rays/raysPatchToPatch.C mappedPatches/mappedPolyPatch/mappedPatchBase.C mappedPatches/mappedPolyPatch/mappedPolyPatch.C mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C -mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C mappedPatches/mappedPointPatch/mappedPointPatch.C mappedPatches/mappedPointPatch/mappedWallPointPatch.C diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index 1a269ee7dc..f7bd85937a 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -53,13 +53,12 @@ namespace Foam const char* Foam::NamedEnum < Foam::mappedPatchBase::sampleMode, - 6 + 5 >::names[] = { "nearestCell", "nearestPatchFace", "nearestPatchFaceAMI", - "nearestPatchPoint", "nearestFace", "nearestOnlyCell" }; @@ -78,7 +77,7 @@ namespace Foam } -const Foam::NamedEnum +const Foam::NamedEnum Foam::mappedPatchBase::sampleModeNames_; const Foam::NamedEnum @@ -87,6 +86,87 @@ const Foam::NamedEnum // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +Foam::pointIndexHit Foam::mappedPatchBase::facePoint +( + const polyMesh& mesh, + const label facei, + const polyMesh::cellDecomposition decompMode +) +{ + const point& fc = mesh.faceCentres()[facei]; + + switch (decompMode) + { + case polyMesh::FACE_PLANES: + case polyMesh::FACE_CENTRE_TRIS: + { + // For both decompositions the face centre is guaranteed to be + // on the face + return pointIndexHit(true, fc, facei); + } + break; + + case polyMesh::FACE_DIAG_TRIS: + case polyMesh::CELL_TETS: + { + // Find the intersection of a ray from face centre to cell centre + // Find intersection of (face-centre-decomposition) centre to + // cell-centre with face-diagonal-decomposition triangles. + + const pointField& p = mesh.points(); + const face& f = mesh.faces()[facei]; + + if (f.size() <= 3) + { + // Return centre of triangle. + return pointIndexHit(true, fc, 0); + } + + label celli = mesh.faceOwner()[facei]; + const point& cc = mesh.cellCentres()[celli]; + vector d = fc-cc; + + const label fp0 = mesh.tetBasePtIs()[facei]; + const point& basePoint = p[f[fp0]]; + + label fp = f.fcIndex(fp0); + for (label i = 2; i < f.size(); i++) + { + const point& thisPoint = p[f[fp]]; + label nextFp = f.fcIndex(fp); + const point& nextPoint = p[f[nextFp]]; + + const triPointRef tri(basePoint, thisPoint, nextPoint); + pointHit hitInfo = tri.intersection + ( + cc, + d, + intersection::algorithm::halfRay + ); + + if (hitInfo.hit() && hitInfo.distance() > 0) + { + return pointIndexHit(true, hitInfo.hitPoint(), i-2); + } + + fp = nextFp; + } + + // Fall-back + return pointIndexHit(false, fc, -1); + } + break; + + default: + { + FatalErrorInFunction + << "problem" << abort(FatalError); + return pointIndexHit(); + } + } +} + + Foam::tmp Foam::mappedPatchBase::facePoints ( const polyPatch& pp @@ -115,6 +195,41 @@ Foam::tmp Foam::mappedPatchBase::facePoints } +Foam::tmp Foam::mappedPatchBase::samplePoints +( + const pointField& fc +) const +{ + tmp tfld(new pointField(fc)); + pointField& fld = tfld.ref(); + + switch (offsetMode_) + { + case UNIFORM: + { + fld += offset_; + break; + } + case NONUNIFORM: + { + fld += offsets_; + break; + } + case NORMAL: + { + // Get outwards pointing normal + vectorField n(patch_.faceAreas()); + n /= mag(n); + + fld += distance_*n; + break; + } + } + + return tfld; +} + + void Foam::mappedPatchBase::collectSamples ( const pointField& facePoints, @@ -337,69 +452,6 @@ void Foam::mappedPatchBase::findSamples break; } - case NEARESTPATCHPOINT: - { - const polyPatch& pp = samplePolyPatch(); - - if (pp.empty()) - { - forAll(samples, sampleI) - { - nearest[sampleI].second().first() = Foam::sqr(great); - nearest[sampleI].second().second() = Pstream::myProcNo(); - } - } - else - { - // patch (local) points - treeBoundBox patchBb - ( - treeBoundBox(pp.points(), pp.meshPoints()).extend(1e-4) - ); - - indexedOctree boundaryTree - ( - treeDataPoint // all information needed to search faces - ( - mesh.points(), - pp.meshPoints() // selection of points to search on - ), - patchBb, // overall search domain - 8, // maxLevel - 10, // leafsize - 3.0 // duplicity - ); - - forAll(samples, sampleI) - { - const point& sample = samples[sampleI]; - - pointIndexHit& nearInfo = nearest[sampleI].first(); - nearInfo = boundaryTree.findNearest - ( - sample, - magSqr(patchBb.span()) - ); - - if (!nearInfo.hit()) - { - nearest[sampleI].second().first() = Foam::sqr(great); - nearest[sampleI].second().second() = - Pstream::myProcNo(); - } - else - { - const point& pt = nearInfo.hitPoint(); - - nearest[sampleI].second().first() = magSqr(pt-sample); - nearest[sampleI].second().second() = - Pstream::myProcNo(); - } - } - } - break; - } - case NEARESTFACE: { if (samplePatch().size() && samplePatch() != "none") @@ -501,6 +553,36 @@ void Foam::mappedPatchBase::findSamples } +Foam::label Foam::mappedPatchBase::sampleSize() const +{ + switch (mode_) + { + case NEARESTPATCHFACEAMI: + { + return samplePolyPatch().size(); + } + case NEARESTCELL: + { + return sampleMesh().nCells(); + } + case NEARESTPATCHFACE: + { + return samplePolyPatch().size(); + } + case NEARESTFACE: + { + return sampleMesh().nFaces() - sampleMesh().nInternalFaces(); + } + default: + { + FatalErrorInFunction + << "problem." << abort(FatalError); + return -1; + } + } +} + + void Foam::mappedPatchBase::calcMapping() const { static bool hasWarned = false; @@ -774,38 +856,6 @@ void Foam::mappedPatchBase::calcMapping() const } -const Foam::autoPtr& Foam::mappedPatchBase::surfPtr() -const -{ - const word surfType(surfDict_.lookupOrDefault("type", "none")); - - if (!surfPtr_.valid() && surfType != "none") - { - word surfName(surfDict_.lookupOrDefault("name", patch_.name())); - - const polyMesh& mesh = patch_.boundaryMesh().mesh(); - - surfPtr_ = - searchableSurface::New - ( - surfType, - IOobject - ( - surfName, - mesh.time().constant(), - searchableSurface::geometryDir(mesh.time()), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ), - surfDict_ - ); - } - - return surfPtr_; -} - - void Foam::mappedPatchBase::calcAMI() const { if (AMIPtr_.valid()) @@ -843,6 +893,31 @@ void Foam::mappedPatchBase::calcAMI() const meshTools::writeOBJ(osO, patch_.localFaces(), patch_.localPoints()); } + // Get the projection surface, if any + const word surfType(surfDict_.lookupOrDefault("type", "none")); + if (!surfPtr_.valid() && surfType != "none") + { + word surfName(surfDict_.lookupOrDefault("name", patch_.name())); + + const polyMesh& mesh = patch_.boundaryMesh().mesh(); + + surfPtr_ = + searchableSurface::New + ( + surfType, + IOobject + ( + surfName, + mesh.time().constant(), + searchableSurface::geometryDir(mesh.time()), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + surfDict_ + ); + } + // Construct/apply AMI interpolation to determine addressing and weights AMIPtr_.reset ( @@ -850,7 +925,7 @@ void Foam::mappedPatchBase::calcAMI() const ( patch_, samplePolyPatch(), // nbrPatch0, - surfPtr(), + surfPtr_, faceAreaIntersect::tmMesh, true, faceAreaWeightAMI::typeName, @@ -1114,51 +1189,6 @@ Foam::mappedPatchBase::mappedPatchBase } -Foam::mappedPatchBase::mappedPatchBase -( - const polyPatch& pp, - const sampleMode mode, - const dictionary& dict -) -: - patch_(pp), - sampleRegion_(dict.lookupOrDefault("sampleRegion", "")), - mode_(mode), - samplePatch_(dict.lookupOrDefault("samplePatch", "")), - coupleGroup_(dict), - offsetMode_(UNIFORM), - offset_(Zero), - offsets_(0), - distance_(0.0), - sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()), - mapPtr_(nullptr), - AMIPtr_(nullptr), - AMIReverse_(dict.lookupOrDefault("flipNormals", false)), - surfPtr_(nullptr), - surfDict_(dict.subOrEmptyDict("surface")) -{ - if (mode != NEARESTPATCHFACE && mode != NEARESTPATCHFACEAMI) - { - FatalIOErrorInFunction(dict) - << "Construct from sampleMode and dictionary only applicable for " - << " collocated patches in modes " - << sampleModeNames_[NEARESTPATCHFACE] << ',' - << sampleModeNames_[NEARESTPATCHFACEAMI] - << exit(FatalIOError); - } - - if (!coupleGroup_.valid()) - { - if (sampleRegion_.empty()) - { - // If no coupleGroup and no sampleRegion assume local region - sampleRegion_ = patch_.boundaryMesh().mesh().name(); - sameRegion_ = true; - } - } -} - - Foam::mappedPatchBase::mappedPatchBase ( const polyPatch& pp, @@ -1216,17 +1246,7 @@ Foam::mappedPatchBase::mappedPatchBase // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedPatchBase::~mappedPatchBase() -{ - clearOut(); -} - - -void Foam::mappedPatchBase::clearOut() -{ - mapPtr_.clear(); - AMIPtr_.clear(); - surfPtr_.clear(); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -1259,125 +1279,17 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const } -Foam::tmp Foam::mappedPatchBase::samplePoints -( - const pointField& fc -) const -{ - tmp tfld(new pointField(fc)); - pointField& fld = tfld.ref(); - - switch (offsetMode_) - { - case UNIFORM: - { - fld += offset_; - break; - } - case NONUNIFORM: - { - fld += offsets_; - break; - } - case NORMAL: - { - // Get outwards pointing normal - vectorField n(patch_.faceAreas()); - n /= mag(n); - - fld += distance_*n; - break; - } - } - - return tfld; -} - - Foam::tmp Foam::mappedPatchBase::samplePoints() const { return samplePoints(facePoints(patch_)); } -Foam::pointIndexHit Foam::mappedPatchBase::facePoint -( - const polyMesh& mesh, - const label facei, - const polyMesh::cellDecomposition decompMode -) +void Foam::mappedPatchBase::clearOut() { - const point& fc = mesh.faceCentres()[facei]; - - switch (decompMode) - { - case polyMesh::FACE_PLANES: - case polyMesh::FACE_CENTRE_TRIS: - { - // For both decompositions the face centre is guaranteed to be - // on the face - return pointIndexHit(true, fc, facei); - } - break; - - case polyMesh::FACE_DIAG_TRIS: - case polyMesh::CELL_TETS: - { - // Find the intersection of a ray from face centre to cell centre - // Find intersection of (face-centre-decomposition) centre to - // cell-centre with face-diagonal-decomposition triangles. - - const pointField& p = mesh.points(); - const face& f = mesh.faces()[facei]; - - if (f.size() <= 3) - { - // Return centre of triangle. - return pointIndexHit(true, fc, 0); - } - - label celli = mesh.faceOwner()[facei]; - const point& cc = mesh.cellCentres()[celli]; - vector d = fc-cc; - - const label fp0 = mesh.tetBasePtIs()[facei]; - const point& basePoint = p[f[fp0]]; - - label fp = f.fcIndex(fp0); - for (label i = 2; i < f.size(); i++) - { - const point& thisPoint = p[f[fp]]; - label nextFp = f.fcIndex(fp); - const point& nextPoint = p[f[nextFp]]; - - const triPointRef tri(basePoint, thisPoint, nextPoint); - pointHit hitInfo = tri.intersection - ( - cc, - d, - intersection::algorithm::halfRay - ); - - if (hitInfo.hit() && hitInfo.distance() > 0) - { - return pointIndexHit(true, hitInfo.hitPoint(), i-2); - } - - fp = nextFp; - } - - // Fall-back - return pointIndexHit(false, fc, -1); - } - break; - - default: - { - FatalErrorInFunction - << "problem" << abort(FatalError); - return pointIndexHit(); - } - } + mapPtr_.clear(); + AMIPtr_.clear(); + surfPtr_.clear(); } diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H index 1c2c483594..914cd38154 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H @@ -42,10 +42,6 @@ Description - patches need not conform - uses AMI interpolation // - nearestFace : nearest boundary face on any patch - // - nearestPatchPoint : nearest patch point (for coupled points - // this might be any of the points so you have - // to guarantee the point data is synchronised - // beforehand) sampleMode nearestCell; // If sampleMode is nearestPatchFace : patch to find faces of @@ -113,7 +109,6 @@ public: NEARESTCELL, // nearest cell containing sample NEARESTPATCHFACE, // nearest face on selected patch NEARESTPATCHFACEAMI, // nearest patch face + AMI interpolation - NEARESTPATCHPOINT, // nearest point on selected patch NEARESTFACE, // nearest face NEARESTONLYCELL // nearest cell (even if not containing cell) }; @@ -126,21 +121,18 @@ public: NORMAL // use face normal + distance }; - static const NamedEnum sampleModeNames_; + static const NamedEnum sampleModeNames_; static const NamedEnum offsetModeNames_; - //- Helper class for finding nearest - // Nearest: - // - point+local index - // - sqr(distance) - // - processor + //- Helper class for finding nearest. Point and local index, squared + // distance, and processor index. typedef Tuple2> nearInfo; + //- Equality operator for nearest info class nearestEqOp { - public: void operator()(nearInfo& x, const nearInfo& y) const @@ -159,27 +151,6 @@ public: } }; - class maxProcEqOp - { - - public: - - void operator()(nearInfo& x, const nearInfo& y) const - { - if (y.first().hit()) - { - if (!x.first().hit()) - { - x = y; - } - else if (y.second().second() > x.second().second()) - { - x = y; - } - } - } - }; - protected: @@ -218,11 +189,7 @@ protected: // Derived information - //- Communication schedule: - // - // - Cells/faces to sample per processor - // - Patch faces to receive per processor - // - schedule + //- Distributor mutable autoPtr mapPtr_; @@ -243,10 +210,26 @@ protected: // Protected Member Functions + //- Get a point on the face given a face decomposition method: + // face-centre-tet : face centre. Returns index of face. + // face-planes : face centre. Returns index of face. + // face-diagonal : intersection of ray from cellcentre to + // facecentre with any of the triangles. + // Returns index (0..size-2) of triangle. + static pointIndexHit facePoint + ( + const polyMesh&, + const label facei, + const polyMesh::cellDecomposition + ); + //- Get the points from face-centre-decomposition face centres // and project them onto the face-diagonal-decomposition triangles. tmp facePoints(const polyPatch&) const; + //- Get the sample points given the face points + tmp samplePoints(const pointField&) const; + //- Collect single list of samples and originating processor+face. void collectSamples ( @@ -267,8 +250,8 @@ protected: pointField& sampleLocations // actual representative location ) const; - //- Get the sample points given the face points - tmp samplePoints(const pointField&) const; + //- Return size of mapped mesh/patch/boundary + label sampleSize() const; //- Calculate mapping void calcMapping() const; @@ -329,11 +312,6 @@ public: //- Construct from dictionary mappedPatchBase(const polyPatch&, const dictionary&); - //- Construct from dictionary and (collocated) sample mode - // (only for nearestPatchFace, nearestPatchFaceAMI, nearestPatchPoint) - // Assumes zero offset. - mappedPatchBase(const polyPatch&, const sampleMode, const dictionary&); - //- Construct as copy, resetting patch mappedPatchBase(const polyPatch&, const mappedPatchBase&); @@ -352,8 +330,6 @@ public: // Member Functions - void clearOut(); - // Access //- What to sample @@ -365,57 +341,27 @@ public: //- Patch (only if NEARESTPATCHFACE) inline const word& samplePatch() const; - //- PatchGroup (only if NEARESTPATCHFACE) - inline const word& coupleGroup() const; - - //- Return size of mapped mesh/patch/boundary - inline label sampleSize() const; - - //- Offset vector (from patch faces to destination mesh objects) - inline const vector& offset() const; - - //- Offset vector (from patch faces to destination mesh objects) - inline const vectorField& offsets() const; - //- Cached sampleRegion != mesh.name() inline bool sameRegion() const; //- Return reference to the parallel distribution map inline const distributionMap& map() const; - //- Return reference to the AMI interpolator - inline const AMIInterpolation& AMI - ( - const bool forceUpdate = false - ) const; - - //- Return a pointer to the AMI projection surface - const autoPtr& surfPtr() const; - //- Get the region mesh const polyMesh& sampleMesh() const; //- Get the patch on the region const polyPatch& samplePolyPatch() const; - - // Helpers - //- Get the sample points tmp samplePoints() const; - //- Get a point on the face given a face decomposition method: - // face-centre-tet : face centre. Returns index of face. - // face-planes : face centre. Returns index of face. - // face-diagonal : intersection of ray from cellcentre to - // facecentre with any of the triangles. - // Returns index (0..size-2) of triangle. - static pointIndexHit facePoint - ( - const polyMesh&, - const label facei, - const polyMesh::cellDecomposition - ); + + + // Edit + + //- Clear out data on mesh change + void clearOut(); // Distribute diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H index 2dca5170a8..0d91cf8319 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H @@ -23,6 +23,10 @@ License \*---------------------------------------------------------------------------*/ +#include "mappedPatchBase.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + inline const Foam::mappedPatchBase::sampleMode& Foam::mappedPatchBase::mode() const { @@ -44,14 +48,12 @@ inline const Foam::word& Foam::mappedPatchBase::sampleRegion() const } // Try and use patchGroup to find samplePatch and sampleRegion - label samplePatchID = coupleGroup_.findOtherPatchID - ( - patch_, - sampleRegion_ - ); + const label samplePatchID = + coupleGroup_.findOtherPatchID(patch_, sampleRegion_); samplePatch_ = sampleMesh().boundaryMesh()[samplePatchID].name(); } + return sampleRegion_; } @@ -70,71 +72,16 @@ inline const Foam::word& Foam::mappedPatchBase::samplePatch() const } // Try and use patchGroup to find samplePatch and sampleRegion - label samplePatchID = coupleGroup_.findOtherPatchID - ( - patch_, - sampleRegion_ - ); + const label samplePatchID = + coupleGroup_.findOtherPatchID(patch_, sampleRegion_); samplePatch_ = sampleMesh().boundaryMesh()[samplePatchID].name(); } + return samplePatch_; } -inline const Foam::word& Foam::mappedPatchBase::coupleGroup() const -{ - return coupleGroup_.name(); -} - - -inline Foam::label Foam::mappedPatchBase::sampleSize() const -{ - switch (mode_) - { - case NEARESTPATCHFACEAMI: - { - return samplePolyPatch().size(); - } - case NEARESTCELL: - { - return sampleMesh().nCells(); - } - case NEARESTPATCHFACE: - { - return samplePolyPatch().size(); - } - case NEARESTPATCHPOINT: - { - return samplePolyPatch().nPoints(); - } - case NEARESTFACE: - { - const polyMesh& mesh = sampleMesh(); - return mesh.nFaces() - mesh.nInternalFaces(); - } - default: - { - FatalErrorInFunction - << "problem." << abort(FatalError); - return -1; - } - } -} - - -inline const Foam::vector& Foam::mappedPatchBase::offset() const -{ - return offset_; -} - - -inline const Foam::vectorField& Foam::mappedPatchBase::offsets() const -{ - return offsets_; -} - - inline bool Foam::mappedPatchBase::sameRegion() const { return sameRegion_; @@ -152,18 +99,4 @@ inline const Foam::distributionMap& Foam::mappedPatchBase::map() const } -inline const Foam::AMIInterpolation& Foam::mappedPatchBase::AMI -( - bool forceUpdate -) const -{ - if (forceUpdate || AMIPtr_.empty()) - { - calcAMI(); - } - - return AMIPtr_(); -} - - // ************************************************************************* // diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C index 7106fae597..ef4c89a9ce 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseTemplates.C @@ -23,6 +23,11 @@ License \*---------------------------------------------------------------------------*/ +#include "mappedPatchBase.H" + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + template void Foam::mappedPatchBase::distribute(List& lst) const { @@ -30,7 +35,11 @@ void Foam::mappedPatchBase::distribute(List& lst) const { case NEARESTPATCHFACEAMI: { - lst = AMI().interpolateToSource(Field(move(lst))); + if (AMIPtr_.empty()) + { + calcAMI(); + } + lst = AMIPtr_->interpolateToSource(Field(move(lst))); break; } default: @@ -52,11 +61,11 @@ void Foam::mappedPatchBase::distribute { case NEARESTPATCHFACEAMI: { - lst = AMI().interpolateToSource - ( - Field(move(lst)), - cop - ); + if (AMIPtr_.empty()) + { + calcAMI(); + } + lst = AMIPtr_->interpolateToSource(Field(move(lst)), cop); break; } default: @@ -87,7 +96,11 @@ void Foam::mappedPatchBase::reverseDistribute(List& lst) const { case NEARESTPATCHFACEAMI: { - lst = AMI().interpolateToTarget(Field(move(lst))); + if (AMIPtr_.empty()) + { + calcAMI(); + } + lst = AMIPtr_->interpolateToTarget(Field(move(lst))); break; } default: @@ -110,21 +123,20 @@ void Foam::mappedPatchBase::reverseDistribute { case NEARESTPATCHFACEAMI: { - lst = AMI().interpolateToTarget - ( - Field(move(lst)), - cop - ); + if (AMIPtr_.empty()) + { + calcAMI(); + } + lst = AMIPtr_->interpolateToTarget(Field(move(lst)), cop); break; } default: { - label cSize = sampleSize(); distributionMapBase::distribute ( Pstream::defaultCommsType, map().schedule(), - cSize, + sampleSize(), map().constructMap(), false, map().subMap(), diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C index badffcdaac..7974739793 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPolyPatch.C @@ -172,9 +172,7 @@ Foam::mappedPolyPatch::mappedPolyPatch // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedPolyPatch::~mappedPolyPatch() -{ - mappedPatchBase::clearOut(); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C deleted file mode 100644 index eb170405b9..0000000000 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C +++ /dev/null @@ -1,174 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "mappedVariableThicknessWallPolyPatch.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(mappedVariableThicknessWallPolyPatch, 0); - - addToRunTimeSelectionTable - ( - polyPatch, - mappedVariableThicknessWallPolyPatch, - word - ); - - addToRunTimeSelectionTable - ( - polyPatch, - mappedVariableThicknessWallPolyPatch, - dictionary - ); -} - - -// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const polyBoundaryMesh& bm, - const word& patchType -) -: - mappedWallPolyPatch(name, size, start, index, bm, patchType), - thickness_(size) -{} - - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vectorField& offset, - const polyBoundaryMesh& bm -) -: - mappedWallPolyPatch(name, size, start, index, bm, typeName), - thickness_(size) -{} - - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, - const polyBoundaryMesh& bm -) -: - mappedWallPolyPatch(name, size, start, index, bm, typeName), - thickness_(size) -{} - - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const word& name, - const dictionary& dict, - const label index, - const polyBoundaryMesh& bm, - const word& patchType -) -: - mappedWallPolyPatch(name, dict, index, bm, patchType), - thickness_(scalarField("thickness", dict, this->size())) -{} - - -Foam::mappedVariableThicknessWallPolyPatch:: -mappedVariableThicknessWallPolyPatch -( - const mappedVariableThicknessWallPolyPatch& pp, - const polyBoundaryMesh& bm -) -: - mappedWallPolyPatch(pp, bm), - thickness_(pp.thickness_) -{} - - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const mappedVariableThicknessWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const label newSize, - const label newStart -) -: - mappedWallPolyPatch(pp, bm, index, newSize, newStart), - thickness_(newSize) -{} - - -Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch -( - const mappedVariableThicknessWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart -) -: - mappedWallPolyPatch(pp, bm, index, mapAddressing, newStart), - thickness_(pp.size()) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::mappedVariableThicknessWallPolyPatch:: -~mappedVariableThicknessWallPolyPatch() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::mappedVariableThicknessWallPolyPatch:: -write(Foam::Ostream& os) const -{ - writeEntry(os, "thickness", thickness_); -} - - -// ************************************************************************* // diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.H deleted file mode 100644 index 299ef6cd1e..0000000000 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.H +++ /dev/null @@ -1,238 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mappedVariableThicknessWallPolyPatch - -Description - Foam::mappedVariableThicknessWallPolyPatch - -SourceFiles - mappedVariableThicknessWallPolyPatch.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mappedVariableThicknessWallPolyPatch_H -#define mappedVariableThicknessWallPolyPatch_H - -#include "wallPolyPatch.H" -#include "mappedWallPolyPatch.H" - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class polyMesh; - -/*---------------------------------------------------------------------------*\ - Class mappedVariableThicknessWallPolyPatch Declaration -\*---------------------------------------------------------------------------*/ - -class mappedVariableThicknessWallPolyPatch -: - public mappedWallPolyPatch -{ - - // Private Data - - //- Thickness - scalarList thickness_; - - -public: - - //- Runtime type information - TypeName("mappedWallVariableThickness"); - - - // Constructors - - //- Construct from components - mappedVariableThicknessWallPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const polyBoundaryMesh& bm, - const word& patchType - ); - - //- Construct from components - mappedVariableThicknessWallPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vectorField& offset, - const polyBoundaryMesh& bm - ); - - //- Construct from components. Uniform offset. - mappedVariableThicknessWallPolyPatch - ( - const word& name, - const label size, - const label start, - const label index, - const word& sampleRegion, - const mappedPatchBase::sampleMode mode, - const word& samplePatch, - const vector& offset, - const polyBoundaryMesh& bm - ); - - //- Construct from dictionary - mappedVariableThicknessWallPolyPatch - ( - const word& name, - const dictionary& dict, - const label index, - const polyBoundaryMesh& bm, - const word& patchType - ); - - //- Construct as copy, resetting the boundary mesh - mappedVariableThicknessWallPolyPatch - ( - const mappedVariableThicknessWallPolyPatch&, - const polyBoundaryMesh& - ); - - //- Construct given the original patch and resetting the - // face list and boundary mesh information - mappedVariableThicknessWallPolyPatch - ( - const mappedVariableThicknessWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const label newSize, - const label newStart - ); - - //- Construct given the original patch and a map - mappedVariableThicknessWallPolyPatch - ( - const mappedVariableThicknessWallPolyPatch& pp, - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ); - - //- Construct and return a clone, resetting the boundary mesh - virtual autoPtr clone(const polyBoundaryMesh& bm) const - { - return autoPtr - ( - new mappedVariableThicknessWallPolyPatch(*this, bm) - ); - } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const label newSize, - const label newStart - ) const - { - return autoPtr - ( - new mappedVariableThicknessWallPolyPatch - ( - *this, - bm, - index, - newSize, - newStart - ) - ); - } - - //- Construct and return a clone, resetting the face list - // and boundary mesh - virtual autoPtr clone - ( - const polyBoundaryMesh& bm, - const label index, - const labelUList& mapAddressing, - const label newStart - ) const - { - return autoPtr - ( - new mappedVariableThicknessWallPolyPatch - ( - *this, - bm, - index, - mapAddressing, - newStart - ) - ); - } - - - //- Destructor - virtual ~mappedVariableThicknessWallPolyPatch(); - - - // Member Functions - - //- Return non const thickness - scalarList& thickness() - { - return thickness_; - } - - - //- Return const thickness - const scalarList& thickness() const - { - return thickness_; - } - - - //- Write the polyPatch data as a dictionary - void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C index 1cddee68dd..6780929ab9 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C @@ -178,9 +178,7 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::mappedWallPolyPatch::~mappedWallPolyPatch() -{ - mappedPatchBase::clearOut(); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/regionModels/Allwclean b/src/regionModels/Allwclean index 037a56e5eb..5be3d3a625 100755 --- a/src/regionModels/Allwclean +++ b/src/regionModels/Allwclean @@ -4,6 +4,6 @@ makeType=${1:-libso} wclean $makeType regionModel wclean $makeType surfaceFilmModels -wclean $makeType thermalBaffleModels +wclean $makeType thermalBaffle #------------------------------------------------------------------------------ diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake index 5dc821bcf2..23978b3b4c 100755 --- a/src/regionModels/Allwmake +++ b/src/regionModels/Allwmake @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory wmake $targetType regionModel wmake $targetType surfaceFilmModels -wmake $targetType thermalBaffleModels +wmake $targetType thermalBaffle #------------------------------------------------------------------------------ diff --git a/src/regionModels/regionModel/Make/files b/src/regionModels/regionModel/Make/files index c75f2ba44e..bc96ee0113 100644 --- a/src/regionModels/regionModel/Make/files +++ b/src/regionModels/regionModel/Make/files @@ -1,13 +1,4 @@ -# Region models regionModel/regionModel.C singleLayerRegion/singleLayerRegion.C -regionModel1D/regionModel1D.C - -# Boundary conditions -derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C - -regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObject.C -regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectNew.C -regionModelFunctionObject/regionModelFunctionObject/regionModelFunctionObjectList.C LIB = $(FOAM_LIBBIN)/libregionModels diff --git a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C deleted file mode 100644 index 0261229f28..0000000000 --- a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.C +++ /dev/null @@ -1,64 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "mappedVariableThicknessWallFvPatch.H" -#include "addToRunTimeSelectionTable.H" -#include "regionModel1D.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(mappedVariableThicknessWallFvPatch, 0); - addToRunTimeSelectionTable - ( - fvPatch, - mappedVariableThicknessWallFvPatch, - polyPatch - ); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::mappedVariableThicknessWallFvPatch:: -makeDeltaCoeffs(scalarField& dc) const -{ - const mappedVariableThicknessWallPolyPatch& pp = - refCast(patch()); - - typedef regionModels::regionModel1D modelType; - - const modelType& region1D = - patch().boundaryMesh().mesh().time().lookupObject - ( - "thermalBaffleProperties" - ); - - dc = 2.0/(pp.thickness()/region1D.nLayers()); -} - - -// ************************************************************************* // diff --git a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H b/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H deleted file mode 100644 index 9ee07c440c..0000000000 --- a/src/regionModels/regionModel/derivedFvPatches/mappedVariableThicknessWall/mappedVariableThicknessWallFvPatch.H +++ /dev/null @@ -1,93 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mappedVariableThicknessWallFvPatch - -Description - Take thickness field and number of layers and returns deltaCoeffs - as 2.0/thickness/nLayers. - To be used with 1D thermo baffle. - -SourceFiles - mappedVariableThicknessWallFvPatch.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mappedVariableThicknessWallFvPatch_H -#define mappedVariableThicknessWallFvPatch_H - -#include "wallFvPatch.H" -#include "mappedVariableThicknessWallPolyPatch.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class mappedVariableThicknessWallFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class mappedVariableThicknessWallFvPatch -: - public wallFvPatch -{ - -protected: - - // Protected Member Functions - - //- Read neighbour cell distances from dictionary - void makeDeltaCoeffs(scalarField& dc) const; - - -public: - - //- Runtime type information - TypeName(mappedVariableThicknessWallPolyPatch::typeName_()); - - - // Constructors - - //- Construct from components - mappedVariableThicknessWallFvPatch - ( - const polyPatch& patch, - const fvBoundaryMesh& bm - ) - : - wallFvPatch(patch, bm) - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index 6344f337eb..66ede01ff2 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -267,8 +267,7 @@ Foam::regionModels::regionModel::regionModel outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), - regionName_("none"), - functions_(*this) + regionName_("none") {} @@ -300,8 +299,7 @@ Foam::regionModels::regionModel::regionModel outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), - regionName_(lookup("regionName")), - functions_(*this, subOrEmptyDict("functions")) + regionName_(lookup("regionName")) { constructMeshObjects(); initialise(); @@ -344,8 +342,7 @@ Foam::regionModels::regionModel::regionModel outputPropertiesPtr_(nullptr), primaryPatchIDs_(), intCoupledPatchIDs_(), - regionName_(dict.lookup("regionName")), - functions_(*this, subOrEmptyDict("functions")) + regionName_(dict.lookup("regionName")) { constructMeshObjects(); initialise(); @@ -398,9 +395,7 @@ void Foam::regionModels::regionModel::evolve() void Foam::regionModels::regionModel::preEvolveRegion() -{ - functions_.preEvolveRegion(); -} +{} void Foam::regionModels::regionModel::evolveRegion() @@ -408,9 +403,7 @@ void Foam::regionModels::regionModel::evolveRegion() void Foam::regionModels::regionModel::postEvolveRegion() -{ - functions_.postEvolveRegion(); -} +{} void Foam::regionModels::regionModel::info() diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index 93aa7b2dc9..9b39f2c5fe 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -39,13 +39,11 @@ SourceFiles #include "fvMesh.H" #include "timeIOdictionary.H" -#include "regionModelFunctionObjectList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - namespace regionModels { @@ -110,9 +108,6 @@ protected: //- Region name word regionName_; - //- Region model function objects - regionModelFunctionObjectList functions_; - // Protected member functions diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C deleted file mode 100644 index 5afd737079..0000000000 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ /dev/null @@ -1,352 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "regionModel1D.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace regionModels -{ - defineTypeNameAndDebug(regionModel1D, 0); -} -} - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -void Foam::regionModels::regionModel1D::constructMeshObjects() -{ - nMagSfPtr_.reset - ( - new surfaceScalarField - ( - IOobject - ( - "nMagSf", - time().timeName(), - regionMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - regionMesh(), - dimensionedScalar(dimArea, 0) - ) - ); -} - - -void Foam::regionModels::regionModel1D::initialise() -{ - DebugInFunction << endl; - - // Calculate boundaryFaceFaces and boundaryFaceCells - - DynamicList