[petsc-users] How to determine the type of SNESLineSearch?

Lisandro Dalcin dalcinl at gmail.com
Sun Jul 10 04:31:28 CDT 2016


PetscBool match;
ierr = PetscObjectTypeCompare((PetscObject)linesearch,
SNESLINESEARCHBASIC,&match);CHKERRQ(ierr);
if (!match) {
    ...
}

On 6 July 2016 at 00:07, Gautam Bisht <gbisht at lbl.gov> wrote:
> Hi PETSc,
>
> After SNESSolve converges, I want to perform few additional operations only
> when SNESLineSearchType is not SNESLINESEARCHBASIC. But, there is no
> SNESLineSearchGetType routine. Any idea on how I can determine the type of
> LineSearch set by a user using command line option?
>
> Thanks,
> -Gautam.



-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459


More information about the petsc-users mailing list