36 #ifndef DynamicField_H 37 #define DynamicField_H 40 #include <type_traits> 49 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
52 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
59 template<
class T,
unsigned SizeInc,
unsigned SizeMult,
unsigned SizeDiv>
71 template<
class T,
unsigned SizeInc=0,
unsigned SizeMult=2,
unsigned SizeDiv=1>
78 (SizeInc || SizeMult) && SizeDiv,
79 "Avoid invalid sizing parameters" 234 inline void operator=
DynamicField< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
A simple container for copying or transferring objects of type <T>.
DynamicField()
Construct null.
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 setCapacity(const label)
Alter the size of the underlying storage.
void resize(const label)
Alter the addressed list size.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label capacity() const
Size of the underlying storage.
void clear()
Clear the addressed list, i.e. set the size to zero.
void operator=(const T &)
Assignment of all addressed entries to the given value.
Abstract base class to hold the Field mapping addressing and weights.
Pre-declare SubField and related Field type.
T & operator()(const label)
Return non-const access to an element, resizing list if.
void reserve(const label)
Reserve allocation space for at least this size.
static const DynamicField< T, SizeInc, SizeMult, SizeDiv > & null()
Return a null field.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void map(const UList< T > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
tmp< Field< T > > T() const
Return the field transpose (only defined for second rank tensors)
void clearStorage()
Clear the list and delete storage.
const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter * reinterpret_cast(0),-1, false,-1, false
void setSize(const label)
Alter the addressed list size.
tmp< DynamicField< T, SizeInc, SizeMult, SizeDiv > > clone() const
Clone.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container as a plain List.
A class for managing temporary objects.
DynamicField< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.