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::UpwindFitData 00026 00027 Description 00028 Data for the quadratic fit correction interpolation scheme to be used with 00029 upwind biased stencil. 00030 - linearCorrection = true : fit calculated for corrected linear scheme 00031 - linearCorrection = false : fit calculated for corrected upwind scheme 00032 00033 SourceFiles 00034 UpwindFitData.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef UpwindFitData_H 00039 #define UpwindFitData_H 00040 00041 #include <finiteVolume/FitData.H> 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 class extendedUpwindCellToFaceStencil; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class UpwindFitData Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 template<class Polynomial> 00055 class UpwindFitData 00056 : 00057 public FitData 00058 < 00059 UpwindFitData<Polynomial>, 00060 extendedUpwindCellToFaceStencil, 00061 Polynomial 00062 > 00063 { 00064 // Private data 00065 00066 //- For each face of the mesh store the coefficients to multiply the 00067 // stencil cell values by if the flow is from the owner 00068 List<scalarList> owncoeffs_; 00069 00070 //- For each face of the mesh store the coefficients to multiply the 00071 // stencil cell values by if the flow is from the neighbour 00072 List<scalarList> neicoeffs_; 00073 00074 00075 // Private member functions 00076 00077 //- Calculate the fit for the all the mesh faces 00078 // and set the coefficients 00079 void calcFit(); 00080 00081 00082 public: 00083 00084 TypeName("UpwindFitData"); 00085 00086 00087 // Constructors 00088 00089 //- Construct from components 00090 UpwindFitData 00091 ( 00092 const fvMesh& mesh, 00093 const extendedUpwindCellToFaceStencil& stencil, 00094 const bool linearCorrection, 00095 const scalar linearLimitFactor, 00096 const scalar centralWeight 00097 ); 00098 00099 00100 //- Destructor 00101 virtual ~UpwindFitData() 00102 {} 00103 00104 00105 // Member functions 00106 00107 //- Return reference to owner fit coefficients 00108 const List<scalarList>& owncoeffs() const 00109 { 00110 return owncoeffs_; 00111 } 00112 00113 //- Return reference to neighbour fit coefficients 00114 const List<scalarList>& neicoeffs() const 00115 { 00116 return neicoeffs_; 00117 } 00118 }; 00119 00120 00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00122 00123 } // End namespace Foam 00124 00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00126 00127 #ifdef NoRepository 00128 # include "UpwindFitData.C" 00129 #endif 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************ vim: set sw=4 sts=4 et: ************************ //