Loading...
Searching...
No Matches
fvSolution.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 OpenFOAM Foundation
9 Copyright (C) 2020-2023 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::fvSolution
29
30Description
31 Selector class for finite volume solution solution.
32 fvMesh is derived from fvSolution so that all fields have access to the
33 fvSolution from the mesh reference they hold.
34
35 The optional fallback dictionary content for constructors is used
36 when a file is missing or for a NO_READ, with a null pointer being
37 treated like an empty dictionary.
38
39SeeAlso
40 Foam::solution
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_fvSolution_H
45#define Foam_fvSolution_H
46
47#include "solution.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54/*---------------------------------------------------------------------------*\
55 Class fvSolution Declaration
56\*---------------------------------------------------------------------------*/
57
58class fvSolution
59:
60 public solution
61{
62public:
63
64 //- No copy construct
65 fvSolution(const fvSolution&) = delete;
66
67 //- No copy assignment
68 void operator=(const fvSolution&) = delete;
69
70
71 // Constructors
72
73 //- Construct for objectRegistry, readOption, (system) dictionary name.
75 (
76 const objectRegistry& obr,
78 const word& dictName,
79 const dictionary* fallback = nullptr
80 )
81 :
82 solution(obr, rOpt, dictName, fallback)
83 {}
84
85 //- Construct for objectRegistry, dictionary name and optional
86 //- fallback dictionary content (for a NO_READ or missing file)
87 // A null dictionary pointer is treated like an empty dictionary.
89 (
90 const objectRegistry& obr,
91 const word& dictName,
92 const dictionary* fallback = nullptr
93 )
94 :
95 solution(obr, dictName, fallback)
96 {}
97
98 //- Construct for objectRegistry, readOption with the
99 //- default dictionary name ("fvSolution").
101 (
102 const objectRegistry& obr,
104 const dictionary* fallback = nullptr
105 )
106 :
107 solution(obr, rOpt, "fvSolution", fallback)
108 {}
109
110 //- Construct for objectRegistry, readOption with the
111 //- default dictionary name ("fvSolution") and
112 //- fallback dictionary content.
114 (
115 const objectRegistry& obr,
117 const dictionary& dict
118 )
120 solution(obr, rOpt, "fvSolution", &dict)
121 {}
122
123 //- Construct for objectRegistry with the
124 //- default dictionary name ("fvSolution").
125 // Uses the readOption from the registry.
126 explicit fvSolution
127 (
128 const objectRegistry& obr,
129 const dictionary* fallback = nullptr
130 )
131 :
132 fvSolution(obr, "fvSolution", fallback)
133 {}
134
135 //- Construct for objectRegistry with the
136 //- default dictionary name ("fvSolution") and optional contents.
137 // Uses the readOption from the registry.
138 fvSolution(const objectRegistry& obr, const dictionary& dict)
139 :
140 fvSolution(obr, "fvSolution", &dict)
141 {}
142};
143
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147} // End namespace Foam
148
149// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151#endif
152
153// ************************************************************************* //
readOption
Enumeration defining read preferences.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
word dictName() const
The local dictionary name (final part of scoped name).
Definition dictionaryI.H:53
Selector class for finite volume solution solution. fvMesh is derived from fvSolution so that all fie...
Definition fvSolution.H:54
fvSolution(const objectRegistry &obr, const dictionary *fallback=nullptr)
Construct for objectRegistry with the default dictionary name ("fvSolution").
Definition fvSolution.H:136
fvSolution(const objectRegistry &obr, const dictionary &dict)
Construct for objectRegistry with the default dictionary name ("fvSolution") and optional contents.
Definition fvSolution.H:150
fvSolution(const objectRegistry &obr, IOobjectOption::readOption rOpt, const dictionary *fallback=nullptr)
Construct for objectRegistry, readOption with the default dictionary name ("fvSolution").
Definition fvSolution.H:105
fvSolution(const objectRegistry &obr, const word &dictName, const dictionary *fallback=nullptr)
Construct for objectRegistry, dictionary name and optional fallback dictionary content (for a NO_READ...
Definition fvSolution.H:91
fvSolution(const objectRegistry &obr, IOobjectOption::readOption rOpt, const word &dictName, const dictionary *fallback=nullptr)
Construct for objectRegistry, readOption, (system) dictionary name.
Definition fvSolution.H:74
fvSolution(const fvSolution &)=delete
No copy construct.
fvSolution(const objectRegistry &obr, IOobjectOption::readOption rOpt, const dictionary &dict)
Construct for objectRegistry, readOption with the default dictionary name ("fvSolution") and fallback...
Definition fvSolution.H:120
void operator=(const fvSolution &)=delete
No copy assignment.
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Definition word.H:66
const auto & fallback
Namespace for OpenFOAM.
dictionary dict