/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | cfMesh: A library for mesh generation \\ / O peration | \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com) \\/ M anipulation | Copyright (C) Creative Fields, Ltd. ------------------------------------------------------------------------------- License This file is part of cfMesh. cfMesh 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. cfMesh 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 cfMesh. If not, see . Description \*---------------------------------------------------------------------------*/ #include "meshSurfaceEngine.H" #include "demandDrivenData.H" #include "boolList.H" #include "helperFunctions.H" #include "VRWGraphSMPModifier.H" #include "labelledPoint.H" #include "HashSet.H" #include #include # ifdef USE_OMP #include # endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void meshSurfaceEngine::calculateBoundaryFaces() const { if( mesh_.boundaries().size() != 0 ) { const faceListPMG& faces = mesh_.faces(); const PtrList& boundaries = mesh_.boundaries(); label nBoundaryFaces(0); if( activePatch_ < 0 ) { //- take all patches forAll(boundaries, patchI) nBoundaryFaces += boundaries[patchI].patchSize(); boundaryFacesPtr_ = new faceList::subList ( faces, nBoundaryFaces, boundaries[0].patchStart() ); } else if( activePatch_ < boundaries.size() ) { nBoundaryFaces = boundaries[activePatch_].patchSize(); boundaryFacesPtr_ = new faceList::subList ( faces, nBoundaryFaces, boundaries[activePatch_].patchStart() ); } else { FatalErrorIn ( "void meshSurfaceEngine::calculateBoundaryFaces() const" ) << "Cannot select boundary faces. Invalid patch index " << activePatch_ << exit(FatalError); } reduce(nBoundaryFaces, sumOp