Go to the documentation of this file.
30 template<
class T,
class Container>
40 sumSize += ll[i].
size();
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];
102 template<
class T,
class Container>
105 const Xfer<CompactListList<T, Container> >& lst
112 template<
class T,
class Container>
115 CompactListList<T, Container>& lst,
120 offsets_(lst.offsets_, reUse),
127 template<
class T,
class Container>
137 offsets_.setSize(nRows+1);
138 m_.setSize(offsets_[nRows]);
140 else if (nRows > size())
143 <<
"Cannot be used to extend the list from " << offsets_.size()
144 <<
" to " << nRows <<
nl
145 <<
" Please use one of the other setSize member functions"
151 template<
class T,
class Container>
159 offsets_.setSize(nRows+1);
164 template<
class T,
class Container>
173 offsets_.setSize(nRows+1);
174 m_.setSize(nData, t);
178 template<
class T,
class Container>
181 size_ = rowSizes.
size();
182 offsets_.setSize(rowSizes.
size()+1);
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>
235 template<
class T,
class Container>
243 ll[i] = Container(
operator[](i));
List< Container > operator()() const
Return as List<Container>
#define forAll(list, i)
Loop across all elements in list.
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
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 T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void clear()
Clear the CompactListList, i.e. set sizes to zero.
void transfer(CompactListList< T, Container > &)
Transfer the contents of the argument CompactListList.
errorManip< error > abort(error &err)
List< T > m_
Packed matrix of data.
void setSize(const label nRows)
Reset size of CompactListList.
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList sizes() const
Return sizes (to be used e.g. for construction)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label k
Boltzmann constant.
CompactListList()
Null constructor.
void size(const label)
Override size to be inconsistent with allocated storage.
label size() const
Return the number of elements in the UList.
List< label > offsets_
Offset table.