/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2007-2009 OpenCFD Ltd. \\/ 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*----------------------------------------------------------------------------*/ #include "CV2D.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // bool Foam::CV2D::dualCellSurfaceIntersection ( const Triangulation::Finite_vertices_iterator& vit ) const { Triangulation::Edge_circulator ecStart = incident_edges(vit); Triangulation::Edge_circulator ec = ecStart; do { if (!is_infinite(ec)) { point e0 = toPoint3D(circumcenter(ec->first)); // If edge end is outside bounding box then edge cuts boundary if (!qSurf_.bb().contains(e0)) { return true; } point e1 = toPoint3D(circumcenter(ec->first->neighbor(ec->second))); // If other edge end is ouside bounding box then edge cuts boundary if (!qSurf_.bb().contains(e1)) { return true; } if (magSqr(e1 - e0) > tols_.minEdgeLen2) { pointIndexHit pHit = qSurf_.tree().findLineAny(e0, e1); if (pHit.hit()) { return true; } } } } while (++ec != ecStart); return false; } void Foam::CV2D::insertPointPairs ( const DynamicList& nearSurfacePoints, const DynamicList& surfacePoints, const DynamicList