42 #ifndef THYRA_DEFAULT_SPMD_VECTOR_SPACE_DEF_HPP
43 #define THYRA_DEFAULT_SPMD_VECTOR_SPACE_DEF_HPP
45 #include "Thyra_DefaultSpmdVectorSpace_decl.hpp"
46 #include "Thyra_SpmdVectorSpaceDefaultBase.hpp"
47 #include "Thyra_VectorSpaceFactoryBase.hpp"
48 #include "Thyra_DefaultSpmdMultiVector.hpp"
49 #include "Thyra_DefaultSpmdVector.hpp"
50 #include "Teuchos_CommHelpers.hpp"
56 template<
class Scalar>
57 RCP<DefaultSpmdVectorSpace<Scalar> >
66 template<
class Scalar>
71 this->initialize(Teuchos::null, dim_in, dim_in);
75 template<
class Scalar>
79 const bool isLocallyReplicated_in
86 localSubDim_ = localSubDim_in;
87 if (! comm.is_null ()) {
88 numProc_ = comm->getSize ();
89 procRank_ = comm->getRank ();
95 this->updateState(globalDim, isLocallyReplicated_in);
99 template<
class Scalar>
102 comm_ = Teuchos::null;
110 template<
class Scalar>
116 values = Teuchos::arcp<Scalar>(localSubDim_);
119 weakSelfPtr_.create_strong(),
127 template<
class Scalar>
133 weakSelfPtr_.create_strong(),
135 this->smallVecSpcFcty()->createVecSpc(numMembers),true
142 template<
class Scalar>
153 weakSelfPtr_.create_strong(),
161 template<
class Scalar>
172 weakSelfPtr_.create_strong(),
173 Teuchos::arcp(const_cast<Scalar*>(raw_v.
values().
get()),0,raw_v.
subDim(),
false),
180 template<
class Scalar>
191 weakSelfPtr_.create_strong(),
193 this->smallVecSpcFcty()->createVecSpc(raw_mv.
numSubCols()),
true),
201 template<
class Scalar>
212 weakSelfPtr_.create_strong(),
214 this->smallVecSpcFcty()->createVecSpc(raw_mv.
numSubCols()),
true),
216 const_cast<Scalar*>(raw_mv.
values().
get()),
224 template<
class Scalar>
229 const Range1D rng = full_range(rng_in,0,this->dim()-1);
230 const Ordinal l_localOffset = this->localOffset();
231 return ( l_localOffset<=rng.
lbound() && rng.
ubound()<l_localOffset+localSubDim_ );
235 template<
class Scalar>
239 return defaultSpmdVectorSpace<Scalar>(comm_, localSubDim_, this->dim(),
240 this->isLocallyReplicated());
247 template<
class Scalar>
255 template<
class Scalar>
265 template<
class Scalar>
267 :localSubDim_(-1), numProc_(-1), procRank_(-1)
277 #endif // THYRA_DEFAULT_SPMD_VECTOR_SPACE_DEF_HPP