Thyra::MPIVectorStd< Scalar > Class Template Reference
[Efficient Generic MPI-based SPMD Concrete Thyra Operator/Vector Subclass Implementations]

Efficient concrete implementation subclass for SPMD-MPI-based vectors. More...

#include <Thyra_MPIVectorStdDecl.hpp>

Inheritance diagram for Thyra::MPIVectorStd< Scalar >:

[legend]
List of all members.

Constructors/initializers

 MPIVectorStd ()
 Construct to uninitialized.
 MPIVectorStd (const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiSpace, const Teuchos::RefCountPtr< Scalar > &localValues, const Index stride)
 Calls initialize().
void initialize (const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &mpiSpace, const Teuchos::RefCountPtr< Scalar > &localValues, const Index stride)
 Initialize.
void uninitialize (Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *mpiSpace=NULL, Teuchos::RefCountPtr< Scalar > *localValues=NULL, Index *stride=NULL)
 Set to an uninitialized state.

Accessors (inlined for minimal overhead)

Teuchos::RefCountPtr< Scalar > getRCPtr ()
 
Teuchos::RefCountPtr< const
Scalar > 
getRCPtr () const
 
Scalar * getPtr ()
 
const Scalar * getPtr () const
 
Index getStride () const
 

Overridden form Teuchos::Describable

std::string description () const
 

Overridden from MPIVectorBase

Teuchos::RefCountPtr< const
MPIVectorSpaceBase< Scalar > > 
mpiSpace () const
 
void getLocalData (Scalar **localValues, Index *stride)
 
void commitLocalData (Scalar *localValues)
 
void getLocalData (const Scalar **localValues, Index *stride) const
 
void freeLocalData (const Scalar *localValues) const
 

Detailed Description

template<class Scalar>
class Thyra::MPIVectorStd< Scalar >

Efficient concrete implementation subclass for SPMD-MPI-based vectors.

This subclass provides a very efficient and very general concrete implementation of a Thyra::VectorBase object.

Objects of this type generally should not be constructed directly by a client but instead by using the concrete vector space subclass Thyra::MPIVectorSpaceStd and using the function Thyra::MPIVectorSpaceStd::createMember().

The storage type can be anything since a Teuchos::RefCountPtr is used to pass in the local values pointer into the constructor and initialize().

Definition at line 53 of file Thyra_MPIVectorStdDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::MPIVectorStd< Scalar >::MPIVectorStd  ) 
 

Construct to uninitialized.

Definition at line 41 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
Thyra::MPIVectorStd< Scalar >::MPIVectorStd const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiSpace,
const Teuchos::RefCountPtr< Scalar > &  localValues,
const Index  stride
 

Calls initialize().

Definition at line 46 of file Thyra_MPIVectorStd.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::initialize const Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > &  mpiSpace,
const Teuchos::RefCountPtr< Scalar > &  localValues,
const Index  stride
 

Initialize.

Parameters:
mpiSpace [in] Smart pointer to MPIVectorSpaceBase object that defines the data distribution for mpiSpace() and space().
localValues [in] Smart pointer to beginning of local strided vector data. This array must be at least of dimension mpiRangeSpace->localDim()*stride and (&*localValues)[ (i-1)*stride ] gives the local value of the one-based entry (i) where i=1...mpiSpace()->localSubDim().
stride [in] Stride between local vector elements.
Preconditions:
  • mpiSpace.get()!=NULL
  • localValues.get()!=NULL
  • stride != 0

Postconditions:

  • this->getRCptr().get() == localValues.get()
  • this->getPtr() == &*localValues
  • this->getStride() == stride

Definition at line 56 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::uninitialize Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > *  mpiSpace = NULL,
Teuchos::RefCountPtr< Scalar > *  localValues = NULL,
Index stride = NULL
 

Set to an uninitialized state.

Postconditions:

Definition at line 74 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
Teuchos::RefCountPtr< Scalar > Thyra::MPIVectorStd< Scalar >::getRCPtr  )  [inline]
 

Definition at line 167 of file Thyra_MPIVectorStdDecl.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const Scalar > Thyra::MPIVectorStd< Scalar >::getRCPtr  )  const [inline]
 

Definition at line 174 of file Thyra_MPIVectorStdDecl.hpp.

template<class Scalar>
Scalar * Thyra::MPIVectorStd< Scalar >::getPtr  )  [inline]
 

Definition at line 181 of file Thyra_MPIVectorStdDecl.hpp.

template<class Scalar>
const Scalar * Thyra::MPIVectorStd< Scalar >::getPtr  )  const [inline]
 

Definition at line 188 of file Thyra_MPIVectorStdDecl.hpp.

template<class Scalar>
Index Thyra::MPIVectorStd< Scalar >::getStride  )  const [inline]
 

Definition at line 195 of file Thyra_MPIVectorStdDecl.hpp.

template<class Scalar>
std::string Thyra::MPIVectorStd< Scalar >::description  )  const
 

Definition at line 94 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
Teuchos::RefCountPtr< const MPIVectorSpaceBase< Scalar > > Thyra::MPIVectorStd< Scalar >::mpiSpace  )  const [virtual]
 

Implements Thyra::MPIVectorBase< Scalar >.

Definition at line 103 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::getLocalData Scalar **  localValues,
Index stride
[virtual]
 

Implements Thyra::MPIVectorBase< Scalar >.

Definition at line 109 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::commitLocalData Scalar *  localValues  )  [virtual]
 

Implements Thyra::MPIVectorBase< Scalar >.

Definition at line 120 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::getLocalData const Scalar **  localValues,
Index stride
const [virtual]
 

Reimplemented from Thyra::MPIVectorBase< Scalar >.

Definition at line 129 of file Thyra_MPIVectorStd.hpp.

template<class Scalar>
void Thyra::MPIVectorStd< Scalar >::freeLocalData const Scalar *  localValues  )  const [virtual]
 

Reimplemented from Thyra::MPIVectorBase< Scalar >.

Definition at line 140 of file Thyra_MPIVectorStd.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:39:54 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1