1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Data for the quadratic fit correction interpolation scheme to be used with
30 upwind biased stencil.
31 - linearCorrection = true : fit calculated for corrected linear scheme
32 - linearCorrection = false : fit calculated for corrected upwind scheme
37 \*---------------------------------------------------------------------------*/
39 #ifndef UpwindFitData_H
40 #define UpwindFitData_H
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 class extendedUpwindCellToFaceStencil;
51 /*---------------------------------------------------------------------------*\
52 Class UpwindFitData Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class Polynomial>
60 UpwindFitData<Polynomial>,
61 extendedUpwindCellToFaceStencil,
67 //- For each face of the mesh store the coefficients to multiply the
68 // stencil cell values by if the flow is from the owner
69 List<scalarList> owncoeffs_;
71 //- For each face of the mesh store the coefficients to multiply the
72 // stencil cell values by if the flow is from the neighbour
73 List<scalarList> neicoeffs_;
76 // Private member functions
78 //- Calculate the fit for the all the mesh faces
79 // and set the coefficients
85 TypeName("UpwindFitData");
90 //- Construct from components
94 const extendedUpwindCellToFaceStencil& stencil,
95 const bool linearCorrection,
96 const scalar linearLimitFactor,
97 const scalar centralWeight
102 virtual ~UpwindFitData()
108 //- Return reference to owner fit coefficients
109 const List<scalarList>& owncoeffs() const
114 //- Return reference to neighbour fit coefficients
115 const List<scalarList>& neicoeffs() const
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 # include "UpwindFitData.C"
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //