Date: 2022-03-31T04:48:38+00:00

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);

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

     14:    Not Collective

     16:    Level: advanced

     18: .seealso:  SNESLineSearchRegisterDestroy()
     19: @*/
     20: PetscErrorCode SNESLineSearchRegisterAll(void)
     21: {
     22:   if (SNESLineSearchRegisterAllCalled) return 0;
     23:   SNESLineSearchRegisterAllCalled = PETSC_TRUE;
     24:   SNESLineSearchRegister(SNESLINESEARCHSHELL,     SNESLineSearchCreate_Shell);
     25:   SNESLineSearchRegister(SNESLINESEARCHBASIC,     SNESLineSearchCreate_Basic);
     26:   SNESLineSearchRegister(SNESLINESEARCHL2,        SNESLineSearchCreate_L2);
     27:   SNESLineSearchRegister(SNESLINESEARCHBT,        SNESLineSearchCreate_BT);
     28:   SNESLineSearchRegister(SNESLINESEARCHNLEQERR,   SNESLineSearchCreate_NLEQERR);
     29:   SNESLineSearchRegister(SNESLINESEARCHCP,        SNESLineSearchCreate_CP);
     30:   SNESLineSearchRegister(SNESLINESEARCHNCGLINEAR, SNESLineSearchCreate_NCGLinear);
     31:   return 0;
     32: }