CentredFitData.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::CentredFitData
29
30Description
31 Data for the quadratic fit correction interpolation scheme
32
33SourceFiles
34 CentredFitData.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef CentredFitData_H
39#define CentredFitData_H
40
41#include "FitData.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48class extendedCentredCellToFaceStencil;
49
50/*---------------------------------------------------------------------------*\
51 Class CentredFitData Declaration
52\*---------------------------------------------------------------------------*/
53
54template<class Polynomial>
56:
57 public FitData
58 <
59 CentredFitData<Polynomial>,
60 extendedCentredCellToFaceStencil,
61 Polynomial
62 >
63{
64 // Private data
65
66 //- For each cell in the mesh store the values which multiply the
67 // values of the stencil to obtain the gradient for each direction
68 List<scalarList> coeffs_;
69
70
71 // Private Member Functions
72
73 //- Calculate the fit for the all the mesh faces
74 // and set the coefficients
75 void calcFit();
76
77
78public:
80 TypeName("CentredFitData");
81
82
83 // Constructors
84
85 //- Construct from components
87 (
88 const fvMesh& mesh,
90 const scalar linearLimitFactor,
91 const scalar centralWeight
92 );
93
94
95 //- Destructor
96 virtual ~CentredFitData() = default;
97
98
99 // Member functions
100
101 //- Return reference to fit coefficients
102 const List<scalarList>& coeffs() const
103 {
104 return coeffs_;
105 }
106};
107
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111} // End namespace Foam
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115#ifdef NoRepository
116 #include "CentredFitData.C"
117#endif
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121#endif
122
123// ************************************************************************* //
Data for the quadratic fit correction interpolation scheme.
virtual ~CentredFitData()=default
Destructor.
TypeName("CentredFitData")
const List< scalarList > & coeffs() const
Return reference to fit coefficients.
Data for the upwinded and centred polynomial fit interpolation schemes. The linearCorrection_ determi...
Definition: FitData.H:60
scalar linearLimitFactor() const
Factor the fit is allowed to deviate from the base scheme.
Definition: FitData.H:124
const extendedCentredCellToFaceStencil & stencil() const
Return reference to the stencil.
Definition: FitData.H:118
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
const Mesh & mesh() const
Definition: MeshObject.H:122
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73