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

IOOutputFilter.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::IOOutputFilter
00026 
00027 Description
00028     IOdictionary wrapper around OutputFilter to allow them to read from
00029     their associated dictionaries.
00030 
00031 SourceFiles
00032     IOOutputFilter.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef IOOutputFilter_H
00037 #define IOOutputFilter_H
00038 
00039 #include <OpenFOAM/IOdictionary.H>
00040 #include <OpenFOAM/pointFieldFwd.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward declaration of classes
00048 class mapPolyMesh;
00049 
00050 /*---------------------------------------------------------------------------*\
00051                        Class IOOutputFilter Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 template<class OutputFilter>
00055 class IOOutputFilter
00056 :
00057     public IOdictionary,
00058     public OutputFilter
00059 {
00060     // Private Member Functions
00061 
00062         // Disallow default bitwise copy construct and assignment
00063         IOOutputFilter(const IOOutputFilter&);
00064         void operator=(const IOOutputFilter&);
00065 
00066 
00067 public:
00068 
00069     // Constructors
00070 
00071         //- Construct for given objectRegistry and dictionary
00072         //  Allow dictionary to be optional
00073         //  Allow the possibility to load fields from files
00074         IOOutputFilter
00075         (
00076             const word& outputFilterName,
00077             const objectRegistry&,
00078             const fileName& dictName = OutputFilter::typeName() + "Dict",
00079             const IOobject::readOption rOpt = IOobject::MUST_READ,
00080             const bool loadFromFile = false
00081         );
00082 
00083 
00084     //- Destructor
00085     virtual ~IOOutputFilter();
00086 
00087 
00088     // Member Functions
00089 
00090         //- Return name
00091         virtual const word& name() const
00092         {
00093             return IOdictionary::name();
00094         }
00095 
00096         //- Read the probes
00097         virtual bool read();
00098 
00099         //- Sample and write
00100         virtual void write();
00101 
00102         //- Update for changes of mesh
00103         virtual void updateMesh(const mapPolyMesh& mpm)
00104         {
00105             read();
00106             OutputFilter::updateMesh(mpm);
00107         }
00108 
00109         //- Update for changes of mesh
00110         virtual void movePoints(const pointField& points)
00111         {
00112             read();
00113             OutputFilter::movePoints(points);
00114         }
00115 };
00116 
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 } // End namespace Foam
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 #ifdef NoRepository
00125 #   include "IOOutputFilter.C"
00126 #endif
00127 
00128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00129 
00130 #endif
00131 
00132 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines