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
OpenFOAM
fields
DimensionedFields
DimensionedField
SubDimensionedField.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) 1991-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::SubDimensionedField
26
27
Description
28
SubDimensionedField is a DimensionedField obtained as a section of another
29
DimensionedField.
30
31
Thus it is itself unallocated so that no storage is allocated or
32
deallocated during its use. To achieve this behaviour,
33
SubDimensionedField is derived from SubField rather than Field.
34
35
SourceFiles
36
SubDimensionedFieldI.H
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef SubDimensionedField_H
41
#define SubDimensionedField_H
42
43
#include <
OpenFOAM/Field.H
>
44
#include <
OpenFOAM/SubField.H
>
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
51
/*---------------------------------------------------------------------------*\
52
Class SubDimensionedField Declaration
53
\*---------------------------------------------------------------------------*/
54
55
template
<
class
Type,
class
GeoMesh>
56
class
SubDimensionedField
57
:
58
public
regIOobject
,
59
public
SubField
<Type>
60
{
61
62
public
:
63
64
// Public typedefs
65
66
typedef
typename
GeoMesh::Mesh
Mesh
;
67
typedef
typename
Field<Type>::cmptType
cmptType
;
68
69
70
// Constructors
71
72
//- Construct from a SubField
73
inline
SubDimensionedField
74
(
75
const
SubField<Type>
& slist
76
);
77
78
//- Construct from a UList and size
79
inline
SubDimensionedField
80
(
81
const
UList<Type>
& list,
82
const
label subSize
83
);
84
85
//- Construct from a UList start and end indices
86
inline
SubDimensionedField
87
(
88
const
UList<Type>
& list,
89
const
label subSize,
90
const
label startIndex
91
);
92
93
//- Construct as copy
94
inline
SubDimensionedField
95
(
96
const
SubDimensionedField<cmptType, GeoMesh>
& sfield
97
);
98
99
100
// Member functions
101
102
//- Return a null SubDimensionedField
103
static
inline
const
SubDimensionedField<Type, GeoMesh>
&
null
();
104
105
//- Return a component field of the field
106
inline
tmp<DimensionedField<cmptType, GeoMesh>
>
component
107
(
108
const
direction
109
)
const
;
110
111
//- Return the field transpose (only defined for second rank tensors)
112
tmp<DimensionedField<Type, GeoMesh>
>
T
()
const
;
113
114
115
// Member operators
116
117
//- Assignment
118
inline
void
operator=
(
const
SubDimensionedField<Type, GeoMesh>
&);
119
120
//- Allow cast to a const DimensionedField<Type, GeoMesh>&
121
inline
operator
const
DimensionedField<Type, GeoMesh>
&()
const
;
122
};
123
124
125
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127
}
// End namespace Foam
128
129
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131
#include <
OpenFOAM/SubDimensionedFieldI.H
>
132
133
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135
#endif
136
137
// ************************ vim: set sw=4 sts=4 et: ************************ //