OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::systemCall
00027 
00028 Description
00029     Executes system calls, entered in the form of a string list
00030 
00031 SourceFiles
00032     systemCall.C
00033     IOsystemCall.H
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef systemCall_H
00038 #define systemCall_H
00039 
00040 #include "stringList.H"
00041 #include "pointFieldFwd.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 // Forward declaration of classes
00049 class objectRegistry;
00050 class dictionary;
00051 class mapPolyMesh;
00052 
00053 /*---------------------------------------------------------------------------*\
00054                        Class systemCall Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class systemCall
00058 {
00059 protected:
00060 
00061     // Private data
00062 
00063         //- Name of this set of system calls
00064         word name_;
00065 
00066         //- List of calls to execute - every step
00067         stringList executeCalls_;
00068 
00069         //- List of calls to execute when exiting the time-loop
00070         stringList endCalls_;
00071 
00072         //- List of calls to execute - write steps
00073         stringList writeCalls_;
00074 
00075 
00076     // Private Member Functions
00077 
00078         //- Disallow default bitwise copy construct
00079         systemCall(const systemCall&);
00080 
00081         //- Disallow default bitwise assignment
00082         void operator=(const systemCall&);
00083 
00084 
00085 public:
00086 
00087     //- Runtime type information
00088     TypeName("systemCall");
00089 
00090 
00091     // Constructors
00092 
00093         //- Construct for given objectRegistry and dictionary.
00094         //  Allow the possibility to load fields from files
00095         systemCall
00096         (
00097             const word& name,
00098             const objectRegistry& unused,
00099             const dictionary&,
00100             const bool loadFromFilesUnused = false
00101         );
00102 
00103 
00104     // Destructor
00105 
00106         virtual ~systemCall();
00107 
00108 
00109     // Member Functions
00110 
00111         //- Return name of the system call set
00112         virtual const word& name() const
00113         {
00114             return name_;
00115         }
00116 
00117         //- Read the system calls
00118         virtual void read(const dictionary&);
00119 
00120         //- Execute the "executeCalls" at each time-step
00121         virtual void execute();
00122 
00123         //- Execute the "endCalls" at the final time-loop
00124         virtual void end();
00125 
00126         //- Write, execute the "writeCalls"
00127         virtual void write();
00128 
00129         //- Update for changes of mesh
00130         virtual void updateMesh(const mapPolyMesh&)
00131         {}
00132 
00133         //- Update for changes of mesh
00134         virtual void movePoints(const pointField&)
00135         {}
00136 };
00137 
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 } // End namespace Foam
00142 
00143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00144 
00145 #endif
00146 
00147 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd