|
|
|
cellSplitter.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::cellSplitter 00027 00028 Description 00029 Does pyramidal decomposition of selected cells. So all faces will become 00030 base of pyramid with as top a user-supplied point (usually the cell centre) 00031 00032 SourceFiles 00033 cellSplitter.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef cellSplitter_H 00038 #define cellSplitter_H 00039 00040 #include "Map.H" 00041 #include "edge.H" 00042 #include "typeInfo.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 // Forward declaration of classes 00050 class polyTopoChange; 00051 class mapPolyMesh; 00052 class polyMesh; 00053 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class cellSplitter Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class cellSplitter 00060 { 00061 // Private data 00062 00063 //- Reference to mesh 00064 const polyMesh& mesh_; 00065 00066 //- Per cell the mid point added. 00067 Map<label> addedPoints_; 00068 00069 00070 // Private Member Functions 00071 00072 //- Get patch and zone info for face 00073 void getFaceInfo 00074 ( 00075 const label faceI, 00076 label& patchID, 00077 label& zoneID, 00078 label& zoneFlip 00079 ) const; 00080 00081 //- Find the new owner (if any) of the face. 00082 label newOwner 00083 ( 00084 const label faceI, 00085 const Map<labelList>& cellToCells 00086 ) const; 00087 00088 //- Find the new neighbour (if any) of the face. 00089 label newNeighbour 00090 ( 00091 const label faceI, 00092 const Map<labelList>& cellToCells 00093 ) const; 00094 00095 //- Disallow default bitwise copy construct 00096 cellSplitter(const cellSplitter&); 00097 00098 //- Disallow default bitwise assignment 00099 void operator=(const cellSplitter&); 00100 00101 public: 00102 00103 //- Runtime type information 00104 ClassName("cellSplitter"); 00105 00106 // Constructors 00107 00108 //- Construct from mesh 00109 cellSplitter(const polyMesh& mesh); 00110 00111 00112 // Destructor 00113 00114 ~cellSplitter(); 00115 00116 00117 // Member Functions 00118 00119 // Edit 00120 00121 //- Insert mesh changes into meshMod. 00122 // cellToMidPoint : cell to cut and position of its new midpoint 00123 void setRefinement 00124 ( 00125 const Map<point>& cellToMidPoint, 00126 polyTopoChange& meshMod 00127 ); 00128 00129 //- Force recalculation of locally stored data on topological change 00130 void updateMesh(const mapPolyMesh&); 00131 00132 00133 // Access 00134 00135 //- Per cell the mid point added. 00136 const Map<label>& addedPoints() const 00137 { 00138 return addedPoints_; 00139 } 00140 }; 00141 00142 00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00144 00145 } // End namespace Foam 00146 00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00148 00149 #endif 00150 00151 // ************************************************************************* // |