:orphan: # SNESLineSearchCreate Creates the line search context. ## Synopsis ``` #include "petscsnes.h" PetscErrorCode SNESLineSearchCreate(MPI_Comm comm, SNESLineSearch *outlinesearch) ``` Logically Collective ## Input Parameter - ***comm -*** MPI communicator for the line search (typically from the associated `SNES` context). ## Output Parameter - ***outlinesearch -*** the new linesearch context ## Note The preferred calling sequence for users is to use `SNESGetLineSearch()` to acquire the `SNESLineSearch` instance already associated with the `SNES`. ## See Also `SNESLineSearch`, `LineSearchDestroy()`, `SNESGetLineSearch()` ## Level developer ## Location src/snes/linesearch/interface/linesearch.c ## Implementations SNESLineSearchCreate_NCGLinear in src/snes/impls/ncg/snesncg.c
SNESLineSearchCreate_Basic in src/snes/linesearch/impls/basic/linesearchbasic.c
SNESLineSearchCreate_BT in src/snes/linesearch/impls/bt/linesearchbt.c
SNESLineSearchCreate_CP in src/snes/linesearch/impls/cp/linesearchcp.c
SNESLineSearchCreate_L2 in src/snes/linesearch/impls/l2/linesearchl2.c
SNESLineSearchCreate_NLEQERR in src/snes/linesearch/impls/nleqerr/linesearchnleqerr.c
SNESLineSearchCreate_Shell in src/snes/linesearch/impls/shell/linesearchshell.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/linesearch/interface/linesearch.c) [Index of all SNES routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)