|
Thyra Package Browser (Single Doxygen Collection) Version of the Day
|
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_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP 00030 #define THYRA_DEFAULT_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP 00031 00032 00033 #include "Thyra_LinearOpWithSolveFactoryBase.hpp" 00034 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp" 00035 00036 00037 namespace Thyra { 00038 00039 00046 template<class Scalar> 00047 class DefaultSerialDenseLinearOpWithSolveFactory 00048 : virtual public LinearOpWithSolveFactoryBase<Scalar>, 00049 virtual protected Teuchos::ParameterListAcceptorDefaultBase 00050 { 00051 public: 00052 00055 00057 00060 00062 void setParameterList(RCP<ParameterList> const& paramList); 00064 RCP<const ParameterList> getValidParameters() const; 00065 00067 00070 00072 virtual bool acceptsPreconditionerFactory() const; 00073 00075 virtual void setPreconditionerFactory( 00076 const RCP<PreconditionerFactoryBase<Scalar> > &precFactory, 00077 const std::string &precFactoryName 00078 ); 00079 00081 virtual RCP<PreconditionerFactoryBase<Scalar> > 00082 getPreconditionerFactory() const; 00083 00085 virtual void unsetPreconditionerFactory( 00086 RCP<PreconditionerFactoryBase<Scalar> > *precFactory, 00087 std::string *precFactoryName 00088 ); 00089 00091 virtual bool isCompatible( 00092 const LinearOpSourceBase<Scalar> &fwdOpSrc 00093 ) const; 00094 00096 virtual RCP<LinearOpWithSolveBase<Scalar> > createOp() const; 00097 00099 virtual void initializeOp( 00100 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc, 00101 LinearOpWithSolveBase<Scalar> *Op, 00102 const ESupportSolveUse supportSolveUse 00103 ) const; 00104 00106 virtual void initializeAndReuseOp( 00107 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc, 00108 LinearOpWithSolveBase<Scalar> *Op 00109 ) const; 00110 00112 virtual void uninitializeOp( 00113 LinearOpWithSolveBase<Scalar> *Op, 00114 RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc, 00115 RCP<const PreconditionerBase<Scalar> > *prec, 00116 RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc, 00117 ESupportSolveUse *supportSolveUse 00118 ) const; 00119 00121 virtual bool supportsPreconditionerInputType( 00122 const EPreconditionerInputType precOpType 00123 ) const; 00124 00126 virtual void initializePreconditionedOp( 00127 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc, 00128 const RCP<const PreconditionerBase<Scalar> > &prec, 00129 LinearOpWithSolveBase<Scalar> *Op, 00130 const ESupportSolveUse supportSolveUse 00131 ) const; 00132 00134 virtual void initializeApproxPreconditionedOp( 00135 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc, 00136 const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc, 00137 LinearOpWithSolveBase<Scalar> *Op, 00138 const ESupportSolveUse supportSolveUse 00139 ) const; 00140 00142 00143 }; 00144 00145 00150 template<class Scalar> 00151 RCP<DefaultSerialDenseLinearOpWithSolveFactory<Scalar> > 00152 defaultSerialDenseLinearOpWithSolveFactory() 00153 { 00154 return Teuchos::rcp(new DefaultSerialDenseLinearOpWithSolveFactory<Scalar>); 00155 } 00156 00157 00158 } // namespace Thyra 00159 00160 00161 #endif // THYRA_DEFAULT_SERIAL_DENSE_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
1.7.4