00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef __Teko_BlockLowerTriInverseOp_hpp__
00048 #define __Teko_BlockLowerTriInverseOp_hpp__
00049
00050 #include "Teko_Utilities.hpp"
00051 #include "Teko_BlockImplicitLinearOp.hpp"
00052
00053 namespace Teko {
00054
00063 class BlockLowerTriInverseOp : public BlockImplicitLinearOp {
00064 public:
00074 BlockLowerTriInverseOp(BlockedLinearOp & L,const std::vector<LinearOp> & invDiag);
00075
00077
00078
00080 virtual VectorSpace range() const { return productRange_; }
00081
00083 virtual VectorSpace domain() const { return productDomain_; }
00084
00097 virtual void implicitApply(const BlockedMultiVector & x, BlockedMultiVector & y,
00098 const double alpha = 1.0, const double beta = 0.0) const;
00100
00101 virtual void describe(Teuchos::FancyOStream &out_arg,
00102 const Teuchos::EVerbosityLevel verbLevel) const;
00103
00104 protected:
00105
00106 const BlockedLinearOp L_;
00107 std::vector<LinearOp> invDiag_;
00108
00109 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productRange_;
00110 Teuchos::RCP<const Thyra::ProductVectorSpaceBase<double> > productDomain_;
00111
00112
00113 mutable BlockedMultiVector srcScrap_;
00114 mutable BlockedMultiVector dstScrap_;
00115
00116 private:
00117
00118 BlockLowerTriInverseOp();
00119 BlockLowerTriInverseOp(const BlockLowerTriInverseOp &);
00120 };
00121
00122 inline LinearOp createBlockLowerTriInverseOp(BlockedLinearOp & U,const std::vector<LinearOp> & invDiag)
00123 {
00124 return Teuchos::rcp(new BlockLowerTriInverseOp(U,invDiag));
00125 }
00126
00127 inline LinearOp createBlockLowerTriInverseOp(BlockedLinearOp & L,const std::vector<LinearOp> & invDiag,const std::string & str)
00128 {
00129 Teuchos::RCP<Thyra::LinearOpBase<double> > result = Teuchos::rcp(new BlockLowerTriInverseOp(L,invDiag));
00130 result->setObjectLabel(str);
00131
00132 return result;
00133 }
00134
00135 }
00136
00137 #endif