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