• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Meros_PCDPreconditionerFactory.h

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //              Meros: Segregated Preconditioning Package
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 MEROS_PCD_PRECONDITIONERFACTORY_H
00030 #define MEROS_PCD_PRECONDITIONERFACTORY_H
00031 
00037 #include "Teuchos_ParameterListAcceptor.hpp"
00038 #include "Thyra_SolveSupportTypes.hpp"
00039 #include "Thyra_LinearOpSourceBase.hpp"
00040 #include "Thyra_PreconditionerBase.hpp"
00041 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
00042 #include "Thyra_LinearOpWithSolveBase.hpp"
00043 #include "Thyra_PreconditionerFactoryBase.hpp"
00044 #include "Meros_PCDOperatorSource.h"
00045 
00046 
00047 namespace Meros
00048 {
00049   using Teuchos::ParameterList;
00050   using Teuchos::RCP;
00051   using Teuchos::rcp;
00052   using Teuchos::null;
00053   using namespace Thyra;
00054 
00102   class PCDPreconditionerFactory 
00103     : public PreconditionerFactoryBase<double>
00104     {
00105     public:
00108 
00110       PCDPreconditionerFactory(); 
00111       
00112 
00117       PCDPreconditionerFactory(
00118          RCP<const LinearOpWithSolveFactoryBase<double> >   
00119    const&  FSolveStrategy,
00120    RCP<const LinearOpWithSolveFactoryBase<double> >   
00121    const&  ApSolveStrategy
00122    );
00123       
00128       PCDPreconditionerFactory(
00129    RCP<const LinearOpWithSolveFactoryBase<double> > 
00130    const& FSolveStrategy,
00131    RCP<const LinearOpWithSolveFactoryBase<double> >
00132    const& ApSolveStrategy,
00133    RCP<const LinearOpWithSolveFactoryBase<double> >
00134    const& QpSolveStrategy
00135    );
00137 
00140 
00144       bool isCompatible(const LinearOpSourceBase<double> &fwdOpSrc ) const;
00145 
00146 
00157       RCP<PreconditionerBase<double> > createPrec() const;
00158 
00159 
00161       void initializePrec(const RCP<const LinearOpSourceBase<double> >
00162         &fwdOpSrc,
00163         PreconditionerBase<double> *precOp,
00164         const ESupportSolveUse 
00165         supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED) const;
00166 
00167 
00168 
00170       void uninitializePrec(PreconditionerBase<double> *prec,
00171           RCP<const LinearOpSourceBase<double> > *fwdOpSrc,
00172           ESupportSolveUse *supportSolveUse = NULL) const;
00173 
00174 
00176 
00179       
00181       void setParameterList(RCP<ParameterList> const& paramList);
00183       RCP<ParameterList> getNonconstParameterList();
00185       RCP<ParameterList> unsetParameterList();
00187       RCP<const ParameterList> getParameterList() const;
00189       RCP<const Teuchos::ParameterList> getValidParameters() const;
00191 
00192       /* Deal with all of the TSFHandleable features */
00193       /* GET_RCP(PreconditionerFactoryBase<double>); */
00194 
00195     private:
00196       mutable RCP<ParameterList>  validPL_;
00197       RCP<ParameterList>          paramList_;
00198 
00199       RCP<const LinearOpWithSolveFactoryBase<double> >   
00200   FSolveStrategy_;
00201       RCP<const LinearOpWithSolveFactoryBase<double> >   
00202   ApSolveStrategy_;
00203       RCP<const LinearOpWithSolveFactoryBase<double> >   
00204   QpSolveStrategy_;
00205     };
00206 
00207 }  // namespace Meros
00208 
00209 #endif  // MEROS_PCD_PRECONDITIONERFACTORY_H