A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc. More...
Data Structures | |
class | iterator |
An STL iterator. More... | |
Public Types | |
typedef T | value_type |
Type of values the UPtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into UPtrList::value_type objects. More... | |
Public Member Functions | |
UPtrList () | |
Null Constructor. More... | |
UPtrList (const label) | |
Construct with size specified. More... | |
UPtrList (UList< T > &) | |
Construct from UList. More... | |
UPtrList (PtrList< T > &) | |
Construct from PtrList. More... | |
UPtrList (const Xfer< UPtrList< T > > &) | |
Construct by transferring the parameter contents. More... | |
UPtrList (UPtrList< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
label | size () const |
Return the number of elements in the UPtrList. More... | |
bool | empty () const |
Return true if the UPtrList is empty (ie, size() is zero). More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | resize (const label) |
Reset size of UPtrList. This can only be used to set the size. More... | |
void | clear () |
Clear the UPtrList, i.e. set size to zero. More... | |
void | transfer (UPtrList< T > &) |
Transfer the contents of the argument UPtrList into this. More... | |
Xfer< UPtrList< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
T * | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
iterator | begin () |
Return an iterator to begin traversing the UPtrList. More... | |
iterator | end () |
Return an iterator to end traversing the UPtrList. More... | |
Data Fields | |
const typedef T & | const_reference |
Type that can be used for storing into constant UPtrList::value_type. More... | |
Private Attributes | |
List< T * > | ptrs_ |
Friends | |
class | iterator |
Ostream & | operator (Ostream &, const UPtrList< T > &) |
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used for subscript bounds checking, etc.
The element operator [] returns a reference to the object rather than a pointer. Storage is not allocated during construction or use but is supplied to the constructor as an argument.
Definition at line 53 of file UPtrList.H.
typedef T value_type |
Type of values the UPtrList contains.
Definition at line 198 of file UPtrList.H.
Type that can be used for storing into UPtrList::value_type objects.
Definition at line 201 of file UPtrList.H.
UPtrList | ( | ) |
Null Constructor.
Definition at line 33 of file UPtrList.C.
|
explicit |
Construct with size specified.
|
inline |
Return the number of elements in the UPtrList.
Definition at line 31 of file UPtrListI.H.
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), GAMGSolver::agglomerateMatrix(), GAMGAgglomeration::compactLevels(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), hexRef8Data::hexRef8Data(), lduMatrix::initMatrixInterfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), lduPrimitiveMesh::nonBlockingSchedule(), GAMGSolver::procAgglomerateMatrix(), externalCoupledFunctionObject::readData(), refinementHistory::refinementHistory(), procFacesGAMGProcAgglomeration::singleCellMesh(), MGridGenGAMGAgglomeration::swap(), lduMatrix::updateMatrixInterfaces(), externalCoupledFunctionObject::writeData(), and externalCoupledFunctionObject::writeGeometry().
|
inline |
Return true if the UPtrList is empty (ie, size() is zero).
Definition at line 38 of file UPtrListI.H.
|
inline |
Return reference to the first element of the list.
Definition at line 45 of file UPtrListI.H.
|
inline |
Return reference to first element of the list.
Definition at line 52 of file UPtrListI.H.
|
inline |
Return reference to the last element of the list.
Definition at line 59 of file UPtrListI.H.
|
inline |
Return reference to the last element of the list.
Definition at line 66 of file UPtrListI.H.
void setSize | ( | const label | newSize | ) |
Reset size of UPtrList. This can only be used to set the size.
of an empty UPtrList, extend a UPtrList, remove entries from the end of a UPtrList.
Definition at line 87 of file UPtrList.C.
Referenced by GAMGSolver::procAgglomerateMatrix().
|
inline |
void clear | ( | ) |
Clear the UPtrList, i.e. set size to zero.
Definition at line 113 of file UPtrList.C.
Transfer the contents of the argument UPtrList into this.
UPtrList and annul the argument list.
Definition at line 120 of file UPtrList.C.
|
inline |
Transfer contents to the Xfer container.
Definition at line 96 of file UPtrListI.H.
|
inline |
Is element set.
Referenced by GAMGSolver::agglomerateInterfaceCoefficients(), GAMGAgglomeration::agglomerateLduAddressing(), GAMGSolver::agglomerateMatrix(), GAMGAgglomeration::combineLevels(), GAMGAgglomeration::compactLevels(), LUscalarMatrix::convert(), wallDistData< TransferType >::correct(), meshWave::correct(), GAMGSolver::GAMGSolver(), lduPrimitiveMesh::gather(), GAMGSolver::gatherMatrices(), MGridGenGAMGAgglomeration::getNbrAgglom(), GAMGProcAgglomeration::globalCellCells(), hexRef8Data::hexRef8Data(), externalCoupledFunctionObject::initialise(), lduMatrix::initMatrixInterfaces(), fvBoundaryMesh::interfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), Foam::MULES::limitSum(), main(), nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother(), lduPrimitiveMesh::nonBlockingSchedule(), GAMGSolver::procAgglomerateMatrix(), procLduMatrix::procLduMatrix(), externalCoupledFunctionObject::readData(), lduMatrix::residual(), GeometricField::GeometricBoundaryField::scalarInterfaces(), procFacesGAMGProcAgglomeration::singleCellMesh(), GaussSeidelSmoother::smooth(), symGaussSeidelSmoother::smooth(), nonBlockingGaussSeidelSmoother::smooth(), lduMatrix::sumA(), MGridGenGAMGAgglomeration::swap(), lduMatrix::updateMatrixInterfaces(), and externalCoupledFunctionObject::writeData().
Set element. Return old element (can be NULL).
No checks on new element.
void reorder | ( | const labelUList & | oldToNew | ) |
Reorders elements. Ordering does not have to be done in.
ascending or descending order. Reordering has to be unique. (is shuffle)
Definition at line 127 of file UPtrList.C.
Return element const pointer.
Definition at line 137 of file UPtrListI.H.
|
inline |
Return an iterator to begin traversing the UPtrList.
Definition at line 291 of file UPtrListI.H.
Referenced by LUscalarMatrix::convert().
|
inline |
Return an iterator to end traversing the UPtrList.
Definition at line 298 of file UPtrListI.H.
|
friend |
Definition at line 211 of file UPtrList.H.
const typedef T& const_reference |
Type that can be used for storing into constant UPtrList::value_type.
objects.
Definition at line 205 of file UPtrList.H.
Definition at line 99 of file UPtrList.H.
Referenced by UPtrList< Foam::Field< Type > >::begin(), UPtrList< Foam::Field< Type > >::end(), and UPtrList< Foam::Field< Type > >::transfer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.