PlayaSimpleDiagonalOpDecl.hpp

00001 /* @HEADER@ */
00002 //   
00003 /* @HEADER@ */
00004 
00005 #ifndef PLAYA_SIMPLE_DIAGONAL_OP_DECL_HPP
00006 #define PLAYA_SIMPLE_DIAGONAL_OP_DECL_HPP
00007 
00008 
00009 
00010 #include "PlayaDefs.hpp"
00011 #include "PlayaLinearOpWithSpacesDecl.hpp"
00012 #include "PlayaLinearOperatorDecl.hpp"
00013 
00014 
00015 namespace Playa
00016 {
00017 using namespace Teuchos;
00018 
00019 
00020 
00021 
00022 
00024 template <class Scalar>
00025 class SimpleDiagonalOp : public LinearOpWithSpaces<Scalar>,
00026   public Printable
00027 {
00028 public:
00030   SimpleDiagonalOp(const Vector<Scalar>& diag);
00031 
00032 
00034   void apply(Teuchos::ETransp transApplyType,
00035     const Vector<Scalar>& in,
00036     Vector<Scalar> out) const ;
00037 
00039   std::string description() const ;
00040 
00042   void print(std::ostream& os) const ;
00043 
00044 private:
00045   Vector<Scalar> diag_;
00046 };
00047 
00049 template <class Scalar>
00050 LinearOperator<Scalar> diagonalOperator(
00051   const Vector<Scalar>& diag);
00052 
00053 }
00054 
00055 #endif

doxygen