FieldI.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) 2018-2019 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 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class Type>
31 inline constexpr Foam::Field<Type>::Field() noexcept
32 :
33  List<Type>()
34 {}
35 
36 
37 template<class Type>
39 :
40  List<Type>(len)
41 {}
42 
43 
44 template<class Type>
45 inline Foam::Field<Type>::Field(const label len, const Type& val)
46 :
47  List<Type>(len, val)
48 {}
49 
50 
51 template<class Type>
52 inline Foam::Field<Type>::Field(const label len, const zero)
53 :
54  List<Type>(len, Zero)
55 {}
56 
57 
58 template<class Type>
60 :
61  List<Type>(fld)
62 {}
63 
64 
65 template<class Type>
67 :
68  List<Type>(list)
69 {}
70 
71 
72 template<class Type>
73 template<class Addr>
75 :
76  List<Type>(list)
77 {}
78 
79 
80 template<class Type>
82 :
83  List<Type>()
84 {
86 }
87 
88 
89 template<class Type>
91 :
92  List<Type>()
93 {
95 }
96 
97 
98 template<class Type>
99 template<int SizeMin>
101 :
102  List<Type>()
103 {
104  List<Type>::transfer(list);
105 }
106 
107 
108 template<class Type>
110 :
111  List<Type>(fld, reuse)
112 {}
113 
114 
115 template<class Type>
117 :
118  List<Type>(tfld.constCast(), tfld.movable())
119 {
120  tfld.clear();
121 }
122 
123 
124 template<class Type>
126 :
127  List<Type>(is)
128 {}
129 
130 
131 template<class Type>
133 {
134  return tmp<Field<Type>>::New(*this);
135 }
136 
137 
138 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
139 
140 template<class Type>
142 {
144 }
145 
146 
147 template<class Type>
149 {
151 }
152 
153 
154 template<class Type>
156 {
158 }
159 
160 
161 template<class Type>
163 {
165 }
166 
167 
168 template<class Type>
169 template<int SizeMin>
171 {
173 }
174 
175 
176 template<class Type>
177 inline void Foam::Field<Type>::operator=(const Type& val)
178 {
180 }
181 
182 
183 template<class Type>
185 {
187 }
188 
189 
190 // ************************************************************************* //
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:57
Foam::Field::clone
tmp< Field< Type > > clone() const
Clone.
Definition: FieldI.H:132
Foam::Field::Field
constexpr Field() noexcept
Construct null.
Definition: FieldI.H:31
Foam::SubField
SubField is a Field obtained as a section of another Field.
Definition: Field.H:64
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
fld
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputLagrangian.H:23
Foam::Field::operator=
void operator=(const Field< Type > &)
Copy assignment.
Definition: Field.C:658
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:102
Foam::UList< Type >
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:115
Foam::IndirectListBase
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
Definition: IndirectListBase.H:57
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition: zero.H:61