OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Interface to Ifpack2 smoothers of the Trilinos package. More...
#include <AmrSmoother.h>
Public Types | |
enum | Smoother { GAUSS_SEIDEL = 0, SGS, JACOBI } |
All supported Ifpack2 smoothers. More... | |
typedef amr::global_ordinal_t | go_t |
typedef amr::local_ordinal_t | lo_t |
typedef amr::scalar_t | scalar_t |
typedef amr::node_t | node_t |
typedef amr::matrix_t | matrix_t |
typedef amr::vector_t | vector_t |
typedef Ifpack2::Preconditioner < scalar_t, lo_t, go_t, node_t > | preconditioner_t |
Public Member Functions | |
AmrSmoother (const Teuchos::RCP< const matrix_t > &A, const Smoother &smoother, lo_t nSweeps) | |
~AmrSmoother () | |
void | smooth (const Teuchos::RCP< vector_t > &x, const Teuchos::RCP< matrix_t > &A, const Teuchos::RCP< vector_t > &b) |
Static Public Member Functions | |
static Smoother | convertToEnumSmoother (const std::string &smoother) |
Private Member Functions | |
void | initParameter_m (const Smoother &smoother, lo_t nSweeps) |
Private Attributes | |
Teuchos::RCP< preconditioner_t > | prec_mp |
Preconditioner instance. More... | |
Teuchos::RCP < Teuchos::ParameterList > | params_mp |
Parameters of preconditioner. More... | |
Interface to Ifpack2 smoothers of the Trilinos package.
Definition at line 11 of file AmrSmoother.h.
Definition at line 14 of file AmrSmoother.h.
Definition at line 15 of file AmrSmoother.h.
typedef amr::matrix_t AmrSmoother::matrix_t |
Definition at line 18 of file AmrSmoother.h.
typedef amr::node_t AmrSmoother::node_t |
Definition at line 17 of file AmrSmoother.h.
typedef Ifpack2::Preconditioner<scalar_t, lo_t, go_t, node_t > AmrSmoother::preconditioner_t |
Definition at line 24 of file AmrSmoother.h.
typedef amr::scalar_t AmrSmoother::scalar_t |
Definition at line 16 of file AmrSmoother.h.
typedef amr::vector_t AmrSmoother::vector_t |
Definition at line 19 of file AmrSmoother.h.
All supported Ifpack2 smoothers.
Enumerator | |
---|---|
GAUSS_SEIDEL | |
SGS | |
JACOBI |
Definition at line 27 of file AmrSmoother.h.
AmrSmoother::AmrSmoother | ( | const Teuchos::RCP< const matrix_t > & | A, |
const Smoother & | smoother, | ||
lo_t | nSweeps | ||
) |
A | matrix to build smoother for |
smoother | type |
nSweeps | number of iterations per smoohting step |
Definition at line 9 of file AmrSmoother.cpp.
References initParameter_m(), params_mp, and prec_mp.
AmrSmoother::~AmrSmoother | ( | ) |
Definition at line 29 of file AmrSmoother.cpp.
|
static |
Used in AmrMultiGrid constructor
smoother | to create |
Definition at line 46 of file AmrSmoother.cpp.
References amr::JACOBI, and Util::toUpper().
Referenced by AmrMultiGrid::convertToEnumSmoother_m().
Initialize paramter list for Ifpack2 smoothers
smoother | of Ifpack2 |
nSweeps | number of iterations |
Definition at line 62 of file AmrSmoother.cpp.
References Physics::e, GAUSS_SEIDEL, JACOBI, params_mp, and SGS.
Referenced by AmrSmoother().
void AmrSmoother::smooth | ( | const Teuchos::RCP< vector_t > & | x, |
const Teuchos::RCP< matrix_t > & | A, | ||
const Teuchos::RCP< vector_t > & | b | ||
) |
Perform one smoothing step
x | right-hand side |
A | system matrix |
b | right-hand side |
Definition at line 35 of file AmrSmoother.cpp.
References prec_mp.
|
private |
Parameters of preconditioner.
Definition at line 77 of file AmrSmoother.h.
Referenced by AmrSmoother(), initParameter_m(), and ~AmrSmoother().
|
private |
Preconditioner instance.
Definition at line 74 of file AmrSmoother.h.
Referenced by AmrSmoother(), smooth(), and ~AmrSmoother().