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_)
173 memcpy(this->v_, a.v_, this->
byteSize());
191 UList<
T>(nullptr, map.size())
201 this->operator[](i) = a[map[i]];
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++;
label size() const
Return the number of elements in the list.
labelList first(const UList< labelPair > &p)
#define List_CONST_ACCESS(type, f, fp)
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D vector of objects of type <T> with a fixed size <Size>.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< T > & shrink()
Clear the indices and return a reference to the underlying List.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list that is sorted upon construction or when explicitly requested with the sort() method...
Template class for non-intrusive linked lists.
An STL-conforming const_iterator.
Template function to specify if the data of a type are contiguous.
scalar distance(const vector &p1, const vector &p2)
points setSize(newPointi)
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.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
label size() const
Return the number of elements in the list.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
List<T> is a 1D vector of objects of type T, where the size of the vector is known and used for subsc...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
#define List_ELEM(f, fp, i)
#define List_ACCESS(type, f, fp)
#define List_FOR_ALL(f, i)
Indexes into negList (negative index) or posList (zero or positive index).
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...
std::streamsize byteSize() const
Return the binary size in number of characters of the UList.
A List with indirect addressing.
void clearStorage()
Clear the list and delete storage.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Non-intrusive singly-linked list.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.