Actual source code: linesearchregi.c

      1: #include <petsc/private/linesearchimpl.h>

      3: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_Basic(SNESLineSearch);
      4: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_L2(SNESLineSearch);
      5: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_CP(SNESLineSearch);
      6: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_BT(SNESLineSearch);
      7: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_NLEQERR(SNESLineSearch);
      8: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_Shell(SNESLineSearch);
      9: PETSC_EXTERN PetscErrorCode SNESLineSearchCreate_NCGLinear(SNESLineSearch);

     12: /*@C
     13:    SNESLineSearchRegisterAll - Registers all of the nonlinear solver methods in the SNESLineSearch package.

     15:    Not Collective

     17:    Level: advanced

     19: .seealso:  SNESLineSearchRegisterDestroy()
     20: @*/
     21: PetscErrorCode SNESLineSearchRegisterAll(void)
     22: {

     26:   if (SNESLineSearchRegisterAllCalled) return(0);
     27:   SNESLineSearchRegisterAllCalled = PETSC_TRUE;
     28:   SNESLineSearchRegister(SNESLINESEARCHSHELL,     SNESLineSearchCreate_Shell);
     29:   SNESLineSearchRegister(SNESLINESEARCHBASIC,     SNESLineSearchCreate_Basic);
     30:   SNESLineSearchRegister(SNESLINESEARCHL2,        SNESLineSearchCreate_L2);
     31:   SNESLineSearchRegister(SNESLINESEARCHBT,        SNESLineSearchCreate_BT);
     32:   SNESLineSearchRegister(SNESLINESEARCHNLEQERR,   SNESLineSearchCreate_NLEQERR);
     33:   SNESLineSearchRegister(SNESLINESEARCHCP,        SNESLineSearchCreate_CP);
     34:   SNESLineSearchRegister(SNESLINESEARCHNCGLINEAR, SNESLineSearchCreate_NCGLinear);
     35:   return(0);
     36: }