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

Meros_LSCPreconditionerFactory.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_LSC_PRECONDITIONERFACTORY_H
00030 #define MEROS_LSC_PRECONDITIONERFACTORY_H
00031 
00037 #include "Teuchos_ParameterListAcceptor.hpp"
00038 
00039 #include "Thyra_SolveSupportTypes.hpp"
00040 #include "Thyra_LinearOpSourceBase.hpp"
00041 #include "Thyra_PreconditionerBase.hpp"
00042 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
00043 #include "Thyra_LinearOpWithSolveBase.hpp"
00044 #include "Thyra_PreconditionerFactoryBase.hpp"
00045 
00046 #include "Meros_LSCOperatorSource.h"
00047 
00048 
00049 namespace Meros
00050 {
00051 
00052   using Teuchos::ParameterList;
00053   using Teuchos::RCP;
00054   using Teuchos::rcp;
00055   using Teuchos::null;
00056   using namespace Thyra;
00057 
00103   class LSCPreconditionerFactory 
00104     : public PreconditionerFactoryBase<double>
00105     {
00106     public:
00109 
00111       LSCPreconditionerFactory();
00112       
00113 
00118       LSCPreconditionerFactory(
00119         RCP<const LinearOpWithSolveFactoryBase<double> >   const&  FSolveStrategy,
00120         RCP<const LinearOpWithSolveFactoryBase<double> >   const&  BBtSolveStrategy
00121         );
00122 
00124 
00127 
00131       bool isCompatible(const LinearOpSourceBase<double> &fwdOpSrc ) const;
00132 
00143       RCP<PreconditionerBase<double> > createPrec() const;
00144 
00145 
00147       void initializePrec(const RCP<const LinearOpSourceBase<double> >
00148         &fwdOpSrc,
00149         PreconditionerBase<double> *precOp,
00150         const ESupportSolveUse 
00151         supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED) const;
00152 
00153 
00154 
00156       void uninitializePrec(PreconditionerBase<double> *prec,
00157           RCP<const LinearOpSourceBase<double> >  *fwdOpSrc,
00158           ESupportSolveUse *supportSolveUse = NULL) const;
00159 
00160 
00162 
00165       
00167       void setParameterList(RCP<ParameterList> const& paramList);
00169       RCP<ParameterList> getNonconstParameterList();
00171       RCP<ParameterList> unsetParameterList();
00173       RCP<const ParameterList> getParameterList() const;
00175       RCP<const Teuchos::ParameterList> getValidParameters() const;
00177 
00178       /* Deal with all of the TSFHandleable features */
00179       /* GET_RCP(PreconditionerFactoryBase<double>); */
00180 
00181     private:
00182 
00183       mutable RCP<ParameterList>  validPL_;
00184       RCP<ParameterList>          paramList_;
00185 
00186       RCP<const LinearOpWithSolveFactoryBase<double> >   FSolveStrategy_;
00187       RCP<const LinearOpWithSolveFactoryBase<double> >   BBtSolveStrategy_;
00188 
00189     };
00190 
00191 }  // namespace Meros
00192 
00193 #endif  // MEROS_LSC_PRECONDITIONERFACTORY_H