![]() |
|
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 surfaceSets 00027 00028 Description 00029 Various utilities to handle sets relating mesh to surface. 00030 Note: work in progress. Used in meshing tools. 00031 00032 SourceFiles 00033 surfaceSets.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef surfaceSets_H 00038 #define surfaceSets_H 00039 00040 #include "label.H" 00041 #include "scalar.H" 00042 #include "fileName.H" 00043 #include "pointField.H" 00044 #include "polyMesh.H" 00045 #include "triSurface.H" 00046 #include "triSurfaceSearch.H" 00047 #include "pointSet.H" 00048 00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00050 00051 namespace Foam 00052 { 00053 00054 // Class forward declarations 00055 class polyMesh; 00056 class triSurface; 00057 class triSurfaceSearch; 00058 class pointSet; 00059 00060 /*---------------------------------------------------------------------------*\ 00061 Class surfaceSets Declaration 00062 \*---------------------------------------------------------------------------*/ 00063 00064 class surfaceSets 00065 { 00066 //- Visibility of points: from inside cells, from outside cells or 00067 // from both 00068 enum pointStatus 00069 { 00070 NOTSET, 00071 INSIDE, 00072 MIXED, 00073 OUTSIDE 00074 }; 00075 00076 00077 // Static 00078 00080 //static scalar minEdgeLen(const primitiveMesh& mesh, const label pointI); 00081 // 00083 //static bool usesPoint 00084 //( 00085 // const primitiveMesh& mesh, 00086 // const boolList& selectedPoint, 00087 // const label cellI 00088 //); 00089 00094 //static label removeHangingCells 00095 //( 00096 // const primitiveMesh&, 00097 // const triSurfaceSearch& querySurf, 00098 // labelHashSet& internalCells 00099 //); 00100 00105 //static void getNearPoints 00106 //( 00107 // const primitiveMesh& mesh, 00108 // const triSurface& surf, 00109 // const triSurfaceSearch& querySurf, 00110 // const scalar edgeFactor, 00111 // const pointSet& candidateSet, 00112 // pointSet& nearPointSet 00113 //); 00114 00115 public: 00116 00117 // Static Functions 00118 00119 //- Divide cells into cut,inside and outside 00120 // nCutLayers>0 : remove cutCells (set to type inside) if further 00121 // than nCutLayers away from outside type cell. 00122 static void getSurfaceSets 00123 ( 00124 const polyMesh& mesh, 00125 const fileName& surfName, 00126 const triSurface& surf, 00127 const triSurfaceSearch& querySurf, 00128 const pointField& outsidePts, 00129 00130 const label nCutLayers, 00131 00132 labelHashSet& inside, 00133 labelHashSet& outside, 00134 labelHashSet& cut 00135 ); 00136 00137 //- Get cells using points on 'outside' only 00138 static labelHashSet getHangingCells 00139 ( 00140 const primitiveMesh& mesh, 00141 const labelHashSet& internalCells 00142 ); 00143 00144 00145 // //- Write cell sets with cells 'inside' and 'outside' surface. 00146 // static void writeSurfaceSets 00147 // ( 00148 // const polyMesh& mesh, 00149 // const fileName& surfName, 00150 // const triSurface& surf, 00151 // const triSurfaceSearch& querySurf, 00152 // const pointField& outsidePts, 00153 // const scalar edgeFactor 00154 // ); 00155 00156 }; 00157 00158 00159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00160 00161 } // End namespace Foam 00162 00163 00164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00165 00166 #endif 00167 00168 // ************************************************************************* //