Thyra_LinearOpWithSolveFactoryBase_decl.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
00030 #define THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
00031 
00032 #include "Thyra_LinearOpWithSolveBase.hpp"
00033 #include "Thyra_PreconditionerFactoryBase.hpp"
00034 #include "Teuchos_ParameterListAcceptor.hpp"
00035 #include "Teuchos_VerboseObject.hpp"
00036 
00037 
00038 namespace Thyra {
00039 
00040 
00390 template<class Scalar>
00391 class LinearOpWithSolveFactoryBase
00392   : virtual public Teuchos::Describable, 
00393     virtual public Teuchos::VerboseObject<LinearOpWithSolveFactoryBase<Scalar> >,
00394     virtual public Teuchos::ParameterListAcceptor
00395 {
00396 public:
00397 
00400 
00405   virtual bool acceptsPreconditionerFactory() const;
00406 
00428   virtual void setPreconditionerFactory(
00429     const RCP<PreconditionerFactoryBase<Scalar> >  &precFactory,
00430     const std::string &precFactoryName
00431     );
00432 
00437   virtual RCP<PreconditionerFactoryBase<Scalar> >
00438   getPreconditionerFactory() const;
00439 
00448   virtual void unsetPreconditionerFactory(
00449     RCP<PreconditionerFactoryBase<Scalar> >  *precFactory = NULL,
00450     std::string *precFactoryName = NULL
00451     );
00452 
00454 
00457 
00461   virtual bool isCompatible(
00462     const LinearOpSourceBase<Scalar> &fwdOpSrc ) const = 0;
00463 
00472   virtual RCP<LinearOpWithSolveBase<Scalar> >
00473   createOp() const = 0;
00474 
00548   virtual void initializeOp(
00549     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00550     LinearOpWithSolveBase<Scalar> *Op,
00551     const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
00552     ) const = 0;
00553 
00620   virtual void initializeAndReuseOp(
00621     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00622     LinearOpWithSolveBase<Scalar> *Op
00623     ) const;
00624 
00684   virtual void uninitializeOp(
00685     LinearOpWithSolveBase<Scalar> *Op,
00686     RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc = NULL,
00687     RCP<const PreconditionerBase<Scalar> > *prec = NULL,
00688     RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc = NULL,
00689     ESupportSolveUse *supportSolveUse = NULL
00690     ) const = 0;
00691   
00693 
00696 
00701   virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const;
00702 
00820   virtual void initializePreconditionedOp(
00821     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00822     const RCP<const PreconditionerBase<Scalar> > &prec,
00823     LinearOpWithSolveBase<Scalar> *Op,
00824     const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
00825     ) const;
00826 
00852   virtual void initializeApproxPreconditionedOp(
00853     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00854     const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
00855     LinearOpWithSolveBase<Scalar> *Op,
00856     const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
00857     ) const;
00858   
00860 
00861 private:
00862   
00863   // Not defined and not to be called
00864   LinearOpWithSolveFactoryBase<Scalar>&
00865   operator=(const LinearOpWithSolveFactoryBase<Scalar>&);
00866 
00867 };
00868 
00869 
00870 } // namespace Thyra
00871 
00872 
00873 #endif // THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:00:14 2011 for Thyra by  doxygen 1.6.3