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) 2011-2015 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 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 "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 
59 
62 
65 
68 
71 
74 
77 
80 
81  //- Steady-state run indicator
82  // Set true if the default ddtScheme is steadyState
83  bool steady_;
84 
85 
86  // Private Member Functions
87 
88  //- Clear the dictionaries and streams before reading
89  void clear();
90 
91  //- Read settings from the dictionary
92  void read(const dictionary&);
93 
94  //- Disallow default bitwise copy construct
95  fvSchemes(const fvSchemes&);
96 
97  //- Disallow default bitwise assignment
98  void operator=(const fvSchemes&);
99 
100 
101 public:
102 
103  //- Debug switch
104  static int debug;
105 
106 
107  // Constructors
108 
109  //- Construct for objectRegistry
110  fvSchemes(const objectRegistry& obr);
111 
112 
113  // Member Functions
114 
115  // Access
116 
117  const dictionary& schemesDict() const;
118 
119  ITstream& ddtScheme(const word& name) const;
120 
121  ITstream& d2dt2Scheme(const word& name) const;
122 
123  ITstream& interpolationScheme(const word& name) const;
124 
125  ITstream& divScheme(const word& name) const;
126 
127  ITstream& gradScheme(const word& name) const;
128 
129  ITstream& snGradScheme(const word& name) const;
130 
131  ITstream& laplacianScheme(const word& name) const;
132 
133  void setFluxRequired(const word& name) const;
134 
135  bool fluxRequired(const word& name) const;
136 
137  //- Return true if the default ddtScheme is steadyState
138  bool steady() const
139  {
140  return steady_;
141  }
142 
143  //- Return true if the default ddtScheme is not steadyState
144  bool transient() const
145  {
146  return !steady_;
147  }
148 
149 
150  // Read
151 
152  //- Read the fvSchemes
153  bool read();
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fvSchemes::snGradSchemes_
dictionary snGradSchemes_
Definition: fvSchemes.H:71
Foam::fvSchemes::defaultFluxRequired_
bool defaultFluxRequired_
Definition: fvSchemes.H:78
Foam::fvSchemes::defaultDdtScheme_
ITstream defaultDdtScheme_
Definition: fvSchemes.H:57
Foam::fvSchemes::ddtScheme
ITstream & ddtScheme(const word &name) const
Definition: fvSchemes.C:360
Foam::fvSchemes::ddtSchemes_
dictionary ddtSchemes_
Definition: fvSchemes.H:56
Foam::fvSchemes
Selector class for finite volume differencing schemes. fvMesh is derived from fvShemes so that all fi...
Definition: fvSchemes.H:50
Foam::fvSchemes::divScheme
ITstream & divScheme(const word &name) const
Definition: fvSchemes.C:421
Foam::fvSchemes::read
bool read()
Read the fvSchemes.
Definition: fvSchemes.C:329
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:50
Foam::fvSchemes::defaultGradScheme_
ITstream defaultGradScheme_
Definition: fvSchemes.H:69
Foam::fvSchemes::debug
static int debug
Debug switch.
Definition: fvSchemes.H:103
Foam::fvSchemes::setFluxRequired
void setFluxRequired(const word &name) const
Definition: fvSchemes.C:497
Foam::ITstream
Input token stream.
Definition: ITstream.H:49
Foam::fvSchemes::fluxRequired_
dictionary fluxRequired_
Definition: fvSchemes.H:77
Foam::fvSchemes::defaultDivScheme_
ITstream defaultDivScheme_
Definition: fvSchemes.H:66
Foam::fvSchemes::gradScheme
ITstream & gradScheme(const word &name) const
Definition: fvSchemes.C:440
Foam::fvSchemes::schemesDict
const dictionary & schemesDict() const
Definition: fvSchemes.C:347
Foam::fvSchemes::defaultInterpolationScheme_
ITstream defaultInterpolationScheme_
Definition: fvSchemes.H:63
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::fvSchemes::defaultD2dt2Scheme_
ITstream defaultD2dt2Scheme_
Definition: fvSchemes.H:60
Foam::fvSchemes::defaultSnGradScheme_
ITstream defaultSnGradScheme_
Definition: fvSchemes.H:72
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fvSchemes::snGradScheme
ITstream & snGradScheme(const word &name) const
Definition: fvSchemes.C:459
Foam::fvSchemes::operator=
void operator=(const fvSchemes &)
Disallow default bitwise assignment.
Foam::fvSchemes::fluxRequired
bool fluxRequired(const word &name) const
Definition: fvSchemes.C:508
Foam::fvSchemes::steady
bool steady() const
Return true if the default ddtScheme is steadyState.
Definition: fvSchemes.H:137
Foam::fvSchemes::divSchemes_
dictionary divSchemes_
Definition: fvSchemes.H:65
IOdictionary.H
Foam::IOdictionary::name
const word & name() const
Name function is needed to disambiguate those inherited.
Definition: IOdictionary.C:181
Foam::fvSchemes::laplacianSchemes_
dictionary laplacianSchemes_
Definition: fvSchemes.H:74
Foam::fvSchemes::interpolationScheme
ITstream & interpolationScheme(const word &name) const
Definition: fvSchemes.C:398
Foam::fvSchemes::clear
void clear()
Clear the dictionaries and streams before reading.
Definition: fvSchemes.C:37
Foam::fvSchemes::d2dt2Schemes_
dictionary d2dt2Schemes_
Definition: fvSchemes.H:59
Foam::fvSchemes::fvSchemes
fvSchemes(const fvSchemes &)
Disallow default bitwise copy construct.
Foam::fvSchemes::d2dt2Scheme
ITstream & d2dt2Scheme(const word &name) const
Definition: fvSchemes.C:379
Foam::fvSchemes::interpolationSchemes_
dictionary interpolationSchemes_
Definition: fvSchemes.H:62
Foam::fvSchemes::laplacianScheme
ITstream & laplacianScheme(const word &name) const
Definition: fvSchemes.C:478
Foam::fvSchemes::steady_
bool steady_
Steady-state run indicator.
Definition: fvSchemes.H:82
Foam::fvSchemes::gradSchemes_
dictionary gradSchemes_
Definition: fvSchemes.H:68
Foam::fvSchemes::defaultLaplacianScheme_
ITstream defaultLaplacianScheme_
Definition: fvSchemes.H:75