regionSplit.H 7.5 KB
 OpenFOAM-admin committed Apr 15, 2008 1 2 3 4 ``````/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | `````` OpenFOAM bot committed Oct 31, 2019 5 `````` \\ / A nd | www.openfoam.com `````` OpenFOAM bot committed Feb 06, 2019 6 7 `````` \\/ M anipulation | ------------------------------------------------------------------------------- `````` OpenFOAM bot committed Oct 31, 2019 8 9 `````` Copyright (C) 2011-2013 OpenFOAM Foundation Copyright (C) 2018 OpenCFD Ltd. `````` OpenFOAM-admin committed Apr 15, 2008 10 11 12 13 ``````------------------------------------------------------------------------------- License This file is part of OpenFOAM. `````` Mark Olesen committed Mar 29, 2010 14 15 16 17 `````` 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-admin committed Apr 15, 2008 18 19 20 21 22 23 24 `````` 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 `````` Mark Olesen committed Mar 29, 2010 25 `````` along with OpenFOAM. If not, see . `````` OpenFOAM-admin committed Apr 15, 2008 26 27 28 29 30 31 `````` Class Foam::regionSplit Description This class separates the mesh into distinct unconnected regions, `````` mattijs committed Jan 24, 2012 32 33 34 35 36 `````` each of which is then given a label according to globalNumbering(). Say 6 cells, 3 processors, with single baffle on proc1. `````` Mark Olesen committed Apr 05, 2018 37 `````` \verbatim `````` mattijs committed Jan 24, 2012 38 39 40 41 42 43 44 `````` baffle | +---+---+---+---+---+---+ | | | | | | | +---+---+---+---+---+---+ proc0 | proc1 | proc2 `````` Mark Olesen committed Apr 05, 2018 45 `````` \endverbatim `````` mattijs committed Jan 24, 2012 46 47 `````` `````` Mark Olesen committed Apr 05, 2018 48 49 `````` \verbatim `````` mattijs committed Jan 24, 2012 50 51 52 53 54 55 56 `````` 1: determine local regions (uncoupled) +---+---+---+---+---+---+ | 0 | 0 | 0 | 1 | 0 | 0 | +---+---+---+---+---+---+ proc0 | proc1 | proc2 `````` Mark Olesen committed Apr 05, 2018 57 `````` \endverbatim `````` mattijs committed Jan 24, 2012 58 59 60 61 `````` 2: make global `````` Mark Olesen committed Apr 05, 2018 62 63 `````` \verbatim `````` mattijs committed Jan 24, 2012 64 65 66 67 68 `````` +---+---+---+---+---+---+ | 0 | 0 | 1 | 2 | 3 | 3 | +---+---+---+---+---+---+ proc0 | proc1 | proc2 `````` Mark Olesen committed Apr 05, 2018 69 `````` \endverbatim `````` mattijs committed Jan 24, 2012 70 71 72 73 `````` 3: merge connected across procs `````` Mark Olesen committed Apr 05, 2018 74 75 `````` \verbatim `````` mattijs committed Jan 24, 2012 76 77 78 79 80 `````` +---+---+---+---+---+---+ | 0 | 0 | 0 | 2 | 2 | 2 | +---+---+---+---+---+---+ proc0 | proc1 | proc2 `````` Mark Olesen committed Apr 05, 2018 81 `````` \endverbatim `````` mattijs committed Jan 24, 2012 82 83 `````` `````` Mark Olesen committed Apr 05, 2018 84 `````` 4. determine locally owner regions. `````` mattijs committed Jan 24, 2012 85 `````` `````` Mark Olesen committed Apr 05, 2018 86 87 88 89 90 91 92 93 94 95 `````` Determine compact numbering for the local regions and send these to all processors that need them: - proc0 uses regions: - 0 which is local to it. - proc1 uses regions - 0 which originates from proc0 - 2 which is local to it - proc2 uses regions - 2 which originates from proc1 `````` mattijs committed Jan 24, 2012 96 97 98 99 `````` So proc1 needs to get the compact number for region 0 from proc0 and proc2 needs to get the compact number for region 2 from proc1: `````` Mark Olesen committed Apr 05, 2018 100 101 `````` \verbatim `````` mattijs committed Jan 24, 2012 102 103 104 105 106 `````` +---+---+---+---+---+---+ | 0 | 0 | 0 | 1 | 1 | 1 | +---+---+---+---+---+---+ proc0 | proc1 | proc2 `````` Mark Olesen committed Apr 05, 2018 107 108 `````` \endverbatim `````` mattijs committed Sep 26, 2013 109 110 `````` Can optionally keep all regions local to the processor. `````` Mark Olesen committed Apr 27, 2018 111 112 113 ``````Note does not walk across cyclicAMI/cyclicACMI - since these are not \c coupled() at the patch level. `````` mattijs committed Sep 26, 2013 114 `````` `````` OpenFOAM-admin committed Apr 15, 2008 115 116 117 118 119 120 121 122 ``````SourceFiles regionSplit.C \*---------------------------------------------------------------------------*/ #ifndef regionSplit_H #define regionSplit_H `````` mattijs committed Jan 24, 2012 123 124 125 ``````#include "globalIndex.H" #include "labelPair.H" #include "boolList.H" `````` mattijs committed Oct 05, 2012 126 ``````#include "MeshObject.H" `````` OpenFOAM-admin committed Apr 15, 2008 127 128 129 130 131 132 `````` // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { `````` Mark Olesen committed Apr 27, 2018 133 134 ``````// Forward declarations `````` mattijs committed Jan 24, 2012 135 136 ``````class polyMesh; `````` OpenFOAM-admin committed Apr 15, 2008 137 ``````/*---------------------------------------------------------------------------*\ `````` andy committed Mar 13, 2013 138 `````` Class regionSplit Declaration `````` OpenFOAM-admin committed Apr 15, 2008 139 140 141 142 ``````\*---------------------------------------------------------------------------*/ class regionSplit : `````` 143 `````` public MeshObject, `````` OpenFOAM-admin committed Apr 15, 2008 144 145 146 147 `````` public labelList { // Private data `````` Mark Olesen committed Apr 27, 2018 148 149 150 151 152 153 154 `````` autoPtr globalNumberingPtr_; //- Temporary list of cells that have changed mutable DynamicList
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9045723676681519, "perplexity": 3899.9875897885936}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-21/segments/1620243991759.1/warc/CC-MAIN-20210510174005-20210510204005-00618.warc.gz"}