34 blocks.resize(vector_sizes.
Size());
35 for (
int i = 0; i < vector_sizes.
Size(); i++)
43 blocks.resize(vector_sizes.
Size());
44 for (
int i = 0; i < vector_sizes.
Size(); i++)
52 blocks.resize(vector_sizes.
Size());
53 for (
int offset = 0, i = 0; i < vector_sizes.
Size(); i++)
55 blocks[i].emplace<0>(base, offset, vector_sizes[i]);
56 offset += vector_sizes[i];
int Size() const
Return the logical size of the array.
MultiVector()=default
Create an empty MultiVector with zero blocks.
void MakeRef(Vector &base, const Array< int > &vector_sizes)
Update the MultiVector to reference data within a given monolithic Vector base.
Vector & operator[](int i)
Read-write access to the i-th Vector. Generates an error if the i-th block is read-only,...
void SetSizes(const Array< int > &vector_sizes)
Update the MultiVector according to the given vector_sizes.
void SetSize(int s)
Resize the vector to size s.
MemoryType
Memory types supported by MFEM.