30 template<
class T,
class Container>
40 sumSize += ll[i].
size();
41 offsets_[i+1] = sumSize;
49 const Container& lli = ll[i];
59 template<
class T,
class Container>
65 size_(rowSizes.
size()),
66 offsets_(rowSizes.
size()+1)
72 sumSize += rowSizes[i];
73 offsets_[i+1] = sumSize;
80 template<
class T,
class Container>
87 size_(rowSizes.
size()),
88 offsets_(rowSizes.
size()+1)
94 sumSize += rowSizes[i];
95 offsets_[i+1] = sumSize;
98 m_.setSize(sumSize, t);
102 template<
class T,
class Container>
112 template<
class T,
class Container>
120 offsets_(lst.offsets_, reuse),
127 template<
class T,
class Container>
138 m_.setSize(offsets_[mRows]);
140 else if (mRows >
size())
143 <<
"Cannot be used to extend the list from " << offsets_.
size()
144 <<
" to " << mRows <<
nl 145 <<
" Please use one of the other setSize member functions" 151 template<
class T,
class Container>
164 template<
class T,
class Container>
174 m_.setSize(nData, t);
178 template<
class T,
class Container>
181 size_ = rowSizes.
size();
188 sumSize += rowSizes[i];
189 offsets_[i+1] = sumSize;
196 template<
class T,
class Container>
201 if (rowSizes.
size() > 0)
205 rowSizes[i] = offsets_[i+1] - offsets_[i];
212 template<
class T,
class Container>
221 template<
class T,
class Container>
237 template<
class T,
class Container>
245 ll[i] = Container(
operator[](i));
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
label k
Boltzmann constant.
void clear()
Clear the CompactListList, i.e. set sizes to zero.
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
void clear()
Clear the list, i.e. set size to zero.
labelList sizes() const
Return sizes (to be used e.g. for construction)
label size() const
Return the primary size, i.e. the number of rows.
CompactListList()
Null constructor.
errorManip< error > abort(error &err)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A packed storage unstructured matrix of objects of type <T> using an offset table for access...
void setSize(const label mRows)
Reset size of CompactListList.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void setSize(const label)
Reset size of List.
List< Container > operator()() const
Return as List<Container>
label size() const
Return the number of elements in the UList.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.