19 #ifndef GEOS_LINEARALGEBRA_UTILITIES_BLOCKVECTOR_HPP_
20 #define GEOS_LINEARALGEBRA_UTILITIES_BLOCKVECTOR_HPP_
34 template<
typename VECTOR >
48 m_vectorStorage( nBlocks )
66 m_vectorStorage( rhs.m_vectorStorage )
76 :
Base( std::move( rhs ) ),
77 m_vectorStorage( std::move( rhs.m_vectorStorage ) )
92 m_vectorStorage.emplace_back( rhs.
block( i ) );
104 m_vectorStorage = x.m_vectorStorage;
116 m_vectorStorage = std::move( x.m_vectorStorage );
135 m_vectorStorage.resize( nBlocks );
144 for(
localIndex i = 0; i < m_vectorStorage.size(); ++i )
151 array1d< VECTOR > m_vectorStorage;
Concrete representation of a block vector.
BlockVector(BlockVectorView< VECTOR > const &rhs)
Conversion constructor from a compatible view with a deep copy of each sub-vector.
BlockVector & operator=(BlockVector &&x) noexcept
Move assignment.
virtual ~BlockVector() override=default
Destructor.
BlockVector & operator=(BlockVector const &x)
Copy assignment.
BlockVector(BlockVector const &rhs)
Copy constructor that performs a deep copy of each sub-vector.
BlockVector(localIndex const nBlocks)
Create a vector of nBlocks blocks.
void resize(localIndex const nBlocks)
Resize to a different number of blocks.
BlockVector()
Create a vector of nBlocks blocks.
BlockVector(BlockVector &&rhs)
Move constructor.
Abstract view of a block vector.
VECTOR const & block(localIndex const blockIndex) const
Get a reference to the vector corresponding to block blockRowIndex.
void setPointer(localIndex i, VECTOR *vec)
Set pointer to a vector.
void resize(localIndex const size)
Resize to a new number of blocks.
localIndex blockSize() const
Get block size.
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).