#include "petscda.h" #include "petscksp.h" #include "petscmg.h" #include "petscdmmg.h" #include "petscpc.h" PetscErrorCode PETSCSNES_DLLEXPORT DMMGSetInitialGuess(DMMG *dmmg,PetscErrorCode (*guess)(DMMG,Vec))Collective on DMMG
dmmg | - the context | |
guess | - the function |
Notes: For nonlinear problems, if this is not set, then the current value in the solution vector (obtained with DMMGGetX()) is used. Thus is if you doing 'time stepping' it will use your current solution as the guess for the next timestep. If grid sequencing is used (via -dmmg_grid_sequence) then the "guess" function is used only on the coarsest grid. For linear problems, if this is not set, then 0 is used as an initial guess. If you would like the linear solver to also (like the nonlinear solver) use the current solution vector as the initial guess then use DMMGInitialGuessCurrent() as the function you pass in
Level:intermediate
Location:src/snes/utils/damg.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages