leastSquareGrad.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) 2020 DLR
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::leastSquareGrad
28
29Description
30 Estimates the gradient with a least square scheme in a cell
31
32 Original code supplied by Henning Scheufler, DLR (2019)
33
34SourceFiles
35 leastSquareGrad.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef leastSquareGrad_H
40#define leastSquareGrad_H
41
42#include "fvMesh.H"
43#include "volFields.H"
44#include "surfaceFields.H"
45#include "OFstream.H"
46#include "multiDimPolyFitter.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class leastSquareGrad Declaration
55\*---------------------------------------------------------------------------*/
56template<class T>
58{
59 // Private Data
60
61 multiDimPolyFitter<T> polyFitter_;
62
63 labelVector geomDir_;
64
65 label nDims_;
66
67
68public:
69
70 // Constructors
71
72 //- Construct from components
73 leastSquareGrad(const word& functionName, const labelVector& geomDir);
74
75
76 // Member Functions
77
78 //- Return the gradient of the cell
80 (
81 const List<vector>& positions,
82 const List<T>& listValue
83 );
84
86 (
87 const Map<List<vector>>& positions,
88 const Map<List<T>>& listValue
89 );
90};
91
92
93// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94
95} // End namespace Foam
96
97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99#endif
100
101// ************************************************************************* //
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
A HashTable to objects of type <T> with a label key.
Definition: Map.H:60
Estimates the gradient with a least square scheme in a cell.
outerProduct< vector, T >::type grad(const List< vector > &positions, const List< T > &listValue)
Return the gradient of the cell.
Fit a polynominal function with the help of multiDimPolyFunction.
type
Volume classification types.
Definition: volumeType.H:66
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
Foam::surfaceFields.