19#include <alien/ref/data/block/VBlockVector.h>
21#include <alien/ref/AlienRefSemantic.h>
22#include <alien/utils/ICopyOnWriteObject.h>
33VBlockVector::VBlockVector()
40VBlockVector::VBlockVector(
const VBlock& block,
const VectorDistribution& dist)
41: m_impl(new MultiVectorImpl(dist.space().clone(), dist.clone()))
43 m_impl->setBlockInfos(&block);
48VBlockVector::VBlockVector(Integer nrows, Integer nrows_local,
const VBlock& block,
49 IMessagePassingMng* parallel_mng)
50: m_impl(new MultiVectorImpl(std::make_shared<Space>(nrows),
51 std::make_shared<VectorDistribution>(
52 VectorDistribution(nrows, nrows_local, parallel_mng))))
54 m_impl->setBlockInfos(&block);
59VBlockVector::VBlockVector(
60Integer nrows,
const VBlock& block, IMessagePassingMng* parallel_mng)
61: m_impl(new MultiVectorImpl(std::make_shared<Space>(nrows),
62 std::make_shared<VectorDistribution>(VectorDistribution(nrows, parallel_mng))))
64 m_impl->setBlockInfos(&block);
69VBlockVector::VBlockVector(VBlockVector&& vector)
70: m_impl(std::move(vector.m_impl))
76VBlockVector::operator=(VBlockVector&& vector)
78 m_impl = std::move(vector.m_impl);
84void VBlockVector::init(
const VBlock& block,
const VectorDistribution& dist)
86 m_impl.reset(
new MultiVectorImpl(dist.space().clone(), dist.clone()));
87 m_impl->setBlockInfos(&block);
92void VBlockVector::free()
99void VBlockVector::clear()
109 return m_impl->space();
122VBlockVector::distribution()
const
124 return m_impl->distribution();
129void VBlockVector::setUserFeature(String feature)
131 m_impl->setFeature(feature);
136bool VBlockVector::hasUserFeature(String feature)
const
138 return m_impl->hasFeature(feature);
144VBlockVector::vblock()
const
146 const VBlock* block = m_impl->vblock();
150 throw FatalErrorException(
151 A_FUNCINFO,
"Requesting for block information but none was provided");
Implementation of an algebraic space.
void visit(ICopyOnWriteVector &) const
Visit method.
const ISpace & space() const
Get the space associated to the vector.
MultiVectorImpl * impl()
Get the multivector implementation.
Computes a vector distribution.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --