|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Default subclass for MultiVectorBase implemented using columns of separate abstract vectors.
More...
#include <Thyra_DefaultColumnwiseMultiVector_decl.hpp>

Private Attributes | |
| RCP< const VectorSpaceBase < Scalar > > | range_ |
| RCP< const VectorSpaceBase < Scalar > > | domain_ |
| Array< RCP< VectorBase< Scalar > > > | col_vecs_ |
Constructors/Initializers | |
| DefaultColumnwiseMultiVector () | |
| Construct to initialized. | |
| DefaultColumnwiseMultiVector (const RCP< VectorBase< Scalar > > &col_vec) | |
Calls initialize(). | |
| DefaultColumnwiseMultiVector (const RCP< const VectorSpaceBase< Scalar > > &range, const RCP< const VectorSpaceBase< Scalar > > &domain, const ArrayView< const RCP< VectorBase< Scalar > > > &col_vecs=Teuchos::null) | |
Calls initialize(). | |
| void | initialize (const RCP< VectorBase< Scalar > > &col_vec) |
| Initialize given a single vector object. | |
| void | initialize (const RCP< const VectorSpaceBase< Scalar > > &range, const RCP< const VectorSpaceBase< Scalar > > &domain, const ArrayView< const RCP< VectorBase< Scalar > > > &col_vecs=Teuchos::null) |
| Initialize given the spaces for the columns and rows and possibly the column vectors. | |
| void | uninitialize () |
| Set uninitialized. | |
Overridden from LinearOpBase | |
| RCP< const VectorSpaceBase < Scalar > > | range () const |
| | |
| RCP< const VectorSpaceBase < Scalar > > | domain () const |
| | |
| bool | opSupportedImpl (EOpTransp 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 | applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const |
This function is implemented in terms of the multi-vector applyOp() function. | |
Overridden from MultiVectorBase | |
| RCP< VectorBase< Scalar > > | nonconstColImpl (Ordinal j) |
| | |
| RCP< MultiVectorBase< Scalar > > | nonconstContigSubViewImpl (const Range1D &col_rng) |
| | |
Default subclass for 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 53 of file Thyra_DefaultColumnwiseMultiVector_decl.hpp.
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | ) |
Construct to initialized.
Postconditions:
this->range().get() == NULL this->domain().get() == NULL
Definition at line 50 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | const RCP< VectorBase< Scalar > > & | col_vec | ) |
Calls initialize().
Definition at line 55 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| Thyra::DefaultColumnwiseMultiVector< Scalar >::DefaultColumnwiseMultiVector | ( | const RCP< const VectorSpaceBase< Scalar > > & | range, |
| const RCP< const VectorSpaceBase< Scalar > > & | domain, | ||
| const ArrayView< const RCP< VectorBase< Scalar > > > & | col_vecs = Teuchos::null |
||
| ) |
Calls initialize().
Definition at line 64 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::initialize | ( | const 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. |
Preconditions:
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 75 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::initialize | ( | const RCP< const VectorSpaceBase< Scalar > > & | range, |
| const RCP< const VectorSpaceBase< Scalar > > & | domain, | ||
| const ArrayView< const RCP< VectorBase< Scalar > > > & | col_vecs = Teuchos::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. |
Preconditions:
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 93 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::uninitialize | ( | ) |
Set uninitialized.
Definition at line 125 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::range | ( | ) | const [virtual] |
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 138 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::domain | ( | ) | const [virtual] |
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 146 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| RCP< VectorBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::nonconstColImpl | ( | Ordinal | j | ) | [virtual] |
Implements Thyra::MultiVectorBase< Scalar >.
Definition at line 222 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::DefaultColumnwiseMultiVector< Scalar >::nonconstContigSubViewImpl | ( | const Range1D & | col_rng | ) | [virtual] |
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 236 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
| bool Thyra::DefaultColumnwiseMultiVector< Scalar >::opSupportedImpl | ( | EOpTransp | 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::LinearOpBase< Scalar >.
Definition at line 156 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
References Thyra::CONJTRANS, and Thyra::NOTRANS.
| void Thyra::DefaultColumnwiseMultiVector< Scalar >::applyImpl | ( | const EOpTransp | M_trans, |
| const MultiVectorBase< Scalar > & | X, | ||
| const Ptr< MultiVectorBase< 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::LinearOpBase< Scalar >.
Definition at line 164 of file Thyra_DefaultColumnwiseMultiVector_def.hpp.
References Thyra::MultiVectorBase< Scalar >::col(), Thyra::LinearOpBase< Scalar >::domain(), Thyra::NOTRANS, THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES, Thyra::Vp_StV(), and Thyra::Vt_S().
RCP<const VectorSpaceBase<Scalar> > Thyra::DefaultColumnwiseMultiVector< Scalar >::range_ [private] |
Definition at line 204 of file Thyra_DefaultColumnwiseMultiVector_decl.hpp.
RCP<const VectorSpaceBase<Scalar> > Thyra::DefaultColumnwiseMultiVector< Scalar >::domain_ [private] |
Definition at line 205 of file Thyra_DefaultColumnwiseMultiVector_decl.hpp.
Array<RCP<VectorBase<Scalar> > > Thyra::DefaultColumnwiseMultiVector< Scalar >::col_vecs_ [private] |
Definition at line 206 of file Thyra_DefaultColumnwiseMultiVector_decl.hpp.
1.7.4