46 <<
"bad size " << this->size_
62 <<
"bad size " << this->size_
86 <<
"bad size " << this->size_
105 UList<
T>(nullptr, a.size_)
114 memcpy(this->v_, a.v_, this->
byteSize());
133 UList<
T>(nullptr, a.size())
158 UList<
T>(nullptr, a.size_)
166 else if (this->size_)
191 UList<
T>(nullptr, map.size())
208 template<
class InputIterator>
216 template<
unsigned Size>
228 UList<
T>(nullptr, lst.size())
237 List<
T>(lst.begin(), lst.end(), lst.size())
244 UList<
T>(nullptr, lst.size())
253 UList<
T>(nullptr, lst.size())
262 List<
T>(lst.begin(), lst.end())
286 <<
"bad size " << newSize
290 if (newSize != this->size_)
298 label i =
min(this->size_, newSize);
303 memcpy(nv, this->v_, i*
sizeof(
T));
308 T* vv = &this->v_[i];
310 while (i--) *--av = *--vv;
315 this->size_ = newSize;
332 if (newSize > oldSize)
334 label i = newSize - oldSize;
335 T* vv = &this->v_[newSize];
336 while (i--) *--vv = a;
345 this->size_ = a.size_;
354 template<
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
359 transfer(
static_cast<List<T>&
>(a));
369 transfer(
static_cast<List<T>&
>(a));
385 memcpy(this->v_, a.v_, this->byteSize());
406 <<
"attempted assignment to self"
410 operator=(
static_cast<const UList<T>&
>(a));
420 <<
"attempted assignment to self"
443 this->operator[](i++) = iter();
470 typename std::initializer_list<T>::iterator iter = lst.begin();
473 this->operator[](i) = *iter++;
List<T> is a 1D vector of objects of type T, where the size of the vector is known and used for subsc...
#define List_ACCESS(type, f, fp)
#define List_ELEM(f, fp, i)
#define List_FOR_ALL(f, i)
#define List_CONST_ACCESS(type, f, fp)
Non-intrusive singly-linked list.
#define forAll(list, i)
Loop across all elements in list.
Indexes into negList (negative index) or posList (zero or positive index).
label size() const
Return the number of elements in the list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clearStorage()
Clear the list and delete storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
A 1D vector of objects of type <T> with a fixed size <Size>.
An STL-conforming const_iterator.
Template class for non-intrusive linked lists.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void operator=(const UList< T > &)
Assignment to UList operator. Takes linear time.
void setSize(const label)
Reset size of List.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list that is sorted upon construction or when explicitly requested with the sort() method.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
A List with indirect addressing.
label size() const
Return the number of elements in the list.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
T & operator[](const label)
Return element of UList.
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Template function to specify if the data of a type are contiguous.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
labelList first(const UList< labelPair > &p)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
points setSize(newPointi)