Loading...
Searching...
No Matches
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-2025 OpenCFD Ltd.
9------------------------------------------------------------------------------
10License
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
26Class
27 Foam::fa::options
28
29Description
30 Finite-area options, which is an IOdictionary of values and
31 a fa::optionList
32
33 Possible file locations (default area region):
34 \verbatim
35 .
36 |-- constant/finite-area/faOptions
37 |-- system/finite-area/faOptions
38 |
39 |-- constant/faOptions (legacy location: OpenFOAM-v2506 and earlier)
40 |-- system/faOptions (legacy location: OpenFOAM-v2506 and earlier)
41 \endverbatim
42
43 Possible file locations (multi-region):
44 \verbatim
45 .
46 |-- constant/finite-area/faOptions.<area-name>
47 |-- system/finite-area/faOptions.<area-name>
48 \endverbatim
49
50 There are no legacy locations when using multiple area regions.
51
52SourceFiles
53 faOptions.cxx
54
55\*---------------------------------------------------------------------------*/
56
57#ifndef Foam_fa_options_H
58#define Foam_fa_options_H
59
60#include "faOptionList.H"
61#include "IOdictionary.H"
62
63// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64
65namespace Foam
66{
67namespace fa
68{
70/*---------------------------------------------------------------------------*\
71 Class options Declaration
72\*---------------------------------------------------------------------------*/
73
74class options
75:
76 public IOdictionary,
77 public fa::optionList
78{
79 // Private Methods
80
81 //- Construct with specified IOobject for the IOdictionary
82 //- (somewhat fragile)
83 options(const fvMesh& mesh, const IOobject& io, const word& areaName);
84
85
86public:
87
88 //- Runtime information
89 ClassName("faOptions");
90
91
92 // Constructors
93
94 //- Construct from components with list of field names
95 explicit options
96 (
97 const fvMesh& mesh,
99 const word& defaultAreaName = word()
100 );
101
102 //- No copy construct
103 options(const options&) = delete;
104
105 //- No copy assignment
106 void operator=(const options&) = delete;
107
108
109 // Factory Methods
110
111 //- Construct faOptions and register to database if not present
112 //- otherwise lookup and return
113 static options& New
114 (
115 const fvMesh& mesh,
117 const word& defaultAreaName = word()
118 );
119
121 //- Destructor
122 virtual ~options() = default;
123
124
125 // Member Functions
126
127 // Note: areaName() available from fa::optionList
128
129 //- Inherit read from fa::optionList
132 //- Read dictionary
133 virtual bool read();
134};
135
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139} // End namespace fa
140} // End namespace Foam
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
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
List of finite-area options.
virtual bool read(const dictionary &dict)
Read dictionary.
const word & areaName() const noexcept
The finite-area mesh name.
virtual ~options()=default
Destructor.
options(const fvMesh &mesh, const word &defaultAreaName=word())
Construct from components with list of field names.
options(const options &)=delete
No copy construct.
static options & New(const fvMesh &mesh, const word &defaultAreaName=word())
Construct faOptions and register to database if not present otherwise lookup and return.
virtual bool read()
Read dictionary.
void operator=(const options &)=delete
No copy assignment.
ClassName("faOptions")
Runtime information.
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
A class for handling words, derived from Foam::string.
Definition word.H:66
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
dynamicFvMesh & mesh
const auto & io
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.