OPAL (Object Oriented Parallel Accelerator Library)  2024.1
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_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< 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

Definition at line 33 of file AmrSmoother.h.

Definition at line 34 of file AmrSmoother.h.

Definition at line 37 of file AmrSmoother.h.

Definition at line 36 of file AmrSmoother.h.

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

Definition at line 43 of file AmrSmoother.h.

Definition at line 35 of file AmrSmoother.h.

Definition at line 38 of file AmrSmoother.h.

Member Enumeration Documentation

All supported Ifpack2 smoothers.

Enumerator
GAUSS_SEIDEL 
SGS 
JACOBI 

Definition at line 46 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 28 of file AmrSmoother.cpp.

References initParameter_m(), params_mp, prec_mp, and type.

Here is the call graph for this function:

AmrSmoother::~AmrSmoother ( )

Definition at line 48 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 64 of file AmrSmoother.cpp.

References amr::JACOBI.

Referenced by AmrMultiGrid::convertToEnumSmoother_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 Physics::e, GAUSS_SEIDEL, JACOBI, params_mp, SGS, and type.

Referenced by AmrSmoother().

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

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().

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: