Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 #ifndef meshDualiser_H
00048 #define meshDualiser_H
00049 
00050 #include <OpenFOAM/DynamicList.H>
00051 #include <OpenFOAM/PackedBoolList.H>
00052 #include <OpenFOAM/boolList.H>
00053 #include <OpenFOAM/typeInfo.H>
00054 
00055 
00056 
00057 namespace Foam
00058 {
00059 
00060 class polyMesh;
00061 class polyTopoChange;
00062 
00063 
00064 
00065 
00066 
00067 class meshDualiser
00068 {
00069     
00070 
00071         const polyMesh& mesh_;
00072 
00073         
00074         
00075         labelListList pointToDualCells_;
00076 
00077         
00078         labelList pointToDualPoint_;
00079 
00080         
00081         labelList cellToDualPoint_;
00082 
00083         
00084         labelList faceToDualPoint_;
00085 
00086         
00087         labelList edgeToDualPoint_;
00088 
00089 
00090     
00091 
00092         static void checkPolyTopoChange(const polyTopoChange&);
00093 
00094         static void dumpPolyTopoChange(const polyTopoChange&, const fileName&);
00095 
00096         
00097         label findDualCell(const label cellI, const label pointI) const;
00098 
00099         
00100         
00101         void generateDualBoundaryEdges
00102         (
00103             const PackedBoolList&,
00104             const label pointI,
00105             polyTopoChange&
00106         );
00107 
00108         
00109         bool sameDualCell
00110         (
00111             const label faceI,
00112             const label pointI
00113         ) const;
00114 
00115         
00116         label addInternalFace
00117         (
00118             const label masterPointI,
00119             const label masterEdgeI,
00120             const label masterFaceI,
00121 
00122             const bool edgeOrder,
00123             const label dualCell0,
00124             const label dualCell1,
00125             const DynamicList<label>& verts,
00126             polyTopoChange& meshMod
00127         ) const;
00128 
00129         
00130         label addBoundaryFace
00131         (
00132             const label masterPointI,
00133             const label masterEdgeI,
00134             const label masterFaceI,
00135 
00136             const label dualCellI,
00137             const label patchI,
00138             const DynamicList<label>& verts,
00139             polyTopoChange& meshMod
00140         ) const;
00141 
00142         
00143         void createFacesAroundEdge
00144         (
00145             const bool splitFace,
00146             const PackedBoolList&,
00147             const label edgeI,
00148             const label startFaceI,
00149             polyTopoChange&,
00150             boolList& doneEFaces
00151         ) const;
00152 
00153         
00154         void createFaceFromInternalFace
00155         (
00156             const label faceI,
00157             label& fp,
00158             polyTopoChange&
00159         ) const;
00160 
00161         
00162         void createFacesAroundBoundaryPoint
00163         (
00164             const label patchI,
00165             const label patchPointI,
00166             const label startFaceI,
00167             polyTopoChange&,
00168             boolList& donePFaces            
00169         ) const;
00170 
00171         
00172         meshDualiser(const meshDualiser&);
00173 
00174         
00175         void operator=(const meshDualiser&);
00176 
00177 
00178 public:
00179 
00180     
00181     ClassName("meshDualiser");
00182 
00183 
00184     
00185 
00186         
00187         meshDualiser(const polyMesh&);
00188 
00189 
00190     
00191 
00192         
00193 
00194             
00195             
00196             const labelListList& pointToDualCells() const
00197             {
00198                 return pointToDualCells_;
00199             }
00200 
00201             
00202             const labelList& pointToDualPoint() const
00203             {
00204                 return pointToDualPoint_;
00205             }
00206 
00207             
00208             
00209             const labelList& cellToDualPoint() const
00210             {
00211                 return cellToDualPoint_;
00212             }
00213 
00214             
00215             
00216             const labelList& faceToDualPoint() const
00217             {
00218                 return faceToDualPoint_;
00219             }
00220 
00221             
00222             
00223             const labelList& edgeToDualPoint() const
00224             {
00225                 return edgeToDualPoint_;
00226             }
00227 
00228 
00229         
00230 
00231 
00232             
00233             
00234             
00235             
00236             
00237             
00238             
00239             
00240             
00241             
00242             void setRefinement
00243             (
00244                 const bool splitFace,
00245                 const labelList& featureFaces,
00246                 const labelList& featureEdges,
00247                 const labelList& singleCellFeaturePoints,
00248                 const labelList& multiCellFeaturePoints,
00249                 polyTopoChange& meshMod
00250             );
00251 };
00252 
00253 
00254 
00255 } 
00256 
00257 
00258 
00259 #endif
00260 
00261