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 #ifndef refinementDistanceData_H
00038 #define refinementDistanceData_H
00039 
00040 #include <OpenFOAM/point.H>
00041 #include <OpenFOAM/tensor.H>
00042 
00043 
00044 
00045 namespace Foam
00046 {
00047 
00048 class polyPatch;
00049 class polyMesh;
00050 
00051 
00052 
00053 
00054 
00055 class refinementDistanceData
00056 {
00057 
00058     
00059 
00060         
00061         scalar level0Size_;
00062 
00063         
00064         point origin_;
00065         label originLevel_;
00066 
00067 
00068     
00069 
00070         
00071         inline bool update
00072         (
00073             const point&,
00074             const refinementDistanceData& neighbourInfo,
00075             const scalar tol
00076         );
00077 
00078 public:
00079 
00080     
00081 
00082         
00083         inline refinementDistanceData();
00084 
00085         
00086         inline refinementDistanceData
00087         (
00088             const scalar level0Size,
00089             const point& origin,
00090             const label level
00091         );
00092 
00093 
00094     
00095 
00096         
00097 
00098             inline scalar level0Size() const
00099             {
00100                 return level0Size_;
00101             }
00102 
00103             inline scalar& level0Size()
00104             {
00105                 return level0Size_;
00106             }
00107 
00108             inline const point& origin() const
00109             {
00110                 return origin_;
00111             }
00112 
00113             inline point& origin()
00114             {
00115                 return origin_;
00116             }
00117 
00118             inline label originLevel() const
00119             {
00120                 return originLevel_;
00121             }
00122 
00123             inline label& originLevel()
00124             {
00125                 return originLevel_;
00126             }
00127 
00128 
00129         
00130 
00131             
00132             
00133             inline label wantedLevel(const point& pt) const;
00134 
00135 
00136         
00137 
00138             
00139             
00140             inline bool valid() const;
00141 
00142             
00143             inline bool sameGeometry
00144             (
00145                 const polyMesh&,
00146                 const refinementDistanceData&,
00147                 const scalar
00148             ) const;
00149 
00150             
00151             
00152             inline void leaveDomain
00153             (
00154                 const polyMesh&,
00155                 const polyPatch&,
00156                 const label patchFaceI,
00157                 const point& faceCentre
00158             );
00159 
00160             
00161             inline void enterDomain
00162             (
00163                 const polyMesh&,
00164                 const polyPatch&,
00165                 const label patchFaceI,
00166                 const point& faceCentre
00167             );
00168 
00169             
00170             inline void transform
00171             (
00172                 const polyMesh&,
00173                 const tensor&
00174             );
00175 
00176             
00177             inline bool updateCell
00178             (
00179                 const polyMesh&,
00180                 const label thisCellI,
00181                 const label neighbourFaceI,
00182                 const refinementDistanceData& neighbourInfo,
00183                 const scalar tol
00184             );
00185 
00186             
00187             inline bool updateFace
00188             (
00189                 const polyMesh&,
00190                 const label thisFaceI,
00191                 const label neighbourCellI,
00192                 const refinementDistanceData& neighbourInfo,
00193                 const scalar tol
00194             );
00195 
00196             
00197             inline bool updateFace
00198             (
00199                 const polyMesh&,
00200                 const label thisFaceI,
00201                 const refinementDistanceData& neighbourInfo,
00202                 const scalar tol
00203             );
00204 
00205     
00206 
00207         
00208         inline bool operator==(const refinementDistanceData&) const;
00209 
00210         inline bool operator!=(const refinementDistanceData&) const;
00211 
00212 
00213     
00214 
00215         friend Ostream& operator<<(Ostream&, const refinementDistanceData&);
00216         friend Istream& operator>>(Istream&, refinementDistanceData&);
00217 };
00218 
00219 
00220 
00221 
00222 } 
00223 
00224 
00225 
00226 #include <dynamicMesh/refinementDistanceDataI.H>
00227 
00228 
00229 
00230 #endif
00231 
00232