71 else if (newSize < oldSize)
75 else if (newSize > oldSize)
80 for (
label i=oldSize; i<newSize; i++)
108 <<
"Size of map (" << oldToNew.
size()
109 <<
") not equal to list size (" <<
size()
117 label newI = oldToNew[i];
119 if (newI < 0 || newI >=
size())
122 <<
"Illegal index " << newI <<
nl 123 <<
"Valid indices are 0.." <<
size()-1
130 <<
"reorder map is not unique; element " << newI
133 newPtrs_[newI] = ptrs_[i];
141 <<
"Element " << i <<
" not set after reordering." <<
nl
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void reorder(const labelUList &)
Reorders elements. Ordering does not have to be done in.
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 ))
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void clear()
Clear the UPtrList, i.e. set size to zero.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
A simple container for copying or transferring objects of type <T>.
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 size(const label)
Override size to be inconsistent with allocated storage.
UPtrList()
Null Constructor.
void clear()
Clear the list, i.e. set size to zero.
void setSize(const label)
Reset size of List.
label size() const
Return the number of elements in the UList.
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
label size() const
Return the number of elements in the UPtrList.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter * reinterpret_cast(0), -1, false, -1, false
void transfer(UPtrList< T > &)
Transfer the contents of the argument UPtrList into this.
void setSize(const label)
Reset size of UPtrList. This can only be used to set the size.