Skip to content

Commit f5feb6c

Browse files
committed
Small update
1 parent bb34665 commit f5feb6c

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

include/LanczosAlgorithm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace lanczos{
8383
#endif
8484
/*Maximum number of Lanczos iterations*/
8585
int max_iter; //<100 in general, increases as needed
86-
int iterationHardLimit = 100; //Do not perform more than this iterations
86+
int iterationHardLimit = 1000; //Do not perform more than this iterations
8787
/*Lanczos algorithm auxiliar memory*/
8888
device_container<real> w; //size N, v in each iteration
8989
device_container<real> V; //size Nxmax_iter; Krylov subspace base transformation matrix

python/python_wrapper.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include<pybind11/pybind11.h>
66
#include<pybind11/numpy.h>
77
#include<iostream>
8-
8+
#include<stdexcept>
99
using real = lanczos::real;
1010

1111
namespace py = pybind11;
@@ -28,6 +28,9 @@ struct MatrixDotTrampoline: public lanczos::MatrixDot{
2828
py::array_t<real> Mvp = overridef(py::array_t<real, py::array::c_style>(this->m_size, v, dummy));
2929
std::copy(Mvp.data(), Mvp.data()+this->m_size, Mv);
3030
}
31+
else{
32+
throw std::runtime_error("[PyLanczos] The required dot function was not found in the provided functor.");
33+
}
3134
}
3235
};
3336

0 commit comments

Comments
 (0)