mirror of
https://github.com/paboyle/Grid.git
synced 2026-09-11 20:23:15 +01:00
Rename to be more familial with PowerMethod
This commit is contained in:
@@ -59,7 +59,7 @@ template<class Field> class PowerMethod
|
|||||||
// |lambda_max| -- the case where the numerical range extends beyond
|
// |lambda_max| -- the case where the numerical range extends beyond
|
||||||
// the spectrum and a spectrum-based smoother/Chebyshev bound is
|
// the spectrum and a spectrum-based smoother/Chebyshev bound is
|
||||||
// unsafe (the field of values must be used instead).
|
// unsafe (the field of values must be used instead).
|
||||||
template<class Field> class NonHermitianPowerMethod
|
template<class Field> class PowerMethodNonHermitian
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -88,17 +88,17 @@ template<class Field> class NonHermitianPowerMethod
|
|||||||
|
|
||||||
if ( i==0 ) {
|
if ( i==0 ) {
|
||||||
ratio0 = ratio;
|
ratio0 = ratio;
|
||||||
std::cout << GridLogMessage << "NonHermitianPowerMethod: step 0 (random v): |Av|/|v| = "
|
std::cout << GridLogMessage << "PowerMethodNonHermitian: step 0 (random v): |Av|/|v| = "
|
||||||
<< ratio << " [lower bound on sigma_max]" << std::endl;
|
<< ratio << " [lower bound on sigma_max]" << std::endl;
|
||||||
}
|
}
|
||||||
if ( (i%10==0) || (i==_MAX_ITER_EST_-1) )
|
if ( (i%10==0) || (i==_MAX_ITER_EST_-1) )
|
||||||
std::cout << GridLogMessage << "NonHermitianPowerMethod: step " << i << " |Av|/|v| = " << ratio
|
std::cout << GridLogMessage << "PowerMethodNonHermitian: step " << i << " |Av|/|v| = " << ratio
|
||||||
<< " Rayleigh (" << real(rq) << "," << imag(rq) << ")" << std::endl;
|
<< " Rayleigh (" << real(rq) << "," << imag(rq) << ")" << std::endl;
|
||||||
|
|
||||||
v = Av;
|
v = Av;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << GridLogMessage << "NonHermitianPowerMethod: |lambda_max| ~ " << ratio
|
std::cout << GridLogMessage << "PowerMethodNonHermitian: |lambda_max| ~ " << ratio
|
||||||
<< " Rayleigh (" << real(rq) << "," << imag(rq) << ")"
|
<< " Rayleigh (" << real(rq) << "," << imag(rq) << ")"
|
||||||
<< " phase " << atan2(imag(rq),real(rq)) << " rad"
|
<< " phase " << atan2(imag(rq),real(rq)) << " rad"
|
||||||
<< " step-0/converged = " << ratio0/ratio
|
<< " step-0/converged = " << ratio0/ratio
|
||||||
|
|||||||
Reference in New Issue
Block a user