Public Member Functions
TSFExtended::VectorTypeExtensions< Scalar > Class Template Reference

VectorTypeExtensions provides extensions to the Thyra::VectorSpaceFactoryBase object, appropriate to the interface with applications codes. More...

List of all members.

Public Member Functions

virtual ~VectorTypeExtensions ()
virtual RCP< const
Thyra::VectorSpaceBase< Scalar > > 
createSpace (int dimension, int nLocal, const int *locallyOwnedIndices, const MPIComm &comm) const =0
 create a distributed vector space.
virtual VectorSpace< Scalar > createEvenlyPartitionedSpace (const MPIComm &comm, int nLocal) const
 Default implementation creates a vector space having nLocal elements on each processor.
virtual RCP< GhostImporter
< Scalar > > 
createGhostImporter (const VectorSpace< Scalar > &space, int nGhost, const int *ghostIndices) const =0
 Create an importer for accessing ghost elements.
virtual RCP< MatrixFactory
< Scalar > > 
createMatrixFactory (const VectorSpace< Scalar > &domain, const VectorSpace< Scalar > &range) const =0
 Create a matrix factory of type compatible with this vector type, sized according to the given domain and range spaces.

Detailed Description

template<class Scalar>
class TSFExtended::VectorTypeExtensions< Scalar >

VectorTypeExtensions provides extensions to the Thyra::VectorSpaceFactoryBase object, appropriate to the interface with applications codes.

Thyra::VectorSpaceFactoryBase has a method to create a small serial vector space for use in multivector operators, however, that is insufficient for the needs of applications.

Notes for subclass developers

Subclasses should also derive from some subclass of Thyra::VectorSpaceFactoryBase in order to use the createReplicatedSpace() method.

Because applications may use the clean syntax

 VectorType vt = new MyVectorType();

subclasses should also derive from Handleable<VectorTypeBase<Scalar> and implement the getRcp() method.

Subclasses might optionally implement the Printable and Describable interfaces

Definition at line 67 of file TSFVectorTypeExtensions.hpp.


Constructor & Destructor Documentation

template<class Scalar>
virtual TSFExtended::VectorTypeExtensions< Scalar >::~VectorTypeExtensions ( ) [inline, virtual]

Definition at line 71 of file TSFVectorTypeExtensions.hpp.


Member Function Documentation

template<class Scalar >
VectorSpace< Scalar > TSFExtended::VectorTypeExtensions< 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 TSFExtended::SerialVectorType.

Definition at line 123 of file TSFVectorTypeExtensions.hpp.

References Sundance::dimension().

template<class Scalar>
virtual RCP<GhostImporter<Scalar> > TSFExtended::VectorTypeExtensions< 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 TSFExtended::EpetraVectorType, and TSFExtended::SerialVectorType.

template<class Scalar>
virtual RCP<MatrixFactory<Scalar> > TSFExtended::VectorTypeExtensions< 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 TSFExtended::EpetraVectorType, and TSFExtended::SerialVectorType.

template<class Scalar>
virtual RCP<const Thyra::VectorSpaceBase<Scalar> > TSFExtended::VectorTypeExtensions< 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 TSFExtended::EpetraVectorType, and TSFExtended::SerialVectorType.

Site Contact