OpenFOAM: API Guide
v2112
The open source CFD toolbox
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
-------------------------------------------------------------------------------
10
License
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
26
Class
27
Foam::leastSquareGrad
28
29
Description
30
Estimates the gradient with a least square scheme in a cell
31
32
Original code supplied by Henning Scheufler, DLR (2019)
33
34
SourceFiles
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
50
namespace
Foam
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class leastSquareGrad Declaration
55
\*---------------------------------------------------------------------------*/
56
template
<
class
T>
57
class
leastSquareGrad
58
{
59
// Private Data
60
61
multiDimPolyFitter<T>
polyFitter_;
62
63
labelVector
geomDir_;
64
65
label nDims_;
66
67
68
public
:
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
79
typename
outerProduct<vector, T>::type
grad
80
(
81
const
List<vector>
& positions,
82
const
List<T>
& listValue
83
);
84
85
Map<typename outerProduct<vector, T>::type
>
grad
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
// ************************************************************************* //
Foam::leastSquareGrad
Estimates the gradient with a least square scheme in a cell.
Definition:
leastSquareGrad.H:56
volFields.H
Foam::multiDimPolyFitter
Fit a polynominal function with the help of multiDimPolyFunction.
Definition:
multiDimPolyFitter.H:54
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:65
Foam::leastSquareGrad::leastSquareGrad
leastSquareGrad(const word &functionName, const labelVector &geomDir)
Construct from components.
Definition:
leastSquareGrad.C:37
Foam::outerProduct::type
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition:
products.H:114
Foam::leastSquareGrad::grad
outerProduct< vector, T >::type grad(const List< vector > &positions, const List< T > &listValue)
Return the gradient of the cell.
Definition:
leastSquareGrad.C:62
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition:
lumpedPointController.H:69
surfaceFields.H
Foam::surfaceFields.
OFstream.H
multiDimPolyFitter.H
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::Vector< label >
Foam::List< vector >
src
finiteVolume
fvMatrices
solvers
multiDimPolyFitter
leastSquareGrad.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.