Thyra Version of the Day
Thyra::SpmdVectorBase< Scalar > Class Template Reference

Base class for SPMD vectors that can provide views of contiguous elements in a process. More...

#include <Thyra_SpmdVectorBase.hpp>

Inheritance diagram for Thyra::SpmdVectorBase< Scalar >:
Inheritance graph
[legend]

List of all members.

Public non-virtual interface functions

RTOpPack::SubVectorView< Scalar > getNonconstLocalSubVector ()
 Get a non-const generalized view of local vector data.
RTOpPack::ConstSubVectorView
< Scalar > 
getLocalSubVector () const
 Get a const generalized view of local vector data.
void getNonconstLocalData (const Ptr< ArrayRCP< Scalar > > &localValues)
 Returns a non-const pointer to the beginning of the local vector data.
void getLocalData (const Ptr< ArrayRCP< const Scalar > > &localValues) const
 Returns a const pointer to the beginning of the local vector data.

Protected pure virtual functions to be overridden

virtual
RTOpPack::SubVectorView
< Scalar > 
getNonconstLocalSubVectorImpl ()=0
 Virtual implementation for getNonconstLocalSubVector().
virtual
RTOpPack::ConstSubVectorView
< Scalar > 
getLocalSubVectorImpl () const =0
 Virtual implementation for getLocalSubVector().
virtual void getNonconstLocalVectorDataImpl (const Ptr< ArrayRCP< Scalar > > &localValues)=0
 Implementation of getNonconstLocalData()
virtual void getLocalVectorDataImpl (const Ptr< ArrayRCP< const Scalar > > &localValues) const =0
 Implementation of getLocalData()

Detailed Description

template<class Scalar>
class Thyra::SpmdVectorBase< Scalar >

Base class for SPMD vectors that can provide views of contiguous elements in a process.

By inheriting from this base class, vector implementations allow their vector objects to be seamlessly combined with other SPMD vector objects (of potentially different concrete types) in applyOp(). A big part of this protocol is that every vector object can expose an SpmdVectorSpaceBase object through the function spmdSpace().

Definition at line 66 of file Thyra_SpmdVectorBase.hpp.


Member Function Documentation

template<class Scalar >
RTOpPack::SubVectorView<Scalar> Thyra::SpmdVectorBase< Scalar >::getNonconstLocalSubVector ( ) [inline]

Get a non-const generalized view of local vector data.

Definition at line 82 of file Thyra_SpmdVectorBase.hpp.

template<class Scalar >
RTOpPack::ConstSubVectorView<Scalar> Thyra::SpmdVectorBase< Scalar >::getLocalSubVector ( ) const [inline]

Get a const generalized view of local vector data.

Definition at line 87 of file Thyra_SpmdVectorBase.hpp.

template<class Scalar >
void Thyra::SpmdVectorBase< Scalar >::getNonconstLocalData ( const Ptr< ArrayRCP< Scalar > > &  localValues) [inline]

Returns a non-const pointer to the beginning of the local vector data.

Parameters:
localValues[out] On output *localValues will point to an array of the local values.

Preconditions:

  • nonnull(localValues)==true

Postconditions:

  • nonnull(*localValues)==true

Note, the data view returned from this function must be freed by removing all of the ArrayRCP objects (or setting them to null).

Definition at line 107 of file Thyra_SpmdVectorBase.hpp.

template<class Scalar >
void Thyra::SpmdVectorBase< Scalar >::getLocalData ( const Ptr< ArrayRCP< const Scalar > > &  localValues) const [inline]

Returns a const pointer to the beginning of the local vector data.

Parameters:
localValues[out] On output *localValues will point to an array of the local values.

Preconditions:

  • nonnull(localValues)==true

Postconditions:

  • nonnull(*localValues)==true

Note, the data view returned from this function must be freed by removing all of the ArrayRCP objects (or setting them to null).

Definition at line 127 of file Thyra_SpmdVectorBase.hpp.

template<class Scalar >
virtual RTOpPack::SubVectorView<Scalar> Thyra::SpmdVectorBase< Scalar >::getNonconstLocalSubVectorImpl ( ) [protected, pure virtual]

Virtual implementation for getNonconstLocalSubVector().

Implemented in Thyra::SpmdVectorDefaultBase< Scalar >.

template<class Scalar >
virtual RTOpPack::ConstSubVectorView<Scalar> Thyra::SpmdVectorBase< Scalar >::getLocalSubVectorImpl ( ) const [protected, pure virtual]

Virtual implementation for getLocalSubVector().

Implemented in Thyra::SpmdVectorDefaultBase< Scalar >.

template<class Scalar >
virtual void Thyra::SpmdVectorBase< Scalar >::getNonconstLocalVectorDataImpl ( const Ptr< ArrayRCP< Scalar > > &  localValues) [protected, pure virtual]
template<class Scalar >
virtual void Thyra::SpmdVectorBase< Scalar >::getLocalVectorDataImpl ( const Ptr< ArrayRCP< const Scalar > > &  localValues) const [protected, pure virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines