1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 Allows some fields/registered objects to be written more often than others.
30 Works in the opposite way: deletes at intermediate times all
37 \*---------------------------------------------------------------------------*/
39 #ifndef partialWrite_H
40 #define partialWrite_H
42 #include "pointFieldFwd.H"
44 #include "DynamicList.H"
45 #include "runTimeSelectionTables.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 // Forward declaration of classes
57 /*---------------------------------------------------------------------------*\
58 Class partialWrite Declaration
59 \*---------------------------------------------------------------------------*/
67 //- Name of this set of partialWrite
70 const objectRegistry& obr_;
73 // Read from dictionary
75 //- Names of objects to dump always
76 HashSet<word> objectNames_;
78 //- Write interval for restart dump
82 //- Current dump instance. If reaches writeInterval do a full write.
86 // Private Member Functions
88 //- Disallow default bitwise copy construct
89 partialWrite(const partialWrite&);
91 //- Disallow default bitwise assignment
92 void operator=(const partialWrite&);
97 //- Runtime type information
98 TypeName("partialWrite");
103 //- Construct for given objectRegistry and dictionary.
104 // Allow the possibility to load fields from files
108 const objectRegistry&,
110 const bool loadFromFiles = false
115 virtual ~partialWrite();
120 //- Return name of the partialWrite
121 virtual const word& name() const
126 //- Read the partialWrite data
127 virtual void read(const dictionary&);
129 //- Execute, currently does nothing
130 virtual void execute();
132 //- Execute at the final time-loop, currently does nothing
135 //- Write the partialWrite
136 virtual void write();
138 //- Update for changes of mesh
139 virtual void updateMesh(const mapPolyMesh&)
142 //- Update for changes of mesh
143 virtual void movePoints(const pointField&)
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 // ************************************************************************* //