![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 repatchPolyTopoChanger 00027 00028 Description 00029 A mesh which allows changes in the patch distribution of the 00030 boundary faces. The change in patching is set using changePatchID. For a 00031 boundary face, a new patch ID is given. 00032 00033 SourceFiles 00034 repatchPolyTopoChanger.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef repatchPolyTopoChanger_H 00039 #define repatchPolyTopoChanger_H 00040 00041 #include "polyMesh.H" 00042 #include "polyTopoChange.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class repatchPolyTopoChanger Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class repatchPolyTopoChanger 00054 { 00055 // Private data 00056 00057 //- The polyMesh to be repatched 00058 polyMesh& mesh_; 00059 00060 //- Topological change to accumulated all mesh changes 00061 polyTopoChange meshMod_; 00062 00063 00064 // Private Member Functions 00065 00066 //- Disallow default bitwise copy construct 00067 repatchPolyTopoChanger(const repatchPolyTopoChanger&); 00068 00069 //- Disallow default bitwise assignment 00070 void operator=(const repatchPolyTopoChanger&); 00071 00072 00073 public: 00074 00075 // Constructors 00076 00077 //- Construct for given mesh 00078 explicit repatchPolyTopoChanger(polyMesh& mesh); 00079 00080 00081 // Destructor 00082 00083 virtual ~repatchPolyTopoChanger() 00084 {} 00085 00086 00087 // Member Functions 00088 00089 //- Change patches. 00090 void changePatches(const List<polyPatch*>& patches); 00091 00092 //- Change patch ID for a boundary face. Note: patchID should be in new 00093 // numbering. 00094 void changePatchID 00095 ( 00096 const label faceID, 00097 const label patchID 00098 ); 00099 00100 //- Set zone ID for a face 00101 void setFaceZone 00102 ( 00103 const label faceID, 00104 const label zoneID, 00105 const bool zoneFlip 00106 ); 00107 00108 //- Change anchor point (zero'th point of face) for a boundary face. 00109 void changeAnchorPoint 00110 ( 00111 const label faceID, 00112 const label fp 00113 ); 00114 00115 00116 //- Re-patch the mesh 00117 void repatch(); 00118 }; 00119 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 } // End namespace Foam 00124 00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00126 00127 #endif 00128 00129 // ************************************************************************* //