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