OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
AmrSmoother.h
Go to the documentation of this file.
1 #ifndef AMR_SMOOTHER_H
2 #define AMR_SMOOTHER_H
3 
4 #include <string>
5 
6 #include "AmrMultiGridDefs.h"
7 
8 #include "Ifpack2_Factory.hpp"
9 
11 class AmrSmoother {
12 
13 public:
21  lo_t,
22  go_t,
23  node_t
25 
27  enum Smoother {
29  SGS, // symmetric Gauss-Seidel
30  JACOBI //,
31 // SOR
32  };
33 
34 public:
40  AmrSmoother(const Teuchos::RCP<const matrix_t>& A,
41  const Smoother& smoother,
42  lo_t nSweeps);
43 
44  ~AmrSmoother();
45 
52  void smooth(const Teuchos::RCP<vector_t>& x,
53  const Teuchos::RCP<matrix_t>& A,
54  const Teuchos::RCP<vector_t>& b);
55 
60  static Smoother convertToEnumSmoother(const std::string& smoother);
61 
62 private:
68  void initParameter_m(const Smoother& smoother,
69  lo_t nSweeps);
70 
71 
72 private:
74  Teuchos::RCP<preconditioner_t> prec_mp;
75 
77  Teuchos::RCP<Teuchos::ParameterList> params_mp;
78 };
79 
80 #endif
Teuchos::RCP< preconditioner_t > prec_mp
Preconditioner instance.
Definition: AmrSmoother.h:74
int local_ordinal_t
Smoother
All supported Ifpack2 smoothers.
Definition: AmrSmoother.h:27
void initParameter_m(const Smoother &smoother, lo_t nSweeps)
Definition: AmrSmoother.cpp:62
Teuchos::RCP< Teuchos::ParameterList > params_mp
Parameters of preconditioner.
Definition: AmrSmoother.h:77
amr::scalar_t scalar_t
Definition: AmrSmoother.h:16
KokkosClassic::DefaultNode::DefaultNodeType node_t
static Smoother convertToEnumSmoother(const std::string &smoother)
Definition: AmrSmoother.cpp:46
AmrSmoother(const Teuchos::RCP< const matrix_t > &A, const Smoother &smoother, lo_t nSweeps)
Definition: AmrSmoother.cpp:9
amr::local_ordinal_t lo_t
Definition: AmrSmoother.h:15
amr::vector_t vector_t
Definition: AmrSmoother.h:19
void smooth(const Teuchos::RCP< vector_t > &x, const Teuchos::RCP< matrix_t > &A, const Teuchos::RCP< vector_t > &b)
Definition: AmrSmoother.cpp:35
Interface to Ifpack2 smoothers of the Trilinos package.
Definition: AmrSmoother.h:11
amr::matrix_t matrix_t
Definition: AmrSmoother.h:18
Tpetra::CrsMatrix< scalar_t, local_ordinal_t, global_ordinal_t, node_t > matrix_t
amr::node_t node_t
Definition: AmrSmoother.h:17
long global_ordinal_t
amr::global_ordinal_t go_t
Definition: AmrSmoother.h:14
Tpetra::Vector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > vector_t
Ifpack2::Preconditioner< scalar_t, lo_t, go_t, node_t > preconditioner_t
Definition: AmrSmoother.h:24
double scalar_t