|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Convenient node subclass for concrete VectorBase subclasses that relies on a default MultiVectorBase implementation.
More...
#include <Thyra_VectorDefaultBase_decl.hpp>

Private Member Functions | |
| void | validateColRng (const Range1D &rowRng) const |
| void | validateColIndexes (const ArrayView< const int > &cols) const |
Private Attributes | |
| RCP< const VectorSpaceBase < Scalar > > | domain_ |
Public functions overridden from Teuchos::Describable | |
| virtual std::string | description () const |
| Default description that gives the label, type, and dimenstion . | |
| virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
| Generates a default outputting for all vectors. | |
Overridden from LinearOpBase | |
| virtual RCP< const VectorSpaceBase< Scalar > > | range () const |
Returns this->space(). | |
| virtual RCP< const VectorSpaceBase< Scalar > > | domain () const |
Returns a DefaultSerialVectorSpace object with dimension 1. | |
Overridden from MultiVectorBase | |
| RCP< MultiVectorBase< Scalar > > | clone_mv () const |
Returns this->clone_v(). | |
Overridden from VectorBase | |
| RCP< VectorBase< Scalar > > | clone_v () const |
Simply creates a new vector and copies the contents from *this. | |
Overridden protected functions from MultiVectorBase | |
| virtual RCP< VectorBase< Scalar > > | nonconstColImpl (Ordinal j) |
Returns Teuchos::rcp(this,false). | |
| virtual RCP< const MultiVectorBase< Scalar > > | contigSubViewImpl (const Range1D &col_rng) const |
Returns Teuchos::rcp(this,false). | |
| virtual RCP< MultiVectorBase < Scalar > > | nonconstContigSubViewImpl (const Range1D &col_rng) |
Returns Teuchos::rcp(this,false). | |
| virtual RCP< const MultiVectorBase< Scalar > > | nonContigSubViewImpl (const ArrayView< const int > &cols) const |
Returns Teuchos::rcp(this,false). | |
| virtual RCP< MultiVectorBase < Scalar > > | nonconstNonContigSubViewImpl (const ArrayView< const int > &cols) |
Returns Teuchos::rcp(this,false). | |
| virtual void | acquireDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const |
Implemented in terms of this->acquireDetachedView(). | |
| virtual void | releaseDetachedMultiVectorViewImpl (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const |
Implemented in terms of this->releaseDetachedView(). | |
| virtual void | acquireNonconstDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv) |
Implemented in terms of this->acquireDetachedView(). | |
| virtual void | commitNonconstDetachedMultiVectorViewImpl (RTOpPack::SubMultiVectorView< Scalar > *sub_mv) |
Implemented in terms of this->commitDetachedView(). | |
Overridden protected functions from VectorBase | |
| virtual void | acquireDetachedVectorViewImpl (const Range1D &rng, RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const |
| | |
| virtual void | releaseDetachedVectorViewImpl (RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const |
| | |
| virtual void | acquireNonconstDetachedVectorViewImpl (const Range1D &rng, RTOpPack::SubVectorView< Scalar > *sub_vec) |
| | |
| virtual void | commitNonconstDetachedVectorViewImpl (RTOpPack::SubVectorView< Scalar > *sub_vec) |
| | |
| virtual void | setSubVectorImpl (const RTOpPack::SparseSubVectorT< Scalar > &sub_vec) |
| | |
Overridden protected functions from LinearOpBase | |
| 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 |
| . Applies vector or its adjoint (transpose) as a linear operator. | |
Convenient node subclass for concrete VectorBase subclasses that relies on a default MultiVectorBase implementation.
Notes for subclass developers
In order to create a concrete subclass of this interface, only two operations must be overridden: space() and applyOp(). Overriding the space() operation requires defining a concrete VectorSpaceBase class (which has only three pure virtual operations if using VectorSpaceDefaultBase).
Note that all of the inherited LinearOpBase and MultiVectorBase functions are overridden in this subclass and are given perfectly good implementations. Therefore, a concrete subclass of VectorDefaultBase should not have to re-override any of these functions.
Definition at line 60 of file Thyra_VectorDefaultBase_decl.hpp.
| std::string Thyra::VectorDefaultBase< Scalar >::description | ( | ) | const [virtual] |
Default description that gives the label, type, and dimenstion .
Reimplemented from Thyra::LinearOpDefaultBase< Scalar >.
Reimplemented in Thyra::SpmdVectorBase< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 65 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::describe | ( | Teuchos::FancyOStream & | out, |
| const Teuchos::EVerbosityLevel | verbLevel | ||
| ) | const [virtual] |
Generates a default outputting for all vectors.
Calls on the this->describe(void) function for the name of the class (and possibly its instance name) and then if verbLevel>=VERB_HIGH, then the vector elements themselves are printed as well. The format of the output is is shown below:
type = 'this->description()', size = n
0:x1
1:x2
.
.
.
n-1:xn
The index:value lines are offset an additional Teuchos::OSTab amount. A newline is printed after the last n-1:xn entry.
Reimplemented from Thyra::LinearOpDefaultBase< Scalar >.
Reimplemented in Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 82 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::ConstDetachedVectorView< Scalar >::subDim().
| RCP< const VectorSpaceBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::range | ( | ) | const [virtual] |
Returns this->space().
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 108 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::domain | ( | ) | const [virtual] |
Returns a DefaultSerialVectorSpace object with dimension 1.
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 122 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::clone_mv | ( | ) | const [virtual] |
Returns this->clone_v().
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 142 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< VectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::clone_v | ( | ) | const [virtual] |
Simply creates a new vector and copies the contents from *this.
Implements Thyra::VectorBase< Scalar >.
Definition at line 159 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::assign(), and Thyra::copy().
| RCP< VectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::nonconstColImpl | ( | Ordinal | j | ) | [protected, virtual] |
Returns Teuchos::rcp(this,false).
Implements Thyra::MultiVectorBase< Scalar >.
Definition at line 181 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< const MultiVectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::contigSubViewImpl | ( | const Range1D & | col_rng | ) | const [protected, virtual] |
Returns Teuchos::rcp(this,false).
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 197 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::nonconstContigSubViewImpl | ( | const Range1D & | col_rng | ) | [protected, virtual] |
Returns Teuchos::rcp(this,false).
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 212 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< const MultiVectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::nonContigSubViewImpl | ( | const ArrayView< const int > & | cols | ) | const [protected, virtual] |
Returns Teuchos::rcp(this,false).
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 227 of file Thyra_VectorDefaultBase_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::VectorDefaultBase< Scalar >::nonconstNonContigSubViewImpl | ( | const ArrayView< const int > & | cols | ) | [protected, virtual] |
Returns Teuchos::rcp(this,false).
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 243 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::acquireDetachedMultiVectorViewImpl | ( | const Range1D & | rowRng, |
| const Range1D & | colRng, | ||
| RTOpPack::ConstSubMultiVectorView< Scalar > * | sub_mv | ||
| ) | const [protected, virtual] |
Implemented in terms of this->acquireDetachedView().
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 258 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::releaseDetachedMultiVectorViewImpl | ( | RTOpPack::ConstSubMultiVectorView< Scalar > * | sub_mv | ) | const [protected, virtual] |
Implemented in terms of this->releaseDetachedView().
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 284 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::acquireNonconstDetachedMultiVectorViewImpl | ( | const Range1D & | rowRng, |
| const Range1D & | colRng, | ||
| RTOpPack::SubMultiVectorView< Scalar > * | sub_mv | ||
| ) | [protected, virtual] |
Implemented in terms of this->acquireDetachedView().
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 294 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::commitNonconstDetachedMultiVectorViewImpl | ( | RTOpPack::SubMultiVectorView< Scalar > * | sub_mv | ) | [protected, virtual] |
Implemented in terms of this->commitDetachedView().
Reimplemented from Thyra::MultiVectorDefaultBase< Scalar >.
Definition at line 320 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::acquireDetachedVectorViewImpl | ( | const Range1D & | rng, |
| RTOpPack::ConstSubVectorView< Scalar > * | sub_vec | ||
| ) | const [protected, virtual] |
This implementation is based on a vector reduction operator class (see RTOpPack::ROpGetSubVector) and calls applyOp(). Note that the footprint of the reduction object (both internal and external state) will be O(rng.size()). For serial applications this is fairly reasonable and will not be a major performance penalty. For parallel applications, however, this is a terrible implementation and must be overridden if rng.size() is large at all. Although, this function should not even be used in case where the vector is very large. If a subclass does override this function, it must also override releaseDetachedView() which has a implementation which is a companion to this function's implementation.
Implements Thyra::VectorBase< Scalar >.
Reimplemented in Thyra::SpmdVectorBase< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 344 of file Thyra_VectorDefaultBase_def.hpp.
Referenced by Thyra::SpmdVectorBase< Scalar >::acquireDetachedVectorViewImpl(), Thyra::DefaultProductVector< Scalar >::acquireDetachedVectorViewImpl(), and Thyra::VectorDefaultBase< Scalar >::acquireNonconstDetachedVectorViewImpl().
| void Thyra::VectorDefaultBase< Scalar >::releaseDetachedVectorViewImpl | ( | RTOpPack::ConstSubVectorView< Scalar > * | sub_vec | ) | const [protected, virtual] |
This implementation is a companion to the implementation for the non-const version of acquireDetachedView(). If acquireDetachedView() is overridden by a subclass then this function must be overridden also!
Implements Thyra::VectorBase< Scalar >.
Reimplemented in Thyra::SpmdVectorBase< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 371 of file Thyra_VectorDefaultBase_def.hpp.
Referenced by Thyra::SpmdVectorBase< Scalar >::releaseDetachedVectorViewImpl(), and Thyra::DefaultProductVector< Scalar >::releaseDetachedVectorViewImpl().
| void Thyra::VectorDefaultBase< Scalar >::acquireNonconstDetachedVectorViewImpl | ( | const Range1D & | rng, |
| RTOpPack::SubVectorView< Scalar > * | sub_vec | ||
| ) | [protected, virtual] |
This implementation is based on a vector reduction operator class (see RTOpPack::ROpGetSubVector) and calls applyOp(). Note that the footprint of the reduction object (both internal and external state) will be O(rng.size()). For serial applications this is fairly reasonable and will not be a major performance penalty. For parallel applications, this will be a terrible thing to do and must be overridden if rng.size() is large at all. If a subclass does override this function, it must also override commitDetachedView() which has a implementation which is a companion to this function's implementation.
Implements Thyra::VectorBase< Scalar >.
Reimplemented in Thyra::SpmdVectorBase< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 381 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::VectorDefaultBase< Scalar >::acquireDetachedVectorViewImpl().
Referenced by Thyra::SpmdVectorBase< Scalar >::acquireNonconstDetachedVectorViewImpl(), and Thyra::DefaultProductVector< Scalar >::acquireNonconstDetachedVectorViewImpl().
| void Thyra::VectorDefaultBase< Scalar >::commitNonconstDetachedVectorViewImpl | ( | RTOpPack::SubVectorView< Scalar > * | sub_vec | ) | [protected, virtual] |
This function has an implementation which is a companion to the implementation for acquireDetachedView(). If acquireDetachedView() is overridden by a subclass then this function must be overridden also!
Implements Thyra::VectorBase< Scalar >.
Reimplemented in Thyra::SpmdVectorBase< Scalar >, Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 404 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::VectorDefaultBase< Scalar >::setSubVectorImpl().
Referenced by Thyra::SpmdVectorBase< Scalar >::commitNonconstDetachedVectorViewImpl(), and Thyra::DefaultProductVector< Scalar >::commitNonconstDetachedVectorViewImpl().
| void Thyra::VectorDefaultBase< Scalar >::setSubVectorImpl | ( | const RTOpPack::SparseSubVectorT< Scalar > & | sub_vec | ) | [protected, virtual] |
This implementation uses a transformation operator class (see RTOpPack::TOpSetSubVector) and calls applyOp(). Be forewarned however, that the operator objects state data (both internal and external) will be order O(sub_vec.subNz()). For serial applications, this is entirely adequate. For parallel applications this may be bad!
Implements Thyra::VectorBase< Scalar >.
Reimplemented in Thyra::DefaultMultiVectorProductVector< Scalar >, and Thyra::DefaultProductVector< Scalar >.
Definition at line 419 of file Thyra_VectorDefaultBase_def.hpp.
Referenced by Thyra::VectorDefaultBase< Scalar >::commitNonconstDetachedVectorViewImpl().
| bool Thyra::VectorDefaultBase< 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 431 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::CONJTRANS, and Thyra::NOTRANS.
| void Thyra::VectorDefaultBase< Scalar >::applyImpl | ( | const EOpTransp | M_trans, |
| const MultiVectorBase< Scalar > & | X, | ||
| const Ptr< MultiVectorBase< Scalar > > & | Y, | ||
| const Scalar | alpha, | ||
| const Scalar | beta | ||
| ) | const [protected, virtual] |
. Applies vector or its adjoint (transpose) as a linear operator.
Implements Thyra::LinearOpBase< Scalar >.
Definition at line 439 of file Thyra_VectorDefaultBase_def.hpp.
References Thyra::MultiVectorBase< Scalar >::col(), Thyra::CONJ, Thyra::CONJTRANS, Thyra::LinearOpBase< Scalar >::domain(), Thyra::NOTRANS, Thyra::set_ele(), THYRA_ASSERT_LINEAR_OP_MULTIVEC_APPLY_SPACES, Thyra::toString(), Thyra::TRANS, Thyra::Vp_StV(), and Thyra::Vt_S().
| void Thyra::VectorDefaultBase< Scalar >::validateColRng | ( | const Range1D & | rowRng | ) | const [inline, private] |
Definition at line 527 of file Thyra_VectorDefaultBase_def.hpp.
| void Thyra::VectorDefaultBase< Scalar >::validateColIndexes | ( | const ArrayView< const int > & | cols | ) | const [inline, private] |
Definition at line 538 of file Thyra_VectorDefaultBase_def.hpp.
RCP<const VectorSpaceBase<Scalar> > Thyra::VectorDefaultBase< Scalar >::domain_ [mutable, private] |
Definition at line 268 of file Thyra_VectorDefaultBase_decl.hpp.
1.7.4