![]() |
|
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 surfaceInterpolation 00027 00028 Description 00029 Cell to surface interpolation scheme. Included in fvMesh. 00030 00031 SourceFiles 00032 surfaceInterpolation.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef surfaceInterpolation_H 00037 #define surfaceInterpolation_H 00038 00039 #include "tmp.H" 00040 #include "scalar.H" 00041 #include "fvSchemes.H" 00042 #include "fvSolution.H" 00043 #include "volFieldsFwd.H" 00044 #include "surfaceFieldsFwd.H" 00045 #include "className.H" 00046 00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00048 00049 namespace Foam 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class surfaceInterpolation Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class surfaceInterpolation 00057 : 00058 public fvSchemes, 00059 public fvSolution 00060 { 00061 // Private data 00062 00063 // Reference to fvMesh 00064 const fvMesh& mesh_; 00065 00066 // Demand-driven data 00067 00068 //- Central-differencing weighting factors 00069 mutable surfaceScalarField* weightingFactors_; 00070 00071 //- Face-gradient difference factors 00072 mutable surfaceScalarField* differenceFactors_; 00073 00074 //- Is mesh orthogonal 00075 mutable bool orthogonal_; 00076 00077 //- Non-orthogonality correction vectors 00078 mutable surfaceVectorField* correctionVectors_; 00079 00080 00081 // Private member functions 00082 00083 //- Construct central-differencing weighting factors 00084 void makeWeights() const; 00085 00086 //- Construct face-gradient difference factors 00087 void makeDeltaCoeffs() const; 00088 00089 //- Construct non-orthogonality correction vectors 00090 void makeCorrectionVectors() const; 00091 00092 00093 protected: 00094 00095 // Protected member functions 00096 00097 // Storage management 00098 00099 //- Clear all geometry and addressing 00100 void clearOut(); 00101 00102 00103 public: 00104 00105 // Declare name of the class and it's debug switch 00106 ClassName("surfaceInterpolation"); 00107 00108 00109 // Constructors 00110 00111 //- Construct given an fvMesh 00112 explicit surfaceInterpolation(const fvMesh&); 00113 00114 00115 // Destructor 00116 00117 ~surfaceInterpolation(); 00118 00119 00120 // Member functions 00121 00122 //- Return reference to weighting factors array 00123 const surfaceScalarField& weights() const; 00124 00125 //- Return reference to difference factors array 00126 const surfaceScalarField& deltaCoeffs() const; 00127 00128 //- Return whether mesh is orthogonal or not 00129 bool orthogonal() const; 00130 00131 //- Return reference to non-orthogonality correction vectors array 00132 const surfaceVectorField& correctionVectors() const; 00133 00134 //- Do what is neccessary if the mesh has moved 00135 bool movePoints(); 00136 }; 00137 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 } // End namespace Foam 00142 00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00144 00145 #endif 00146 00147 // ************************************************************************* //