OpenFOAM: API Guide
v2112
The open source CFD toolbox
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 | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2016-2018 OpenCFD Ltd.
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
InClass
27
Foam::readFields
28
29
Description
30
Helper routines for reading a field or fields, optionally with
31
a mesh subset (using fvMeshSubsetProxy).
32
33
SourceFiles
34
readFields.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef readFields_H
39
#define readFields_H
40
41
#include "
fvMeshSubsetProxy.H
"
42
#include "
IOobjectList.H
"
43
#include "
PtrList.H
"
44
45
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47
namespace
Foam
48
{
49
50
//- Get the field or return nullptr
51
template
<
class
GeoField>
52
tmp<GeoField>
getField
53
(
54
const
IOobject* io,
55
const
typename
GeoField::Mesh&
mesh
,
56
const
bool
syncPar
57
);
58
59
60
//- Get the field and subset it, or return nullptr
61
template
<
class
GeoField>
62
tmp<GeoField>
getField
63
(
64
const
IOobject* io,
65
const
fvMeshSubsetProxy& proxy,
66
const
bool
syncPar
67
);
68
69
70
//- Get the named field from the objects, or return nullptr.
71
template
<
class
GeoField>
72
tmp<GeoField>
getField
73
(
74
const
typename
GeoField::Mesh&
mesh
,
75
const
IOobjectList& objects,
76
const
word& fieldName,
77
const
bool
syncPar
78
);
79
80
81
//- Get the named field from the objects and subset it, or return nullptr
82
template
<
class
GeoField>
83
tmp<GeoField>
getField
84
(
85
const
fvMeshSubsetProxy& proxy,
86
const
IOobjectList& objects,
87
const
word& fieldName,
88
const
bool
syncPar
89
);
90
91
92
//- Read the fields, and return as a pointer list
93
template
<
class
GeoField>
94
PtrList<const GeoField>
readFields
95
(
96
const
typename
GeoField::Mesh&
mesh
,
97
const
IOobjectList& objects,
98
const
wordRes& selection
99
);
100
101
102
//- Read the fields, optionally subset, and return as a pointer list
103
template
<
class
GeoField>
104
PtrList<const GeoField>
readFields
105
(
106
const
fvMeshSubsetProxy& proxy,
107
const
IOobjectList& objects,
108
const
wordRes& selection
109
);
110
111
112
}
// End namespace Foam
113
114
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116
#ifdef NoRepository
117
#include "readFields.C"
118
#endif
119
120
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122
#endif
123
124
// ************************************************************************* //
IOobjectList.H
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
fvMeshSubsetProxy.H
Foam::readFields
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Definition:
ReadFieldsTemplates.C:312
Foam::getField
tmp< GeoField > getField(const IOobject *io, const typename GeoField::Mesh &mesh)
Get the field or return nullptr.
Definition:
readFields.H:53
PtrList.H
applications
utilities
postProcessing
dataConversion
foamToVTK
readFields.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.