28 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
32 capacity_(
Field<
T>::size())
36 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
50 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
61 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
72 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
84 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
92 Field<T>(mapF, mapAddressing, weights),
97 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
104 capacity_(lst.capacity_)
108 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
115 capacity_(lst.capacity_)
123 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
131 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
140 if (nextFree > capacity_)
143 nextFree = capacity_;
152 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
159 if (nElem > capacity_)
177 label(SizeInc + capacity_ * SizeMult / SizeDiv)
189 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
196 if (nElem > capacity_)
214 label(SizeInc + capacity_ * SizeMult / SizeDiv)
226 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
237 while (nextFree < nElem)
239 this->operator[](nextFree++) = t;
244 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
254 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
265 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
272 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
280 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
285 if (capacity_ > nextFree)
291 capacity_ = nextFree;
299 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
309 this->operator[](elemI) = t;
314 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
332 this->operator[](nextFree++) = lst[elemI];
338 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
359 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
370 return this->operator[](elemI);
374 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
375 inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
384 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
385 inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
396 if (capacity_ >= lst.
size())
413 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
414 inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
426 capacity_ = lst.capacity_;
431 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
432 inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
437 if (capacity_ >= lst.
size())
454 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
455 inline void Foam::DynamicField<T, SizeInc, SizeMult, SizeDiv>::operator=
friend Ostream & operator(Ostream &, const DynamicField< T, SizeInc, SizeMult, SizeDiv > &)
DynamicField< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
DynamicField()
Construct null.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void setCapacity(const label)
Alter the size of the underlying storage.
void resize(const label)
Alter the addressed list size.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label capacity() const
Size of the underlying storage.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the addressed list, i.e. set the size to zero.
points setSize(newPointi)
Pre-declare SubField and related Field type.
void reserve(const label)
Reserve allocation space for at least this size.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clearStorage()
Clear the list and delete storage.
void setSize(const label)
Alter the addressed list size.
label size() const
Return the number of elements in the UList.
T remove()
Remove and return the top element.
DynamicField< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.