Teko Version of the Day
Teko_MLLinearOp.hpp
00001 #ifndef __Teko_MLLinearOp_hpp__
00002 #define __Teko_MLLinearOp_hpp__
00003 
00004 #include "Teko_Utilities.hpp"
00005 #include "Teko_BlockImplicitLinearOp.hpp"
00006 
00007 // forward declarations!
00008 namespace ML_Epetra {
00009 class MultiLevelPreconditioner;
00010 }
00011 
00012 namespace Teko {
00013 
00014 namespace Epetra {
00015 class MappingStrategy;
00016 class EpetraOperatorWrapper;
00017 }
00018 
00019 class MLLinearOp : public BlockImplicitLinearOp {
00020 public:
00021    MLLinearOp(const Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> & mlPrecOp);
00022 
00024    virtual VectorSpace range() const { return productRange_; }
00025 
00027    virtual VectorSpace domain() const { return productDomain_; }
00028 
00041    virtual void implicitApply(const BlockedMultiVector & x, BlockedMultiVector & y,
00042               const double alpha = 1.0, const double beta = 0.0) const;
00043 
00044    virtual void describe(Teuchos::FancyOStream & out_arg,
00045                          const Teuchos::EVerbosityLevel verbLevel) const;
00046 
00047    Teuchos::RCP<const ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner() const;
00048    Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner();
00049 
00050 protected:
00051 
00052    void extractConversionInformation(ML_Epetra::MultiLevelPreconditioner & mlPrec);
00053 
00054    Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productRange_; 
00055    Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productDomain_; 
00056 
00057    Teuchos::RCP<ML_Epetra::MultiLevelPreconditioner> mlPrecOp_;
00058    Teuchos::RCP<Epetra::EpetraOperatorWrapper> Amat_;
00059    Teuchos::RCP<const Epetra::MappingStrategy> mappingStrategy_; 
00060 
00061    mutable Teuchos::RCP<Epetra_MultiVector> eX_, eY_; // storage to avoid repeated reallocation
00062 
00063 private:
00064    // hide me!
00065    MLLinearOp();
00066    MLLinearOp(const MLLinearOp &);
00067 };
00068 
00069 Teuchos::RCP<const ML_Epetra::MultiLevelPreconditioner> getMLPreconditioner(const Teko::LinearOp & lo);
00070 
00071 }
00072 
00073 #endif
 All Classes Files Functions Variables