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" 95 return *reinterpret_cast
221 inline void operator=
227 inline void operator=
DynamicField< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
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.
label capacity() const
Size of the underlying storage.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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.
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...
tmp< DynamicField< T, SizeInc, SizeMult, SizeDiv > > clone() const
Clone.
void clearStorage()
Clear the list and delete storage.
void setSize(const label)
Alter the addressed list size.
tmp< Field< T > > T() const
Return the field transpose (only defined for second rank tensors)
A class for managing temporary objects.
DynamicField< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.