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)
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>
314 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
338 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
359 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
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=
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.
intWM_LABEL_SIZE_t 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.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
T & operator[](const label)
Return element of UList.
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.
friend Ostream & operator(Ostream &, const Field< T > &)
Pre-declare SubField and related Field type.
void clear()
Clear the list, i.e. set size to zero.
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 operator=(const Field< Type > &)
void setSize(const label)
Reset size of List.
void clearStorage()
Clear the list and delete storage.
void setSize(const label)
Alter the addressed list size.
tmp< Field< T > > T() const
Return the field transpose (only defined for second rank tensors)
label size() const
Return the number of elements in the UList.
T remove()
Remove and return the top element.
label size() const
Return the number of elements in the UList.
DynamicField< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.