Description
This:
// SLEPc default eigenproblem solver
this->_eigen_solver_type = KRYLOVSCHUR;
in void SlepcEigenSolver<T>::clear ()
function is giving me a trouble.
I've called void set_eigensolver_type (const EigenSolverType est)
to set the desired the solver type and need to call EigenSystem::solve ()
(that calls one of the solve functions in SlepcEigenSolver
multiple times). But because that clear
function resets the default solver type and is called by all the solve functions, I cannot make the second solve call to use the same non-default solver type I set previously. Because of this, I have to use a different way to set the solver type with SLEPc command-line option -eps_type
, which defeats the purpose of having set_eigensolver_type
function.
I propose to remove that line because,
- the clear function is for clearing data changed by
solve
functions but not options set by users to the solver in my opinion; - there are other settings in the solver like
_position_of_spectrum
, etc., which should be cleared as well if we think we should reset the solver type inclear
; - we could add a new function like
clearSolveData
and called by solve functions, but I think it is unnecessary. Users can reset the solver type manually if they want.
I've tried removing that line and ran all MOOSE tests. All tests past. I will push up a PR to let civet check if there are any implications.