37 this->v_ =
new T[this->size_];
45 if (this->size_ != len)
58 const label len = this->size_;
60 for (label i=0; i<len; ++i)
62 this->operator[](i) = list[i];
68template<
class InputIterator>
71 InputIterator begIter,
72 InputIterator endIter,
76 UList<
T>(nullptr, len)
82 InputIterator iter = begIter;
83 for (label i = 0; i < len; ++i)
85 this->operator[](i) = *iter;
111 return NullObjectRef<List<T>>();
133 this->
resize(newLen,
false);
155 label
n = this->size();
177 const label idx = this->size();
180 this->operator[](idx) = val;
187 const label idx = this->size();
190 this->operator[](idx) = std::move(val);
203 label idx = this->size();
204 const label
n = list.
size();
208 for (label i=0; i<
n; ++i)
210 this->operator[](idx++) = list[i];
219 label idx = this->size();
220 const label
n = list.
size();
224 for (label i=0; i<
n; ++i)
226 this->operator[](idx++) = list[i];
234 if (this->
found(val))
virtual bool resize()
Resize the ODE solver.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
label size() const noexcept
The number of elements in the list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T & newElmt(const label i)
autoPtr< List< T > > clone() const
Clone.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void operator=(const UList< T > &a)
Assignment to UList operator. Takes linear time.
constexpr List() noexcept
Default construct.
label appendUniq(const T &val)
Append an element if not already in the list.
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
static const List< T > & null()
Return a null List.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
bool append() const noexcept
True if output format uses an append mode.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
patchWriters resize(patchIds.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
errorManip< error > abort(error &err)