/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2015-2020 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 . 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 Note: addressing used: distributedTriSurfaceMesh: none triSurfaceMesh: - surf.pointFaces() : edge addressing (for volume tests only) - surf.edges() : edgeTree - surf.faceFaces() : only if minQuality > 0 SourceFiles distributedTriSurfaceMesh.C \*---------------------------------------------------------------------------*/ #ifndef distributedTriSurfaceMesh_H #define distributedTriSurfaceMesh_H #include "triSurfaceMesh.H" #include "localIOdictionary.H" #include "IOdictionary.H" #include "Pair.H" #include "globalIndex.H" #include "DynamicField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { class mapDistribute; class decompositionMethod; // Typedefs typedef Pair segment; /*---------------------------------------------------------------------------*\ Class distributedTriSurfaceMesh Declaration \*---------------------------------------------------------------------------*/ class distributedTriSurfaceMesh : public triSurfaceMesh { public: // Static data enum distributionType { FOLLOW = 0, INDEPENDENT = 1, DISTRIBUTED = 2, FROZEN = 3 }; static const Enum distributionTypeNames_; private: // Private member data //- Merging distance scalar mergeDist_; autoPtr decomposeParDict_; //- Decomposition used when independently decomposing surface. autoPtr decomposer_; //- Bounding box settings localIOdictionary dict_; //- Bounding boxes of all processors List> procBb_; //- Global triangle numbering mutable autoPtr globalTris_; //- The (wanted) distribution type. distributionType distType_; //- The (current) distribution type. Used to trigger re-distribution // when starting from undecomposed surface. distributionType currentDistType_; // Private Member Functions // Read //- Search for io.local directory (=triSurface) either in case // directory or in parent directory static word findLocalInstance(const IOobject& io); //- 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