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
field
readFields
readFields.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) 2010-2010 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::readFields
26
27
Description
28
Reads fields from the time folders and adds them to the mesh database
29
for further post-processing.
30
31
SourceFiles
32
readFields.C
33
IOreadFields.H
34
35
\*---------------------------------------------------------------------------*/
36
37
#ifndef readFields_H
38
#define readFields_H
39
40
#include <
OpenFOAM/OFstream.H
>
41
#include <
OpenFOAM/pointFieldFwd.H
>
42
#include <
finiteVolume/volFields.H
>
43
#include <
finiteVolume/surfaceFields.H
>
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
// Forward declaration of classes
51
class
objectRegistry;
52
class
dictionary;
53
class
mapPolyMesh;
54
55
/*---------------------------------------------------------------------------*\
56
Class readFields Declaration
57
\*---------------------------------------------------------------------------*/
58
59
class
readFields
60
{
61
protected
:
62
63
// Protected data
64
65
//- Name of this set of readFields object
66
word
name_
;
67
68
const
objectRegistry
&
obr_
;
69
70
//- on/off switch
71
bool
active_
;
72
73
//- Fields to load
74
wordList
fieldSet_
;
75
76
//- Loaded fields
77
PtrList<volScalarField>
vsf_
;
78
PtrList<volVectorField>
vvf_
;
79
PtrList<volSphericalTensorField>
vSpheretf_
;
80
PtrList<volSymmTensorField>
vSymmtf_
;
81
PtrList<volTensorField>
vtf_
;
82
83
PtrList<surfaceScalarField>
ssf_
;
84
PtrList<surfaceVectorField>
svf_
;
85
PtrList<surfaceSphericalTensorField>
sSpheretf_
;
86
PtrList<surfaceSymmTensorField>
sSymmtf_
;
87
PtrList<surfaceTensorField>
stf_
;
88
89
90
// Protected Member Functions
91
92
//- Disallow default bitwise copy construct
93
readFields
(
const
readFields
&);
94
95
//- Disallow default bitwise assignment
96
void
operator=
(
const
readFields
&);
97
98
template
<
class
Type>
99
void
loadField
100
(
101
const
word
&,
102
PtrList
<
GeometricField<Type, fvPatchField, volMesh>
>&,
103
PtrList
<
GeometricField<Type, fvsPatchField, surfaceMesh>
>&
104
)
const
;
105
106
107
public
:
108
109
//- Runtime type information
110
TypeName
(
"readFields"
);
111
112
113
// Constructors
114
115
//- Construct for given objectRegistry and dictionary.
116
// Allow the possibility to load fields from files
117
readFields
118
(
119
const
word
&
name
,
120
const
objectRegistry
&,
121
const
dictionary
&,
122
const
bool
loadFromFiles =
false
123
);
124
125
126
//- Destructor
127
virtual
~readFields
();
128
129
130
// Member Functions
131
132
//- Return name of the readFields object
133
virtual
const
word
&
name
()
const
134
{
135
return
name_
;
136
}
137
138
//- Read the field min/max data
139
virtual
void
read
(
const
dictionary
&);
140
141
//- Execute, currently does nothing
142
virtual
void
execute
();
143
144
//- Execute at the final time-loop, currently does nothing
145
virtual
void
end
();
146
147
//- Write
148
virtual
void
write
();
149
150
//- Update for changes of mesh
151
virtual
void
updateMesh
(
const
mapPolyMesh
&)
152
{}
153
154
//- Update for changes of mesh
155
virtual
void
movePoints
(
const
pointField
&)
156
{}
157
};
158
159
160
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162
}
// End namespace Foam
163
164
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166
#ifdef NoRepository
167
# include "
readFieldsTemplates.C
"
168
#endif
169
170
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172
#endif
173
174
// ************************ vim: set sw=4 sts=4 et: ************************ //