VectorSpaceBase class for all SPMD vector spaces with contiguous local-to-global indexing.
More...
#include <Thyra_SpmdVectorSpaceDefaultBaseDecl.hpp>
Inheritance diagram for Thyra::SpmdVectorSpaceDefaultBase< Scalar >:
Overridden from SpmdVectorSpaceBase | |
| Index | localOffset () const |
| | |
| Index | mapCode () const |
| | |
Overridden from VectorSpaceBase | |
| Index | dim () const |
| Returns the sum of the local number of elements on every process. | |
| Teuchos::RefCountPtr< const VectorSpaceFactoryBase< Scalar > > | smallVecSpcFcty () const |
Returns a DefaultSpmdVectorSpaceFactory object that has been given getComm(). | |
| bool | isCompatible (const VectorSpaceBase< Scalar > &vecSpc) const |
| Checks the general compatibility of parallel (or serial on one process) Spmd-based vector spaces. | |
Public Member Functions | |
| SpmdVectorSpaceDefaultBase () | |
| | |
Protected Member Functions | |
| virtual void | updateState (const Index globalDim) |
This function must be called whenever the state of this changes and some internal state must be updated. | |
VectorSpaceBase class for all SPMD vector spaces with contiguous local-to-global indexing.
See SpmdVectorSpaceBase for details on what this class represents in an abstract way.
Notes to subclass developers:
The pure virtual methods mpiComm(), localSubDim() and createMember() are the only functions that must be overridden.
If this this is in an uninitialized state then localSubDim() should return 0.
It should never be necessary to override the virtual functions mapCode() and isCompatible() as these functions have very good and very general implementations.
If optimized implementations of multi-vectors can be supported, then the createMembers() method should also be overridden.
This class defines a very general default implementation for smallVecSpcFcty() that returns a DefaultSpmdVectorSpaceFactory object which in turn can be used to create DefaultSpmdVectorSpace objects. These are the vector space objects that are used by the domain space of multi-vectors created by createMembers(). The class DefaultSpmdVectorSpace creates DefaultSpmdVector and DefaultSpmdMultiVector objects. This implementation of smallVecSpcFcty() is very general should be very appropriate for many different concrete implementations.
Note: It is very important that subclasses call the updateState() function whenever the state of *this changes in a way that might affect the behavior of any of the public member functions. For example, if a different value of localSubDim() will be returned the next time it is called by a client, then updateState() needs to be called by the subclass. External clients should never need to worry about this function and that is why updateState() is declared protected.
Definition at line 80 of file Thyra_SpmdVectorSpaceDefaultBaseDecl.hpp.
|
|||||||||
|
Definition at line 40 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
|||||||||
|
This method has a default implementation which just assigns this offset based on counting up Implements Thyra::SpmdVectorSpaceBase< Scalar >. Definition at line 47 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
|||||||||
|
This method takes the data The value returned from this default implementation of this method must not be changed or this approach breaks down. The only reason for overriding this method is for the subclass to be alerted of when this method is called but not what is returned from this method. If a subclass developer does not understand what this means then don't override this method!
The default implementation will always return Implements Thyra::SpmdVectorSpaceBase< Scalar >. Definition at line 53 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
|||||||||
|
Returns the sum of the local number of elements on every process.
Implements Thyra::VectorSpaceBase< Scalar >. Definition at line 61 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
|||||||||
|
Returns a
Implements Thyra::VectorSpaceBase< Scalar >. Definition at line 68 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
||||||||||
|
Checks the general compatibility of parallel (or serial on one process) Spmd-based vector spaces.
If the mapping of vector elements to processes is not as described above then this method should be overridden in a way that is specific to the vector implementation. Implements Thyra::VectorSpaceBase< Scalar >. Definition at line 74 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
|
||||||||||
|
This function must be called whenever the state of
Usually, this operation only needs to be called once for every *new* parallel vector space constructed and very few parallel vector spaces will be created per application usually. Definition at line 90 of file Thyra_SpmdVectorSpaceDefaultBase.hpp. |
1.3.9.1