Public Member Functions
Playa::VectorTypeBase< Scalar > Class Template Reference

List of all members.

Public Member Functions

virtual ~VectorTypeBase ()
virtual RCP< const
VectorSpaceBase< Scalar > > 
createSpace (int dimension, int nLocal, const int *locallyOwnedIndices, const MPIComm &comm) const =0
virtual VectorSpace< Scalar > createEvenlyPartitionedSpace (const MPIComm &comm, int nLocal) const
virtual RCP< GhostImporter
< Scalar > > 
createGhostImporter (const VectorSpace< Scalar > &space, int nGhost, const int *ghostIndices) const =0
virtual RCP< MatrixFactory
< Scalar > > 
createMatrixFactory (const VectorSpace< Scalar > &domain, const VectorSpace< Scalar > &range) const =0

Detailed Description

template<class Scalar>
class Playa::VectorTypeBase< Scalar >

Definition at line 59 of file PlayaVectorTypeBase.hpp.


Constructor & Destructor Documentation

template<class Scalar>
virtual Playa::VectorTypeBase< Scalar >::~VectorTypeBase ( ) [inline, virtual]

Virtual dtor

Definition at line 63 of file PlayaVectorTypeBase.hpp.


Member Function Documentation

template<class Scalar >
VectorSpace< Scalar > Playa::VectorTypeBase< Scalar >::createEvenlyPartitionedSpace ( const MPIComm comm,
int  nLocal 
) const [inline, virtual]

Default implementation creates a vector space having nLocal elements on each processor. Serial types should override this to produce a replicated space.

Reimplemented in Playa::SerialVectorType.

Definition at line 115 of file PlayaVectorTypeBase.hpp.

References Sundance::dimension(), Playa::MPIComm::getNProc(), and Playa::MPIComm::getRank().

template<class Scalar>
virtual RCP<GhostImporter<Scalar> > Playa::VectorTypeBase< Scalar >::createGhostImporter ( const VectorSpace< Scalar > &  space,
int  nGhost,
const int *  ghostIndices 
) const [pure virtual]

Create an importer for accessing ghost elements.

Parameters:
spacethe distributed vector space on which ghost elements are to be shared
nGhostnumber of ghost elements needed by this processor
ghostIndicesread-only C array of off-processor indices needed by this processor.
Returns:
A RCP to a GhostImporter object.

Implemented in Playa::SerialVectorType, and Playa::EpetraVectorType.

template<class Scalar>
virtual RCP<MatrixFactory<Scalar> > Playa::VectorTypeBase< Scalar >::createMatrixFactory ( const VectorSpace< Scalar > &  domain,
const VectorSpace< Scalar > &  range 
) const [pure virtual]

Create a matrix factory of type compatible with this vector type, sized according to the given domain and range spaces.

Implemented in Playa::SerialVectorType, and Playa::EpetraVectorType.

template<class Scalar>
virtual RCP<const VectorSpaceBase<Scalar> > Playa::VectorTypeBase< Scalar >::createSpace ( int  dimension,
int  nLocal,
const int *  locallyOwnedIndices,
const MPIComm comm 
) const [pure virtual]

create a distributed vector space.

Parameters:
dimensionthe dimension of the space
nLocalnumber of indices owned by the local processor
locallyOwnedIndicesarray of indices owned by this processor

Implemented in Playa::SerialVectorType, and Playa::EpetraVectorType.

Site Contact