FreeFOAM The Cross-Platform CFD Toolkit
fvSchemes.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  Foam::fvSchemes
26 
27 Description
28  Selector class for finite volume differencing schemes.
29  fvMesh is derived from fvShemes so that all fields have access to the
30  fvSchemes from the mesh reference they hold.
31 
32 SourceFiles
33  fvSchemes.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef fvSchemes_H
38 #define fvSchemes_H
39 
40 #include <OpenFOAM/IOdictionary.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class fvSchemes Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class fvSchemes
52 :
53  public IOdictionary
54 {
55  // Private data
56 
57  dictionary ddtSchemes_;
58  ITstream defaultDdtScheme_;
59 
60  dictionary d2dt2Schemes_;
61  ITstream defaultD2dt2Scheme_;
62 
63  dictionary interpolationSchemes_;
64  ITstream defaultInterpolationScheme_;
65 
66  dictionary divSchemes_;
67  ITstream defaultDivScheme_;
68 
69  dictionary gradSchemes_;
70  ITstream defaultGradScheme_;
71 
72  dictionary snGradSchemes_;
73  ITstream defaultSnGradScheme_;
74 
75  dictionary laplacianSchemes_;
76  ITstream defaultLaplacianScheme_;
77 
78  dictionary fluxRequired_;
79  bool defaultFluxRequired_;
80 
81  dictionary cacheFields_;
82 
83 
84  // Private Member Functions
85 
86  //- Clear the dictionaries and streams before reading
87  void clear();
88 
89  //- Disallow default bitwise copy construct
90  fvSchemes(const fvSchemes&);
91 
92  //- Disallow default bitwise assignment
93  void operator=(const fvSchemes&);
94 
95 
96 public:
97 
98  //- Debug switch
99  static int debug;
100 
101 
102  // Constructors
103 
104  //- Construct for objectRegistry
105  fvSchemes(const objectRegistry& obr);
106 
107 
108  // Member Functions
109 
110  // Access
111 
112  const dictionary& schemesDict() const;
113 
114  ITstream& ddtScheme(const word& name) const;
115 
116  ITstream& d2dt2Scheme(const word& name) const;
117 
118  ITstream& interpolationScheme(const word& name) const;
119 
120  ITstream& divScheme(const word& name) const;
121 
122  ITstream& gradScheme(const word& name) const;
123 
124  ITstream& snGradScheme(const word& name) const;
125 
126  ITstream& laplacianScheme(const word& name) const;
127 
128  bool fluxRequired(const word& name) const;
129 
130  bool cache(const word& name) const;
131 
132 
133  // Read
134 
135  //- Read the fvSchemes
136  bool read();
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************ vim: set sw=4 sts=4 et: ************************ //