10 #ifndef __Teko_BlockedTpetraOperator_hpp__
11 #define __Teko_BlockedTpetraOperator_hpp__
14 #include "Tpetra_Operator.hpp"
17 #include "Teuchos_RCP.hpp"
19 #include "Thyra_LinearOpBase.hpp"
22 #include "Teko_BlockedReordering.hpp"
23 #include "Teko_TpetraOperatorWrapper.hpp"
24 #include "Teko_TpetraBlockedMappingStrategy.hpp"
25 #include "Teko_ConfigDefs.hpp"
28 namespace TpetraHelpers {
44 const Teuchos::RCP<
const Tpetra::Operator<ST, LO, GO, NT> > &content,
45 const std::string &label =
"<ANYM>");
55 virtual void SetContent(
const std::vector<std::vector<GO> > &vars,
56 const Teuchos::RCP<
const Tpetra::Operator<ST, LO, GO, NT> > &content);
63 virtual const Teuchos::RCP<const Tpetra::Operator<ST, LO, GO, NT> > GetContent()
const {
67 virtual const Teuchos::RCP<const Tpetra::Operator<ST, LO, GO, NT> > GetContent() {
71 const Teuchos::RCP<const Tpetra::Operator<ST, LO, GO, NT> > GetBlock(
int i,
int j)
const;
76 void Reorder(
const BlockReorderManager &brm);
83 virtual void WriteBlocks(
const std::string &prefix)
const;
94 virtual int SetUseTranspose(
bool ) {
return -1; }
96 virtual int ApplyInverse(
const Tpetra::MultiVector<ST, LO, GO, NT> & ,
97 Tpetra::MultiVector<ST, LO, GO, NT> & )
const {
98 TEUCHOS_ASSERT(
false);
102 virtual double NormInf()
const {
103 TEUCHOS_ASSERT(
false);
108 virtual bool UseTranspose()
const {
return false; }
109 virtual bool HasNormInf()
const {
return false; }
110 virtual const Teuchos::Comm<int> &Comm()
const {
return *fullContent_->getRangeMap()->getComm(); }
117 Teuchos::RCP<const Tpetra::Operator<ST, LO, GO, NT> > fullContent_;
118 Teuchos::RCP<TpetraBlockedMappingStrategy> blockedMapping_;
119 Teuchos::RCP<Thyra::LinearOpBase<ST> > blockedOperator_;
120 Teuchos::RCP<const BlockReorderManager> reorderManager_;
124 void BuildBlockedOperator();
void Reorder(const BlockReorderManager &brm)
virtual void RebuildOps()
void RemoveReording()
Remove any reordering on this object.
Tear about a user specified Tpetra::Operator<ST,LO,GO,NT> (CrsMatrix) using a vector of vectors of GI...
virtual void WriteBlocks(const std::string &prefix) const
BlockedTpetraOperator(const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &content, const std::string &label="<ANYM>")
bool testAgainstFullOperator(int count, ST tol) const
Helps perform sanity checks.
virtual void SetContent(const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &content)
Implements the Epetra_Operator interface with a Thyra LinearOperator. This enables the use of absrtac...