Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
finiteVolume
finiteVolume
snGradSchemes
quadraticFitSnGrad
quadraticFitSnGradData.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
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.
20
21
You should have received a copy of the GNU General Public License
22
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24
Class
25
quadraticFitSnGradData
26
27
Description
28
Data for the quadratic fit correction snGrad scheme
29
30
SourceFiles
31
quadraticFitSnGradData.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef quadraticFitSnGradData_H
36
#define quadraticFitSnGradData_H
37
38
#include <
OpenFOAM/MeshObject.H
>
39
#include <
finiteVolume/fvMesh.H
>
40
#include <
finiteVolume/extendedCellToFaceStencil.H
>
41
42
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44
namespace
Foam
45
{
46
47
/*---------------------------------------------------------------------------*\
48
Class quadraticFitSnGradData Declaration
49
\*---------------------------------------------------------------------------*/
50
51
class
quadraticFitSnGradData
52
:
53
public
MeshObject
<fvMesh, quadraticFitSnGradData>
54
{
55
// Private data
56
57
const
scalar centralWeight_;
58
const
label dim_;
59
60
//- minimum stencil size
61
const
label minSize_;
62
63
//- Extended stencil addressing
64
extendedCellToFaceStencil
stencil_;
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>
fit_;
69
70
71
// Private member functions
72
73
//- Find the normal direction and i, j and k directions for face faci
74
static
void
findFaceDirs
75
(
76
vector
& idir,
// value changed in return
77
vector
& jdir,
// value changed in return
78
vector
& kdir,
// value changed in return
79
const
fvMesh
&
mesh
,
80
const
label faci
81
);
82
83
label calcFit(
const
List<point>
&,
const
label faci);
84
85
86
public
:
87
88
TypeName
(
"quadraticFitSnGradData"
);
89
90
91
// Constructors
92
93
explicit
quadraticFitSnGradData
94
(
95
const
fvMesh
& mesh,
96
const
scalar cWeight
97
);
98
99
100
// Destructor
101
102
virtual
~quadraticFitSnGradData
()
103
{};
104
105
106
// Member functions
107
108
//- Return reference to the stencil
109
const
extendedCellToFaceStencil
&
stencil
()
const
110
{
111
return
stencil_;
112
}
113
114
//- Return reference to fit coefficients
115
const
List<scalarList>
&
fit
()
const
{
return
fit_; }
116
117
//- Delete the data when the mesh moves not implemented
118
virtual
bool
movePoints
();
119
};
120
121
122
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124
}
// End namespace Foam
125
126
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128
#endif
129
130
// ************************ vim: set sw=4 sts=4 et: ************************ //