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-2020 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 fa_options_H
38 #define 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  options(const fvPatch& p);
82 
83  //- Construct faOptions and register to database if not present
84  //- otherwise lookup and return
85  static options& New(const fvPatch& p);
86 
87 
88  //- Destructor
89  virtual ~options()
90  {}
91 
92 
93  // Member Functions
94 
95  //- Inherit read from optionList
96  using optionList::read;
97 
98  //- Read dictionary
99  virtual bool read();
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace fa
106 } // End namespace Foam
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 #endif
111 
112 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::fa::options::New
static options & New(const fvPatch &p)
Definition: faOptions.C:102
faOptionList.H
Foam::fa::optionList
List of finite volume options.
Definition: faOptionList.H:65
Foam::fa::options::read
virtual bool read()
Read dictionary.
Definition: faOptions.C:129
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::fa::options::ClassName
ClassName("faOptions")
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::fa::options
Finite-area options.
Definition: faOptions.H:54
Foam::fa::optionList::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: faOptionList.C:156
Foam::fa::options::~options
virtual ~options()
Destructor.
Definition: faOptions.H:88
autoPtr.H