SNESSetComputeApplicationContext#

Sets an optional function to compute a user-defined context for the nonlinear solvers.

Synopsis#

#include "petscsnes.h"  
PetscErrorCode SNESSetComputeApplicationContext(SNES snes, PetscErrorCode (*compute)(SNES, void **), PetscErrorCode (*destroy)(void **))

Logically Collective

Input Parameters#

  • snes - the SNES context

  • compute - function to compute the context

  • destroy - function to destroy the context

Note#

This routine is useful if you are performing grid sequencing or using SNESFAS and need the appropriate context generated for each level.

Use SNESSetApplicationContext() to see the context immediately

Fortran Note#

This function is currently not available from Fortran.

See Also#

SNESGetApplicationContext(), SNESSetComputeApplicationContext(), SNESSetApplicationContext()

Level#

intermediate

Location#

src/snes/interface/snes.c

Examples#

src/snes/tutorials/ex58.c.html


Edit on GitLab

Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages