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 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
32
33SourceFiles
34 options.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef fv_options_H
39#define fv_options_H
40
41#include "fvOptionList.H"
42#include "IOdictionary.H"
43#include "autoPtr.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace fv
50{
51
52/*---------------------------------------------------------------------------*\
53 Class options Declaration
54\*---------------------------------------------------------------------------*/
56class options
57:
58 public IOdictionary,
59 public optionList
60{
61 // Private Member Functions
62
63 //- Create IO object if dictionary is present
64 IOobject createIOobject(const fvMesh& mesh) const;
65
66 //- No copy construct
67 options(const options&) = delete;
68
69 //- No copy assignment
70 void operator=(const options&) = delete;
71
72
73public:
74
75 // Declare name of the class and its debug switch
76 ClassName("fvOptions");
77
78
79 // Constructors
80
81 //- Construct from components with list of field names
82 options(const fvMesh& mesh);
83
84 //- Construct fvOptions and register to database if not present
85 // otherwise lookup and return
86 static options& New(const fvMesh& mesh);
87
88
89 //- Destructor
90 virtual ~options() = default;
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 fv
106} // End namespace Foam
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110#endif
111
112// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
virtual bool read()
Re-read model coefficients if they have changed.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
List of finite volume options.
Definition: fvOptionList.H:72
Finite-volume options.
Definition: fvOptions.H:59
virtual ~options()=default
Destructor.
ClassName("fvOptions")
static options & New(const fvMesh &mesh)
Construct fvOptions and register to database if not present.
Definition: fvOptions.C:103
virtual bool read()
Read dictionary.
Definition: fvOptions.C:125
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition: className.H:67
dynamicFvMesh & mesh
Namespace for OpenFOAM.
labelList fv(nPoints)