OpenFOAM
13
The OpenFOAM Foundation
toSubField.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration | Website: https://openfoam.org
5
\\ / A nd | Copyright (C) 2025 OpenFOAM Foundation
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
InNamespace
25
Foam
26
27
Description
28
Functions to cast/convert dimensioned field references and temporaries
29
based on a primitive field to equivalent types based on sub-fields
30
31
SourceFiles
32
toSubField.C
33
34
\*---------------------------------------------------------------------------*/
35
36
#ifndef toSubField_H
37
#define toSubField_H
38
39
#include "
DimensionedField.H
"
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
//- Return a temporary sub-field from a reference to a field
49
template
<
class
Type,
class
GeoMesh>
50
tmp<DimensionedField<Type, GeoMesh, SubField>
>
toSubField
51
(
52
const
DimensionedField<Type, GeoMesh, Field>
&
53
);
54
55
//- Return a temporary sub-field from a reference to a sub-field. Just returns
56
// the reference. No conversion necessary.
57
template
<
class
Type,
class
GeoMesh>
58
tmp<DimensionedField<Type, GeoMesh, SubField>
>
toSubField
59
(
60
const
DimensionedField<Type, GeoMesh, SubField>
&
61
);
62
63
//- Return a temporary sub-field from a temporary field
64
template
<
class
Type,
class
GeoMesh>
65
tmp<DimensionedField<Type, GeoMesh, SubField>
>
toSubField
66
(
67
const
tmp
<
DimensionedField<Type, GeoMesh, Field>
>&
68
);
69
70
//- Return a temporary sub-field from a temporary sub-field Just returns the
71
// tmp. No conversion necessary.
72
template
<
class
Type,
class
GeoMesh>
73
tmp<DimensionedField<Type, GeoMesh, SubField>
>
toSubField
74
(
75
const
tmp
<
DimensionedField<Type, GeoMesh, SubField>
>&
76
);
77
78
//- Return a temporary sub-field from a newly constructed temporary
79
// field by forwarding arguments to the sub-field's New function
80
template
<
class
Type,
class
GeoMesh
,
class
... Args>
81
tmp<DimensionedField<Type, GeoMesh, SubField>
>
toSubField
82
(
83
const
Args& ...
args
84
);
85
86
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88
}
// End namespace Foam
89
90
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92
#ifdef NoRepository
93
#include "
toSubFieldTemplates.C
"
94
#endif
95
96
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98
#endif
99
100
// ************************************************************************* //
DimensionedField.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition:
DimensionedField.H:81
Foam::GeoMesh
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition:
GeoMesh.H:47
Foam::tmp
A class for managing temporary objects.
Definition:
tmp.H:55
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
Foam::toSubField
tmp< DimensionedField< Type, GeoMesh, SubField > > toSubField(const DimensionedField< Type, GeoMesh, Field > &)
Return a temporary sub-field from a reference to a field.
args
Foam::argList args(argc, argv)
toSubFieldTemplates.C
src
Lagrangian
Lagrangian
fields
toSubField.H
Generated by
1.9.1