solverI.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) 2021-2023 PCOpt/NTUA
9  Copyright (C) 2021-2023 FOSS GP
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 \*---------------------------------------------------------------------------*/
28 
29 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
30 
31 const Foam::fvMesh& Foam::solver::mesh() const
32 {
33  return mesh_;
34 }
35 
36 
38 {
39  return solverName_;
40 }
41 
42 
44 {
45  return useSolverNameForFields_;
46 }
47 
48 
50 {
51  return (useSolverNameForFields_ ? word(varName + solverName_) : varName);
52 }
53 
54 
56 {
57  return active_;
58 }
59 
60 
62 {
63  return dict_;
64 }
65 
66 
68 {
69  return vars_();
70 }
71 
72 
74 {
75  return vars_();
76 }
77 
78 
80 {
81  return managerType_;
82 }
83 
84 
85 bool Foam::solver::isMaster() const
86 {
87  return isMaster_;
88 }
89 
90 
91 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const fvMesh & mesh() const
Return the solver mesh.
Definition: solverI.H:24
bool isMaster() const
Whether the solver is the master one, in case of coupled solvers.
Definition: solverI.H:78
bool active()
Return state of solver.
Definition: solverI.H:48
A class for handling words, derived from Foam::string.
Definition: word.H:63
const word & managerType() const
Return the manager type.
Definition: solverI.H:72
const dictionary & dict() const
Return the solver dictionary.
Definition: solverI.H:54
Base class for creating a set of variables.
Definition: variablesSet.H:43
word extendedVariableName(const word &varName) const
Given a variable name, return a name that is possibly appended by the solverName, depending on useSol...
Definition: solverI.H:42
const word & solverName() const
Return the solver name.
Definition: solverI.H:30
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const variablesSet & getVariablesSet() const
Return constant reference to variableSet used by the solver.
Definition: solverI.H:60
fvMesh & mesh_
Reference to the mesh database.
Definition: solver.H:56
bool useSolverNameForFields() const
Use solver name as a suffix to the involved fields.
Definition: solverI.H:36