lanczos: little bug fix

This commit is contained in:
2025-12-15 14:36:16 +01:00
parent 1965f4f653
commit 671b924c8c
2 changed files with 2 additions and 4 deletions

View File

@@ -25,9 +25,8 @@
#include "auxstorage.h"
//TODO:
//@@@convergece test by residual norm rather than by energy difference
//@@@implement restart when Krylov space is exceeded
//@@@implement inital guess of more than 1 vector (also in davidson)
//@@@implement inital guess of more than 1 vector (also in davidson) and block version of the methods
namespace LA {
@@ -153,7 +152,7 @@ for(j=1; j<maxkrylov;++j)
if(verbose)
{
for(int iroot=0; iroot<=std::min(krylovsize,nroots-1); ++iroot)
for(int iroot=0; iroot<std::min(krylovsize,nroots); ++iroot)
{
std::cout <<"Lanczos: iter="<<it <<" dim="<<krylovsize<<" root="<<iroot<<" eigenvalue="<<r[iroot]<<"\n";
}

1
t.cc
View File

@@ -4536,7 +4536,6 @@ for(int i=0; i<m; ++i)
if(1)
{
//n must not be too small
int n,m;
bool which;
cin>>n >>m>>which ;