faSolution.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) 2016-2017 Wikki Ltd
9  Copyright (C) 2021-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::faSolution
29 
30 Description
31  Selector class for finite area solution.
32  faMesh is derived from faSolution so that all fields have access to the
33  faSolution 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 
39 SeeAlso
40  Foam::solution
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef Foam_faSolution_H
45 #define Foam_faSolution_H
46 
47 #include "solution.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class faSolution Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class faSolution
59 :
60  public solution
61 {
62 public:
63 
64  // Generated Methods
65 
66  //- No copy construct
67  faSolution(const faSolution&) = delete;
68 
69  //- No copy assignment
70  void operator=(const faSolution&) = delete;
71 
72 
73  // Constructors
74 
75  //- Construct for objectRegistry, readOption, (system) dictionary name.
77  (
78  const objectRegistry& obr,
80  const word& dictName,
81  const dictionary* fallback = nullptr
82  )
83  :
84  solution(obr, rOpt, dictName, fallback)
85  {}
86 
87  //- Construct for objectRegistry, (system) dictionary name
88  //- using the readOption from the registry.
90  (
91  const objectRegistry& obr,
92  const word& dictName,
93  const dictionary* fallback = nullptr
94  )
95  :
96  solution(obr, dictName, fallback)
97  {}
98 
99  //- Construct for objectRegistry, readOption with the
100  //- default dictionary name ("faSolution").
101  faSolution
102  (
103  const objectRegistry& obr,
105  const dictionary* fallback = nullptr
106  )
107  :
108  solution(obr, rOpt, "faSolution", fallback)
109  {}
110 
111  //- Construct for objectRegistry, readOption with the
112  //- default dictionary name ("faSolution") and
113  //- fallback dictionary content.
114  faSolution
115  (
116  const objectRegistry& obr,
118  const dictionary& dict
119  )
120  :
121  solution(obr, rOpt, "faSolution", &dict)
122  {}
123 
124  //- Construct for objectRegistry with the
125  //- default dictionary name ("faSolution").
126  // Uses the readOption from the registry.
127  explicit faSolution
128  (
129  const objectRegistry& obr,
130  const dictionary* fallback = nullptr
131  )
132  :
133  solution(obr, "faSolution", fallback)
134  {}
135 
136  //- Construct for objectRegistry with the
137  //- default dictionary name ("faSolution") and optional contents.
138  // Uses the readOption from the registry.
139  faSolution(const objectRegistry& obr, const dictionary& dict)
140  :
141  solution(obr, "faSolution", &dict)
142  {}
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:53
dictionary dict
faSolution(const faSolution &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A class for handling words, derived from Foam::string.
Definition: word.H:63
Selector class for finite area solution. faMesh is derived from faSolution so that all fields have ac...
Definition: faSolution.H:51
Selector class for relaxation factors, solver type and solution.
Definition: solution.H:92
Registry of regIOobjects.
void operator=(const faSolution &)=delete
No copy assignment.
Namespace for OpenFOAM.
readOption
Enumeration defining read preferences.