faOptions.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2019-2022 OpenCFD Ltd.
9 ------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fa::options
28 
29 Description
30  Finite-area options
31 
32 SourceFiles
33  faOptions.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef Foam_fa_options_H
38 #define Foam_fa_options_H
39 
40 #include "faOptionList.H"
41 #include "IOdictionary.H"
42 #include "autoPtr.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace fa
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class options Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class options
56 :
57  public IOdictionary,
58  public optionList
59 {
60  // Private Member Functions
61 
62  //- Create IO object if dictionary is present
63  IOobject createIOobject(const fvMesh& mesh) const;
64 
65  //- No copy construct
66  options(const options&) = delete;
67 
68  //- No copy assignment
69  void operator=(const options&) = delete;
70 
71 
72 public:
73 
74  // Declare name of the class and its debug switch
75  ClassName("faOptions");
76 
77 
78  // Constructors
79 
80  //- Construct from components with list of field names
81  explicit options(const fvMesh& mesh);
82 
83  //- Construct faOptions and register to database if not present
84  //- otherwise lookup and return
85  static options& New(const fvMesh& mesh);
86 
87 
88  //- Destructor
89  virtual ~options() = default;
90 
91 
92  // Member Functions
93 
94  //- Inherit read from optionList
95  using optionList::read;
96 
97  //- Read dictionary
98  virtual bool read();
99 };
100 
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 } // End namespace fa
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
ClassName("faOptions")
List of finite volume options.
Definition: faOptionList.H:61
virtual bool read()
Read dictionary.
Definition: faOptions.C:113
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
dynamicFvMesh & mesh
static options & New(const fvMesh &mesh)
Construct faOptions and register to database if not present otherwise lookup and return.
Definition: faOptions.C:95
Finite-area options.
Definition: faOptions.H:50
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: faOptionList.C:141
virtual ~options()=default
Destructor.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
Namespace for OpenFOAM.