Thyra Package Browser (Single Doxygen Collection) Version of the Day
Thyra_DefaultBlockedTriangularLinearOpWithSolveFactory_decl.hpp
Go to the documentation of this file.
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_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
00030 #define THYRA_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
00031 
00032 
00033 #include "Thyra_LinearOpWithSolveBase.hpp"
00034 #include "Thyra_DefaultBlockedLinearOp.hpp"
00035 #include "Thyra_LinearOpSourceBase.hpp"
00036 
00037 
00038 namespace Thyra {
00039 
00040 
00079 template<class Scalar>
00080 class DefaultBlockedTriangularLinearOpWithSolveFactory
00081   : virtual public LinearOpWithSolveFactoryBase<Scalar>
00082 {
00083 public:
00084 
00087   
00098   DefaultBlockedTriangularLinearOpWithSolveFactory(
00099     const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf
00100     );
00101 
00102   
00113   DefaultBlockedTriangularLinearOpWithSolveFactory(
00114     const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf
00115     );
00116 
00117   // 2007/10/02: rabartl: Add versions of constructor that accept an array of
00118   // LOWSFB objects when needed.  This will be needed for multi-physics
00119   // problems for instance!
00120 
00122   RCP<LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF();
00123 
00125   RCP<const LinearOpWithSolveFactoryBase<Scalar> > getUnderlyingLOWSF() const;
00126 
00128 
00131 
00133   std::string description() const;
00134 
00136 
00139 
00141   void setParameterList(RCP<ParameterList> const& paramList);
00143   RCP<ParameterList> getNonconstParameterList();
00145   RCP<ParameterList> unsetParameterList();
00147   RCP<const ParameterList> getParameterList() const;
00149   RCP<const ParameterList> getValidParameters() const;
00150 
00152 
00155   
00157   virtual bool acceptsPreconditionerFactory() const;
00158 
00160   virtual void setPreconditionerFactory(
00161     const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
00162     const std::string &precFactoryName
00163     );
00164 
00166   virtual RCP<PreconditionerFactoryBase<Scalar> >
00167   getPreconditionerFactory() const;
00168 
00170   virtual void unsetPreconditionerFactory(
00171     RCP<PreconditionerFactoryBase<Scalar> > *precFactory,
00172     std::string *precFactoryName
00173     );
00174 
00176   virtual bool isCompatible(
00177     const LinearOpSourceBase<Scalar> &fwdOpSrc
00178     ) const;
00179 
00181   virtual RCP<LinearOpWithSolveBase<Scalar> > createOp() const;
00182 
00184   virtual void initializeOp(
00185     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00186     LinearOpWithSolveBase<Scalar> *Op,
00187     const ESupportSolveUse supportSolveUse
00188     ) const;
00189 
00191   virtual void initializeAndReuseOp(
00192     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00193     LinearOpWithSolveBase<Scalar> *Op
00194     ) const;
00195 
00197   virtual void uninitializeOp(
00198     LinearOpWithSolveBase<Scalar> *Op,
00199     RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
00200     RCP<const PreconditionerBase<Scalar> > *prec,
00201     RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
00202     ESupportSolveUse *supportSolveUse
00203     ) const;
00204  
00206   virtual bool supportsPreconditionerInputType(
00207     const EPreconditionerInputType precOpType
00208     ) const;
00209 
00211   virtual void initializePreconditionedOp(
00212     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00213     const RCP<const PreconditionerBase<Scalar> > &prec,
00214     LinearOpWithSolveBase<Scalar> *Op,
00215     const ESupportSolveUse supportSolveUse
00216     ) const;
00217 
00219   virtual void initializeApproxPreconditionedOp(
00220     const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
00221     const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
00222     LinearOpWithSolveBase<Scalar> *Op,
00223     const ESupportSolveUse supportSolveUse
00224     ) const;
00225 
00227 
00228 protected:
00229 
00232 
00234   void informUpdatedVerbosityState() const;
00235 
00237 
00238 private:
00239 
00240   typedef Teuchos::ConstNonconstObjectContainer<LinearOpWithSolveFactoryBase<Scalar> > LOWSF_t;
00241   
00242   LOWSF_t lowsf_;
00243 
00244   // Not defined and not to be called
00245   DefaultBlockedTriangularLinearOpWithSolveFactory();
00246 
00247 };
00248 
00249 
00254 template<class Scalar>
00255 RCP<DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar> >
00256 defaultBlockedTriangularLinearOpWithSolveFactory(
00257   const RCP<LinearOpWithSolveFactoryBase<Scalar> > &lowsf
00258   )
00259 {
00260   return Teuchos::rcp(
00261     new DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar>(lowsf)
00262     );
00263 }
00264 
00265 
00270 template<class Scalar>
00271 RCP<DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar> >
00272 defaultBlockedTriangularLinearOpWithSolveFactory(
00273   const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf
00274   )
00275 {
00276   return Teuchos::rcp(
00277     new DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar>(lowsf)
00278     );
00279 }
00280 
00281 
00282 } // namespace Thyra
00283 
00284 
00285 #endif // THYRA_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines