Thyra
Version of the Day
|
#include <Thyra_DefaultClusteredSpmdProductVector_decl.hpp>
Constructors/Intializers/Accessors | |
DefaultClusteredSpmdProductVectorSpace () | |
DefaultClusteredSpmdProductVectorSpace (const RCP< const Teuchos::Comm< Ordinal > > &intraClusterComm, const int clusterRootRank, const RCP< const Teuchos::Comm< Ordinal > > &interClusterComm, const int numBlocks, const RCP< const VectorSpaceBase< Scalar > > vecSpaces[]) | |
void | initialize (const RCP< const Teuchos::Comm< Ordinal > > &intraClusterComm, const int clusterRootRank, const RCP< const Teuchos::Comm< Ordinal > > &interClusterComm, const int numBlocks, const RCP< const VectorSpaceBase< Scalar > > vecSpaces[]) |
Initalize. More... | |
RCP< const Teuchos::Comm < Ordinal > > | intraClusterComm () const |
int | clusterRootRank () const |
RCP< const Teuchos::Comm < Ordinal > > | interClusterComm () const |
int | clusterSubDim () const |
int | clusterOffset () const |
Overridden form Teuchos::Describable | |
std::string | description () const |
Public overridden from VectorSpaceBase | |
Ordinal | dim () const |
bool | isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const |
RCP< const VectorSpaceFactoryBase< Scalar > > | smallVecSpcFcty () const |
Scalar | scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) const |
void | scalarProdsImpl (const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y, const ArrayView< Scalar > &scalarProds) const |
bool | isEuclidean () const |
bool | hasInCoreView (const Range1D &rng, const EViewType viewType, const EStrideType strideType) const |
RCP< const VectorSpaceBase < Scalar > > | clone () const |
Protected overridden from ProductVectorSpaceBase | |
int | numBlocks () const |
RCP< const VectorSpaceBase < Scalar > > | getBlock (const int k) const |
Protected overridden from VectorSpaceBase | |
RCP< VectorBase< Scalar > > | createMember () const |
RCP< MultiVectorBase< Scalar > > | createMembers (int numMembers) const |
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... | |
Protected Member Functions inherited from Thyra::VectorSpaceBase< Scalar > | |
Protected Member Functions inherited from Thyra::VectorSpaceDefaultBase< Scalar > | |
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 |
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... | |
Concrete subclass of VectorSpaceBase
that takes a collection of individual VectorSpaceBase
objects distributed over many different processes and creates a single vector space.
What this class does is to take different vector space objects distributed over a set of different clusters of processes and then creates a single vector space object.
Let numClusters
be the number of clusters that the processes in the global communicator are partitioned into. Each cluster of processes is represented by another communicator known in this process as intraClusterComm
. The communicator that links the root of each cluster is called interClusterComm
. All communication is performed with just these two communicators. There is no overall global communicator that encompasses all of the processes.
Within a cluster of processes, the number of constituent vector space objects must be the same. Let v[0]..v[numBlocks-1]
be the numBlocks
VectorBase
objects for constituent vectors in this cluster of processes. There is no assumption make whatsoever about the natrue of the VectorSpaceBase
objects or the [Multi]VectorBase
objects that they create.
ToDo: Finish documentation!
The default copy constructor and assign operator are allowed and they work correctly and perform shallow copies of the constituent vector spaces!
Definition at line 51 of file Thyra_DefaultClusteredSpmdProductVector_decl.hpp.
Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::DefaultClusteredSpmdProductVectorSpace | ( | ) |
Definition at line 60 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::DefaultClusteredSpmdProductVectorSpace | ( | const RCP< const Teuchos::Comm< Ordinal > > & | intraClusterComm, |
const int | clusterRootRank, | ||
const RCP< const Teuchos::Comm< Ordinal > > & | interClusterComm, | ||
const int | numBlocks, | ||
const RCP< const VectorSpaceBase< Scalar > > | vecSpaces[] | ||
) |
Definition at line 66 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
void Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::initialize | ( | const RCP< const Teuchos::Comm< Ordinal > > & | intraClusterComm, |
const int | clusterRootRank, | ||
const RCP< const Teuchos::Comm< Ordinal > > & | interClusterComm, | ||
const int | numBlocks, | ||
const RCP< const VectorSpaceBase< Scalar > > | vecSpaces[] | ||
) |
Initalize.
intraClusterComm | [in] The communicator over just this cluster. |
clusterRootRank | [in] The rank of the root process in *interClusterComm for this cluster of processes. This is also the process that in included in *interClusterComm (which has a different rank ther obviously). |
interClusterComm | [in] Defines the communicator between the root processes of all of the clusters. For the root process of each cluster *interClusterComm!=Spmd_COMM_NULL , otherwise interClusterComm==Teuchos::null or *interClusterComm==Spmd_COMM_NULL . |
numBlocks | [in] Number of vector space blocks for this cluster of processes. |
vecSpaces | [in] Array (length numBlocks ) of the vector spaces for this cluster of processes. |
Definition at line 80 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
RCP< const Teuchos::Comm< Ordinal > > Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::intraClusterComm | ( | ) | const |
Definition at line 239 of file Thyra_DefaultClusteredSpmdProductVectorSpace_decl.hpp.
int Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::clusterRootRank | ( | ) | const |
Definition at line 246 of file Thyra_DefaultClusteredSpmdProductVectorSpace_decl.hpp.
RCP< const Teuchos::Comm< Ordinal > > Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::interClusterComm | ( | ) | const |
Definition at line 254 of file Thyra_DefaultClusteredSpmdProductVectorSpace_decl.hpp.
int Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::clusterSubDim | ( | ) | const |
The sum of the dimensions of the block vector spaces in this cluster.
Definition at line 261 of file Thyra_DefaultClusteredSpmdProductVectorSpace_decl.hpp.
int Thyra::DefaultClusteredSpmdProductVectorSpace< Scalar >::clusterOffset | ( | ) | const |
The offset of the first element in the first constituent vector in this cluster in the w.r.t. the global vector.
Definition at line 268 of file Thyra_DefaultClusteredSpmdProductVectorSpace_decl.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 131 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 145 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 151 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 178 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 186 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 196 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 216 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 222 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 231 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::ProductVectorSpaceBase< Scalar >.
Definition at line 239 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
virtual |
Implements Thyra::ProductVectorSpaceBase< Scalar >.
Definition at line 246 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
protectedvirtual |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 257 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.
|
protectedvirtual |
Reimplemented from Thyra::VectorSpaceDefaultBase< Scalar >.
Definition at line 265 of file Thyra_DefaultClusteredSpmdProductVectorSpace_def.hpp.