47#ifndef XPETRA_BLOCKREORDERMANAGER_HPP_
48#define XPETRA_BLOCKREORDERMANAGER_HPP_
94 virtual void SetBlock(
int blockIndex,
int reorder);
129 std::stringstream ss;
131 for(
size_t i = 0; i <
children_.size(); i++) {
135 ss <<
" " <<
children_[i]->toString() <<
" ";
144 for(
size_t i = 0; i<
children_.size(); i++) {
146 int subMax =
children_[i]->LargestIndex();
147 max = max > subMax ? max : subMax;
155 std::vector<Teuchos::RCP<BlockReorderManager> >
children_;
172 return Teuchos::null;
175 return Teuchos::null;
180 std::stringstream ss; ss <<
value_;
return ss.str();
192void tokenize(std::string srcInput,std::string whitespace,std::string prefer, std::vector<std::string> & tokens);
197 std::vector<std::string>::const_iterator begin,
198 std::vector<std::string>::const_iterator end,
199 std::vector<std::string> & subBlock);
BlockReorderLeaf(int ind)
virtual const Teuchos::RCP< BlockReorderManager > GetBlock(int)
Get a particular block. If there is no block at this index location return a new one.
int GetIndex() const
Get the index that is stored in this block/leaf.
virtual const Teuchos::RCP< const BlockReorderManager > GetBlock(int) const
Get a particular block. If there is no block at this index location return a new one.
virtual int LargestIndex() const
returns largest index in this BlockReorderManager class
virtual void SetNumBlocks(size_t)
Sets number of subblocks.
virtual Teuchos::RCP< BlockReorderManager > Copy() const
returns copy of this object
virtual size_t GetNumBlocks() const
Returns number of subblocks.
virtual void SetBlock(int, int)
Sets the subblock to a specific index value.
BlockReorderLeaf(const BlockReorderLeaf &brl)
virtual std::string toString() const
for sanities sake, print a readable string
virtual void SetBlock(int, const Teuchos::RCP< BlockReorderManager > &)
Sets the subblock to a specific index value.
int value_
The value of the index for this leaf.
virtual const Teuchos::RCP< const BlockReorderManager > GetBlock(int blockIndex) const
Get a particular block. If there is no block at this index location return a new one.
BlockReorderManager(const BlockReorderManager &bmm)
Copy constructor.
virtual ~BlockReorderManager()
empty destructor
virtual int LargestIndex() const
returns largest index in this BlockReorderManager class
virtual std::string toString() const
for sanities sake, print a readable string
BlockReorderManager()
Basic empty constructor.
virtual void SetNumBlocks(size_t sz)
Sets number of subblocks.
std::vector< Teuchos::RCP< BlockReorderManager > > children_
definitions of the subblocks
virtual void SetBlock(int blockIndex, int reorder)
Sets the subblock to a specific index value.
virtual Teuchos::RCP< BlockReorderManager > Copy() const
returns copy of this object
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 size_t GetNumBlocks() const
Returns number of subblocks.
#define TEUCHOS_ASSERT(assertion_test)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
std::vector< std::string >::const_iterator buildSubBlock(std::vector< std::string >::const_iterator begin, std::vector< std::string >::const_iterator end, std::vector< std::string > &subBlock)
Teuchos::RCP< Xpetra::BlockReorderManager > blockedReorderFromTokens(const std::vector< std::string > &tokens)
void tokenize(std::string srcInput, std::string whitespace, std::string prefer, std::vector< std::string > &tokens)
Teuchos::RCP< const Xpetra::BlockReorderManager > blockedReorderFromString(std::string reorder)
Convert a string to a block reorder manager object.