/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2018 OpenCFD Ltd. ------------------------------------------------------------------------------- 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 "thresholdCellFaces.H" #include "polyMesh.H" #include "DynamicList.H" #include "emptyPolyPatch.H" #include "processorPolyPatch.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { defineTypeNameAndDebug(thresholdCellFaces, 0); } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::thresholdCellFaces::calculate ( const scalarField& field, const scalar lowerThreshold, const scalar upperThreshold, const bool triangulate ) { const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); const faceList& origFaces = mesh_.faces(); const pointField& origPoints = mesh_.points(); const polyBoundaryMesh& bMesh = mesh_.boundaryMesh(); surfZoneList surfZones(bMesh.size()+1); surfZones[0] = surfZone ( "internalMesh", 0, // size 0, // start 0 // index ); forAll(bMesh, patchi) { surfZones[patchi+1] = surfZone ( bMesh[patchi].name(), 0, // size 0, // start patchi+1 // index ); } label nFaces = 0; label nPoints = 0; meshCells_.clear(); DynamicList surfFaces(0.5 * mesh_.nFaces()); DynamicList