/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation ------------------------------------------------------------------------------- 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 . Application testExtendedStencil Description Test app for determining extended stencil. \*---------------------------------------------------------------------------*/ #include "argList.H" #include "timeSelector.H" #include "fvMesh.H" #include "volFields.H" #include "Time.H" #include "fvCFD.H" #include "OFstream.H" #include "meshTools.H" //#include "FECCellToFaceStencil.H" //#include "CFCCellToFaceStencil.H" //#include "CPCCellToFaceStencil.H" //#include "CECCellToFaceStencil.H" //#include "extendedCentredCellToFaceStencil.H" //#include "extendedUpwindCellToFaceStencil.H" //#include "centredCFCCellToFaceStencilObject.H" //#include "centredFECCellToFaceStencilObject.H" //#include "centredCPCCellToFaceStencilObject.H" //#include "centredCECCellToFaceStencilObject.H" //#include "upwindFECCellToFaceStencilObject.H" //#include "upwindCPCCellToFaceStencilObject.H" //#include "upwindCECCellToFaceStencilObject.H" //#include "upwindCFCCellToFaceStencilObject.H" //#include "centredCFCFaceToCellStencilObject.H" #include "centredCECCellToCellStencilObject.H" #include "centredCFCCellToCellStencilObject.H" #include "centredCPCCellToCellStencilObject.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void writeStencilOBJ ( const fileName& fName, const point& fc, const List& stencilCc ) { OFstream str(fName); label vertI = 0; meshTools::writeOBJ(str, fc); vertI++; forAll(stencilCc, i) { meshTools::writeOBJ(str, stencilCc[i]); vertI++; str << "l 1 " << vertI << nl; } } // Stats void writeStencilStats(const labelListList& stencil) { label sumSize = 0; label nSum = 0; label minSize = labelMax; label maxSize = labelMin; forAll(stencil, i) { const labelList& sCells = stencil[i]; if (sCells.size() > 0) { sumSize += sCells.size(); nSum++; minSize = min(minSize, sCells.size()); maxSize = max(maxSize, sCells.size()); } } reduce(sumSize, sumOp