|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
Concrete implementation of an SPMD vector space subclass which creates DefaultSpmdVector and DefaultSpmdMultiVector objects.
More...
#include <Thyra_DefaultSpmdVectorSpace_decl.hpp>

Public Member Functions | |
| TEUCHOS_GET_RCP (VectorSpaceBase< Scalar >) | |
Private Member Functions | |
| DefaultSpmdVectorSpace () | |
Private Attributes | |
| RCP< const Teuchos::Comm < Ordinal > > | comm_ |
| Ordinal | localSubDim_ |
| int | numProc_ |
| int | procRank_ |
| RCP< DefaultSpmdVectorSpace < Scalar > > | weakSelfPtr_ |
Related Functions | |
(Note that these are not member functions.) | |
| template<class Scalar > | |
| RCP< DefaultSpmdVectorSpace < Scalar > > | defaultSpmdVectorSpace () |
| Nonmember consturctor that creats an uninitialized vector space. | |
| template<class Scalar > | |
| RCP< DefaultSpmdVectorSpace < Scalar > > | defaultSpmdVectorSpace (const Ordinal dim) |
| Nonmember consturctor that creats a serial vector space. | |
| template<class Scalar > | |
| RCP< DefaultSpmdVectorSpace < Scalar > > | defaultSpmdVectorSpace (const RCP< const Teuchos::Comm< Ordinal > > &comm, const Ordinal localSubDim, const Ordinal globalDim) |
| Nonmember consturctor function that creates a distributed or locally-replicated parallel vector space. | |
Constructors and initializers | |
| void | initialize (const Ordinal dim) |
| Initialize a serial space. | |
| void | initialize (const RCP< const Teuchos::Comm< Ordinal > > &comm, const Ordinal localSubDim, const Ordinal globalDim) |
| Initialize an SPMD space. | |
| void | uninitialize () |
| Set to an uninitialized state. | |
| static RCP < DefaultSpmdVectorSpace < Scalar > > | create () |
| Create with weak ownership to self. | |
Public overridden from VectorSpaceBase | |
| bool | hasInCoreView (const Range1D &rng, const EViewType viewType, const EStrideType strideType) const |
Returns true if all the elements in rng are in this process. | |
| RCP< const VectorSpaceBase < Scalar > > | clone () const |
| | |
Protected overridden from VectorSpaceBase | |
| RCP< VectorBase< Scalar > > | createMember () const |
| | |
| 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 |
| | |
Public overridden from SpmdVectorSpaceDefaultBase | |
| RCP< const Teuchos::Comm < Ordinal > > | getComm () const |
| | |
| Ordinal | localSubDim () const |
| | |
Deprecated | |
| DefaultSpmdVectorSpace (const Ordinal dim) | |
| Deprecated. | |
| DefaultSpmdVectorSpace (const RCP< const Teuchos::Comm< Ordinal > > &comm, const Ordinal localSubDim, const Ordinal globalDim) | |
| Deprecated. | |
Concrete implementation of an SPMD vector space subclass which creates DefaultSpmdVector and DefaultSpmdMultiVector objects.
This is a simple but yet fully general and functional concrete subclass of SpmdVectorSpaceBase that returns DefaultSpmdMultiVector objects from createMembers() and DefaultSpmdVector objects from createMember().
See the function initialize() that describes the different kinds of distributions this class can handle.
Definition at line 57 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
| Thyra::DefaultSpmdVectorSpace< Scalar >::DefaultSpmdVectorSpace | ( | ) | [private] |
Definition at line 251 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| Thyra::DefaultSpmdVectorSpace< Scalar >::DefaultSpmdVectorSpace | ( | const Ordinal | dim | ) |
Deprecated.
Definition at line 262 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
References Thyra::DefaultSpmdVectorSpace< Scalar >::initialize(), and Thyra::DefaultSpmdVectorSpace< Scalar >::weakSelfPtr_.
| Thyra::DefaultSpmdVectorSpace< Scalar >::DefaultSpmdVectorSpace | ( | const RCP< const Teuchos::Comm< Ordinal > > & | comm, |
| const Ordinal | localSubDim, | ||
| const Ordinal | globalDim | ||
| ) |
Deprecated.
Definition at line 272 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
References Thyra::DefaultSpmdVectorSpace< Scalar >::initialize(), and Thyra::DefaultSpmdVectorSpace< Scalar >::weakSelfPtr_.
| Thyra::DefaultSpmdVectorSpace< Scalar >::TEUCHOS_GET_RCP | ( | VectorSpaceBase< Scalar > | ) |
| RCP< DefaultSpmdVectorSpace< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::create | ( | ) | [static] |
Create with weak ownership to self.
Definition at line 45 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
Referenced by Thyra::DefaultSpmdVectorSpace< Scalar >::defaultSpmdVectorSpace().
| void Thyra::DefaultSpmdVectorSpace< Scalar >::initialize | ( | const Ordinal | dim | ) |
Initialize a serial space.
| dim | [in] Gives the dimension of the vector space. |
Equivalent to calling this->initialize(Teuchos::null,dim,dim)
Definition at line 54 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
Referenced by Thyra::DefaultSpmdVectorSpace< Scalar >::DefaultSpmdVectorSpace().
| void Thyra::DefaultSpmdVectorSpace< Scalar >::initialize | ( | const RCP< const Teuchos::Comm< Ordinal > > & | comm, |
| const Ordinal | localSubDim, | ||
| const Ordinal | globalDim | ||
| ) |
Initialize an SPMD space.
| comm | [in] The communicator. This object must be maintained by the client the entire time that this is in use. |
| localSubDim | [in] The number of elements in the local process. This number can be different in every process. |
| globalDim | [in] Gives the number of global elements in the vector if globalDim > 0. If globalDim < 0 then the global dimension is determined by the above argument localSubDim but requires a global communication to do so (i.e. Spmd_Allreduce()). |
Preconditions:
localSubDim > 0 globalDim != 0 comm.get() != NULL && globalDim > 0] globalDim >= localSubDim Postconditions:
this->getComm().get() == comm.get() this->localSubDim() == localSubDim comm.get() == NULL] this->dim() == localSubDim comm.get() != NULL && globalDim > 0] this->dim() == globalDim comm.get() != NULL && globalDim < 0] this->dim() == sum(localSubDim[i],i=0...numProc-1) This function supports three different types of use-cases:
comm.get()==NULL : Serial (i.e. single process) vectors where this->dim() == localSubDim.
comm.get()!=NULL && globalDim < 0 : Distributed-memory vectors where this->dim() is equal to the sum of the localSubDim arguments in each process. This will result in a call to Spmd_Allreduce() inside of this function.
comm.get()!=NULL && globalDim > 0 : Distributed-memory vectors where this->dim() returns globalDim. This will not result in a call to Teuchos::reduceAll() inside this function and therefore the client had better be sure that globalDim is consistent with localSubDim in each process.
comm.get()!=NULL && globalDim == localSubDim : Locally-replicated distributed-memory vectors where this->dim() == globalDim == localSubDim.
Definition at line 63 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| void Thyra::DefaultSpmdVectorSpace< Scalar >::uninitialize | ( | ) |
Set to an uninitialized state.
Postconditions:
Definition at line 86 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| bool Thyra::DefaultSpmdVectorSpace< Scalar >::hasInCoreView | ( | const Range1D & | rng, |
| const EViewType | viewType, | ||
| const EStrideType | strideType | ||
| ) | const [virtual] |
Returns true if all the elements in rng are in this process.
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 211 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< const VectorSpaceBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::clone | ( | ) | const [virtual] |
Reimplemented from Thyra::VectorSpaceBase< Scalar >.
Definition at line 223 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< VectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMember | ( | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 98 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMembers | ( | int | numMembers | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 115 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< VectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMemberView | ( | const RTOpPack::SubVectorView< Scalar > & | raw_v | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 130 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< const VectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMemberView | ( | const RTOpPack::ConstSubVectorView< Scalar > & | raw_v | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 149 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< MultiVectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMembersView | ( | const RTOpPack::SubMultiVectorView< Scalar > & | raw_mv | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 168 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< const MultiVectorBase< Scalar > > Thyra::DefaultSpmdVectorSpace< Scalar >::createMembersView | ( | const RTOpPack::ConstSubMultiVectorView< Scalar > & | raw_mv | ) | const [protected, virtual] |
Implements Thyra::VectorSpaceBase< Scalar >.
Definition at line 189 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< const Teuchos::Comm< Ordinal > > Thyra::DefaultSpmdVectorSpace< Scalar >::getComm | ( | ) | const [virtual] |
Implements Thyra::SpmdVectorSpaceBase< Scalar >.
Definition at line 234 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| Ordinal Thyra::DefaultSpmdVectorSpace< Scalar >::localSubDim | ( | ) | const [virtual] |
Implements Thyra::SpmdVectorSpaceBase< Scalar >.
Definition at line 241 of file Thyra_DefaultSpmdVectorSpace_def.hpp.
| RCP< DefaultSpmdVectorSpace< Scalar > > defaultSpmdVectorSpace | ( | ) | [related] |
Nonmember consturctor that creats an uninitialized vector space.
Definition at line 246 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
References Thyra::DefaultSpmdVectorSpace< Scalar >::create().
| RCP< DefaultSpmdVectorSpace< Scalar > > defaultSpmdVectorSpace | ( | const Ordinal | dim | ) | [related] |
Nonmember consturctor that creats a serial vector space.
Definition at line 258 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
References Thyra::DefaultSpmdVectorSpace< Scalar >::create().
| RCP< DefaultSpmdVectorSpace< Scalar > > defaultSpmdVectorSpace | ( | const RCP< const Teuchos::Comm< Ordinal > > & | comm, |
| const Ordinal | localSubDim, | ||
| const Ordinal | globalDim | ||
| ) | [related] |
Nonmember consturctor function that creates a distributed or locally-replicated parallel vector space.
Definition at line 274 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
References Thyra::DefaultSpmdVectorSpace< Scalar >::create().
RCP<const Teuchos::Comm<Ordinal> > Thyra::DefaultSpmdVectorSpace< Scalar >::comm_ [private] |
Definition at line 208 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
Ordinal Thyra::DefaultSpmdVectorSpace< Scalar >::localSubDim_ [private] |
Reimplemented from Thyra::SpmdVectorSpaceDefaultBase< Scalar >.
Definition at line 209 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
int Thyra::DefaultSpmdVectorSpace< Scalar >::numProc_ [private] |
Definition at line 210 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
int Thyra::DefaultSpmdVectorSpace< Scalar >::procRank_ [private] |
Definition at line 211 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
RCP<DefaultSpmdVectorSpace<Scalar> > Thyra::DefaultSpmdVectorSpace< Scalar >::weakSelfPtr_ [private] |
Definition at line 212 of file Thyra_DefaultSpmdVectorSpace_decl.hpp.
Referenced by Thyra::DefaultSpmdVectorSpace< Scalar >::DefaultSpmdVectorSpace().
1.7.4