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>
424 template<
class T,
int SizeMin>
429 capacity_ = lst.size();
434 template<
class T,
int SizeMin>
435 template<
int AnySizeMin>
456 template<
class T,
int SizeMin>
464 capacity_ = lst.size();
469 template<
class T,
int SizeMin>
479 this->operator[](idx) = val;
484 template<
class T,
int SizeMin>
494 this->operator[](idx) = std::move(val);
499 template<
class T,
int SizeMin>
516 for (
const T& val : lst)
518 this->operator[](idx++) = val;
524 template<
class T,
int SizeMin>
535 for (
const T& val : lst)
537 this->operator[](idx++) = val;
543 template<
class T,
int SizeMin>
547 std::initializer_list<T> lst
554 for (
const T& val : lst)
556 this->operator[](idx++) = val;
562 template<
class T,
int SizeMin>
571 const label
n = lst.
size();
575 for (label i=0; i<
n; ++i)
577 this->operator[](idx++) = lst[i];
583 template<
class T,
int SizeMin>
610 template<
class T,
int SizeMin>
623 template<
class T,
int SizeMin>
624 template<
int AnySizeMin>
637 template<
class T,
int SizeMin>
650 template<
class T,
int SizeMin>
670 template<
class T,
int SizeMin>
689 return this->remove();
693 template<
class T,
int SizeMin>
699 return this->removeElements(this->validateRange(
range));
703 template<
class T,
int SizeMin>
706 std::initializer_list<label> start_size
709 return this->removeElements(this->validateRange(start_size));
713 template<
class T,
int SizeMin>
719 return this->subsetElements(this->validateRange(
range));
723 template<
class T,
int SizeMin>
726 std::initializer_list<label> start_size
729 return this->subsetElements(this->validateRange(start_size));
735 template<
class T,
int SizeMin>
746 return this->operator[](i);
750 template<
class T,
int SizeMin>
760 template<
class T,
int SizeMin>
770 template<
class T,
int SizeMin>
780 template<
class T,
int SizeMin>
787 const label
n = lst.
size();
791 for (label i=0; i<
n; ++i)
793 this->operator[](i) = lst[i];
798 template<
class T,
int SizeMin>
813 template<
class T,
int SizeMin>
814 template<
int SizeMin2>
829 template<
class T,
int SizeMin>
832 std::initializer_list<T> lst
839 template<
class T,
int SizeMin>
850 template<
class T,
int SizeMin>
861 template<
class T,
int SizeMin>
877 template<
class T,
int SizeMin>
878 template<
int SizeMin2>
894 template<
class T,
int SizeMin>
907 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.
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)
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
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 ...