Go to the documentation of this file.
54 ptrs_[i] = (a[i]).clone().ptr();
60 template<
class CloneArg>
67 ptrs_[i] = (a[i]).clone(cloneArg).ptr();
88 ptrs_[i] = a.
ptrs_[i];
97 ptrs_[i] = (a[i]).clone().ptr();
118 ptrs_[i++] = (iter()).clone().ptr();
147 <<
"bad set size " << newSize
148 <<
" for type " <<
typeid(
T).
name()
152 label oldSize = size();
158 else if (newSize < oldSize)
161 for (i=newSize; i<oldSize; i++)
169 ptrs_.setSize(newSize);
173 ptrs_.setSize(newSize);
176 for (i=oldSize; i<newSize; i++)
203 ptrs_.transfer(a.
ptrs_);
210 if (oldToNew.
size() != size())
213 <<
"Size of map (" << oldToNew.
size()
214 <<
") not equal to list size (" << size()
215 <<
") for type " <<
typeid(
T).
name()
219 List<T*> newPtrs_(ptrs_.size(),
reinterpret_cast<T*
>(0));
223 label newI = oldToNew[i];
225 if (newI < 0 || newI >= size())
228 <<
"Illegal index " << newI <<
nl
229 <<
"Valid indices are 0.." << size()-1
230 <<
" for type " <<
typeid(
T).
name()
237 <<
"reorder map is not unique; element " << newI
238 <<
" already set for type " <<
typeid(
T).
name()
241 newPtrs_[newI] = ptrs_[i];
249 <<
"Element " << i <<
" not set after reordering with type "
254 ptrs_.transfer(newPtrs_);
266 <<
"attempted assignment to self for type " <<
typeid(
T).
name()
276 ptrs_[i] = (a[i]).clone().ptr();
279 else if (a.
size() == size())
289 <<
"bad size: " << a.
size()
290 <<
" for type " <<
typeid(
T).
name()
const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter * reinterpret_cast(0), -1, false, -1, false
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.
PtrList()
Null Constructor.
A simple container for copying or transferring objects of type <T>.
Non-intrusive singly-linked pointer list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void transfer(PtrList< T > &)
Transfer the contents of the argument PtrList into this PtrList.
void reorder(const labelUList &)
Reorders elements. Ordering does not have to be done in.
void clear()
Clear the PtrList, i.e. set size to zero deleting all the.
errorManip< error > abort(error &err)
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))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the PtrList.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
label size() const
Return the number of elements in the UList.
word name(const complex &)
Return a string representation of a complex.
PtrList< T > & operator=(const PtrList< T > &)
Assignment.