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::duplicatePoints 00026 00027 Description 00028 Duplicate points 00029 00030 SourceFiles 00031 duplicatePoints.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef duplicatePoints_H 00036 #define duplicatePoints_H 00037 00038 #include <OpenFOAM/labelList.H> 00039 #include <OpenFOAM/typeInfo.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Forward declaration of classes 00047 class polyMesh; 00048 class polyTopoChange; 00049 class edge; 00050 class face; 00051 class mapPolyMesh; 00052 class localPointRegion; 00053 00054 /*---------------------------------------------------------------------------*\ 00055 Class duplicatePoints Declaration 00056 \*---------------------------------------------------------------------------*/ 00057 00058 class duplicatePoints 00059 { 00060 // Private data 00061 00062 //- Reference to mesh 00063 const polyMesh& mesh_; 00064 00065 //- Per regionSide.pointRegion() the points created. 00066 // element 0 is the original point. 00067 // Can have empty entries if a point only has one region. 00068 labelListList duplicates_; 00069 00070 00071 // Private Member Functions 00072 00073 //- Disallow default bitwise copy construct 00074 duplicatePoints(const duplicatePoints&); 00075 00076 //- Disallow default bitwise assignment 00077 void operator=(const duplicatePoints&); 00078 00079 public: 00080 00081 //- Runtime type information 00082 ClassName("duplicatePoints"); 00083 00084 00085 // Constructors 00086 00087 //- Construct from mesh 00088 duplicatePoints(const polyMesh& mesh); 00089 00090 00091 // Member Functions 00092 00093 // Access 00094 00095 //- Per point in regionSide.pointRegions() the points created. 00096 const labelListList& duplicates() const 00097 { 00098 return duplicates_; 00099 } 00100 00101 00102 // Topology changes 00103 00104 //- Play commands into polyTopoChange to duplicate points. Gets 00105 // localPointRegion structure which is per non-manifold point 00106 // the regions per point. 00107 void setRefinement 00108 ( 00109 const localPointRegion& regionSide, 00110 polyTopoChange& 00111 ); 00112 00113 //- Force recalculation of locally stored data on topological change 00114 void updateMesh(const mapPolyMesh&); 00115 }; 00116 00117 00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00119 00120 } // End namespace Foam 00121 00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00123 00124 #endif 00125 00126 // ************************ vim: set sw=4 sts=4 et: ************************ //