FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

surfaceSets.H

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