AlgebraicMultigrid 0.1
C++ algebraic multigrid.
|
Dense successive over relaxation iterative method. More...
#include <smoother.hpp>
Public Member Functions | |
SuccessiveOverRelaxation () | |
SuccessiveOverRelaxation (double omega_) | |
Construct a new Successive Over Relaxation object. | |
SuccessiveOverRelaxation (double omega_, double tolerance_, size_t compute_error_every_n_iters_, size_t n_iters_) | |
Construct a new Successive Over Relaxation object. | |
void | smooth (const Eigen::SparseMatrix< EleType > &A, Eigen::Matrix< EleType, -1, 1 > &u, const Eigen::Matrix< EleType, -1, 1 > &b) |
Update initial guess u inplace with SOR and internal relaxation param omega | |
Public Member Functions inherited from AMG::SmootherBase< EleType > | |
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. | |
Private Member Functions | |
void | validate_omega () |
Force omega to be in [0, 2]. | |
Private Attributes | |
double | omega {1.0} |
Relaxation parameter in [0, 2]. | |
Additional Inherited Members | |
Public Attributes inherited from AMG::SmootherBase< EleType > | |
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. | |
Dense successive over relaxation iterative method.
EleType |
|
inline |
|
inline |
Construct a new Successive Over Relaxation object.
This constructor only sets the omega
member data and leaves the Base class's member data alone.
omega_ |
|
inline |
Construct a new Successive Over Relaxation object.
This constructor also sets the Base class's member data.
omega_ | |
tolerance_ | |
compute_error_every_n_iters_ | |
n_iters_ |
|
inlinevirtual |
Update initial guess u
inplace with SOR and internal relaxation param omega
If this.omega == 1
, then this is equivalent to a Gauss-Seidel smoother.
References:
[1] : Heath, M.T. Scientific Computing. pp 470. SIAM 2018.
Implements AMG::SmootherBase< EleType >.
|
inlineprivate |
Force omega
to be in [0, 2].
TODO: Is there a better way to handle this in the constructor?
|
private |
Relaxation parameter in [0, 2].