PlayaLinearOperatorBaseDecl.hpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 //   
00003  /* @HEADER@ */
00004 
00005 #ifndef PLAYA_LINEAROPERATORBASEDECL_HPP
00006 #define PLAYA_LINEAROPERATORBASEDECL_HPP
00007 
00008 #include "PlayaDefs.hpp"
00009 #include "Teuchos_BLAS_types.hpp"
00010 #include "PlayaVectorDecl.hpp"
00011 #include "PlayaObjectWithVerbosity.hpp"
00012 
00013 namespace Playa
00014 {
00015 
00016 template <class Scalar>  class VectorSpaceBase;
00017 template <class Scalar>  class Vector;
00018 template <class Scalar>  class VectorType;
00019 using Teuchos::ETransp;
00020 
00021 /** 
00022  * Base class for linear operators. Most operator subtypes can safely derive
00023  * from LinearOpWithSpaces  which provides trivial implementations of 
00024  * the domain() and range() methods.
00025  * 
00026  */
00027 template <class Scalar>
00028 class LinearOperatorBase
00029   : public ObjectWithVerbosity
00030 {
00031 public:
00032   /** Virtual dtor */
00033   ~LinearOperatorBase(){}
00034 
00035   /** Return the domain */
00036   virtual const RCP<const VectorSpaceBase<Scalar> > domain() const = 0 ;
00037 
00038   /** Return the range */
00039   virtual const RCP<const VectorSpaceBase<Scalar> > range() const = 0 ;
00040 
00041   /** 
00042    * Apply the operator. 
00043    * 
00044    * \param applyType Indicates whether to apply the operator, its transpose,
00045    * or its conjugate transpose. 
00046    * \param in The vector on which the operator is to act
00047    * \param out The vector into which the result of the operation 
00048    * is to be written. This vector should already be initialized by the
00049    * appropriate space.
00050    **/
00051   virtual void apply(
00052     Teuchos::ETransp applyType,
00053     const Vector<Scalar>& in,
00054     Vector<Scalar> out) const = 0 ;
00055 };
00056 
00057 
00058 
00059 
00060 }
00061 
00062 
00063 #endif

Site Contact