Go to the documentation of this file.
33 template<
class T,
int SizeMin>
34 template<
class ListType>
40 const label newSize = lst.size();
42 if (capacity_ >= newSize)
61 template<
class T,
int SizeMin>
68 template<
class T,
int SizeMin>
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>
144 this->operator=(lst);
148 template<
class T,
int SizeMin>
149 template<
class InputIterator>
152 InputIterator begIter,
153 InputIterator endIter
161 template<
class T,
int SizeMin>
164 std::initializer_list<T> lst
172 template<
class T,
int SizeMin>
184 template<
class T,
int SizeMin>
196 template<
class T,
int SizeMin>
197 template<
int AnySizeMin>
209 template<
class T,
int SizeMin>
223 template<
class T,
int SizeMin>
230 template<
class T,
int SizeMin>
239 if (nextFree > capacity_)
242 nextFree = capacity_;
252 template<
class T,
int SizeMin>
259 if (nElem > capacity_)
280 template<
class T,
int SizeMin>
287 if (nElem > capacity_)
308 template<
class T,
int SizeMin>
319 while (nextFree < nElem)
321 this->operator[](nextFree++) = val;
326 template<
class T,
int SizeMin>
336 template<
class T,
int SizeMin>
347 template<
class T,
int SizeMin>
354 template<
class T,
int SizeMin>
362 template<
class T,
int SizeMin>
374 template<
class T,
int SizeMin>
379 if (capacity_ > nextFree)
385 capacity_ = nextFree;
393 template<
class T,
int SizeMin>
394 template<
int AnySizeMin>
401 if (this->cdata() == lst.cdata())
425 template<
class T,
int SizeMin>
430 capacity_ = lst.size();
435 template<
class T,
int SizeMin>
436 template<
int AnySizeMin>
444 if (this->cdata() == lst.cdata())
458 template<
class T,
int SizeMin>
466 capacity_ = lst.size();
471 template<
class T,
int SizeMin>
481 this->operator[](idx) = val;
486 template<
class T,
int SizeMin>
496 this->operator[](idx) = std::move(val);
501 template<
class T,
int SizeMin>
518 for (
const T& val : lst)
520 this->operator[](idx++) = val;
526 template<
class T,
int SizeMin>
537 for (
const T& val : lst)
539 this->operator[](idx++) = val;
545 template<
class T,
int SizeMin>
549 std::initializer_list<T> lst
556 for (
const T& val : lst)
558 this->operator[](idx++) = val;
564 template<
class T,
int SizeMin>
573 const label
n = lst.
size();
577 for (label i=0; i<
n; ++i)
579 this->operator[](idx++) = lst[i];
585 template<
class T,
int SizeMin>
612 template<
class T,
int SizeMin>
625 template<
class T,
int SizeMin>
626 template<
int AnySizeMin>
639 template<
class T,
int SizeMin>
652 template<
class T,
int SizeMin>
672 template<
class T,
int SizeMin>
691 return this->remove();
695 template<
class T,
int SizeMin>
701 return this->removeElements(this->validateRange(
range));
705 template<
class T,
int SizeMin>
708 std::initializer_list<label> start_size
711 return this->removeElements(this->validateRange(start_size));
715 template<
class T,
int SizeMin>
721 return this->subsetElements(this->validateRange(
range));
725 template<
class T,
int SizeMin>
728 std::initializer_list<label> start_size
731 return this->subsetElements(this->validateRange(start_size));
737 template<
class T,
int SizeMin>
748 return this->operator[](i);
752 template<
class T,
int SizeMin>
762 template<
class T,
int SizeMin>
772 template<
class T,
int SizeMin>
782 template<
class T,
int SizeMin>
789 const label
n = lst.
size();
793 for (label i=0; i<
n; ++i)
795 this->operator[](i) = lst[i];
800 template<
class T,
int SizeMin>
815 template<
class T,
int SizeMin>
816 template<
int AnySizeMin>
823 if (this->cdata() == list.cdata())
832 template<
class T,
int SizeMin>
835 std::initializer_list<T> lst
842 template<
class T,
int SizeMin>
853 template<
class T,
int SizeMin>
864 template<
class T,
int SizeMin>
880 template<
class T,
int SizeMin>
881 template<
int AnySizeMin>
888 if (this->cdata() == list.cdata())
898 template<
class T,
int SizeMin>
911 template<
class T,
int SizeMin1,
int SizeMin2>
points setSize(newPointi)
label subset(const labelRange &range)
Retain a (start,size) subset from the list.
constexpr DynamicList() noexcept
Default construct, an empty list without allocation.
void assignDynList(const ListType &lst)
Copy assignment from another list.
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 expandStorage()
Expand the addressable size to fit the allocated capacity.
static constexpr label size() noexcept
Return the number of elements in the FixedList.
void swap(DynamicList< T, AnySizeMin > &lst)
Swap content with any sized DynamicList.
label capacity() const noexcept
Size of the underlying storage.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void Swap(DynamicList< T, SizeMin1 > &a, DynamicList< T, SizeMin2 > &b)
void reserve(const label nElem)
Reserve allocation space for at least this size.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void clear()
Clear the addressed list, i.e. set the size to zero.
A range or interval of labels defined by a start and a size.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
A list that is sorted upon construction or when explicitly requested with the sort() method.
errorManip< error > abort(error &err)
void setSize(const label nElem)
Alter addressable list size.
void setCapacity(const label nElem)
Alter the size of the underlying storage.
void resize(const label nElem)
Alter addressable list size.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void transfer(List< T > &lst)
Transfer contents of the argument List into this.
void clearStorage()
Clear the list and delete storage.
T remove()
Remove and return the last element. Fatal on an empty list.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
friend Ostream & operator(Ostream &os, const DynamicList< T, SizeMin > &lst)
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
label size() const
The number of elements in the list.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...