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: [](ch_snes), `SNES`, `SNESLineSearch`, `SNESLineSearchRegister()`, `SNESLineSearchRegisterDestroy()`
19: @*/
20: PetscErrorCode SNESLineSearchRegisterAll(void)
21: {
22: PetscFunctionBegin;
23: if (SNESLineSearchRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
24: SNESLineSearchRegisterAllCalled = PETSC_TRUE;
25: PetscCall(SNESLineSearchRegister(SNESLINESEARCHSHELL, SNESLineSearchCreate_Shell));
26: PetscCall(SNESLineSearchRegister(SNESLINESEARCHBASIC, SNESLineSearchCreate_Basic));
27: PetscCall(SNESLineSearchRegister(SNESLINESEARCHNONE, SNESLineSearchCreate_Basic));
28: PetscCall(SNESLineSearchRegister(SNESLINESEARCHL2, SNESLineSearchCreate_L2));
29: PetscCall(SNESLineSearchRegister(SNESLINESEARCHBT, SNESLineSearchCreate_BT));
30: PetscCall(SNESLineSearchRegister(SNESLINESEARCHNLEQERR, SNESLineSearchCreate_NLEQERR));
31: PetscCall(SNESLineSearchRegister(SNESLINESEARCHCP, SNESLineSearchCreate_CP));
32: PetscCall(SNESLineSearchRegister(SNESLINESEARCHNCGLINEAR, SNESLineSearchCreate_NCGLinear));
33: PetscFunctionReturn(PETSC_SUCCESS);
34: }