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

outputFilterOutputControl.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) 1991-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::outputFilterOutputControl
00026 
00027 Description
00028 
00029 SourceFiles
00030     outputFilterOutputControl.C
00031 
00032 \*---------------------------------------------------------------------------*/
00033 
00034 #ifndef outputFilterOutputControl_H
00035 #define outputFilterOutputControl_H
00036 
00037 #include <OpenFOAM/dictionary.H>
00038 #include <OpenFOAM/Time.H>
00039 #include <OpenFOAM/NamedEnum.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                   Class outputFilterOutputControl Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class outputFilterOutputControl
00051 {
00052 public:
00053 
00054     enum outputControls
00055     {
00056         ocTimeStep,
00057         ocOutputTime
00058     };
00059 
00060 
00061 private:
00062 
00063     // Private data
00064 
00065         //- Time object
00066         const Time& time_;
00067 
00068         //- String representation of outputControls enums
00069         static const NamedEnum<outputControls, 2> outputControlNames_;
00070 
00071         //- Type of output
00072         outputControls outputControl_;
00073 
00074         //- The execution interval (in time steps) when using TIMESTEP mode
00075         //  a value <= 1 means execute at every time step
00076         label outputInterval_;
00077 
00078 
00079     // Private Member Functions
00080 
00081         //- Disallow default bitwise copy construct and assignment
00082         outputFilterOutputControl(const outputFilterOutputControl&);
00083         void operator=(const outputFilterOutputControl&);
00084 
00085 
00086 public:
00087 
00088     // Constructors
00089 
00090         //- Construct from Time object and dictionary
00091         outputFilterOutputControl(const Time&, const dictionary&);
00092 
00093 
00094     // Destructor
00095         ~outputFilterOutputControl();
00096 
00097 
00098     // Member Functions
00099 
00100         //- Read from dictionary
00101         void read(const dictionary&);
00102 
00103         //- Return const access to the Time object
00104         const Time& time() const
00105         {
00106             return time_;
00107         }
00108 
00109         //- Flag to indicate whether to output
00110         bool output() const;
00111 };
00112 
00113 
00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00115 
00116 } // End namespace Foam
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 #endif
00121 
00122 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines