initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / postProcessing / functionObjects / systemCall / systemCall.H
blob042ee0fc4d8667749314e03cea856dbff25c6016
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::systemCall
28 Description
29     Executes system calls, entered in the form of a string list
31 SourceFiles
32     systemCall.C
33     IOsystemCall.H
35 \*---------------------------------------------------------------------------*/
37 #ifndef systemCall_H
38 #define systemCall_H
40 #include "stringList.H"
41 #include "pointFieldFwd.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declaration of classes
49 class objectRegistry;
50 class dictionary;
51 class mapPolyMesh;
53 /*---------------------------------------------------------------------------*\
54                        Class systemCall Declaration
55 \*---------------------------------------------------------------------------*/
57 class systemCall
59 protected:
61     // Private data
63         //- Name of this set of system calls
64         word name_;
66         //- List of calls to execute - every step
67         stringList executeCalls_;
69         //- List of calls to execute when exiting the time-loop
70         stringList endCalls_;
72         //- List of calls to execute - write steps
73         stringList writeCalls_;
76     // Private Member Functions
78         //- Disallow default bitwise copy construct
79         systemCall(const systemCall&);
81         //- Disallow default bitwise assignment
82         void operator=(const systemCall&);
85 public:
87     //- Runtime type information
88     TypeName("systemCall");
91     // Constructors
93         //- Construct for given objectRegistry and dictionary.
94         //  Allow the possibility to load fields from files
95         systemCall
96         (
97             const word& name,
98             const objectRegistry& unused,
99             const dictionary&,
100             const bool loadFromFilesUnused = false
101         );
104     // Destructor
106         virtual ~systemCall();
109     // Member Functions
111         //- Return name of the system call set
112         virtual const word& name() const
113         {
114             return name_;
115         }
117         //- Read the system calls
118         virtual void read(const dictionary&);
120         //- Execute the "executeCalls" at each time-step
121         virtual void execute();
123         //- Execute the "endCalls" at the final time-loop
124         virtual void end();
126         //- Write, execute the "writeCalls"
127         virtual void write();
129         //- Update for changes of mesh
130         virtual void updateMesh(const mapPolyMesh&)
131         {}
133         //- Update for changes of mesh
134         virtual void movePoints(const pointField&)
135         {}
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 #endif
147 // ************************************************************************* //