Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_BlockedVector_decl.hpp>

Inheritance diagram for Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > Xpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Public Types

using scalar_type = Scalar
 
using local_ordinal_type = LocalOrdinal
 
using global_ordinal_type = GlobalOrdinal
 
using node_type = Node
 
- Public Types inherited from Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
using scalar_type = Scalar
 
using local_ordinal_type = LocalOrdinal
 
using global_ordinal_type = GlobalOrdinal
 
using node_type = Node
 
- Public Types inherited from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 
- Public Types inherited from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 

Public Member Functions

Teuchos::RCP< const MapgetMap () const
 Access function for the underlying Map this DistObject was constructed with. More...
 
Teuchos::RCP
< Xpetra::MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getMultiVector (size_t r) const
 return partial Vector associated with block row r More...
 
Teuchos::RCP
< Xpetra::MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getMultiVector (size_t r, bool bThyraMode) const
 return partial Vector associated with block row r More...
 
void setMultiVector (size_t r, Teuchos::RCP< const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > v, bool bThyraMode)
 set partial Vector associated with block row r More...
 
Teuchos::RCP
< Xpetra::MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
Merge () const
 merge BlockedVector blocks to a single Vector More...
 
- Public Member Functions inherited from Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~Vector ()
 Destructor. More...
 
- Public Member Functions inherited from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~MultiVector ()
 Destructor. More...
 
MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > & 
operator= (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
 Assignment operator: Does a deep copy. More...
 
virtual void replaceMap (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &map)=0
 
- Public Member Functions inherited from Xpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~DistObject ()
 Destructor. More...
 
- Public Member Functions inherited from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
Teuchos::RCP< const
Xpetra::BlockedMap
< LocalOrdinal, GlobalOrdinal,
Node > > 
getBlockedMap () const
 Access function for the underlying Map this DistObject was constructed with. More...
 
Teuchos::RCP< MultiVectorgetMultiVector (size_t r) const
 return partial multivector associated with block row r More...
 
Teuchos::RCP< MultiVectorgetMultiVector (size_t r, bool bThyraMode) const
 return partial multivector associated with block row r More...
 
void setMultiVector (size_t r, Teuchos::RCP< const MultiVector > v, bool bThyraMode)
 set partial multivector associated with block row r More...
 
Teuchos::RCP< MultiVectorMerge () const
 merge BlockedMultiVector blocks to a single MultiVector More...
 
 BlockedMultiVector (const Teuchos::RCP< const BlockedMap > &map, size_t NumVectors, bool zeroOut=true)
 Constructor. More...
 
 BlockedMultiVector (Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > > bmap, Teuchos::RCP< const MultiVector > v)
 
 BlockedMultiVector (Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >> mapExtractor, Teuchos::RCP< const MultiVector > v)
 
 BlockedMultiVector (const Teuchos::RCP< const BlockedMap > &map, std::vector< Teuchos::RCP< MultiVector > > &vin)
 
virtual ~BlockedMultiVector ()
 Destructor. More...
 
BlockedMultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > & 
operator= (const MultiVector &rhs)
 Assignment operator: Does a deep copy. More...
 

Protected Member Functions

virtual void assign (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
 Implementation of the assignment operator (operator=); does a deep copy. More...
 

Constructor/Destructor Methods

 BlockedVector (const Teuchos::RCP< const BlockedMap > &map, bool zeroOut=true)
 Constructor. More...
 
 BlockedVector (Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >> bmap, Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >> v)
 
 BlockedVector (Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >> mapExtractor, Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >> v)
 
virtual ~BlockedVector ()
 Destructor. More...
 
BlockedVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > & 
operator= (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
 Assignment operator: Does a deep copy. More...
 

Post-construction modification routines

virtual void replaceGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
 Replace value, using global (row) index. More...
 
virtual void sumIntoGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using global (row) index. More...
 
virtual void replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Replace value, using local (row) index. More...
 
virtual void sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using local (row) index. More...
 
virtual void replaceGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Replace value, using global (row) index. More...
 
virtual void sumIntoGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Add value to existing value, using global (row) index. More...
 
virtual void replaceLocalValue (LocalOrdinal myRow, const Scalar &value)
 Replace value, using local (row) index. More...
 
virtual void sumIntoLocalValue (LocalOrdinal myRow, const Scalar &value)
 Add value to existing value, using local (row) index. More...
 
virtual void putScalar (const Scalar &value)
 Set all values in the vector with the given value. More...
 

Data Copy and View get methods

virtual Teuchos::RCP< const
Xpetra::Vector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getVector (size_t j) const
 Return a Vector which is a const view of column j. More...
 
virtual Teuchos::RCP
< Xpetra::Vector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getVectorNonConst (size_t j)
 Return a Vector which is a nonconst view of column j. More...
 
virtual Teuchos::ArrayRCP
< const Scalar > 
getData (size_t j) const
 Const view of the local values in a particular vector of this vector. More...
 
virtual Teuchos::ArrayRCP< Scalar > getDataNonConst (size_t j)
 View of the local values in a particular vector of this vector. More...
 

Mathematical methods

virtual void dot (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
 Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). More...
 
virtual Scalar dot (const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) const
 Computes dot product of this Vector against input Vector x. More...
 
virtual void abs (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
 Put element-wise absolute values of input vector in target: A = abs(this). More...
 
virtual void reciprocal (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
 Put element-wise reciprocal values of input vector in target, this(i,j) = 1/A(i,j). More...
 
virtual void scale (const Scalar &alpha)
 Scale the current values of a vector, this = alpha*this. More...
 
virtual void scale (Teuchos::ArrayView< const Scalar > alpha)
 Scale the current values of a vector, this[j] = alpha[j]*this[j]. More...
 
virtual void update (const Scalar &alpha, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)
 Update multi-vector values with scaled values of A, this = beta*this + alpha*A. More...
 
virtual void update (const Scalar &alpha, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &gamma)
 Update vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. More...
 
virtual Teuchos::ScalarTraits
< Scalar >::magnitudeType 
norm1 () const
 Compute 1-norm of vector. More...
 
virtual Teuchos::ScalarTraits
< Scalar >::magnitudeType 
norm2 () const
 Compute 2-norm of vector. More...
 
virtual Teuchos::ScalarTraits
< Scalar >::magnitudeType 
normInf () const
 Compute Inf-norm in vector. More...
 
virtual void norm1 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 Compute 1-norm of each vector in multi-vector. More...
 
virtual void norm2 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 
virtual void normInf (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 Compute Inf-norm of each vector in multi-vector. More...
 
virtual void meanValue (const Teuchos::ArrayView< Scalar > &) const
 
virtual Scalar meanValue () const
 Compute mean (average) value of this Vector. More...
 
virtual void multiply (Teuchos::ETransp, Teuchos::ETransp, const Scalar &, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Scalar &)
 Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). More...
 
virtual void multiply (Teuchos::ETransp, Teuchos::ETransp, const Scalar &, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Scalar &)
 Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). More...
 
virtual void elementWiseMultiply (Scalar, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, Scalar)
 Element-wise multiply of a Vector A with a MultiVector B. More...
 
virtual void elementWiseMultiply (Scalar, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar)
 Element-wise multiply of a Vector A with a Vector B. More...
 

Attribute access functions

virtual size_t getNumVectors () const
 Number of columns in the Vector. More...
 
virtual size_t getLocalLength () const
 Local number of rows on the calling process. More...
 
virtual global_size_t getGlobalLength () const
 Global number of rows in the Vector. More...
 
virtual bool isSameSize (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &) const
 Local number of rows on the calling process. More...
 

Overridden from Teuchos::Describable

virtual std::string description () const
 A simple one-line description of this object. More...
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with the given verbosity level to a FancyOStream. More...
 
virtual void replaceMap (const RCP< const Map > &map)
 
virtual void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Import &, CombineMode)
 Import. More...
 
virtual void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Import &, CombineMode)
 Export. More...
 
virtual void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Export &, CombineMode)
 Import (using an Exporter). More...
 
virtual void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &, const Export &, CombineMode)
 Export (using an Importer). More...
 

Xpetra specific

virtual void setSeed (unsigned int seed)
 Set seed for Random function. More...
 
virtual void randomize (bool bUseXpetraImplementation=false)
 Set multi-vector values to random numbers. More...
 
virtual void Xpetra_randomize ()
 Set vector values to random numbers. XPetra implementation. More...
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
class Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 69 of file Xpetra_BlockedVector_decl.hpp.

Member Typedef Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
using Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type = Scalar

Definition at line 74 of file Xpetra_BlockedVector_decl.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
using Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type = LocalOrdinal

Definition at line 75 of file Xpetra_BlockedVector_decl.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
using Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type = GlobalOrdinal

Definition at line 76 of file Xpetra_BlockedVector_decl.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
using Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type = Node

Definition at line 77 of file Xpetra_BlockedVector_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedVector ( const Teuchos::RCP< const BlockedMap > &  map,
bool  zeroOut = true 
)

Constructor.

Const version of constructor which accepts a const version of a blocked map

Parameters
mapBlockedMap defining the block structure of the vector
zeroOutIf true initialize vector with zeros
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedVector ( Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >>  bmap,
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >>  v 
)

NonConst version of constructor which accepts a const version of the vector

Note
If you change the information in input vector v the data in the blocked vector are not affected (and vice versa). Consider the blocked vector to be a copy of the input vector (not a view)
Parameters
bmapBlockedMap object containing information about the block splitting
vVector that is to be splitted into a blocked vector

Definition at line 70 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedVector ( Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >>  mapExtractor,
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >>  v 
)

Non-const version of constructor which accepts a non-const version of the vector

Note
If you change the information in input vector v the data in the blocked vector are not affected (and vice versa). Consider the blocked vector to be a copy of the input vector (not a view)
Parameters
mapExtractorMapExtractor object containing information about the block splitting
vVector that is to be splitted into a blocked vector
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~BlockedVector ( )
virtual

Destructor.

Definition at line 86 of file Xpetra_BlockedVector_def.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::operator= ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  rhs)

Assignment operator: Does a deep copy.

The assignment operator does a deep copy, just like subclasses' copy constructors.

Note
This currently only works if both *this and the input argument are instances of the same subclass.

Definition at line 93 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar &  value 
)
virtual

Replace value, using global (row) index.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 103 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar &  value 
)
virtual

Add value to existing value, using global (row) index.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 112 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar &  value 
)
virtual

Replace value, using local (row) index.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 121 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar &  value 
)
virtual

Add value to existing value, using local (row) index.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 130 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  globalRow,
const Scalar &  value 
)
virtual

Replace value, using global (row) index.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 139 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
const Scalar &  value 
)
virtual

Add value to existing value, using global (row) index.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 148 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  myRow,
const Scalar &  value 
)
virtual

Replace value, using local (row) index.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 156 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  myRow,
const Scalar &  value 
)
virtual

Add value to existing value, using local (row) index.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 164 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::putScalar ( const Scalar &  value)
virtual

Set all values in the vector with the given value.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 172 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector ( size_t  j) const
virtual

Return a Vector which is a const view of column j.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 180 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVectorNonConst ( size_t  j)
virtual

Return a Vector which is a nonconst view of column j.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 188 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< const Scalar > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getData ( size_t  j) const
virtual

Const view of the local values in a particular vector of this vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 196 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ArrayRCP< Scalar > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDataNonConst ( size_t  j)
virtual

View of the local values in a particular vector of this vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 204 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dot ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Teuchos::ArrayView< Scalar > &  dots 
) const
virtual

Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 212 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Scalar Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dot ( const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  a) const
virtual

Computes dot product of this Vector against input Vector x.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 221 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::abs ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A)
virtual

Put element-wise absolute values of input vector in target: A = abs(this).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 231 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::reciprocal ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A)
virtual

Put element-wise reciprocal values of input vector in target, this(i,j) = 1/A(i,j).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 240 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale ( const Scalar &  alpha)
virtual

Scale the current values of a vector, this = alpha*this.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 249 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scale ( Teuchos::ArrayView< const Scalar >  alpha)
virtual

Scale the current values of a vector, this[j] = alpha[j]*this[j].

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 258 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::update ( const Scalar &  alpha,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Scalar &  beta 
)
virtual

Update multi-vector values with scaled values of A, this = beta*this + alpha*A.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 267 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::update ( const Scalar &  alpha,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Scalar &  beta,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  B,
const Scalar &  gamma 
)
virtual

Update vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 278 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm1 ( ) const
virtual

Compute 1-norm of vector.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 291 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm2 ( ) const
virtual

Compute 2-norm of vector.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 302 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::normInf ( ) const
virtual

Compute Inf-norm in vector.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 314 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm1 ( const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
virtual

Compute 1-norm of each vector in multi-vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 326 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::norm2 ( const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
virtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::normInf ( const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
virtual

Compute Inf-norm of each vector in multi-vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 344 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::meanValue ( const Teuchos::ArrayView< Scalar > &  ) const
virtual

Compute mean (average) value of each vector in vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 353 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Scalar Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::meanValue ( ) const
virtual

Compute mean (average) value of this Vector.

Implements Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 362 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::multiply ( Teuchos::ETransp  ,
Teuchos::ETransp  ,
const Scalar &  ,
const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Scalar &   
)
virtual

Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).

Definition at line 371 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::multiply ( Teuchos::ETransp  ,
Teuchos::ETransp  ,
const Scalar &  ,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Scalar &   
)
virtual

Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 385 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::elementWiseMultiply ( Scalar  scalarAB,
const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  B,
Scalar  scalarThis 
)
virtual

Element-wise multiply of a Vector A with a MultiVector B.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 399 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::elementWiseMultiply ( Scalar  ,
const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  B,
Scalar   
)
virtual

Element-wise multiply of a Vector A with a Vector B.

Definition at line 411 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumVectors ( ) const
virtual

Number of columns in the Vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 455 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalLength ( ) const
virtual

Local number of rows on the calling process.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 464 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalLength ( ) const
virtual

Global number of rows in the Vector.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 475 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isSameSize ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ) const
virtual

Local number of rows on the calling process.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 484 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
std::string Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description ( ) const
virtual

A simple one-line description of this object.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 495 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
virtual

Print the object with the given verbosity level to a FancyOStream.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 504 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceMap ( const RCP< const Map > &  map)
virtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doImport ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Import ,
CombineMode   
)
virtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doExport ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Import ,
CombineMode   
)
virtual
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doImport ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Export ,
CombineMode   
)
virtual

Import (using an Exporter).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 548 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doExport ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Export ,
CombineMode   
)
virtual

Export (using an Importer).

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 559 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setSeed ( unsigned int  seed)
virtual

Set seed for Random function.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 570 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::randomize ( bool  bUseXpetraImplementation = false)
virtual

Set multi-vector values to random numbers.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 582 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Xpetra_randomize ( )
virtual

Set vector values to random numbers. XPetra implementation.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 594 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMap ( ) const
virtual

Access function for the underlying Map this DistObject was constructed with.

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 637 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMultiVector ( size_t  r) const

return partial Vector associated with block row r

Definition at line 647 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMultiVector ( size_t  r,
bool  bThyraMode 
) const

return partial Vector associated with block row r

Definition at line 656 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setMultiVector ( size_t  r,
Teuchos::RCP< const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >  v,
bool  bThyraMode 
)

set partial Vector associated with block row r

Definition at line 665 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Merge ( ) const

merge BlockedVector blocks to a single Vector

Definition at line 677 of file Xpetra_BlockedVector_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::assign ( const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  rhs)
protectedvirtual

Implementation of the assignment operator (operator=); does a deep copy.

Each subclass must implement this. This includes Xpetra::EpetraVector and Xpetra::TpetraVector as well as Xpetra::BockedVector

Reimplemented from Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 686 of file Xpetra_BlockedVector_def.hpp.


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