BUG: radialActuactionDiskSource: corrected maxR calculation.
[OpenFOAM-2.0.x.git] / etc / codeTemplates / dynamicCode / functionObjectTemplate.C
blob61cba180c3cccfb08645c5410cfd30b43bbfa43f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "functionObjectTemplate.H"
27 #include "Time.H"
28 #include "fvCFD.H"
30 //{{{ begin codeInclude
31 ${codeInclude}
32 //}}} end codeInclude
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 namespace Foam
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(${typeName}FunctionObject, 0);
44 // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
46 //{{{ begin localCode
47 ${localCode}
48 //}}} end localCode
51 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
53 const objectRegistry& ${typeName}FunctionObject::obr() const
55     return obr_;
59 const fvMesh& ${typeName}FunctionObject::mesh() const
61     return refCast<const fvMesh>(obr_);
65 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
67 ${typeName}FunctionObject::${typeName}FunctionObject
69     const word& name,
70     const objectRegistry& obr,
71     const dictionary& dict,
72     const bool
75     name_(name),
76     obr_(obr)
78     read(dict);
82 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
84 ${typeName}FunctionObject::~${typeName}FunctionObject()
88 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
90 void ${typeName}FunctionObject::read(const dictionary& dict)
92     if (${verbose:-false})
93     {
94         Info<<"read ${typeName} sha1: ${SHA1sum}\n";
95     }
97 //{{{ begin code
98     ${codeRead}
99 //}}} end code
103 void ${typeName}FunctionObject::execute()
105     if (${verbose:-false})
106     {
107         Info<<"execute ${typeName} sha1: ${SHA1sum}\n";
108     }
110 //{{{ begin code
111     ${codeExecute}
112 //}}} end code
116 void ${typeName}FunctionObject::end()
118     if (${verbose:-false})
119     {
120         Info<<"end ${typeName} sha1: ${SHA1sum}\n";
121     }
123 //{{{ begin code
124     ${codeEnd}
125 //}}} end code
129 void ${typeName}FunctionObject::write()
131     if (${verbose:-false})
132     {
133         Info<<"write ${typeName} sha1: ${SHA1sum}\n";
134     }
136 //{{{ begin code
137     ${code}
138 //}}} end code
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
146 // ************************************************************************* //