MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_MueLuTpetraQ2Q1PreconditionerFactory_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef THYRA_MUELU_TPETRA_Q2Q1PRECONDITIONER_FACTORY_DECL_HPP
11 #define THYRA_MUELU_TPETRA_Q2Q1PRECONDITIONER_FACTORY_DECL_HPP
12 #ifdef HAVE_MUELU_EXPERIMENTAL
13 
14 #include "Thyra_PreconditionerFactoryBase.hpp"
15 
16 #include <Tpetra_KokkosCompat_DefaultNode.hpp>
17 
18 #include <Teko_Utilities.hpp>
19 #include <Xpetra_Matrix_fwd.hpp>
20 
21 #include "MueLu_FactoryBase.hpp"
22 
23 namespace Thyra {
24 
29 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
30 class MueLuTpetraQ2Q1PreconditionerFactory : public PreconditionerFactoryBase<Scalar> {
31  private:
32  typedef Scalar SC;
33  typedef LocalOrdinal LO;
34  typedef GlobalOrdinal GO;
35  typedef Node NO;
36 
37  public:
40 
44 
47 
49  bool isCompatible(const LinearOpSourceBase<SC>& fwdOp) const;
53  void initializePrec(const Teuchos::RCP<const LinearOpSourceBase<SC> >& fwdOp, PreconditionerBase<SC>* prec, const ESupportSolveUse supportSolveUse) const;
55  void uninitializePrec(PreconditionerBase<SC>* prec, Teuchos::RCP<const LinearOpSourceBase<SC> >* fwdOp, ESupportSolveUse* supportSolveUse) const;
57 
60 
72 
75 
77  std::string description() const;
78 
79  // ToDo: Add an override of describe(...) to give more detail!
80 
82 
83  private:
85  Q2Q1MkPrecond(const ParameterList& paramList,
88  const Teuchos::ArrayRCP<LO>& p2vMap,
89  const Teko::LinearOp& thA11, const Teko::LinearOp& thA12, const Teko::LinearOp& thA21, const Teko::LinearOp& thA11_9Pt) const;
90 
93 
95  void SetBlockDependencyTree(MueLu::FactoryManager<SC, LO, GO, NO>& M, LO row, LO col, const std::string& mode, const ParameterList& paramList) const;
96 
97  RCP<MueLu::FactoryBase> GetSmoother(const std::string& type, const ParameterList& paramList, bool coarseSolver) const;
98 
100 };
101 
102 } // namespace Thyra
103 #endif
104 #endif // THYRA_MUELU_TPETRA_Q2Q1PRECONDITIONER_FACTORY_DECL_HPP
void SetDependencyTree(MueLu::FactoryManager< SC, LO, GO, NO > &M, const ParameterList &paramList) const
This class specifies the default factory that should generate some data on a Level if the data does n...
MueLu::DefaultLocalOrdinal LocalOrdinal
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
void uninitializePrec(PreconditionerBase< SC > *prec, Teuchos::RCP< const LinearOpSourceBase< SC > > *fwdOp, ESupportSolveUse *supportSolveUse) const
Concrete preconditioner factory subclass based on MueLu.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
MueLu::DefaultNode Node
void initializePrec(const Teuchos::RCP< const LinearOpSourceBase< SC > > &fwdOp, PreconditionerBase< SC > *prec, const ESupportSolveUse supportSolveUse) const
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Teuchos::RCP< Xpetra::Matrix< SC, LO, GO, NO > > FilterMatrix(Xpetra::Matrix< SC, LO, GO, NO > &A, Xpetra::Matrix< SC, LO, GO, NO > &Pattern, SC dropTol) const
Teuchos::RCP< MueLu::TpetraOperator< SC, LO, GO, NO > > Q2Q1MkPrecond(const ParameterList &paramList, const Teuchos::RCP< Tpetra::MultiVector< SC, LO, GO, NO > > &velCoords, const Teuchos::RCP< Tpetra::MultiVector< SC, LO, GO, NO > > &presCoords, const Teuchos::ArrayRCP< LO > &p2vMap, const Teko::LinearOp &thA11, const Teko::LinearOp &thA12, const Teko::LinearOp &thA21, const Teko::LinearOp &thA11_9Pt) const
bool isCompatible(const LinearOpSourceBase< SC > &fwdOp) const
void SetBlockDependencyTree(MueLu::FactoryManager< SC, LO, GO, NO > &M, LO row, LO col, const std::string &mode, const ParameterList &paramList) const
Teuchos::RCP< Xpetra::Matrix< SC, LO, GO, NO > > Absolute(const Xpetra::Matrix< SC, LO, GO, NO > &A) const
RCP< MueLu::FactoryBase > GetSmoother(const std::string &type, const ParameterList &paramList, bool coarseSolver) const