Go to the documentation of this file.
31 template<
class T,
int SizeMin>
32 template<
class ListType>
38 const label newSize = list.size();
40 if (capacity_ >= newSize)
43 Field<T>::size(list.size());
49 Field<T>::size(capacity_);
52 capacity_ = Field<T>::size();
59 template<
class T,
int SizeMin>
67 template<
class T,
int SizeMin>
71 capacity_(
Field<
T>::size())
77 template<
class T,
int SizeMin>
89 template<
class T,
int SizeMin>
101 template<
class T,
int SizeMin>
112 template<
class T,
int SizeMin>
113 template<
int AnySizeMin>
124 template<
class T,
int SizeMin>
135 template<
class T,
int SizeMin>
147 template<
class T,
int SizeMin>
158 template<
class T,
int SizeMin>
171 template<
class T,
int SizeMin>
172 template<
int AnySizeMin>
185 template<
class T,
int SizeMin>
197 template<
class T,
int SizeMin>
205 Field<T>(mapF, mapAddressing, weights),
211 template<
class T,
int SizeMin>
225 template<
class T,
int SizeMin>
232 template<
class T,
int SizeMin>
241 if (nextFree > capacity_)
244 nextFree = capacity_;
254 template<
class T,
int SizeMin>
261 if (nElem > capacity_)
282 template<
class T,
int SizeMin>
289 if (nElem > capacity_)
310 template<
class T,
int SizeMin>
321 while (nextFree < nElem)
323 this->operator[](nextFree++) = val;
328 template<
class T,
int SizeMin>
338 template<
class T,
int SizeMin>
349 template<
class T,
int SizeMin>
356 template<
class T,
int SizeMin>
364 template<
class T,
int SizeMin>
376 template<
class T,
int SizeMin>
381 if (capacity_ > nextFree)
387 capacity_ = nextFree;
395 template<
class T,
int SizeMin>
396 template<
int AnySizeMin>
403 if (this->cdata() == lst.cdata())
427 template<
class T,
int SizeMin>
431 capacity_ = list.size();
436 template<
class T,
int SizeMin>
437 template<
int AnySizeMin>
444 if (this->cdata() == list.cdata())
458 template<
class T,
int SizeMin>
459 template<
int AnySizeMin>
466 if (this->cdata() == list.cdata())
480 template<
class T,
int SizeMin>
490 this->operator[](idx) = val;
495 template<
class T,
int SizeMin>
511 for (
const T& val : list)
513 this->operator[](idx++) = val;
519 template<
class T,
int SizeMin>
541 template<
class T,
int SizeMin>
552 return this->operator[](i);
556 template<
class T,
int SizeMin>
566 template<
class T,
int SizeMin>
572 assignDynField(list);
576 template<
class T,
int SizeMin>
587 assignDynField(list);
591 template<
class T,
int SizeMin>
601 template<
class T,
int SizeMin>
611 template<
class T,
int SizeMin>
612 template<
int AnySizeMin>
void clear()
Clear the addressed list, i.e. set the size to zero.
points setSize(newPointi)
void transfer(List< T > &list)
Transfer the parameter contents into this.
void setSize(const label nElem)
Alter the addressed list size.
void clearStorage()
Clear the list and delete storage.
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
label capacity() const noexcept
Size of the underlying storage.
Abstract base class to hold the Field mapping addressing and weights.
label capacity() const noexcept
Size of the underlying storage.
DynamicField< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
Generic templated field type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr DynamicField() noexcept
Construct null.
void swap(DynamicField< T, AnySizeMin > &list)
Swap content with any sized DynamicField.
errorManip< error > abort(error &err)
void operator=(const Field< T > &)
Copy assignment.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void reserve(const label nElem)
Reserve allocation space for at least this size.
T remove()
Remove and return the top element.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label expandStorage()
Expand the addressable size to fit the allocated capacity.
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 size(const label n) noexcept
Override size to be inconsistent with allocated storage.
void setCapacity(const label nElem)
Alter the size of the underlying storage.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
DynamicField< T, SizeMin > & append(const T &val)
Append an element at the end of the list.
void resize(const label nElem)
Alter the addressed list size.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...