66 offsets_(rowSizes.size() + 1),
73 sumSize += rowSizes[i];
74 offsets_[i+1] = sumSize;
77 m_.setSize(sumSize, t);
92 if (mRows < this->size())
94 offsets_.setSize(mRows + 1);
95 m_.setSize(offsets_[mRows]);
99 else if (mRows > this->size())
102 <<
"Cannot be used to extend the list from " << offsets_.size()
103 <<
" to " << mRows <<
nl
104 <<
" Please use one of the other setSize member functions"
117 offsets_.setSize(mRows + 1);
132 offsets_.setSize(mRows + 1);
133 m_.setSize(nData, t);
142 offsets_.setSize(rowSizes.
size() + 1);
148 sumSize += rowSizes[i];
149 offsets_[i+1] = sumSize;
191 offsets_.transfer(a.offsets_);
#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.
CompactListList()
Null constructor.
void transfer(CompactListList< T > &)
Transfer the contents of the argument CompactListList.
void clear()
Clear the CompactListList, i.e. set sizes to zero.
void setSize(const label mRows)
Reset size of CompactListList.
Unallocated base class of CompactListList.
static void setSizeToListList(ListType &offsets, ListType &m, const ListListType &ll)
Set the sizes to match that of the given list-list.
static void setSizeAndValuesToListList(ListType &offsets, ListType &m, const ListListType &ll)
Set the sizes and values to match that of the given list-list.
void shallowCopy(const UCompactListList< T > &)
Copy the ULists, but not the underlying data.
A List with indirect addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)