OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
AmrSmoother Class Reference

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_tprec_mp
 Preconditioner instance. More...
 
Teuchos::RCP
< Teuchos::ParameterList > 
params_mp
 Parameters of preconditioner. More...
 

Detailed Description

Interface to Ifpack2 smoothers of the Trilinos package.

Definition at line 11 of file AmrSmoother.h.

Member Typedef Documentation

Definition at line 14 of file AmrSmoother.h.

Definition at line 15 of file AmrSmoother.h.

Definition at line 18 of file AmrSmoother.h.

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.

Definition at line 16 of file AmrSmoother.h.

Definition at line 19 of file AmrSmoother.h.

Member Enumeration Documentation

All supported Ifpack2 smoothers.

Enumerator
GAUSS_SEIDEL 
SGS 
JACOBI 

Definition at line 27 of file AmrSmoother.h.

Constructor & Destructor Documentation

AmrSmoother::AmrSmoother ( const Teuchos::RCP< const matrix_t > &  A,
const Smoother smoother,
lo_t  nSweeps 
)
Parameters
Amatrix to build smoother for
smoothertype
nSweepsnumber of iterations per smoohting step

Definition at line 9 of file AmrSmoother.cpp.

References initParameter_m(), params_mp, and prec_mp.

Here is the call graph for this function:

AmrSmoother::~AmrSmoother ( )

Definition at line 29 of file AmrSmoother.cpp.

References params_mp, and prec_mp.

Member Function Documentation

AmrSmoother::Smoother AmrSmoother::convertToEnumSmoother ( const std::string &  smoother)
static

Used in AmrMultiGrid constructor

Parameters
smootherto create

Definition at line 46 of file AmrSmoother.cpp.

References amr::JACOBI, and Util::toUpper().

Referenced by AmrMultiGrid::convertToEnumSmoother_m().

Here is the call graph for this function:

void AmrSmoother::initParameter_m ( const Smoother smoother,
lo_t  nSweeps 
)
private

Initialize paramter list for Ifpack2 smoothers

Parameters
smootherof Ifpack2
nSweepsnumber 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

Parameters
xright-hand side
Asystem matrix
bright-hand side

Definition at line 35 of file AmrSmoother.cpp.

References prec_mp.

Member Data Documentation

Teuchos::RCP<Teuchos::ParameterList> AmrSmoother::params_mp
private

Parameters of preconditioner.

Definition at line 77 of file AmrSmoother.h.

Referenced by AmrSmoother(), initParameter_m(), and ~AmrSmoother().

Teuchos::RCP<preconditioner_t> AmrSmoother::prec_mp
private

Preconditioner instance.

Definition at line 74 of file AmrSmoother.h.

Referenced by AmrSmoother(), smooth(), and ~AmrSmoother().


The documentation for this class was generated from the following files: