Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Related Functions | List of all members
Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Concrete implementation of an SPMD vector space for Tpetra. More...

#include <Thyra_TpetraVectorSpace_decl.hpp>

Inheritance diagram for Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

Public Types

typedef TpetraVectorSpace
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > 
this_t
 

Related Functions

(Note that these are not member functions.)

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< TpetraVectorSpace< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
tpetraVectorSpace (const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &tpetraMap)
 Nonmember constructor that creats a serial vector space. More...
 

Constructors and initializers

static RCP< TpetraVectorSpace
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
create ()
 Create with weak ownership to self. More...
 
void initialize (const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &tpetraMap)
 Initialize a serial space. More...
 

Utility functions

RCP< TpetraVectorSpace< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createLocallyReplicatedVectorSpace (int size) const
 Create Tpetra locally replicated vector space. More...
 

Public overridden from VectorSpaceBase

bool hasInCoreView (const Range1D &rng, const EViewType viewType, const EStrideType strideType) const
 Returns true if all the elements in rng are in this process. More...
 
RCP< const VectorSpaceBase
< Scalar > > 
clone () const
 
RCP< const Tpetra::Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getTpetraMap () const
 Get the embedded Tpetra::Map. More...
 

Protected overridden from VectorSpaceBase

RCP< MultiVectorBase< Scalar > > createCachedMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, bool initialize=true) const
 Create a (possibly) cached multi-vector member that is a non-const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView. More...
 
RCP< const MultiVectorBase
< Scalar > > 
createCachedMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const
 Create a (possibly) cached multi-vector member that is a const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView. More...
 
RCP< VectorBase< Scalar > > createMember () const
 
RCP< MultiVectorBase< Scalar > > createMembers (int numMembers) const
 

Public overridden from SpmdVectorSpaceDefaultBase

RCP< const Teuchos::Comm
< Ordinal > > 
getComm () const
 
Ordinal localSubDim () const
 

Additional Inherited Members

- Public Member Functions inherited from Thyra::SpmdVectorSpaceDefaultBase< Scalar >
 SpmdVectorSpaceDefaultBase ()
 
Ordinal localOffset () const
 
Ordinal mapCode () const
 
bool isLocallyReplicated () const
 Returns true if vector space is locally replicated space. More...
 
std::string description () const
 
Ordinal dim () const
 Returns the sum of the local number of elements on every process. More...
 
Teuchos::RCP< const
VectorSpaceFactoryBase< Scalar > > 
smallVecSpcFcty () const
 Returns a DefaultSpmdVectorSpaceFactory object that has been given getComm(). More...
 
bool isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const
 Checks the general compatibility of parallel (or serial on one process) Spmd-based vector spaces. More...
 
