FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

systemCall.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2009-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::systemCall
00026 
00027 Description
00028     Executes system calls, entered in the form of a string list
00029 
00030 SourceFiles
00031     systemCall.C
00032     IOsystemCall.H
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef systemCall_H
00037 #define systemCall_H
00038 
00039 #include <OpenFOAM/stringList.H>
00040 #include <OpenFOAM/pointFieldFwd.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward declaration of classes
00048 class objectRegistry;
00049 class dictionary;
00050 class mapPolyMesh;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                        Class systemCall Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class systemCall
00057 {
00058 protected:
00059 
00060     // Private data
00061 
00062         //- Name of this set of system calls
00063         word name_;
00064 
00065         //- List of calls to execute - every step
00066         stringList executeCalls_;
00067 
00068         //- List of calls to execute when exiting the time-loop
00069         stringList endCalls_;
00070 
00071         //- List of calls to execute - write steps
00072         stringList writeCalls_;
00073 
00074 
00075     // Private Member Functions
00076 
00077         //- Disallow default bitwise copy construct
00078         systemCall(const systemCall&);
00079 
00080         //- Disallow default bitwise assignment
00081         void operator=(const systemCall&);
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     TypeName("systemCall");
00088 
00089 
00090     // Constructors
00091 
00092         //- Construct for given objectRegistry and dictionary.
00093         //  Allow the possibility to load fields from files
00094         systemCall
00095         (
00096             const word& name,
00097             const objectRegistry& unused,
00098             const dictionary&,
00099             const bool loadFromFilesUnused = false
00100         );
00101 
00102 
00103     // Destructor
00104 
00105         virtual ~systemCall();
00106 
00107 
00108     // Member Functions
00109 
00110         //- Return name of the system call set
00111         virtual const word& name() const
00112         {
00113             return name_;
00114         }
00115 
00116         //- Read the system calls
00117         virtual void read(const dictionary&);
00118 
00119         //- Execute the "executeCalls" at each time-step
00120         virtual void execute();
00121 
00122         //- Execute the "endCalls" at the final time-loop
00123         virtual void end();
00124 
00125         //- Write, execute the "writeCalls"
00126         virtual void write();
00127 
00128         //- Update for changes of mesh
00129         virtual void updateMesh(const mapPolyMesh&)
00130         {}
00131 
00132         //- Update for changes of mesh
00133         virtual void movePoints(const pointField&)
00134         {}
00135 };
00136 
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00143 
00144 #endif
00145 
00146 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines