MultiVectorBase implemented using columns of separate abstract vectors.
More...
#include <Thyra_DefaultColumnwiseMultiVectorDecl.hpp>
Inheritance diagram for Thyra::DefaultColumnwiseMultiVector< Scalar >:
Constructors/Initializers | |
| DefaultColumnwiseMultiVector () | |
| Construct to initialized. | |
| DefaultColumnwiseMultiVector (const Teuchos::RCP< VectorBase< Scalar > > &col_vec) | |
Calls initialize(). | |
| DefaultColumnwiseMultiVector (const Teuchos::RCP< const VectorSpaceBase< Scalar > > &range, const Teuchos::RCP< const VectorSpaceBase< Scalar > > &domain, const Teuchos::RCP< VectorBase< Scalar > > col_vecs[]=NULL) | |
Calls initialize(). | |
| void | initialize (const Teuchos::RCP< VectorBase< Scalar > > &col_vec) |
| Initialize given a single vector object. | |
| void | initialize (const Teuchos::RCP< const VectorSpaceBase< Scalar > > &range, const Teuchos::RCP< const VectorSpaceBase< Scalar > > &domain, const Teuchos::RCP< VectorBase< Scalar > > col_vecs[]=NULL) |
| Initialize given the spaces for the columns and rows and possibly the column vectors. | |
| void | set_uninitialized () |
| Set uninitialized. | |
Overridden from OpBase | |
| Teuchos::RCP< const VectorSpaceBase< Scalar > > | range () const |
| | |
| Teuchos::RCP< const VectorSpaceBase< Scalar > > | domain () const |
| | |
Overridden from MultiVectorBase | |
| Teuchos::RCP< VectorBase< Scalar > > | col (Index j) |
| | |
| Teuchos::RCP< MultiVectorBase< Scalar > > | subView (const Range1D &col_rng) |
| | |
Overridden from SingleRhsLinearOpBase | |
| bool | opSupported (ETransp M_trans) const |
For complex Scalar types returns true for NOTRANS and CONJTRANS and for real types returns true for all values of M_trans. | |
| void | apply (const ETransp M_trans, const VectorBase< Scalar > &x, VectorBase< Scalar > *y, const Scalar alpha, const Scalar beta) const |
This function is implemented in terms of the multi-vector applyOp() function. | |
MultiVectorBase implemented using columns of separate abstract vectors.
This is a very bad implementation of a multi-vector but this will work in situations where you need a multi-vector but some underlying linear algebra library does not directly support them.
This subclass can be used to represent a MultiVectorBase wrapper around a single VectorBase object so that a single vector can be passed to a method that expects a MultiVectorBase object.
Definition at line 52 of file Thyra_DefaultColumnwiseMultiVectorDecl.hpp.
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | ) |
Construct to initialized.
Postconditions:
this->range().get() == NULL this->domain().get() == NULL
Definition at line 46 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | const Teuchos::RCP< VectorBase< Scalar > > & | col_vec | ) |
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | const Teuchos::RCP< const VectorSpaceBase< Scalar > > & | range, | |
| const Teuchos::RCP< const VectorSpaceBase< Scalar > > & | domain, | |||
| const Teuchos::RCP< VectorBase< Scalar > > | col_vecs[] = NULL | |||
| ) |
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::initialize | ( | const Teuchos::RCP< VectorBase< Scalar > > & | col_vec | ) |
Initialize given a single vector object.
| col_vec | [in] A single column vector. It is not allowed for col_vecs==NULL. |
col_vec.get() != NULL (throw std::invalid_argument) col_vec->dim() > 0 (throw std::invalid_argument) Postconditions:
this->range().get() == col_vec.space().get() this->domain()->dim() == 1 this->col(0).get() == col_vec.get()
Definition at line 68 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::initialize | ( | const Teuchos::RCP< const VectorSpaceBase< Scalar > > & | range, | |
| const Teuchos::RCP< const VectorSpaceBase< Scalar > > & | domain, | |||
| const Teuchos::RCP< VectorBase< Scalar > > | col_vecs[] = NULL | |||
| ) |
Initialize given the spaces for the columns and rows and possibly the column vectors.
| range | [in] The space that the columns must lie in. The underlying vector space must not be changed while this is in use. | |
| domain | [in] The space that the rows must lie in. The underlying vector space must not be changed while this is in use. What this argument really specifies is what vector type will be compatible with the vectors that the client may try to use to interact with the rows of this multivector. | |
| col_vecs | [in] Array (size domain->dim()) of column vectors to use for the columns of this. It is allowed for col_vecs==NULL in which case range->createMember() will be used to create the columns of this. |
range.get() != NULL (throw std::invalid_argument) domain.get() != NULL (throw std::invalid_argument) range->dim() > 0 (throw std::invalid_argument) domain->dim() > 0 (throw std::invalid_argument) col_vecs != NULL] col_vecs[j].get() != NULL && col_vecs[j]->space()->is_compatible(*range) == true, for j=0..domain->dim()-1 Postconditions:
this->range().get() == range.get() this->domain().get() == domain.get() [col_vecs != NULL] this->col(j).get() == col_vecs[j].get(), for j=0..domain->dim()-1
Definition at line 85 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::set_uninitialized | ( | ) |
| Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::range | ( | ) | const [virtual] |
Implements Thyra::LinearOpBase< RangeScalar, DomainScalar >.
Definition at line 125 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| Teuchos::RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::domain | ( | ) | const [virtual] |
Implements Thyra::LinearOpBase< RangeScalar, DomainScalar >.
Definition at line 132 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| Teuchos::RCP< VectorBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::col | ( | Index | j | ) | [virtual] |
Implements Thyra::MultiVectorBase< Scalar >.
Definition at line 197 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| Teuchos::RCP< MultiVectorBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::subView | ( | const Range1D & | col_rng | ) | [virtual] |
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 208 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| bool Thyra::DefaultColumnwiseMultiVector< Scalar >::opSupported | ( | ETransp | M_trans | ) | const [protected, virtual] |
For complex Scalar types returns true for NOTRANS and CONJTRANS and for real types returns true for all values of M_trans.
Implements Thyra::SingleScalarLinearOpBase< Scalar >.
Definition at line 140 of file Thyra_DefaultColumnwiseMultiVector.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::apply | ( | const ETransp | M_trans, | |
| const VectorBase< Scalar > & | x, | |||
| VectorBase< Scalar > * | y, | |||
| const Scalar | alpha, | |||
| const Scalar | beta | |||
| ) | const [protected, virtual] |
This function is implemented in terms of the multi-vector applyOp() function.
The implementation takes care of two types of operations. One (M_trans==TRANS) is the block dot product of two vectors to form scalar (stored as the vector y which as one component). The other (M_trans==NOTRANS) is essentially an axpy operation where x is a vector with one element. Both of these operations are performed using reduction/transformation operators.
This implementation is near optimal but the default implementation of the multi-vector version of apply() as implemented in the base class LinearOpBase will not be a near optimal implementation in its current form do to multiple, sequential reductions but it could be made to be with a little work.
Implements Thyra::SingleRhsLinearOpBase< Scalar >.
Definition at line 147 of file Thyra_DefaultColumnwiseMultiVector.hpp.
1.4.7