- Public Member Functions inherited from Thyra::SpmdVectorSpaceBase< Scalar >
- Public Member Functions inherited from Thyra::VectorSpaceBase< Scalar >
void scalarProds (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
 Return the scalar product of each column in two multi-vectors in the vector space. More...
 
- Public Member Functions inherited from Thyra::ScalarProdVectorSpaceBase< Scalar >
 ScalarProdVectorSpaceBase ()
 Construct to use dot product as the default. More...
 
 ScalarProdVectorSpaceBase (const RCP< const ScalarProdBase< Scalar > > &scalarProd)
 Construct with a different scalar product. More...
 
virtual void setScalarProd (const RCP< const ScalarProdBase< Scalar > > &scalarProd)
 Set a different scalar product. More...
 
RCP< const ScalarProdBase
< Scalar > > 
getScalarProd () const
 Return the current scalar product. More...
 
bool isEuclidean () const
 Returns getScalarProd()->isEuclidean() More...
 
Scalar scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const
 Returns getScalarProd()->scalarProd(x,y) More...
 
void scalarProdsImpl (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const
 Calls getScalarProd()->scalarProds(X,Y,scalar_prods) More...
 
- Protected Member Functions inherited from Thyra::SpmdVectorSpaceDefaultBase< Scalar >
virtual void updateState (const Ordinal globalDim, const bool isLocallyReplicated=false)
 This function must be called whenever the state of this changes and some internal state must be updated. More...
 
- Protected Member Functions inherited from Thyra::VectorSpaceBase< Scalar >
- Protected Member Functions inherited from Thyra::VectorSpaceDefaultBase< Scalar >
RCP< VectorBase< Scalar > > createMemberView (const RTOpPack::SubVectorView< Scalar > &raw_v) const
 
RCP< const VectorBase< Scalar > > createMemberView (const RTOpPack::ConstSubVectorView< Scalar > &raw_v) const
 
RCP< MultiVectorBase< Scalar > > createMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv) const
 
RCP< const MultiVectorBase
< Scalar > > 
createMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
class Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Concrete implementation of an SPMD vector space for Tpetra.

Definition at line 27 of file Thyra_TpetraVectorSpace_decl.hpp.

Member Typedef Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
typedef TpetraVectorSpace<Scalar,LocalOrdinal,GlobalOrdinal,Node> Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::this_t

Definition at line 32 of file Thyra_TpetraVectorSpace_decl.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::create ( )
static

Create with weak ownership to self.

Definition at line 26 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::initialize ( const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &  tpetraMap)

Initialize a serial space.

Definition at line 35 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createLocallyReplicatedVectorSpace ( int  size) const

Create Tpetra locally replicated vector space.

This vector space forms the domain space of a Thyra::TpetraMultiVector.

Definition at line 53 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasInCoreView ( const Range1D rng,
const EViewType  viewType,
const EStrideType  strideType 
) const
virtual

Returns true if all the elements in rng are in this process.

Reimplemented from Thyra::VectorSpaceBase< Scalar >.

Definition at line 229 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const VectorSpaceBase< Scalar > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::clone ( ) const
virtual

Reimplemented from Thyra::VectorSpaceBase< Scalar >.

Definition at line 245 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getTpetraMap ( ) const

Get the embedded Tpetra::Map.

Definition at line 252 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< VectorBase< Scalar > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createMember ( ) const
protectedvirtual

Implements Thyra::VectorSpaceBase< Scalar >.

Definition at line 66 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< MultiVectorBase< Scalar > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createMembers ( int  numMembers) const
protectedvirtual

Implements Thyra::VectorSpaceBase< Scalar >.

Definition at line 79 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< MultiVectorBase< Scalar > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createCachedMembersView ( const RTOpPack::SubMultiVectorView< Scalar > &  raw_mv,
bool  initialize = true 
) const
virtual

Create a (possibly) cached multi-vector member that is a non-const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView.

Parameters
raw_mv[in] On input contains pointer (i.e. raw_mv.values()) to array that the returned MultiVectorBase will be a view of.

Preconditions:

  • raw_mv has been initialized to memory (i.e. raw_mv.subDim()!=0 && raw_mv.values()!=NULL).

  • raw_mv is consistent with the local storage of this spaces vector data. This precondition is purposefully vague since this function can be used an variety of specialized use-cases.

Postconditions:

It is stated here that the client can not expect that the values pointed to by raw_mv.values() to be changed until the smart pointer returnVal goes out of scope. This is to allow for an implementation that temporarily copies data into and out of a MultiVectorBase object using explicit vector access.

Reimplemented from Thyra::VectorSpaceBase< Scalar >.

Definition at line 124 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const MultiVectorBase< Scalar > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::createCachedMembersView ( const RTOpPack::ConstSubMultiVectorView< Scalar > &  raw_mv) const
virtual

Create a (possibly) cached multi-vector member that is a const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView.

Parameters
raw_mv[in] On input contains pointer (i.e. raw_mv.values()) to array that the returned MultiVectorBase will be a view of. The data pointed to by raw_mv.values() must remain valid until the returned MultiVectorBase object is destroyed.

This function works exactly the same as the previous version that takes a RTOpPack::SubMultiVectorView object except that this version takes a RTOpPack::ConstSubMultiVectorView object and returns a smart pointer to a const MultiVectorBase object.

Preconditions:

Postconditions:

Reimplemented from Thyra::VectorSpaceBase< Scalar >.

Definition at line 184 of file Thyra_TpetraVectorSpace_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< const Teuchos::Comm< Ordinal > > Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getComm ( ) const
virtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Ordinal Thyra::TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node >::localSubDim ( ) const
virtual

Friends And Related Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< TpetraVectorSpace< Scalar, LocalOrdinal, GlobalOrdinal, Node > > tpetraVectorSpace ( const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &  tpetraMap)
related

Nonmember constructor that creats a serial vector space.

Definition at line 141 of file Thyra_TpetraVectorSpace_decl.hpp.


The documentation for this class was generated from the following files: