Loading...
Searching...
No Matches
fvOptions.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) 2011-2015 OpenFOAM Foundation
9 Copyright (C) 2019-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::fv::options
29
30Description
31 Finite-volume options, which is an IOdictionary of values and
32 a fv::optionList
33
34 Possible file locations (default region):
35 \verbatim
36 .
37 |-- constant/fvOptions
38 |-- system/fvOptions
39 \endverbatim
40
41 Possible file locations (multi-region):
42 \verbatim
43 .
44 |-- constant/<region>/fvOptions
45 |-- system/<region>/fvOptions
46 \endverbatim
47
48SourceFiles
49 fvOptions.C
50
51\*---------------------------------------------------------------------------*/
52
53#ifndef Foam_fvOptions_H
54#define Foam_fvOptions_H
55
56#include "fvOptionList.H"
57#include "IOdictionary.H"
58
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61namespace Foam
62{
63namespace fv
64{
66/*---------------------------------------------------------------------------*\
67 Class options Declaration
68\*---------------------------------------------------------------------------*/
69
70class options
71:
72 public IOdictionary,
73 public fv::optionList
74{
75 // Private Member Functions
76
77 //- Construct with specified IOobject for the IOdictionary
78 //- (somewhat fragile)
79 options(const fvMesh& mesh, const IOobject& io);
80
81
82public:
83
84 // Declare name of the class and its debug switch
85 ClassName("fvOptions");
86
87
88 // Constructors
89
90 //- Construct from components with list of field names
91 explicit options(const fvMesh& mesh);
92
93 //- No copy construct
94 options(const options&) = delete;
96 //- No copy assignment
97 void operator=(const options&) = delete;
98
99
100 // Factory Methods
101
102 //- Construct fvOptions and register to database if not present
103 //- otherwise lookup and return
104 static options& New(const fvMesh& mesh);
105
106
107 //- Destructor
108 virtual ~options() = default;
109
110
111 // Member Functions
112
113 //- Inherit read from fv::optionList
116 //- Read dictionary
117 virtual bool read();
118};
119
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123} // End namespace fv
124} // End namespace Foam
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
List of finite volume options.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual ~options()=default
Destructor.
ClassName("fvOptions")
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present otherwise lookup and return.
Definition fvOptions.C:116
options(const options &)=delete
No copy construct.
void operator=(const options &)=delete
No copy assignment.
virtual bool read()
Read dictionary.
Definition fvOptions.C:134
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
dynamicFvMesh & mesh
const auto & io
Namespace for finite-volume.
Namespace for OpenFOAM.