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

Implementation of the Handle for the Vector class. More...

Inheritance diagram for TSFExtended::VectorSpace< Scalar >:
Sundance::Handle< const Thyra::VectorSpaceBase< Scalar > > Sundance::ObjectWithVerbosityBase

List of all members.

Public Member Functions

 VectorSpace ()
 Empty ctor.
 VectorSpace (Handleable< const Thyra::VectorSpaceBase< Scalar > > *rawPtr)
 Construct a VectorSpace<Scalar> with a raw pointer to a const Thyra::VectorSpaceBase<Scalar>
 VectorSpace (const RefCountPtr< const Thyra::VectorSpaceBase< Scalar > > &smartPtr)
 Construct a VectorSpace<Scalar> with a smart pointer to a const Thyra::VectorSpaceBase<Scalar>
Vector< Scalar > createMember () const
 Create a new element of this vector space.
int dim () const
 Return the dimension of the space.
int lowestLocallyOwnedIndex () const
 Return the lowest global index accessible on this processor.
int numLocalElements () const
 Return the number of elements owned by this processor.
bool isCompatible (const VectorSpace< Scalar > &vecSpc) const
 Check compatibility with another space.
bool operator== (const VectorSpace< Scalar > &other) const
 test equality between two spaces
bool operator!= (const VectorSpace< Scalar > &other) const
 test inequality of two spaces
bool contains (const Vector< Scalar > &vec) const
 test whether the space contains a given vector
int numBlocks () const
 return the number of subblocks.
VectorSpace< Scalar > getBlock (int i) const
 get the i-th subblock
void setBlock (int i, const VectorSpace< Scalar > &space)
 set the i-th subblock
SequentialIterator< Scalar > begin () const
SequentialIterator< Scalar > end () const
bool advanceIndex (OrdType &blockIndex, OrdType &indexInCurrentBlock, OrdType &globalIndex) const

Detailed Description

template<class Scalar>
class TSFExtended::VectorSpace< Scalar >

Implementation of the Handle for the Vector class.

This wraps a TSFCoreVector

Definition at line 50 of file TSFVectorSpaceDecl.hpp.


Constructor & Destructor Documentation

template<class Scalar>
TSFExtended::VectorSpace< Scalar >::VectorSpace ( ) [inline]

Empty ctor.

Definition at line 53 of file TSFVectorSpaceDecl.hpp.

template<class Scalar>
TSFExtended::VectorSpace< Scalar >::VectorSpace ( Handleable< const Thyra::VectorSpaceBase< Scalar > > *  rawPtr) [inline]

Construct a VectorSpace<Scalar> with a raw pointer to a const Thyra::VectorSpaceBase<Scalar>

Definition at line 53 of file TSFVectorSpaceDecl.hpp.

template<class Scalar>
TSFExtended::VectorSpace< Scalar >::VectorSpace ( const RefCountPtr< const Thyra::VectorSpaceBase< Scalar > > &  smartPtr) [inline]

Construct a VectorSpace<Scalar> with a smart pointer to a const Thyra::VectorSpaceBase<Scalar>

Definition at line 53 of file TSFVectorSpaceDecl.hpp.


Member Function Documentation

template<class Scalar >
bool VectorSpace::advanceIndex ( OrdType blockIndex,
OrdType indexInCurrentBlock,
OrdType globalIndex 
) const [inline]

Definition at line 247 of file TSFVectorSpaceImpl.hpp.

template<class Scalar >
SequentialIterator< Scalar > VectorSpace::begin ( ) const [inline]
template<class Scalar>
bool VectorSpace::contains ( const Vector< Scalar > &  vec) const

test whether the space contains a given vector

Definition at line 158 of file TSFVectorSpaceImpl.hpp.

References TSFExtended::Vector< Scalar >::space().

template<class Scalar >
Vector< Scalar > VectorSpace::createMember ( ) const
template<class Scalar>
int TSFExtended::VectorSpace< Scalar >::dim ( ) const [inline]
template<class Scalar >
SequentialIterator< Scalar > VectorSpace::end ( ) const [inline]
template<class Scalar >
VectorSpace< Scalar > VectorSpace::getBlock ( int  i) const

get the i-th subblock

Definition at line 181 of file TSFVectorSpaceImpl.hpp.

Referenced by TSFExtended::getComm(), and TSFExtended::SimpleBlockOp< Scalar >::SimpleBlockOp().

template<class Scalar>
bool VectorSpace::isCompatible ( const VectorSpace< Scalar > &  vecSpc) const

Check compatibility with another space.

Implementation note: we don't know if the argument vec space is a handle to another vector space or the contents of a handle, and we want the operation to work the same in either case. We can make this work as follows: have the argument check compatibility with the contents of this handle. If the argument is a handle, the process will be repeated, interchanging places again so that both handles are dereferenced. If the argument is not a handle, then it ends up comparing to the concrete contents of this handle, giving the same results.

Definition at line 145 of file TSFVectorSpaceImpl.hpp.

References Sundance::Handle< const Thyra::VectorSpaceBase< Scalar > >::ptr().

template<class Scalar >
int VectorSpace::lowestLocallyOwnedIndex ( ) const
template<class Scalar >
int VectorSpace::numBlocks ( ) const
template<class Scalar >
int VectorSpace::numLocalElements ( ) const
template<class Scalar>
bool VectorSpace::operator!= ( const VectorSpace< Scalar > &  other) const

test inequality of two spaces

Definition at line 67 of file TSFVectorSpaceImpl.hpp.

template<class Scalar>
bool VectorSpace::operator== ( const VectorSpace< Scalar > &  other) const

test equality between two spaces

Definition at line 59 of file TSFVectorSpaceImpl.hpp.

template<class Scalar>
void TSFExtended::VectorSpace< Scalar >::setBlock ( int  i,
const VectorSpace< Scalar > &  space 
)

set the i-th subblock

Site Contact