Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
postProcessing
functionObjects
IO
partialWrite
partialWrite.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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.
20
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/>.
23
24
Class
25
Foam::partialWrite
26
27
Description
28
Allows some fields/registered objects to be written more often than others.
29
30
Works in the opposite way: deletes at intermediate times all
31
but selected fields.
32
33
SourceFiles
34
partialWrite.C
35
IOpartialWrite.H
36
37
\*---------------------------------------------------------------------------*/
38
39
#ifndef partialWrite_H
40
#define partialWrite_H
41
42
#include <
OpenFOAM/pointFieldFwd.H
>
43
#include <
OpenFOAM/HashSet.H
>
44
#include <
OpenFOAM/DynamicList.H
>
45
#include <
OpenFOAM/runTimeSelectionTables.H
>
46
47
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49
namespace
Foam
50
{
51
52
// Forward declaration of classes
53
class
objectRegistry;
54
class
dictionary;
55
class
mapPolyMesh;
56
57
/*---------------------------------------------------------------------------*\
58
Class partialWrite Declaration
59
\*---------------------------------------------------------------------------*/
60
61
class
partialWrite
62
{
63
protected
:
64
65
// Private data
66
67
//- Name of this set of partialWrite
68
word
name_
;
69
70
const
objectRegistry
&
obr_
;
71
72
73
// Read from dictionary
74
75
//- Names of objects to dump always
76
HashSet<word>
objectNames_
;
77
78
//- Write interval for restart dump
79
label
writeInterval_
;
80
81
82
//- Current dump instance. If reaches writeInterval do a full write.
83
label
writeInstance_
;
84
85
86
// Private Member Functions
87
88
//- Disallow default bitwise copy construct
89
partialWrite
(
const
partialWrite
&);
90
91
//- Disallow default bitwise assignment
92
void
operator=
(
const
partialWrite
&);
93
94
95
public
:
96
97
//- Runtime type information
98
TypeName
(
"partialWrite"
);
99
100
101
// Constructors
102
103
//- Construct for given objectRegistry and dictionary.
104
// Allow the possibility to load fields from files
105
partialWrite
106
(
107
const
word
&
name
,
108
const
objectRegistry
&,
109
const
dictionary
&,
110
const
bool
loadFromFiles =
false
111
);
112
113
114
//- Destructor
115
virtual
~partialWrite
();
116
117
118
// Member Functions
119
120
//- Return name of the partialWrite
121
virtual
const
word
&
name
()
const
122
{
123
return
name_
;
124
}
125
126
//- Read the partialWrite data
127
virtual
void
read
(
const
dictionary
&);
128
129
//- Execute, currently does nothing
130
virtual
void
execute
();
131
132
//- Execute at the final time-loop, currently does nothing
133
virtual
void
end
();
134
135
//- Write the partialWrite
136
virtual
void
write
();
137
138
//- Update for changes of mesh
139
virtual
void
updateMesh
(
const
mapPolyMesh
&)
140
{}
141
142
//- Update for changes of mesh
143
virtual
void
movePoints
(
const
pointField
&)
144
{}
145
};
146
147
148
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150
}
// End namespace Foam
151
152
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154
#endif
155
156
// ************************ vim: set sw=4 sts=4 et: ************************ //