/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2004-2010 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 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 . Class Foam::distributedTriSurfaceMesh Description IOoject and searching on distributed triSurface. All processor hold (possibly overlapping) part of the overall surface. All queries are distributed to the processor that can answer it and the result sent back. Can work in three modes: - follow : makes sure each processor has all the triangles inside the externally provided bounding box (usually the mesh bounding box). Guarantees minimum amount of communication since mesh-local queries should be answerable without any comms. - independent : surface is decomposed according to the triangle centres so the decomposition might be radically different from the mesh decomposition. Guarantees best memory balance but at the expense of more communication. - frozen : no change SourceFiles distributedTriSurfaceMesh.C \*---------------------------------------------------------------------------*/ #ifndef distributedTriSurfaceMesh_H #define distributedTriSurfaceMesh_H #include "triSurfaceMesh.H" #include "IOdictionary.H" #include "Pair.H" #include "globalIndex.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { class mapDistribute; class decompositionMethod; // Typedefs typedef Pair segment; template<> inline bool contiguous() {return contiguous();} /*---------------------------------------------------------------------------*\ Class distributedTriSurfaceMesh Declaration \*---------------------------------------------------------------------------*/ class distributedTriSurfaceMesh : public triSurfaceMesh { public: // Static data enum distributionType { FOLLOW = 0, INDEPENDENT = 1, FROZEN = 2 }; static const NamedEnum distributionTypeNames_; private: // Private member data //- Merging distance scalar mergeDist_; //- Decomposition used when independently decomposing surface. autoPtr decomposer_; //- Bounding box settings IOdictionary dict_; //- bounding boxes of all processors List > procBb_; //- Global triangle numbering mutable autoPtr globalTris_; //- The distribution type. distributionType distType_; // Private Member Functions // Read //- Read my additional data bool read(); // Line intersection static bool isLocal ( const List& myBbs, const point& start, const point& end ); //- Split segment into subsegments overlapping the processor // bounding box. //void Foam::distributedTriSurfaceMesh::splitSegment //( // const label segmentI, // const point& start, // const point& end, // const treeBoundBox& bb, // // DynamicList& allSegments, // DynamicList