Dynamically sized Field. More...
Public Member Functions | |
DynamicField () | |
Construct null. More... | |
DynamicField (const label) | |
Construct given size. More... | |
DynamicField (const UList< T > &) | |
Construct from UList. Size set to UList size. More... | |
DynamicField (const Xfer< List< T > > &) | |
Construct by transferring the parameter contents. More... | |
DynamicField (const UList< T > &mapF, const labelList &mapAddressing) | |
Construct by 1 to 1 mapping from the given field. More... | |
DynamicField (const UList< T > &mapF, const labelListList &mapAddressing, const scalarListList &weights) | |
Construct by interpolative mapping from the given field. More... | |
DynamicField (const UList< T > &mapF, const FieldMapper &map) | |
Construct by mapping from the given field. More... | |
DynamicField (const DynamicField< T, SizeInc, SizeMult, SizeDiv > &) | |
Construct copy. More... | |
DynamicField (const Xfer< DynamicField< T, SizeInc, SizeMult, SizeDiv > > &) | |
Construct by transferring the Field contents. More... | |
DynamicField (Istream &) | |
Construct from Istream. Size set to size of list read. More... | |
tmp< DynamicField< T, SizeInc, SizeMult, SizeDiv > > | clone () const |
Clone. More... | |
label | capacity () const |
Size of the underlying storage. More... | |
void | setCapacity (const label) |
Alter the size of the underlying storage. More... | |
void | setSize (const label) |
Alter the addressed list size. More... | |
void | setSize (const label, const T &) |
Alter the addressed list size and fill new space with a. More... | |
void | resize (const label) |
Alter the addressed list size. More... | |
void | resize (const label, const T &) |
Alter the addressed list size and fill new space with a. More... | |
void | reserve (const label) |
Reserve allocation space for at least this size. More... | |
void | clear () |
Clear the addressed list, i.e. set the size to zero. More... | |
void | clearStorage () |
Clear the list and delete storage. More... | |
DynamicField< T, SizeInc, SizeMult, SizeDiv > & | shrink () |
Shrink the allocated space to the number of elements used. More... | |
Xfer< List< T > > | xfer () |
Transfer contents to the Xfer container as a plain List. More... | |
DynamicField< T, SizeInc, SizeMult, SizeDiv > & | append (const T &) |
Append an element at the end of the list. More... | |
DynamicField< T, SizeInc, SizeMult, SizeDiv > & | append (const UList< T > &) |
Append a List at the end of this list. More... | |
T | remove () |
Remove and return the top element. More... | |
T & | operator() (const label) |
Return non-const access to an element, resizing list if. More... | |
void | operator= (const T &) |
Assignment of all addressed entries to the given value. More... | |
void | operator= (const DynamicField< T, SizeInc, SizeMult, SizeDiv > &) |
Assignment from DynamicField. More... | |
void | operator= (const UList< T > &) |
Assignment from UList. More... | |
Static Public Member Functions | |
static const DynamicField< T, SizeInc, SizeMult, SizeDiv > & | null () |
Return a null field. More... | |
Private Member Functions | |
StaticAssert ((SizeInc||SizeMult) &&SizeDiv) | |
Avoid invalid sizing parameters. More... | |
Private Attributes | |
label | capacity_ |
The capacity (allocated size) of the underlying field. More... | |
|
inline |
Construct null.
Definition at line 29 of file DynamicFieldI.H.
|
inlineexplicit |
Construct given size.
|
inlineexplicit |
Construct from UList. Size set to UList size.
Also constructs from DynamicField with different sizing parameters.
|
inlineexplicit |
Construct by transferring the parameter contents.
|
inline |
Construct by 1 to 1 mapping from the given field.
Definition at line 74 of file DynamicFieldI.H.
|
inline |
Construct by interpolative mapping from the given field.
Definition at line 86 of file DynamicFieldI.H.
|
inline |
Construct by mapping from the given field.
Definition at line 100 of file DynamicFieldI.H.
|
inline |
Construct copy.
|
inline |
Construct by transferring the Field contents.
|
explicit |
Construct from Istream. Size set to size of list read.
|
private |
Avoid invalid sizing parameters.
|
inlinestatic |
Return a null field.
Definition at line 89 of file DynamicField.H.
References reinterpret_cast().
Foam::tmp< Foam::DynamicField< T, SizeInc, SizeMult, SizeDiv > > clone | ( | ) | const |
Clone.
Definition at line 40 of file DynamicField.C.
|
inline |
Size of the underlying storage.
Definition at line 135 of file DynamicFieldI.H.
Referenced by searchableSurfaces::checkIntersection(), extendedEdgeMesh::cut(), and meshRefinement::markSurfaceGapRefinement().
|
inline |
Alter the size of the underlying storage.
The addressed size will be truncated if needed to fit, but will remain otherwise untouched. Use this or reserve() in combination with append().
Definition at line 144 of file DynamicFieldI.H.
References setSize().
Referenced by extendedEdgeMesh::cut().
|
inline |
|
inline |
Alter the addressed list size and fill new space with a.
constant.
|
inline |
Alter the addressed list size.
New space will be allocated if required. Use this to resize the list prior to using the operator[] for setting values (as per List usage).
|
inline |
Alter the addressed list size and fill new space with a.
constant.
|
inline |
Reserve allocation space for at least this size.
Never shrinks the allocated size, use setCapacity() for that.
Definition at line 165 of file DynamicFieldI.H.
References Foam::max(), and setSize().
|
inline |
Clear the addressed list, i.e. set the size to zero.
Allocated size does not change
Definition at line 277 of file DynamicFieldI.H.
Referenced by faceHeatShading::calculate(), faceShading::calculate(), autoSnapDriver::findDiagonalAttraction(), main(), and searchableSurfacesQueries::signedDistance().
|
inline |
Clear the list and delete storage.
Definition at line 284 of file DynamicFieldI.H.
References clear().
Referenced by main().
|
inline |
Shrink the allocated space to the number of elements used.
Returns a reference to the DynamicField.
Definition at line 293 of file DynamicFieldI.H.
References setSize().
Referenced by meshRefinement::markInternalGapRefinement(), meshRefinement::markSmallFeatureRefinement(), and meshRefinement::markSurfaceGapRefinement().
|
inline |
Transfer contents to the Xfer container as a plain List.
Definition at line 312 of file DynamicFieldI.H.
Referenced by searchableSurfaces::checkIntersection().
|
inline |
Append an element at the end of the list.
Referenced by extendedEdgeMesh::add(), mappedPatchBase::calcMapping(), faceHeatShading::calculate(), faceShading::calculate(), autoLayerDriver::checkAndUnmark(), searchableSurfaces::checkIntersection(), extendedEdgeMesh::cut(), autoSnapDriver::findDiagonalAttraction(), meshRefinement::generateRays(), main(), meshRefinement::markSurfaceGapRefinement(), refinementFeatures::read(), searchableSurfacesQueries::signedDistance(), and externalCoupledFunctionObject::writeGeometry().
|
inline |
Append a List at the end of this list.
|
inline |
Remove and return the top element.
Definition at line 358 of file DynamicFieldI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, List::size(), and Foam::T().
Referenced by main().
Return non-const access to an element, resizing list if.
necessary
Definition at line 380 of file DynamicFieldI.H.
References setSize().
|
inline |
Assignment of all addressed entries to the given value.
|
inline |
Assignment from DynamicField.
|
private |
The capacity (allocated size) of the underlying field.
Definition at line 81 of file DynamicField.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.