fvOptions.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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::fv::options
26 
27 Description
28  Finite-volume options
29 
30 SourceFiles
31  options.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fvOptions_H
36 #define fvOptions_H
37 
38 #include "fvOptionList.H"
39 #include "IOdictionary.H"
40 #include "autoPtr.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace fv
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class options Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class options
54 :
55  public IOdictionary,
56  public optionList
57 {
58  // Private Member Functions
59 
60  //- Create IO object if dictionary is present
61  IOobject createIOobject(const fvMesh& mesh) const;
62 
63  //- Disallow default bitwise copy construct
64  options(const options&);
65 
66  //- Disallow default bitwise assignment
67  void operator=(const options&);
68 
69 
70 public:
71 
72  // Declare name of the class and its debug switch
73  ClassName("fvOptions");
74 
75 
76  // Constructors
77 
78  //- Construct from components with list of field names
79  options(const fvMesh& mesh);
80 
81  //- Construct fvOptions and register to datbase if not present
82  // otherwise lookup and return
83  static options& New(const fvMesh& mesh);
84 
85 
86  //- Destructor
87  virtual ~options()
88  {}
89 
90 
91  // Member Functions
92 
93  //- Inherit read from optionList
94  using optionList::read;
95 
96  //- Read dictionary
97  virtual bool read();
98 };
99 
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 } // End namespace fv
104 } // End namespace Foam
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 #endif
109 
110 // ************************************************************************* //
Finite-volume options.
Definition: fvOptions.H:52
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
virtual bool read()
Read dictionary.
Definition: fvOptions.C:126
dynamicFvMesh & mesh
labelList fv(nPoints)
ClassName("fvOptions")
virtual ~options()
Destructor.
Definition: fvOptions.H:86
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
List of finite volume options.
Definition: fvOptionList.H:64
static options & New(const fvMesh &mesh)
Construct fvOptions and register to datbase if not present.
Definition: fvOptions.C:101
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: fvOptionList.C:157