All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
filmSubModelBase.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "filmSubModelBase.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 namespace regionModels
33 {
34 namespace surfaceFilmModels
35 {
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
40 :
41  subModelBase(film.outputProperties()),
42  filmModel_(film)
43 {}
44 
45 
47 (
49  const dictionary& dict,
50  const word& baseName,
51  const word& modelType,
52  const word& dictExt
53 )
54 :
56  (
57  film.outputProperties(),
58  dict,
59  baseName,
60  modelType,
61  dictExt
62  ),
63  filmModel_(film)
64 {}
65 
66 
68 (
69  const word& modelName,
71  const dictionary& dict,
72  const word& baseName,
73  const word& modelType
74 )
75 :
77  (
78  modelName,
79  film.outputProperties(),
80  dict,
81  baseName,
82  modelType
83  ),
84  filmModel_(film)
85 {}
86 
87 
88 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
89 
91 {}
92 
93 
94 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
95 
97 {
98  return active() && filmModel_.time().writeTime();
99 }
100 
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 } // End namespace surfaceFilmModels
105 } // End namespace regionModels
106 } // End namespace Foam
107 
108 // ************************************************************************* //
filmSubModelBase(surfaceFilmRegionModel &film)
Construct null.
subModelBase(dictionary &properties)
Construct null.
Definition: subModelBase.C:38
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
virtual bool writeTime() const
Flag to indicate when to write a property.
bool writeTime() const
Return true if this is a write time.
Definition: TimeStateI.H:65
A class for handling words, derived from string.
Definition: word.H:59
const IOdictionary & outputProperties() const
Return const access to the output properties dictionary.
Definition: regionModelI.H:110
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:122
Base class for generic sub-models requiring to be read from dictionary. Provides a mechanism to read ...
Definition: subModelBase.H:51
const word & baseName() const
Return const access to the base name of the sub-model.
Definition: subModelBase.C:116
surfaceFilmRegionModel & filmModel_
Reference to the film surface film model.
virtual bool active() const
Return the model &#39;active&#39; status - default active = true.
Definition: subModelBase.C:154
Namespace for OpenFOAM.