LimitFuncs.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-------------------------------------------------------------------------------
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
26Namespace
27 Foam::limitFuncs
28
29Description
30 Namespace for limiting functions
31
32
33Class
34 Foam::limitFuncs::LimitFuncs
35
36Description
37 Class to create NVD/TVD limited weighting-factors.
38
39 The particular differencing scheme class is supplied as a template
40 argument, the weight function of which is called by the weight function
41 of this class for the internal faces as well as faces of coupled
42 patches (e.g. processor-processor patches). The weight function is
43 supplied the central-differencing weighting factor, the face-flux, the
44 cell and face gradients (from which the normalised variable
45 distribution may be created) and the cell centre distance.
46
47 This code organisation is both neat and efficient, allowing for
48 convenient implementation of new schemes to run on parallelised cases.
49
50SourceFiles
51 LimitFuncs.C
52
53\*---------------------------------------------------------------------------*/
54
55#ifndef LimitFuncs_H
56#define LimitFuncs_H
57
58// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59
60namespace Foam
61{
62
63namespace limitFuncs
64{
65
66// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67
68template<class Type>
69class null
70{
71public:
73 null()
74 {}
77 (
79 ) const
80 {
81 return phi;
82 }
83};
84
85
86template<class Type>
87class magSqr
88{
89public:
91 magSqr()
92 {}
93
94 inline tmp<volScalarField> operator()
95 (
97 ) const;
98};
99
100template<>
102(
103 const volScalarField& phi
104) const;
105
106template<>
108(
110) const;
111
112template<>
114(
115 const volTensorField& phi
116) const;
117
118
119template<class Type>
120class rhoMagSqr
121{
122public:
124 rhoMagSqr()
125 {}
126
127 inline tmp<volScalarField> operator()
128 (
130 ) const;
131};
132
133template<>
135(
136 const volScalarField& phi
137) const;
138
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142} // End namespace limitFuncs
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#ifdef NoRepository
148 #include "LimitFuncs.C"
149#endif
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
surfaceScalarField & phi
Generic GeometricField class.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.