AlgebraicMultigrid 0.1
C++ algebraic multigrid.
Loading...
Searching...
No Matches
AMG::SmootherBase< EleType > Class Template Referenceabstract

Base class for smoothers that must implement a smooth function for the iterative solution of a linear system Au = b. More...

#include <smoother.hpp>

Inheritance diagram for AMG::SmootherBase< EleType >:
AMG::Jacobi< EleType > AMG::SparseGaussSeidel< EleType > AMG::SuccessiveOverRelaxation< EleType >

Public Member Functions

 SmootherBase ()
 
 SmootherBase (size_t n_iters_)
 
 SmootherBase (double tolerance_, size_t compute_error_every_n_iters_, size_t n_iters_)
 Construct a new Smoother Base object with iterative solver member data.
 
virtual void smooth (const Eigen::SparseMatrix< EleType > &A, Eigen::Matrix< EleType, -1, 1 > &u, const Eigen::Matrix< EleType, -1, 1 > &b)=0
 Must implement function that smooths Au = b.
 

Public Attributes

EleType tolerance {1e-9}
 Tolerance below which a smoother is considered to have converged.
 
size_t compute_error_every_n_iters {100}
 Compute the error every n iterations during smoothing.
 
size_t n_iters {1}
 Maximum number of iterations before smoothing termination.
 

Detailed Description

template<class EleType>
class AMG::SmootherBase< EleType >

Base class for smoothers that must implement a smooth function for the iterative solution of a linear system Au = b.

Template Parameters
EleType

Constructor & Destructor Documentation

◆ SmootherBase() [1/3]

template<class EleType >
AMG::SmootherBase< EleType >::SmootherBase ( )
inline

◆ SmootherBase() [2/3]

template<class EleType >
AMG::SmootherBase< EleType >::SmootherBase ( size_t n_iters_)
inline

◆ SmootherBase() [3/3]

template<class EleType >
AMG::SmootherBase< EleType >::SmootherBase ( double tolerance_,
size_t compute_error_every_n_iters_,
size_t n_iters_ )
inline

Construct a new Smoother Base object with iterative solver member data.

Parameters
tolerance_
compute_error_every_n_iters_
n_iters_

Member Function Documentation

◆ smooth()

template<class EleType >
virtual void AMG::SmootherBase< EleType >::smooth ( const Eigen::SparseMatrix< EleType > & A,
Eigen::Matrix< EleType, -1, 1 > & u,
const Eigen::Matrix< EleType, -1, 1 > & b )
pure virtual

Must implement function that smooths Au = b.

Parameters
ACoefficients matrix for discretized governing equations. Coeffcients matrix for linear system of equations.
uSolution to linear system of equations.
bRight hand side of linear system Au = b. Right hand side of linear system of equations.

Implemented in AMG::Jacobi< EleType >, AMG::SparseGaussSeidel< EleType >, and AMG::SuccessiveOverRelaxation< EleType >.

Member Data Documentation

◆ compute_error_every_n_iters

template<class EleType >
size_t AMG::SmootherBase< EleType >::compute_error_every_n_iters {100}

Compute the error every n iterations during smoothing.

◆ n_iters

template<class EleType >
size_t AMG::SmootherBase< EleType >::n_iters {1}

Maximum number of iterations before smoothing termination.

◆ tolerance

template<class EleType >
EleType AMG::SmootherBase< EleType >::tolerance {1e-9}

Tolerance below which a smoother is considered to have converged.


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