综合讨论版 #149911 层

PETSc.KSP求救

楼主 · 1 楼
Our new algorithm need to check the value of /x/ just after the run of FIRST(Only) iteration, so that we can verify the corresponding external variable to do futher work:




if (it is the 1st iteration && external variable met the requirement)
/* Use KSP.setconvergenTest */
then
{
perform some external functions A;
NOT come back to the ORIGINAL solver again;
}
else
{
if (NOT converged) /*which function I should calle?*/
then
{
continue the solver
}
else
{
perform some external functions B;
NOT come back to the ORIGINAL solver again;
}
}


Could you please provide the function name which I need for each step?
due to some KSP funciton names are different in C++ && Python, and
there is few python version manual/exmaple available, so it is hard to
find out the way to go.