initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / interpolation / surfaceInterpolation / schemes / UpwindFitScheme / UpwindFitData.H
bloba62a3002c3242d6d6bbccf67a61bf6caf89d71b8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::UpwindFitData
28 Description
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
34 SourceFiles
35     UpwindFitData.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef UpwindFitData_H
40 #define UpwindFitData_H
42 #include "FitData.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 class extendedUpwindCellToFaceStencil;
51 /*---------------------------------------------------------------------------*\
52                     Class UpwindFitData Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class Polynomial>
56 class UpwindFitData
58     public FitData
59     <
60         UpwindFitData<Polynomial>,
61         extendedUpwindCellToFaceStencil,
62         Polynomial
63     >
65     // Private data
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
80         void calcFit();
83 public:
85     TypeName("UpwindFitData");
88     // Constructors
90         //- Construct from components
91         UpwindFitData
92         (
93             const fvMesh& mesh,
94             const extendedUpwindCellToFaceStencil& stencil,
95             const bool linearCorrection,
96             const scalar linearLimitFactor,
97             const scalar centralWeight
98         );
101     //- Destructor
102     virtual ~UpwindFitData()
103     {}
106     // Member functions
108         //- Return reference to owner fit coefficients
109         const List<scalarList>& owncoeffs() const
110         {
111             return owncoeffs_;
112         }
114         //- Return reference to neighbour fit coefficients
115         const List<scalarList>& neicoeffs() const
116         {
117             return neicoeffs_;
118         }
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 #ifdef NoRepository
129 #   include "UpwindFitData.C"
130 #endif
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 #endif
136 // ************************************************************************* //