47#ifndef THYRA_MUELU_PRECONDITIONER_FACTORY_DECL_HPP
48#define THYRA_MUELU_PRECONDITIONER_FACTORY_DECL_HPP
52#if defined(HAVE_MUELU_STRATIMIKOS) && defined(HAVE_MUELU_THYRA)
55#include "Thyra_DefaultPreconditioner.hpp"
56#include "Thyra_BlockedLinearOpBase.hpp"
57#include "Thyra_DiagonalLinearOpBase.hpp"
59#include "Thyra_TpetraLinearOp.hpp"
60#include "Thyra_TpetraThyraWrappers.hpp"
61#ifdef HAVE_MUELU_EPETRA
62#include "Thyra_EpetraLinearOp.hpp"
65#include "Teuchos_Ptr.hpp"
66#include "Teuchos_TestForException.hpp"
67#include "Teuchos_Assert.hpp"
68#include "Teuchos_Time.hpp"
70#include <Xpetra_CrsMatrixWrap.hpp>
71#include <Xpetra_CrsMatrix.hpp>
72#include <Xpetra_Matrix.hpp>
73#include <Xpetra_ThyraUtils.hpp>
75#include <MueLu_Hierarchy.hpp>
77#include <MueLu_HierarchyUtils.hpp>
78#include <MueLu_Utilities.hpp>
79#include <MueLu_ParameterListInterpreter.hpp>
80#include <MueLu_MLParameterListInterpreter.hpp>
84#include <MueLu_TpetraOperator.hpp>
85#include <Xpetra_TpetraHalfPrecisionOperator.hpp>
86#ifdef HAVE_MUELU_EPETRA
90#include "Thyra_PreconditionerFactoryBase.hpp"
92#include <Tpetra_KokkosCompat_DefaultNode.hpp>
101 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
103 static bool replaceWithXpetra(ParameterList& paramList, std::string parameterName);
106#ifdef HAVE_MUELU_EPETRA
107 template <
class GlobalOrdinal>
108 struct Converters<double, int,
GlobalOrdinal, Tpetra::KokkosCompat::KokkosSerialWrapperNode> {
109 static bool replaceWithXpetra(ParameterList& paramList, std::string parameterName);
118 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
119 class MueLuPreconditionerFactory :
public PreconditionerFactoryBase<Scalar> {
126 MueLuPreconditionerFactory();
133 bool isCompatible(
const LinearOpSourceBase<Scalar>& fwdOp)
const;
135 Teuchos::RCP<PreconditionerBase<Scalar> > createPrec()
const;
137 void initializePrec(
const Teuchos::RCP<
const LinearOpSourceBase<Scalar> >& fwdOp,
138 PreconditionerBase<Scalar>* prec,
139 const ESupportSolveUse supportSolveUse
142 void uninitializePrec(PreconditionerBase<Scalar>* prec,
143 Teuchos::RCP<
const LinearOpSourceBase<Scalar> >* fwdOp,
144 ESupportSolveUse* supportSolveUse
153 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList>& paramList);
155 Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
157 Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
159 Teuchos::RCP<const Teuchos::ParameterList> getParameterList()
const;
168 std::string description()
const;
178 Teuchos::RCP<Teuchos::ParameterList> paramList_;
Various adapters that will create a MueLu preconditioner that is an Xpetra::Matrix.
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void getValidParameters(Teuchos::ParameterList ¶ms)