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-2019 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 
64 public:
65 
66  // Declare name of the class and its debug switch
67  ClassName("fvOptions");
68 
69 
70  // Constructors
71 
72  //- Construct from components with list of field names
73  options(const fvMesh& mesh);
74 
75  //- Disallow default bitwise copy construction
76  options(const options&) = delete;
77 
78  //- Construct fvOptions and register to datbase if not present
79  // otherwise lookup and return
80  static options& New(const fvMesh& mesh);
81 
82 
83  //- Destructor
84  virtual ~options()
85  {}
86 
87 
88  // Member Functions
89 
90  //- Inherit read from optionList
91  using optionList::read;
92 
93  //- Read dictionary
94  virtual bool read();
95 
96 
97  // Member Operators
98 
99  //- Disallow default bitwise assignment
100  void operator=(const options&) = delete;
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace fv
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
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")
options(const fvMesh &mesh)
Construct from components with list of field names.
Definition: fvOptions.C:92
virtual ~options()
Destructor.
Definition: fvOptions.H:83
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.
void operator=(const options &)=delete
Disallow default bitwise assignment.
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: fvOptionList.C:157