![]() |
|
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 cellSet 00027 00028 Description 00029 Collection of cell labels. 00030 00031 SourceFiles 00032 cellSet.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef cellSet_H 00037 #define cellSet_H 00038 00039 #include "topoSet.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 /*---------------------------------------------------------------------------*\ 00047 Class cellSet Declaration 00048 \*---------------------------------------------------------------------------*/ 00049 00050 class cellSet 00051 : 00052 public topoSet 00053 { 00054 00055 00056 // Private Member Functions 00057 00058 //- Disallow default bitwise copy construct 00059 cellSet(const cellSet&); 00060 00061 public: 00062 00063 //- Runtime type information 00064 TypeName("cellSet"); 00065 00066 00067 // Constructors 00068 00069 00070 //- Construct from IOobject. No checking. 00071 cellSet(const IOobject& obj); 00072 00073 //- Construct from polyMesh and name. Checks for valid cell ids. 00074 cellSet 00075 ( 00076 const polyMesh& mesh, 00077 const word& name, 00078 readOption r=MUST_READ, 00079 writeOption w=NO_WRITE 00080 ); 00081 00082 //- Construct empty from size of labelHashSet 00083 cellSet 00084 ( 00085 const polyMesh& mesh, 00086 const word& name, 00087 const label sizes, 00088 writeOption w=NO_WRITE 00089 ); 00090 00091 //- Construct from labelHashSet 00092 cellSet 00093 ( 00094 const polyMesh& mesh, 00095 const word& name, 00096 const labelHashSet&, 00097 writeOption w=NO_WRITE 00098 ); 00099 00100 00101 // Used for tetMesh cellSet only. 00102 00103 //- Construct from objectRegistry and name. 00104 cellSet 00105 ( 00106 const Time&, 00107 const word& name, 00108 readOption r=MUST_READ, 00109 writeOption w=NO_WRITE 00110 ); 00111 00112 //- Construct empty from objectRegistry. 00113 cellSet 00114 ( 00115 const Time&, 00116 const word& name, 00117 const label size, 00118 writeOption w=NO_WRITE 00119 ); 00120 00121 //- Construct from labelHashSet 00122 cellSet 00123 ( 00124 const Time&, 00125 const word& name, 00126 const labelHashSet&, 00127 writeOption w=NO_WRITE 00128 ); 00129 00130 00131 // Destructor 00132 00133 virtual ~cellSet(); 00134 00135 00136 // Member functions 00137 00138 //- Sync cellSet across coupled patches. 00139 virtual void sync(const polyMesh& mesh) 00140 {} 00141 00142 //- Return max index+1. 00143 virtual label maxSize(const polyMesh& mesh) const; 00144 00145 //- Update any stored data for new labels 00146 virtual void updateMesh(const mapPolyMesh& morphMap); 00147 00148 //- Update any stored data for new labels 00149 //virtual void updateMesh(const directPolyTopoChange& meshMod); 00150 00151 //- Write maxLen items with label and coordinates. 00152 virtual void writeDebug 00153 ( 00154 Ostream& os, 00155 const primitiveMesh&, 00156 const label maxLen 00157 ) const; 00158 00159 }; 00160 00161 00162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00163 00164 } // End namespace Foam 00165 00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00167 00168 #endif 00169 00170 // ************************************************************************* //