/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 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 . Application Test-distributedDelaunayMesh Description \*---------------------------------------------------------------------------*/ #include "CGALTriangulation3DKernel.H" #include "indexedVertex.H" #include "indexedCell.H" #include "argList.H" #include "Time.H" #include "DistributedDelaunayMesh.H" #include "backgroundMeshDecomposition.H" #include "searchableSurfaces.H" #include "conformationSurfaces.H" #include "PrintTable.H" #include "Random.H" #include "boundBox.H" #include "point.H" #include "cellShapeControlMesh.H" #include "triadField.H" #include "scalarIOField.H" #include "pointIOField.H" #include "triadIOField.H" using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: template Foam::tmp> filterFarPoints ( const Triangulation& mesh, const Field& field ) { tmp> tNewField(new Field(field.size())); Field& newField = tNewField(); label added = 0; label count = 0; for ( typename Triangulation::Finite_vertices_iterator vit = mesh.finite_vertices_begin(); vit != mesh.finite_vertices_end(); ++vit ) { if (vit->real()) { newField[added++] = field[count]; } count++; } newField.resize(added); return tNewField; } template autoPtr buildMap ( const T& mesh, labelListList& pointPoints ) { pointPoints.setSize(mesh.vertexCount()); globalIndex globalIndexing(mesh.vertexCount()); for ( typename T::Finite_vertices_iterator vit = mesh.finite_vertices_begin(); vit != mesh.finite_vertices_end(); ++vit ) { if (!vit->real()) { continue; } std::list adjVerts; mesh.finite_adjacent_vertices(vit, std::back_inserter(adjVerts)); DynamicList