10 #ifndef __Teko_BlockedReordering_hpp__
11 #define __Teko_BlockedReordering_hpp__
16 #include "Teuchos_RCP.hpp"
18 #include "Thyra_LinearOpBase.hpp"
19 #include "Thyra_LinearOpDefaultBase.hpp"
20 #include "Thyra_BlockedLinearOpBase.hpp"
21 #include "Thyra_ProductMultiVectorBase.hpp"
94 virtual Teuchos::RCP<BlockReorderManager>
Copy()
const {
115 virtual void SetBlock(
int blockIndex,
int reorder);
129 virtual void SetBlock(
int blockIndex,
const Teuchos::RCP<BlockReorderManager>& reorder);
146 virtual const Teuchos::RCP<BlockReorderManager>
GetBlock(
int blockIndex);
162 virtual const Teuchos::RCP<const BlockReorderManager>
GetBlock(
int blockIndex)
const;
165 virtual std::string
toString()
const;
172 std::vector<Teuchos::RCP<BlockReorderManager> >
children_;
192 virtual Teuchos::RCP<BlockReorderManager>
Copy()
const {
206 virtual const Teuchos::RCP<BlockReorderManager>
GetBlock(
int ) {
207 return Teuchos::null;
211 virtual const Teuchos::RCP<const BlockReorderManager>
GetBlock(
int )
const {
212 return Teuchos::null;
220 std::stringstream ss;
260 Teuchos::RCP<const Thyra::LinearOpBase<double> > buildReorderedLinearOp(
262 const Teuchos::RCP<
const Thyra::BlockedLinearOpBase<double> >& blkOp);
287 Teuchos::RCP<const Thyra::LinearOpBase<double> > buildReorderedLinearOp(
289 const Teuchos::RCP<
const Thyra::BlockedLinearOpBase<double> >& blkOp);
312 Teuchos::RCP<const Thyra::VectorSpaceBase<double> > buildReorderedVectorSpace(
314 const Teuchos::RCP<
const Thyra::ProductVectorSpaceBase<double> >& blkSpc);
329 const Teuchos::RCP<Thyra::ProductMultiVectorBase<double> >& blkVec);
344 const Teuchos::RCP<
const Thyra::ProductMultiVectorBase<double> >& blkVec);
358 Teuchos::RCP<Thyra::MultiVectorBase<double> > buildFlatMultiVector(
360 const Teuchos::RCP<Thyra::ProductMultiVectorBase<double> >& blkVec);
374 Teuchos::RCP<const Thyra::MultiVectorBase<double> > buildFlatMultiVector(
376 const Teuchos::RCP<
const Thyra::ProductMultiVectorBase<double> >& blkVec);
380 Teuchos::RCP<const Thyra::VectorSpaceBase<double> > buildFlatVectorSpace(
382 const Teuchos::RCP<
const Thyra::VectorSpaceBase<double> >& blkSpc);
int GetIndex() const
Get the the index that is stored in this block.
int value_
The value of the index for this leaf.
virtual std::string toString() const
Return a string description of this leaf class.
virtual const Teuchos::RCP< const BlockReorderManager > GetBlock(int) const
Get a particular subblock...this returns null.
virtual const Teuchos::RCP< BlockReorderManager > GetBlock(int)
Get a particular subblock...this returns null.
BlockReorderManager(const BlockReorderManager &bmm)
Copy constructor.
std::vector< Teuchos::RCP< BlockReorderManager > > children_
Definitions of the subblocks.
Class that describes how a flat blocked operator should be reordered.
virtual int GetNumBlocks() const
Gets the number of subblocks.
virtual int LargestIndex() const
Largest index in this manager.
virtual const Teuchos::RCP< BlockReorderManager > GetBlock(int blockIndex)
Get a particular block. If there is no block at this index location return a new one.
virtual ~BlockReorderManager()
Do nothing destructor.
virtual Teuchos::RCP< BlockReorderManager > Copy() const
Make a copy of this object.
virtual void SetNumBlocks(int sz)
Sets the number of subblocks.
Teuchos::RCP< Thyra::MultiVectorBase< double > > buildReorderedMultiVector(const BlockReorderManager &mgr, const Teuchos::RCP< Thyra::ProductMultiVectorBase< double > > &blkVec)
Convert a flat multi vector into a reordered multivector.
virtual int LargestIndex() const
Largest index in this manager.
BlockReorderLeaf(int ind)
Simple constructor that sets the index.
BlockReorderManager(int sz)
Set this level to have size sz.
virtual Teuchos::RCP< BlockReorderManager > Copy() const
Returns a copy of this object.
BlockReorderLeaf(const BlockReorderLeaf &brl)
Copy constructor.
virtual std::string toString() const
For sanities sake, print a readable string.
virtual void SetBlock(int, int)
Set the sub block, this does nothing b/c its a leaf.
virtual int GetNumBlocks() const
Get the number of subblocks (this one returns 0 b/c its a leaf)
virtual void SetNumBlocks(int)
Set the number of subblocks (this one does nothing b/c its a leaf)
BlockReorderManager()
Basic empty constructor.
Teuchos::RCP< const BlockReorderManager > blockedReorderFromString(std::string &reorder)
Convert a string to a block reorder manager object.
virtual void SetBlock(int blockIndex, int reorder)
Sets the sublock to a specific index value.