47 #ifndef __Teko_BlockedReordering_hpp__
48 #define __Teko_BlockedReordering_hpp__
53 #include "Teuchos_RCP.hpp"
55 #include "Thyra_LinearOpBase.hpp"
56 #include "Thyra_LinearOpDefaultBase.hpp"
57 #include "Thyra_BlockedLinearOpBase.hpp"
58 #include "Thyra_ProductMultiVectorBase.hpp"
131 virtual Teuchos::RCP<BlockReorderManager>
Copy()
const
150 virtual void SetBlock(
int blockIndex,
int reorder);
164 virtual void SetBlock(
int blockIndex,
const Teuchos::RCP<BlockReorderManager> & reorder);
181 virtual const Teuchos::RCP<BlockReorderManager>
GetBlock(
int blockIndex);
197 virtual const Teuchos::RCP<const BlockReorderManager>
GetBlock(
int blockIndex)
const;
200 virtual std::string
toString()
const;
207 std::vector<Teuchos::RCP<BlockReorderManager> >
children_;
228 virtual Teuchos::RCP<BlockReorderManager>
Copy()
const
241 virtual const Teuchos::RCP<BlockReorderManager>
GetBlock(
int )
242 {
return Teuchos::null; }
245 virtual const Teuchos::RCP<const BlockReorderManager>
GetBlock(
int )
const
246 {
return Teuchos::null; }
253 { std::stringstream ss; ss <<
value_;
return ss.str(); }
290 Teuchos::RCP<const Thyra::LinearOpBase<double> >
292 const Teuchos::RCP<
const Thyra::BlockedLinearOpBase<double> > & blkOp);
317 Teuchos::RCP<const Thyra::LinearOpBase<double> >
319 const Teuchos::RCP<
const Thyra::BlockedLinearOpBase<double> > & blkOp);
342 Teuchos::RCP<const Thyra::VectorSpaceBase<double> >
344 const Teuchos::RCP<
const Thyra::ProductVectorSpaceBase<double> > & blkSpc);
357 Teuchos::RCP<Thyra::MultiVectorBase<double> >
359 const Teuchos::RCP<Thyra::ProductMultiVectorBase<double> > & blkVec);
372 Teuchos::RCP<const Thyra::MultiVectorBase<double> >
374 const Teuchos::RCP<
const Thyra::ProductMultiVectorBase<double> > & blkVec);
388 Teuchos::RCP<Thyra::MultiVectorBase<double> >
390 const Teuchos::RCP<Thyra::ProductMultiVectorBase<double> > & blkVec);
404 Teuchos::RCP<const Thyra::MultiVectorBase<double> >
406 const Teuchos::RCP<
const Thyra::ProductMultiVectorBase<double> > & blkVec);
410 Teuchos::RCP<const Thyra::VectorSpaceBase<double> >
412 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.