Teko Version of the Day
Loading...
Searching...
No Matches
Teko_MLLinearOp.hpp
1#ifndef __Teko_MLLinearOp_hpp__
2#define __Teko_MLLinearOp_hpp__
3
4#include "Teko_Utilities.hpp"
5#include "Teko_BlockImplicitLinearOp.hpp"
6
7// forward declarations!
8namespace ML_Epetra {
9class MultiLevelPreconditioner;
10}
11
12namespace Teko {
13
14namespace Epetra {
15class MappingStrategy;
16class EpetraOperatorWrapper;
17}
18
19class MLLinearOp : public BlockImplicitLinearOp {
20public:
21 MLLinearOp(const Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> & mlPrecOp);
22
24 virtual VectorSpace range() const { return productRange_; }
25
27 virtual VectorSpace domain() const { return productDomain_; }
28
41 virtual void implicitApply(const BlockedMultiVector & x, BlockedMultiVector & y,
42 const double alpha = 1.0, const double beta = 0.0) const;
43
44 virtual void describe(Teuchos::FancyOStream & out_arg,
45 const Teuchos::EVerbosityLevel verbLevel) const;
46
47 Teuchos::RCP<const ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner() const;
48 Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner();
49
50protected:
51
52 void extractConversionInformation(ML_Epetra::MultiLevelPreconditioner & mlPrec);
53
54 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productRange_;
55 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productDomain_;
56
57 Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> mlPrecOp_;
58 Teuchos::RCP<Epetra::EpetraOperatorWrapper> Amat_;
59 Teuchos::RCP<const Epetra::MappingStrategy> mappingStrategy_;
60
61 mutable Teuchos::RCP<Epetra_MultiVector> eX_, eY_; // storage to avoid repeated reallocation
62
63private:
64 // hide me!
65 MLLinearOp();
66 MLLinearOp(const MLLinearOp &);
67};
68
69Teuchos::RCP<const ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner(const Teko::LinearOp & lo);
70
71}
72
73#endif