Thyra_DelayedLinearOpWithSolveFactoryDecl.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_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
00030 #define THYRA_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
00031 
00032 
00033 #include "Thyra_LinearOpWithSolveBaseDecl.hpp"
00034 
00035 
00036 namespace Thyra {
00037 
00038 
00047 template<class Scalar>
00048 class DelayedLinearOpWithSolveFactory
00049   : virtual public LinearOpWithSolveFactoryBase<Scalar>
00050 {
00051 public:
00052 
00055   
00057   DelayedLinearOpWithSolveFactory(
00058     const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf
00059     );
00060 
00062   RCP<LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF();
00063 
00065   RCP<const LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF() const;
00066 
00068 
00071 
00073   std::string description() const;
00074 
00076 
00079 
00081   void setParameterList(RCP<ParameterList> const& paramList);
00083   RCP<ParameterList> getParameterList();
00085   RCP<ParameterList> unsetParameterList();
00087   RCP<const ParameterList> getParameterList() const;
00089   RCP<const ParameterList> getValidParameters() const;
00090 
00092 
00095   
00097   virtual bool acceptsPreconditionerFactory() const;
00098 
00100   virtual void setPreconditionerFactory(
00101     const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
00102     const std::string &precFactoryName
00103     );
00104 
00106   virtual RCP<PreconditionerFactoryBase<Scalar> >
00107   getPreconditionerFactory() const;
00108 
00110   virtual void unsetPreconditionerFactory(
00111     RCP<PreconditionerFactoryBase<Scalar> > *precFactory,
00112     std::string *precFactoryName
00113     );
00114 
00116   virtual bool isCompatible(
00117     const LinearOpSourceBase<Scalar> &fwdOpSrc
00118     ) const;
00119 
00121   virtual RCP<LinearOpWithSolveBase<Scalar> > createOp() const;
00122 
00124   virtual void initializeOp(
00125     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00126     LinearOpWithSolveBase<Scalar> *Op,
00127     const ESupportSolveUse supportSolveUse
00128     ) const;
00129 
00131   virtual void initializeAndReuseOp(
00132     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00133     LinearOpWithSolveBase<Scalar> *Op
00134     ) const;
00135 
00137   virtual void uninitializeOp(
00138     LinearOpWithSolveBase<Scalar> *Op,
00139     RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
00140     RCP<const PreconditionerBase<Scalar> > *prec,
00141     RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
00142     ESupportSolveUse *supportSolveUse
00143     ) const;
00144  
00146   virtual bool supportsPreconditionerInputType(
00147     const EPreconditionerInputType precOpType
00148     ) const;
00149 
00151   virtual void initializePreconditionedOp(
00152     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00153     const RCP<const PreconditionerBase<Scalar> > &prec,
00154     LinearOpWithSolveBase<Scalar> *Op,
00155     const ESupportSolveUse supportSolveUse
00156     ) const;
00157 
00159   virtual void initializeApproxPreconditionedOp(
00160     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00161     const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
00162     LinearOpWithSolveBase<Scalar> *Op,
00163     const ESupportSolveUse supportSolveUse
00164     ) const;
00165 
00167 
00168 protected:
00169 
00172 
00174   void informUpdatedVerbosityState() const;
00175 
00177 
00178 private:
00179 
00180   RCP<LinearOpWithSolveFactoryBase<Scalar> > lowsf_;
00181 
00182   // Not defined and not to be called
00183   DelayedLinearOpWithSolveFactory();
00184 
00185 };
00186 
00187 
00188 } // namespace Thyra
00189 
00190 
00191 #endif // THYRA_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP

Generated on Tue Oct 20 12:47:11 2009 for Thyra Operator Solve Support by doxygen 1.4.7