Class that describes how a flat blocked operator should be reordered. More...
#include <Teko_BlockedReordering.hpp>
Public Member Functions | |
virtual Teuchos::RCP < BlockReorderManager > | Copy () const |
Returns a copy of this object. More... | |
virtual void | SetNumBlocks (int sz) |
Sets the number of subblocks. More... | |
virtual int | GetNumBlocks () const |
Gets the number of subblocks. More... | |
virtual void | SetBlock (int blockIndex, int reorder) |
Sets the sublock to a specific index value. More... | |
virtual void | SetBlock (int blockIndex, const Teuchos::RCP< BlockReorderManager > &reorder) |
Set the subblock to a use a particular reorder manager. More... | |
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. More... | |
virtual const Teuchos::RCP < const BlockReorderManager > | GetBlock (int blockIndex) const |
Get a particular block. If there is no block at this index location return Teuchos::null More... | |
virtual std::string | toString () const |
For sanities sake, print a readable string. More... | |
virtual int | LargestIndex () const |
Largest index in this manager. More... | |
Constructors | |
BlockReorderManager () | |
Basic empty constructor. More... | |
BlockReorderManager (int sz) | |
Set this level to have size sz. More... | |
BlockReorderManager (const BlockReorderManager &bmm) | |
Copy constructor. More... | |
virtual | ~BlockReorderManager () |
Do nothing destructor. More... | |
Protected Attributes | |
std::vector< Teuchos::RCP < BlockReorderManager > > | children_ |
Definitions of the subblocks. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > | buildReorderedVectorSpace (const BlockReorderManager &mgr, const Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > &blkSpc) |
Use the BlockReorderManager to change a flat vector space into a composite vector space. More... | |
Teuchos::RCP< const Thyra::LinearOpBase< double > > | buildReorderedLinearOp (const BlockReorderManager &bmm, const Teuchos::RCP< const Thyra::BlockedLinearOpBase< double > > &blkOp) |
Use the BlockReorderManager to change a flat square blocked operator into a composite operator. More... | |
Teuchos::RCP< const Thyra::LinearOpBase< double > > | buildReorderedLinearOp (const BlockReorderManager &rowMgr, const BlockReorderManager &colMgr, const Teuchos::RCP< const Thyra::BlockedLinearOpBase< double > > &blkOp) |
Use the BlockReorderManager to change a flat blocked operator into a composite operator. More... | |
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > | buildReorderedVectorSpace (const BlockReorderManager &mgr, const Teuchos::RCP< const Thyra::ProductVectorSpaceBase< double > > &blkSpc) |
Use the BlockReorderManager to change a flat vector space into a composite vector space. More... | |
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. More... | |
Teuchos::RCP< const Thyra::MultiVectorBase< double > > | buildReorderedMultiVector (const BlockReorderManager &mgr, const Teuchos::RCP< const Thyra::ProductMultiVectorBase< double > > &blkVec) |
Convert a flat multi vector into a reordered multivector. More... | |
Teuchos::RCP < Thyra::MultiVectorBase < double > > | buildFlatMultiVector (const BlockReorderManager &mgr, const Teuchos::RCP< Thyra::ProductMultiVectorBase< double > > &blkVec) |
Convert a reordered multivector into a flat multivector. More... | |
Teuchos::RCP< const Thyra::MultiVectorBase< double > > | buildFlatMultiVector (const BlockReorderManager &mgr, const Teuchos::RCP< const Thyra::ProductMultiVectorBase< double > > &blkVec) |
Convert a reordered multivector into a flat multivector. More... | |
Teuchos::RCP< const BlockReorderManager > | blockedReorderFromString (std::string &reorder) |
Convert a string to a block reorder manager object. More... | |
Class that describes how a flat blocked operator should be reordered.
Class that describes how a flat blocked operator should be reordered. The semenatics are very similar to a Teuchos::ParameterList. Each level expects you to set the size of the level and define what each subblock is. For example, to change the blocked 3x3 matrix from
to
the algorithm to build the appropriate block manager is
RCP<BlockReorderManager> bmm = rcp(new BlockReorderManager(2));
bmm->GetBlock(0)->SetNumBlocks(2);
bmm->GetBlock(0)->SetBlock(0,0);
bmm->GetBlock(0)->SetBlock(1,1);
bmm->SetBlock(1,2);
Suppose now you want to take your operator and build . The relevant code is
BlockedLinearOp Z = ...
LinearOp Zprime = buildReorderedLinearOp(*bmm,Z);
Definition at line 72 of file Teko_BlockedReordering.hpp.
|
inline |
Basic empty constructor.
Definition at line 78 of file Teko_BlockedReordering.hpp.
|
inline |
Set this level to have size sz.
Definition at line 81 of file Teko_BlockedReordering.hpp.
|
inline |
Copy constructor.
Definition at line 84 of file Teko_BlockedReordering.hpp.
|
inlinevirtual |
Do nothing destructor.
Definition at line 89 of file Teko_BlockedReordering.hpp.
|
inlinevirtual |
Returns a copy of this object.
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 94 of file Teko_BlockedReordering.hpp.
|
inlinevirtual |
Sets the number of subblocks.
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 99 of file Teko_BlockedReordering.hpp.
|
inlinevirtual |
Gets the number of subblocks.
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 105 of file Teko_BlockedReordering.hpp.
|
virtual |
Sets the sublock to a specific index value.
Sets the sublock to a specific index value
[in] | blockIndex | Subblock to be set |
[in] | reorder | The value of the index in this subblock |
blockIndex<this->GetNumBlocks()
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 32 of file Teko_BlockedReordering.cpp.
|
virtual |
Set the subblock to a use a particular reorder manager.
Set the subblock to a use a particular reorder manager. This facilitates recursive construction algorithms where the base case is not differentiated.
[in] | blockIndex | Subblock to be set |
[in] | reorder | Reorder manager to be used in this block |
blockIndex<this->GetNumBlocks()
|
virtual |
Get a particular block. If there is no block at this index location return a new one.
Get a particular block. If there is no block at this index location return a new one.
[in] | blockIndex | The index queried. |
blockIndex<this->GetNumBlocks()
null
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 58 of file Teko_BlockedReordering.cpp.
|
virtual |
Get a particular block. If there is no block at this index location return Teuchos::null
Get a particular block. If there is no block at this index location return Teuchos::null
[in] | blockIndex | The index queried. |
Teuchos::null
is returned.blockIndex<this->GetNumBlocks()
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 67 of file Teko_BlockedReordering.cpp.
|
virtual |
For sanities sake, print a readable string.
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 73 of file Teko_BlockedReordering.cpp.
|
virtual |
Largest index in this manager.
Reimplemented in Teko::BlockReorderLeaf.
Definition at line 88 of file Teko_BlockedReordering.cpp.
|
related |
Use the BlockReorderManager to change a flat vector space into a composite vector space.
Use the BlockReorderManager to chanage a flat vector space a more complex composite structure. The manager should not have any indicies larger then the size of the blocked operator.
[in] | mgr | BlockReorderManager that specifies how the space is to be restructured. |
[in] | blkSpc | The block space to be reordered and restructured. Only the first level of the space will be considered. Each subspace (even if it is itself blocked) will be handed as an individual space. |
bmm
is smaller then the dimension of the blkSpc
. Definition at line 212 of file Teko_BlockedReordering.cpp.
|
related |
Use the BlockReorderManager to change a flat square blocked operator into a composite operator.
Use the BlockReorderManager to chanage a flat square blocked operator into a more complex composite structure. The manager should not have any indicies larger then the size of the blocked operator.
[in] | bmm | BlockReorderManager that specifies how the blocked operator is to be restructured. |
[in] | blkOp | The block operator to be reordered and restructured. Only the first level of the operator will be considered. Each subblock (even if it is itself blocked) will be handed as an individual operator. |
bmm
is smaller then the dimension of the blkOp
. Definition at line 101 of file Teko_BlockedReordering.cpp.
|
related |
Use the BlockReorderManager to change a flat blocked operator into a composite operator.
Use the BlockReorderManager to chanage a flat square blocked operator into a more complex composite structure. The manager should not have any indicies larger then the size of the blocked operator.
[in] | rowMgr | BlockReorderManager that specifies how the rows are to be restructured. |
[in] | colMgr | BlockReorderManager that specifies how the columns are to be restructured. |
[in] | blkOp | The block operator to be reordered and restructured. Only the first level of the operator will be considered. Each subblock (even if it is itself blocked) will be handed as an individual operator. |
bmm
is smaller then the dimension of the blkOp
. Definition at line 107 of file Teko_BlockedReordering.cpp.
|
related |
Use the BlockReorderManager to change a flat vector space into a composite vector space.
Use the BlockReorderManager to chanage a flat vector space a more complex composite structure. The manager should not have any indicies larger then the size of the blocked operator.
[in] | mgr | BlockReorderManager that specifies how the space is to be restructured. |
[in] | blkSpc | The block space to be reordered and restructured. Only the first level of the space will be considered. Each subspace (even if it is itself blocked) will be handed as an individual space. |
bmm
is smaller then the dimension of the blkSpc
.
|
related |
Convert a flat multi vector into a reordered multivector.
Convert a flat multi vector into a reordered multivector.
[in] | mgr | Block manager describing the reordered multivector. |
[in] | blkVec | The flat multivector. |
mgr
. Definition at line 251 of file Teko_BlockedReordering.cpp.
|
related |
Convert a flat multi vector into a reordered multivector.
Convert a flat multi vector into a reordered multivector.
[in] | mgr | Block manager describing the reordered multivector. |
[in] | blkVec | The flat multivector. |
mgr
. Definition at line 292 of file Teko_BlockedReordering.cpp.
|
related |
Convert a reordered multivector into a flat multivector.
Convert a reordered multivector into a flat multivector.
[in] | mgr | Block manager describing the reordered multivector. |
[in] | blkVec | The reordered multivector structured in a way that is consistent with by mgr |
Definition at line 392 of file Teko_BlockedReordering.cpp.
|
related |
Convert a reordered multivector into a flat multivector.
Convert a reordered multivector into a flat multivector.
[in] | mgr | Block manager describing the reordered multivector. |
[in] | blkVec | The reordered multivector structured in a way that is consistent with by mgr |
Definition at line 415 of file Teko_BlockedReordering.cpp.
|
related |
Convert a string to a block reorder manager object.
Convert a string to a block reorder manager object. These strings have numbers delimted by [,]. For example, the string "[[2 1] 0]" will give a manager with [2 1] in the first block and 0 in the second block.
[in] | reorder | Block structure corresponding to the manager |
Definition at line 611 of file Teko_BlockedReordering.cpp.
|
protected |
Definitions of the subblocks.
Definition at line 172 of file Teko_BlockedReordering.hpp.