Thyra
Version of the Day
|
Standard concrete implementation of a product vector space that creates product vectors fromed implicitly from the columns of a multi-vector. More...
#include <Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp>
Related Functions | |
(Note that these are not member functions.) | |
template<class Scalar > | |
RCP < DefaultMultiVectorProductVectorSpace < Scalar > > | multiVectorProductVectorSpace () |
Nonmember constructor function. More... | |
template<class Scalar > | |
RCP < DefaultMultiVectorProductVectorSpace < Scalar > > | multiVectorProductVectorSpace (const RCP< const VectorSpaceBase< Scalar > > &space, const int numColumns) |
Nonmember constructor function. More... | |
Related Functions inherited from Thyra::ProductVectorSpaceBase< Scalar > | |
template<class Scalar > | |
RCP< ProductVectorSpaceBase < Scalar > > | nonconstProductVectorSpaceBase (const RCP< VectorSpaceBase< Scalar > > &v, const bool forceSuccess=true) |
Dynamic cast from a VectorSpaceBase to a ProductVectorSpaceBase object and thow exception if this fails. More... | |
template<class Scalar > | |
RCP< const ProductVectorSpaceBase< Scalar > > | productVectorSpaceBase (const RCP< const VectorSpaceBase< Scalar > > &v, const bool forceSuccess=true) |
Dynamic cast from a const VectorSpaceBase to a const ProductVectorSpaceBase object and thow exception if this fails. More... | |
RCP< ProductVectorSpaceBase < double > > | nonconstProductVectorSpaceBase (const RCP< VectorSpaceBase< double > > &vs, const bool forceSuccess=true) |
Inline overload of nonconstProductVectorSpaceBase<Scalar>(..) for double. More... | |
RCP< const ProductVectorSpaceBase< double > > | productVectorSpaceBase (const RCP< const VectorSpaceBase< double > > &vs, const bool forceSuccess=true) |
Inline overload of productVectorSpaceBase<Scalar>(..) for double. More... | |
Related Functions inherited from Thyra::VectorSpaceBase< Scalar > | |
template<class Scalar > | |
RCP< const VectorSpaceBase < Scalar > > | makeHaveOwnership (const RCP< const VectorSpaceBase< Scalar > > &vs) |
Helper function that clones a VectorSpaceBase object if the RCP does not have ownership. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMember (const RCP< const VectorSpaceBase< Scalar > > &vs, const std::string &label="") |
Create a vector member from the vector space. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMember (const VectorSpaceBase< Scalar > &vs, const std::string &label="") |
Calls createMember(Teuchos::rcp(&vs,false)) . More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const RCP< const VectorSpaceBase< Scalar > > &vs, int numMembers, const std::string &label="") |
Create a set of vector members (a MultiVectorBase ) from the vector space. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const RCP< const VectorSpaceBase< Scalar > > &vs, const RCP< const VectorSpaceBase< Scalar > > &domain, const std::string &label="") |
Create a set of vector members (a MultiVectorBase ) from the vector space. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (const VectorSpaceBase< Scalar > &vs, int numMembers, const std::string &label="") |
Calls createMembers(Teuchos::rcp(&vs,false),numMembers) . More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMemberView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::SubVectorView< Scalar > &raw_v, const std::string &label="") |
Create a vector member that is a non-const view of raw data. More... | |
template<class Scalar > | |
RCP< VectorBase< Scalar > > | createMemberView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::SubVectorView< Scalar > &raw_v, const std::string &label="") |
Calls createMemberView(Teuchos::rcp(&vs,false),raw_v) . More... | |
template<class Scalar > | |
RCP< const VectorBase< Scalar > > | createMemberView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::ConstSubVectorView< Scalar > &raw_v, const std::string &label="") |
Create a vector member that is a const view of raw data. More... | |
template<class Scalar > | |
RCP< const VectorBase< Scalar > > | createMemberView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::ConstSubVectorView< Scalar > &raw_v, const std::string &label="") |
Calls createMemberView(Teuchos::rcp(&vs,false),raw_v) . More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembersView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Create a multi-vector member that is a non-const view of raw data. More... | |
template<class Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembersView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Calls createMembersView(Teuchos::rcp(&vs,false),raw_mv) . More... | |
template<class Scalar > | |
RCP< const MultiVectorBase < Scalar > > | createMembersView (const RCP< const VectorSpaceBase< Scalar > > &vs, const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Create a multi-vector member that is a const view of raw data. More... | |
template<class Scalar > | |
RCP< const MultiVectorBase < Scalar > > | createMembersView (const VectorSpaceBase< Scalar > &vs, const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv, const std::string &label="") |
Calls createMembersView(Teuchos::rcp(&vs,false),raw_mv) . More... | |
Constructors/initializers/accessors | |
DefaultMultiVectorProductVectorSpace () | |
Construct to an uninitialized state. More... | |
void | initialize (const RCP< const VectorSpaceBase< Scalar > > &space, const int numColumns) |
Initialize with a list of constituent vector spaces. More... | |
RCP< const DefaultProductVectorSpace < Scalar > > | getDefaultProductVectorSpace () const |
void | uninitialize (RCP< const VectorSpaceBase< Scalar > > *space=0, int *numColumns=0) |
Uninitialize. More... | |
Overridden from DefaultMultiVectorProductVectorSpace | |
int | numBlocks () const |
RCP< const VectorSpaceBase < Scalar > > | getBlock (const int k) const |
Overridden from VectorSpaceBase | |
Ordinal | dim () const |
bool | isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const |
RCP< VectorBase< Scalar > > | createMember () const |
Returns a DefaultMultiVectorProductVector object. More... | |
Scalar | scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const |
Returns the sum of the scalar products of the constituent vectors. More... | |
void | scalarProdsImpl (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const |
Returns the sum of the scalar products of each of the columns of the constituent multi-vectors. More... | |
bool | hasInCoreView (const Range1D &rng, const EViewType viewType, const EStrideType strideType) const |
Returns true if all of the constituent vector spaces return true. More... | |
RCP< const VectorSpaceFactoryBase< Scalar > > | smallVecSpcFcty () const |
Returns getBlock(0)->smallVecSpcFcty() . More... | |
RCP< MultiVectorBase< Scalar > > | createMembers (int numMembers) const |
Returns a DefaultColumnwiseMultiVector object. More... | |
RCP< const VectorSpaceBase < Scalar > > | clone () const |
Clones the object as promised. More... | |
Overridden from Teuchos::Describable | |
std::string | description () const |
Prints just the name DefaultMultiVectorProductVectorSpace along with the overall dimension and the number of blocks. More... | |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const |
Prints the details about the constituent vector space. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Thyra::VectorSpaceBase< Scalar > | |
void | scalarProds (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds_out) const |
Return the scalar product of each column in two multi-vectors in the vector space. More... | |
virtual bool | isEuclidean () const |
Return if this vector space has a Euclidean (identity) basis in which case the scalar product is the same as the dot product. More... | |
virtual RCP< MultiVectorBase < Scalar > > | createCachedMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv, bool initialize=true) const |
Create a (possibly) cached multi-vector member that is a non-const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView . More... | |
virtual RCP< const MultiVectorBase< Scalar > > | createCachedMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const |
Create a (possibly) cached multi-vector member that is a const view of raw multi-vector data. The caching mechanism must be implemented by child classes, by default this just calls the regular createMembersView . More... | |
Protected Member Functions inherited from Thyra::VectorSpaceBase< Scalar > | |
Protected Member Functions inherited from Thyra::VectorSpaceDefaultBase< Scalar > | |
RCP< MultiVectorBase< Scalar > > | createMembers (int numMembers) const |
RCP< VectorBase< Scalar > > | createMemberView (const RTOpPack::SubVectorView< Scalar > &raw_v) const |
RCP< const VectorBase< Scalar > > | createMemberView (const RTOpPack::ConstSubVectorView< Scalar > &raw_v) const |
RCP< MultiVectorBase< Scalar > > | createMembersView (const RTOpPack::SubMultiVectorView< Scalar > &raw_mv) const |
RCP< const MultiVectorBase < Scalar > > | createMembersView (const RTOpPack::ConstSubMultiVectorView< Scalar > &raw_mv) const |
Standard concrete implementation of a product vector space that creates product vectors fromed implicitly from the columns of a multi-vector.
The default copy constructor is allowed since it has just the right behavior (i.e. shallow copy).
ToDo: Finish Documentation!
Definition at line 23 of file Thyra_DefaultMultiVectorProductVector_decl.hpp.
Thyra::DefaultMultiVectorProductVectorSpace< Scalar >::DefaultMultiVectorProductVectorSpace | ( | ) |
Construct to an uninitialized state.
Definition at line 25 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
void Thyra::DefaultMultiVectorProductVectorSpace< Scalar >::initialize | ( | const RCP< const VectorSpaceBase< Scalar > > & | space, |
const int | numColumns | ||
) |
Initialize with a list of constituent vector spaces.
space | [in,persisting] The vector space used to create the multi-vectors. |
numColunns | [in] The number of columns to create in the multi-vector represented as a product vector. |
Preconditions:
!is_null(space)
numColumns > 0
Postconditions:
this->dim() == space->dim() * numColumns
this->numBlocks() == numColumns
getBlock(i).get() == space.get(), i=0,...,numColumns-1
Definition at line 31 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
inline |
Definition at line 226 of file Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp.
void Thyra::DefaultMultiVectorProductVectorSpace< Scalar >::uninitialize | ( | Teuchos::RCP< const VectorSpaceBase< Scalar > > * | space = 0 , |
int * | numColumns = 0 |
||
) |
Uninitialize.
numBlocks | [out] If numBlocks!=NULL then on output *numBlocks will be set to this->numBlocks() . |
vecSpaces | [out] If vecSpaces!=NULL then vecSpaces must point to an array of length this->numBlocks and on output vecSpace[i] will be set to this->vecSpaces()[i] for i=0,..,this->numBlocks()-1 . |
Postconditions:
this->numBlocks()==0
vecSpaces()==NULL
Warning! If this->hasBeenCloned()==true
then the client had better not mess with the constituent vector spaces returned in vecSpaces[]
since another DefaultMultiVectorProductVectorSpace
object is still using them.
Definition at line 47 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::ProductVectorSpaceBase< Scalar >.
Definition at line 60 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::ProductVectorSpaceBase< Scalar >.
Definition at line 68 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 79 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 88 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns a DefaultMultiVectorProductVector
object.
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 107 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns the sum of the scalar products of the constituent vectors.
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 116 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns the sum of the scalar products of each of the columns of the constituent multi-vectors.
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 127 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns true if all of the constituent vector spaces return true.
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 139 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns getBlock(0)->smallVecSpcFcty()
.
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 148 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Returns a DefaultColumnwiseMultiVector
object.
ToDo: It is possible an general and well optimized multi-vector implementation called something like MultiVectorProducMultiVector. This would require that you create an underlying multi-vector with numBlocks*numMembers total columns. However, this class is not needed at this time so it is not provided.
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 157 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Clones the object as promised.
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 167 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Prints just the name DefaultMultiVectorProductVectorSpace
along with the overall dimension and the number of blocks.
Reimplemented from Teuchos::Describable.
Definition at line 185 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
virtual |
Prints the details about the constituent vector space.
This function outputs different levels of detail based on the value passed in for verbLevel
:
ToDo: Finish documentation!
Reimplemented from Teuchos::Describable.
Definition at line 198 of file Thyra_DefaultMultiVectorProductVectorSpace_def.hpp.
|
related |
Nonmember constructor function.
Definition at line 194 of file Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp.
|
related |
Nonmember constructor function.
Definition at line 207 of file Thyra_DefaultMultiVectorProductVectorSpace_decl.hpp.