VectorTypeExtensions provides extensions to the Thyra::VectorSpaceFactoryBase object, appropriate to the interface with applications codes. More...
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. | |
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.
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.
| virtual TSFExtended::VectorTypeExtensions< Scalar >::~VectorTypeExtensions | ( | ) | [inline, virtual] |
Definition at line 71 of file TSFVectorTypeExtensions.hpp.
| 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().
| 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.
| space | the distributed vector space on which ghost elements are to be shared |
| nGhost | number of ghost elements needed by this processor |
| ghostIndices | read-only C array of off-processor indices needed by this processor. |
Implemented in TSFExtended::EpetraVectorType, and TSFExtended::SerialVectorType.
| 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.
| 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.
| dimension | the dimension of the space |
| nLocal | number of indices owned by the local processor |
| locallyOwnedIndices | array of indices owned by this processor |
Implemented in TSFExtended::EpetraVectorType, and TSFExtended::SerialVectorType.