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

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