19 #ifndef GEOSX_LINEARALGEBRA_UTILITIES_BLOCKVECTOR_HPP_ 20 #define GEOSX_LINEARALGEBRA_UTILITIES_BLOCKVECTOR_HPP_ 34 template<
typename VECTOR >
48 m_vectorStorage( nBlocks )
66 m_vectorStorage( rhs.m_vectorStorage )
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 )
156 #endif //GEOSX_LINEARALGEBRA_UTILITIES_BLOCKVECTOR_HPP_ Concrete representation of a block vector.
BlockVector()
Create a vector of nBlocks blocks.
void setPointer(localIndex i, VECTOR *vec)
Set pointer to a vector.
void resize(localIndex const size)
Resize to a new number of blocks.
BlockVector(BlockVector &&rhs)
Move constructor.
BlockVector(BlockVector const &rhs)
Copy constructor that performs a deep copy of each sub-vector.
BlockVector & operator=(BlockVector &&x) noexcept
Move assignment.
void resize(localIndex const nBlocks)
Resize to a different number of blocks.
localIndex blockSize() const
Get block size.
BlockVector & operator=(BlockVector const &x)
Copy assignment.
BlockVector(localIndex const nBlocks)
Create a vector of nBlocks blocks.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
VECTOR const & block(localIndex const blockIndex) const
Get a reference to the vector corresponding to block blockRowIndex.
Abstract view of a block vector.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
virtual ~BlockVector() override=default
Destructor.
BlockVector(BlockVectorView< VECTOR > const &rhs)
Conversion constructor from a compatible view with a deep copy of each sub-vector.