petsc-3.7.1 2016-05-15
Report Typos and Errors

# DMDASNESSetPicardLocal

set a local right hand side and matrix evaluation function for Picard iteration

### Synopsis

    #include "petscdmda.h"
    #include "petscsnes.h"
    PetscErrorCode DMDASNESSetPicardLocal(DM dm,InsertMode imode,PetscErrorCode (*func)(DMDALocalInfo*,void*,void*,void*),
                                          PetscErrorCode (*jac)(DMDALocalInfo*,void*,Mat,Mat,void*),void *ctx)

Logically Collective Many br

### Input Arguments

| dm | - DM to associate callback with Many br
| imode | - INSERT_VALUES if local function computes owned part, ADD_VALUES if it contributes to ghosted part Many br
| func | - local residual evaluation Many br
| ctx | - optional context for local residual evaluation Many br

### Calling sequence for func

| info | - DMDALocalInfo defining the subdomain to evaluate the residual on Many br
| x | - dimensional pointer to state at which to evaluate residual Many br
| f | - dimensional pointer to residual, write the residual here Many br
| ctx | - optional context passed above Many br

Notes: The user must use Many brextern PetscErrorCode SNESPicardComputeFunction(SNES,Vec,Vec,void*); Many brextern PetscErrorCode SNESPicardComputeJacobian(SNES,Vec,Mat,Mat,MatStructure*,void*); Many brierr = SNESSetFunction(snes,NULL,SNESPicardComputeFunction,&user);CHKERRQ(ierr); Many brin their code before calling this routine. Many br

Many br

### See Also

DMSNESSetFunction(), DMDASNESSetJacobian(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d()

Level:beginner
Location:src/snes/utils/dmdasnes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex15.c.html