// @HEADER // ***************************************************************************** // Stratimikos: Thyra-based strategies for linear solvers // // Copyright 2006 NTESS and the Stratimikos contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP #define THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP #include "Thyra_PreconditionerFactoryBase.hpp" #include "Thyra_EpetraOperatorViewExtractorBase.hpp" #include "Teuchos_StandardCompositionMacros.hpp" namespace Thyra { /** \brief Concrete preconditioner factory subclass based on ML. * * For information on ML and its available options, please see the ML home page or the ML User manuals. */ class MLPreconditionerFactory : public PreconditionerFactoryBase { public: /** @name Constructors/initializers/accessors */ //@{ /** \brief . */ MLPreconditionerFactory(); /** \brief Set the strategy object used to extract an * Epetra_Operator view of an input forward operator. * * This view will then be dynamically casted to Epetra_RowMatrix * before it is used. * * The default implementation used is EpetraOperatorViewExtractorBase. */ STANDARD_COMPOSITION_MEMBERS( EpetraOperatorViewExtractorBase, epetraFwdOpViewExtractor ); //@} /** @name Overridden from PreconditionerFactoryBase */ //@{ /** \brief . */ bool isCompatible( const LinearOpSourceBase &fwdOp ) const; /** \brief . */ bool applySupportsConj(EConj conj) const; /** \brief . */ bool applyTransposeSupportsConj(EConj conj) const; /** \brief . */ Teuchos::RCP > createPrec() const; /** \brief . */ void initializePrec( const Teuchos::RCP > &fwdOp, PreconditionerBase *prec, const ESupportSolveUse supportSolveUse ) const; /** \brief . */ void uninitializePrec( PreconditionerBase *prec ,Teuchos::RCP > *fwdOp ,ESupportSolveUse *supportSolveUse ) const; //@} /** @name Overridden from Teuchos::ParameterListAcceptor */ //@{ /** \brief . */ void setParameterList( Teuchos::RCP const& paramList); /** \brief . */ Teuchos::RCP getNonconstParameterList(); /** \brief . */ Teuchos::RCP unsetParameterList(); /** \brief . */ Teuchos::RCP getParameterList() const; /** \brief . */ Teuchos::RCP getValidParameters() const; //@} /** \name Public functions overridden from Describable. */ //@{ /** \brief . */ std::string description() const; // ToDo: Add an override of describe(...) to give more detail! //@} private: Teuchos::RCP paramList_; }; } // namespace Thyra #endif // THYRA_ML_PRECONDITIONER_FACTORY_DECL_HPP