1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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/>.
25 Template for use with dynamic code generation of a
26 OutputFilter functionObject.
29 functionObjectTemplate.C
31 \*---------------------------------------------------------------------------*/
33 #ifndef functionObjectTemplate_H
34 #define functionObjectTemplate_H
36 #include "stringList.H"
37 #include "pointField.H"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 // Forward declaration of classes
50 /*---------------------------------------------------------------------------*\
51 A templated functionObject
52 \*---------------------------------------------------------------------------*/
54 class ${typeName}FunctionObject
58 //- Name of this set of system calls
62 const objectRegistry& obr_;
69 // Private Member Functions
71 const objectRegistry& obr() const;
73 const fvMesh& mesh() const;
75 //- Disallow default bitwise copy construct
76 ${typeName}FunctionObject(const ${typeName}FunctionObject&);
78 //- Disallow default bitwise assignment
79 void operator=(const ${typeName}FunctionObject&);
84 //- Runtime type information
85 TypeName("${typeName}");
90 //- Construct for given objectRegistry and dictionary.
91 // Allow the possibility to load fields from files
92 ${typeName}FunctionObject
95 const objectRegistry& unused,
97 const bool loadFromFilesUnused = false
102 virtual ~${typeName}FunctionObject();
107 //- Return name of the system call set
108 virtual const word& name() const
113 //- Read the system calls
114 virtual void read(const dictionary&);
116 //- Execute the "executeCalls" at each time-step
117 virtual void execute();
119 //- Execute the "endCalls" at the final time-loop
122 //- Write, execute the "writeCalls"
123 virtual void write();
125 //- Update for changes of mesh
126 virtual void updateMesh(const mapPolyMesh&)
129 //- Update for changes of mesh
130 virtual void movePoints(const pointField&)
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 } // End namespace Foam
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 // ************************************************************************* //