initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / db / functionObjects / IOOutputFilter / IOOutputFilter.H
blob51ccc952ae9222a31dfc9edfae3842088a45a387
1 /*---------------------------------------------------------------------------* \
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::IOOutputFilter
28 Description
29     IOdictionary wrapper around OutputFilter to allow them to read from
30     their associated dictionaries.
32 SourceFiles
33     IOOutputFilter.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef IOOutputFilter_H
38 #define IOOutputFilter_H
40 #include "IOdictionary.H"
41 #include "pointFieldFwd.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declaration of classes
49 class mapPolyMesh;
51 /*---------------------------------------------------------------------------*\
52                        Class IOOutputFilter Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class OutputFilter>
56 class IOOutputFilter
58     public IOdictionary,
59     public OutputFilter
61     // Private Member Functions
63         // Disallow default bitwise copy construct and assignment
64         IOOutputFilter(const IOOutputFilter&);
65         void operator=(const IOOutputFilter&);
68 public:
70     // Constructors
72         //- Construct for given objectRegistry and dictionary
73         //  Allow dictionary to be optional
74         //  Allow the possibility to load fields from files
75         IOOutputFilter
76         (
77             const word& outputFilterName,
78             const objectRegistry&,
79             const fileName& dictName = OutputFilter::typeName() + "Dict",
80             const IOobject::readOption rOpt = IOobject::MUST_READ,
81             const bool loadFromFile = false
82         );
85     //- Destructor
86     virtual ~IOOutputFilter();
89     // Member Functions
91         //- Return name
92         virtual const word& name() const
93         {
94             return IOdictionary::name();
95         }
97         //- Read the probes
98         virtual bool read();
100         //- Sample and write
101         virtual void write();
103         //- Update for changes of mesh
104         virtual void updateMesh(const mapPolyMesh& mpm)
105         {
106             read();
107             OutputFilter::updateMesh(mpm);
108         }
110         //- Update for changes of mesh
111         virtual void movePoints(const pointField& points)
112         {
113             read();
114             OutputFilter::movePoints(points);
115         }
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace Foam
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 #ifdef NoRepository
126 #   include "IOOutputFilter.C"
127 #endif
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 #endif
133 // ************************************************************************* //