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

#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_tpreconditioner_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< 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

Definition at line 30 of file AmrSmoother.h.

Member Typedef Documentation

◆ go_t

Definition at line 33 of file AmrSmoother.h.

◆ lo_t

Definition at line 34 of file AmrSmoother.h.

◆ matrix_t

Definition at line 37 of file AmrSmoother.h.

◆ node_t

Definition at line 36 of file AmrSmoother.h.

◆ preconditioner_t

typedef Ifpack2::Preconditioner<scalar_t, lo_t, go_t, node_t > AmrSmoother::preconditioner_t

Definition at line 43 of file AmrSmoother.h.

◆ scalar_t

Definition at line 35 of file AmrSmoother.h.

◆ vector_t

Definition at line 38 of file AmrSmoother.h.

Member Enumeration Documentation

◆ Smoother

All supported Ifpack2 smoothers.

Enumerator
GAUSS_SEIDEL 
SGS 
JACOBI 

Definition at line 46 of file AmrSmoother.h.

Constructor & Destructor Documentation

◆ AmrSmoother()

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 28 of file AmrSmoother.cpp.

References initParameter_m(), params_mp, and prec_mp.

Here is the call graph for this function:

◆ ~AmrSmoother()

AmrSmoother::~AmrSmoother ( )

Definition at line 48 of file AmrSmoother.cpp.

References params_mp, and prec_mp.

Member Function Documentation

◆ convertToEnumSmoother()

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

Used in AmrMultiGrid constructor

Parameters
smootherto create

Definition at line 64 of file AmrSmoother.cpp.

References amr::JACOBI.

Referenced by AmrMultiGrid::convertToEnumSmoother_m().

◆ initParameter_m()

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 80 of file AmrSmoother.cpp.

References GAUSS_SEIDEL, JACOBI, params_mp, and SGS.

Referenced by AmrSmoother().

◆ smooth()

void AmrSmoother::smooth ( const Teuchos::RCP< vector_t > &  x,
const Teuchos::RCP< vector_t > &  b 
)

Perform one smoothing step

Parameters
xright-hand side
bright-hand side

Definition at line 54 of file AmrSmoother.cpp.

References prec_mp.

Member Data Documentation

◆ params_mp

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

Parameters of preconditioner.

Definition at line 94 of file AmrSmoother.h.

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

◆ prec_mp

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

Preconditioner instance.

Definition at line 91 of file AmrSmoother.h.

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


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