Xpetra  Version of the Day
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_BlockedMultiVector_decl.hpp>

Inheritance diagram for Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > Xpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > Teuchos::Describable Teuchos::LabeledObject

Public Types

typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 
- Public Types inherited from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >
typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef KokkosClassic::DefaultNode::DefaultNodeType node_type
 

Xpetra specific

Teuchos::RCP< const BlockedMapmap_
 blocked map containing the sub block maps (either thyra or xpetra mode) More...
 
std::vector< Teuchos::RCP< MultiVector > > vv_
 array containing RCPs of the partial vectors More...
 
size_t numVectors_
 number of vectors (columns in multi vector) More...
 
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 multi-vector values to random numbers. XPetra implementation. More...
 
Teuchos::RCP< const MapgetMap () const
 Access function for the underlying Map this DistObject was constructed with. More...
 
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...
 
virtual void assign (const MultiVector &rhs)
 Implementation of the assignment operator (operator=); does a deep copy. More...
 
void ExtractVector (RCP< const MultiVector > &full, size_t block, RCP< MultiVector > &partial) const
 
void ExtractVector (RCP< MultiVector > &full, size_t block, RCP< MultiVector > &partial) const
 
RCP< MultiVectorExtractVector (RCP< const MultiVector > &full, size_t block, bool bThyraMode=false) const
 
RCP< MultiVectorExtractVector (RCP< MultiVector > &full, size_t block, bool bThyraMode=false) const
 
void ExtractVector (const MultiVector &full, size_t block, MultiVector &partial) const
 
void InsertVector (const MultiVector &partial, size_t block, MultiVector &full, bool bThyraMode=false) const
 
void InsertVector (RCP< const MultiVector > partial, size_t block, RCP< MultiVector > full, bool bThyraMode=false) const
 
void InsertVector (RCP< MultiVector > partial, size_t block, RCP< MultiVector > full, bool bThyraMode=false) const
 

Constructor/Destructor Methods

 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...
 

Post-construction modification routines

virtual void replaceGlobalValue (GlobalOrdinal, size_t, const Scalar &)
 Replace value, using global (row) index. More...
 
virtual void sumIntoGlobalValue (GlobalOrdinal, size_t, const Scalar &)
 Add value to existing value, using global (row) index. More...
 
virtual void replaceLocalValue (LocalOrdinal, size_t, const Scalar &)
 Replace value, using local (row) index. More...
 
virtual void sumIntoLocalValue (LocalOrdinal, size_t, const Scalar &)
 Add value to existing value, using local (row) index. More...
 
virtual void putScalar (const Scalar &value)
 Set all values in the multivector 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 multivector. More...
 
virtual Teuchos::ArrayRCP< Scalar > getDataNonConst (size_t j)
 View of the local values in a particular vector of this multivector. More...
 

Mathematical methods

virtual void dot (const MultiVector &, const Teuchos::ArrayView< Scalar > &) const
 Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). More...
 
virtual void abs (const MultiVector &)
 Put element-wise absolute values of input Multi-vector in target: A = abs(this). More...
 
virtual void reciprocal (const MultiVector &)
 Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). More...
 
virtual void scale (const Scalar &alpha)
 Scale the current values of a multi-vector, this = alpha*this. More...
 
virtual void scale (Teuchos::ArrayView< const Scalar > alpha)
 Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. More...
 
virtual void update (const Scalar &alpha, const MultiVector &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 MultiVector &A, const Scalar &beta, const MultiVector &B, const Scalar &gamma)
 Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. 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
 Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). More...
 
virtual void multiply (Teuchos::ETransp, Teuchos::ETransp, const Scalar &, const MultiVector &, const MultiVector &, const Scalar &)
 Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). More...
 
virtual void elementWiseMultiply (Scalar scalarAB, const Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector &B, Scalar scalarThis)
 Element-wise multiply of a Vector A with a MultiVector B. More...
 

Attribute access functions

virtual size_t getNumVectors () const
 Number of columns in the multivector. 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 multivector. More...
 
virtual bool isSameSize (const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &vec) 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...
 

Additional Inherited Members

- Public Member Functions inherited from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >
virtual ~MultiVector ()
 Destructor. More...
 
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > & operator= (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &rhs)
 Assignment operator: Does a deep copy. More...
 
virtual void dot (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A, const Teuchos::ArrayView< Scalar > &dots) const=0
 Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). More...
 
virtual void abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A)=0
 Put element-wise absolute values of input Multi-vector in target: A = abs(this). More...
 
virtual void reciprocal (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A)=0
 Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). More...
 
virtual void update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A, const Scalar &beta)=0
 Update multi-vector values with scaled values of A, this = beta*this + alpha*A. More...
 
virtual void update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &B, const Scalar &gamma)=0
 Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. More...
 
virtual void multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &B, const Scalar &beta)=0
 Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). More...
 
virtual void elementWiseMultiply (Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &B, Scalar scalarThis)=0
 Multiply a Vector A elementwise by a MultiVector B. More...
 
virtual bool isSameSize (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &vec) const=0
 
virtual void replaceMap (const RCP< const Map< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >> &map)=0
 
- Public Member Functions inherited from Xpetra::DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >
virtual ~DistObject ()
 Destructor. More...
 
virtual void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)=0
 Import data into this object using an Import object ("forward mode"). More...
 
virtual void doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)=0
 Import data into this object using an Export object ("reverse mode"). More...
 
virtual void beginImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)
 Import data into this object using an Import object ("forward mode"). More...
 
virtual void beginImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)
 Import data into this object using an Export object ("reverse mode"). More...
 
virtual void endImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)
 Import data into this object using an Import object ("forward mode"). More...
 
virtual void endImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)
 Import data into this object using an Export object ("reverse mode"). More...
 
virtual void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)=0
 Export data into this object using an Export object ("forward mode"). More...
 
virtual void doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)=0
 Export data into this object using an Import object ("reverse mode"). More...
 
virtual void beginExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)
 Export data into this object using an Export object ("forward mode"). More...
 
virtual void beginExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)
 Export data into this object using an Import object ("reverse mode"). More...
 
virtual void endExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Export< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &exporter, CombineMode CM)
 Export data into this object using an Export object ("forward mode"). More...
 
virtual void endExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &source, const Import< LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &importer, CombineMode CM)
 Export data into this object using an Import object ("reverse mode"). More...
 
- Public Member Functions inherited from Teuchos::Describable
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
- Public Member Functions inherited from Teuchos::LabeledObject
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 
- Protected Member Functions inherited from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >
virtual void assign (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType > &rhs)=0
 Implementation of the assignment operator (operator=); does a deep copy. More...
 

Detailed Description

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

Definition at line 75 of file Xpetra_BlockedMultiVector_decl.hpp.

Member Typedef Documentation

◆ scalar_type

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

Definition at line 79 of file Xpetra_BlockedMultiVector_decl.hpp.

◆ local_ordinal_type

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

Definition at line 80 of file Xpetra_BlockedMultiVector_decl.hpp.

◆ global_ordinal_type

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

Definition at line 81 of file Xpetra_BlockedMultiVector_decl.hpp.

◆ node_type

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

Definition at line 82 of file Xpetra_BlockedMultiVector_decl.hpp.

Constructor & Destructor Documentation

◆ BlockedMultiVector() [1/4]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedMultiVector ( const Teuchos::RCP< const BlockedMap > &  map,
size_t  NumVectors,
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 multi vector
NumVectorsNumber of vector columns in multi vector
zeroOutIf true initialize multivector with zeros

◆ BlockedMultiVector() [2/4]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedMultiVector ( Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > >  bmap,
Teuchos::RCP< const MultiVector v 
)

Const version of constructor which accepts a const version of the multi-vector

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

◆ BlockedMultiVector() [3/4]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedMultiVector ( Teuchos::RCP< const Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >>  mapExtractor,
Teuchos::RCP< const MultiVector v 
)

Const version of constructor which accepts a const version of the multi-vector

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

Definition at line 136 of file Xpetra_BlockedMultiVector_def.hpp.

◆ BlockedMultiVector() [4/4]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::BlockedMultiVector ( const Teuchos::RCP< const BlockedMap > &  map,
std::vector< Teuchos::RCP< MultiVector > > &  vin 
)

Constructor to build a blocked multivector from a blocked map and component vectors

Note
We do NOT check map compatibility between the BlockedMap and the array of multivectors
Parameters
mapBlockedMap object containing information about the block splitting
vinA std::vector of RCPs to component vectors

◆ ~BlockedMultiVector()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~BlockedMultiVector
virtual

Destructor.

Definition at line 172 of file Xpetra_BlockedMultiVector_def.hpp.

Member Function Documentation

◆ operator=()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::operator= ( const MultiVector 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 187 of file Xpetra_BlockedMultiVector_def.hpp.

◆ replaceGlobalValue()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  ,
size_t  ,
const Scalar &   
)
virtual

◆ sumIntoGlobalValue()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  ,
size_t  ,
const Scalar &   
)
virtual

◆ replaceLocalValue()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  ,
size_t  ,
const Scalar &   
)
virtual

◆ sumIntoLocalValue()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  ,
size_t  ,
const Scalar &   
)
virtual

◆ putScalar()

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

◆ getVector()

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

◆ getVectorNonConst()

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

◆ getData()

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

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

Implements Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >.

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 275 of file Xpetra_BlockedMultiVector_def.hpp.

◆ getDataNonConst()

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

◆ dot()

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 303 of file Xpetra_BlockedMultiVector_def.hpp.

◆ abs()

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 312 of file Xpetra_BlockedMultiVector_def.hpp.

◆ reciprocal()

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 321 of file Xpetra_BlockedMultiVector_def.hpp.

◆ scale() [1/2]

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

◆ scale() [2/2]

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

◆ update() [1/2]

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 362 of file Xpetra_BlockedMultiVector_def.hpp.

◆ update() [2/2]

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 467 of file Xpetra_BlockedMultiVector_def.hpp.

◆ norm1()

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

◆ norm2()

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

◆ normInf()

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

◆ meanValue()

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

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

Implements Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >.

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 584 of file Xpetra_BlockedMultiVector_def.hpp.

◆ multiply()

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 593 of file Xpetra_BlockedMultiVector_def.hpp.

◆ elementWiseMultiply()

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

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

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 607 of file Xpetra_BlockedMultiVector_def.hpp.

◆ getNumVectors()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumVectors
virtual

◆ getLocalLength()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalLength
virtual

◆ getGlobalLength()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
global_size_t Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalLength
virtual

◆ isSameSize()

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

Local number of rows on the calling process.

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 684 of file Xpetra_BlockedMultiVector_def.hpp.

◆ description()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
std::string Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::description
virtual

◆ describe()

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

◆ replaceMap()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::replaceMap ( const RCP< const Map > &  map)
virtual

◆ doImport() [1/2]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::doImport ( const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  ,
const Import ,
CombineMode   
)
virtual

◆ doExport() [1/2]

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

◆ doImport() [2/2]

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

Import (using an Exporter).

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 780 of file Xpetra_BlockedMultiVector_def.hpp.

◆ doExport() [2/2]

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

Export (using an Importer).

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 791 of file Xpetra_BlockedMultiVector_def.hpp.

◆ setSeed()

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

◆ randomize()

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

◆ Xpetra_randomize()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Xpetra_randomize
virtual

Set multi-vector values to random numbers. XPetra implementation.

Reimplemented from Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, KokkosClassic::DefaultNode::DefaultNodeType >.

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 826 of file Xpetra_BlockedMultiVector_def.hpp.

◆ getMap()

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

◆ getBlockedMap()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getBlockedMap

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

Definition at line 845 of file Xpetra_BlockedMultiVector_def.hpp.

◆ getMultiVector() [1/2]

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

return partial multivector associated with block row r

Definition at line 855 of file Xpetra_BlockedMultiVector_def.hpp.

◆ getMultiVector() [2/2]

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

return partial multivector associated with block row r

Definition at line 869 of file Xpetra_BlockedMultiVector_def.hpp.

◆ setMultiVector()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::setMultiVector ( size_t  r,
Teuchos::RCP< const MultiVector v,
bool  bThyraMode 
)

set partial multivector associated with block row r

Definition at line 886 of file Xpetra_BlockedMultiVector_def.hpp.

◆ Merge()

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::Merge

merge BlockedMultiVector blocks to a single MultiVector

Definition at line 914 of file Xpetra_BlockedMultiVector_def.hpp.

◆ assign()

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

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

Each subclass must implement this. This includes Xpetra::EpetraMultiVector and Xpetra::TpetraMultiVector as well as Xpetra::BockedMultiVector

Reimplemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 944 of file Xpetra_BlockedMultiVector_def.hpp.

◆ ExtractVector() [1/5]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const MultiVector > &  full,
size_t  block,
RCP< MultiVector > &  partial 
) const
private

◆ ExtractVector() [2/5]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< MultiVector > &  full,
size_t  block,
RCP< MultiVector > &  partial 
) const
private

◆ ExtractVector() [3/5]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP<MultiVector> Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const MultiVector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
private

◆ ExtractVector() [4/5]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP<MultiVector> Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< MultiVector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
private

◆ ExtractVector() [5/5]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( const MultiVector full,
size_t  block,
MultiVector partial 
) const
private

Definition at line 1131 of file Xpetra_BlockedMultiVector_def.hpp.

◆ InsertVector() [1/3]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( const MultiVector partial,
size_t  block,
MultiVector full,
bool  bThyraMode = false 
) const
private

Definition at line 1147 of file Xpetra_BlockedMultiVector_def.hpp.

◆ InsertVector() [2/3]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< const MultiVector partial,
size_t  block,
RCP< MultiVector full,
bool  bThyraMode = false 
) const
private

◆ InsertVector() [3/3]

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< MultiVector partial,
size_t  block,
RCP< MultiVector full,
bool  bThyraMode = false 
) const
private

Member Data Documentation

◆ map_

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Teuchos::RCP<const BlockedMap> Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::map_
private

blocked map containing the sub block maps (either thyra or xpetra mode)

Definition at line 390 of file Xpetra_BlockedMultiVector_decl.hpp.

◆ vv_

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
std::vector<Teuchos::RCP<MultiVector> > Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::vv_
private

array containing RCPs of the partial vectors

Definition at line 391 of file Xpetra_BlockedMultiVector_decl.hpp.

◆ numVectors_

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::numVectors_
private

number of vectors (columns in multi vector)

Definition at line 392 of file Xpetra_BlockedMultiVector_decl.hpp.


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