Peter Brune committed 5c3e6ab

Doc fixes in snesob.c, anderson.c, snesngmres.c

Comments (0)

Files changed (3)


   ierr = PetscOptionsHead("SNES NGMRES options");CHKERRQ(ierr);
   ierr = PetscOptionsInt("-snes_anderson_m",            "Number of directions","SNES",ngmres->msize,&ngmres->msize,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsReal("-snes_anderson_beta",        "Number of directions","SNES",ngmres->andersonBeta,&ngmres->andersonBeta,NULL);CHKERRQ(ierr);
-  ierr = PetscOptionsBool("-snes_anderson_monitor",     "Monitor actions of NGMRES","SNES",ngmres->monitor ? PETSC_TRUE : PETSC_FALSE,&debug,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsReal("-snes_anderson_beta",        "Mixing parameter","SNES",ngmres->andersonBeta,&ngmres->andersonBeta,NULL);CHKERRQ(ierr);
+  ierr = PetscOptionsBool("-snes_anderson_monitor",     "Monitor steps of Anderson Mixing","SNES",ngmres->monitor ? PETSC_TRUE : PETSC_FALSE,&debug,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-snes_anderson_restart",      "Iterations before forced restart", "SNES",ngmres->restart_periodic,&ngmres->restart_periodic,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsInt("-snes_anderson_restart_it",   "Tolerance iterations before restart","SNES",ngmres->restart_it,&ngmres->restart_it,NULL);CHKERRQ(ierr);
   ierr = PetscOptionsEnum("-snes_anderson_restart_type","Restart type","SNESNGMRESSetRestartType",SNESNGMRESRestartTypes,
    Options Database:
 +  -snes_anderson_m                - Number of stored previous solutions and residuals
 .  -snes_anderson_beta             - Relaxation parameter; X_{update} = X + \beta F
+.  -snes_anderson_restart_type     - Type of restart (see SNESNGMRES)
+.  -snes_anderson_restart_it       - Number of iterations of restart conditions before restart
+.  -snes_anderson_restart          - Number of iterations before periodic restart
 -  -snes_anderson_monitor          - Prints relevant information about the ngmres iteration
     "D. G. Anderson. Iterative procedures for nonlinear integral equations.
     J. Assoc. Comput. Mach., 12:547–560, 1965."
-.seealso: SNESCreate(), SNES, SNESSetType(), SNESType (for list of available types)
+.seealso: SNESNGMRES, SNESCreate(), SNES, SNESSetType(), SNESType (for list of available types)
 #undef __FUNCT__


 .  -snes_ngmres_epsilonB         - Difference tolerance between subsequent solutions triggering restart
 .  -snes_ngmres_deltaB           - Difference tolerance between residuals triggering restart
 .  -snes_ngmres_monitor          - Prints relevant information about the ngmres iteration
-.  -snes_linesearch_type <basic,basicnonorms,quadratic,critical> - Line search type used for the default smoother
+.  -snes_linesearch_type <basic,l2,cp> - Line search type used for the default smoother
 -  -additive_snes_linesearch_type - linesearch type used to select between the candidate and combined solution with additive select type


    Level: advanced
-.seealso:   SNESSetFunction(), SNESGetFunction(), SNESSetObjectiveFunction(), SNESGetObjectiveFunction()
+.seealso:   SNESSetFunction(), SNESGetFunction(), SNESSetObjective(), SNESGetObjective()
 .  snes - the SNES context
    Output Parameter:
-+  func - the function (or NULL)
++  SNESObjectiveFunction - objective evaluation routine (or NULL)
 -  ctx - the function context (or NULL)
    Level: advanced
 #undef __FUNCT__
 #define __FUNCT__ "SNESObjectiveComputeFunctionDefaultFD"
+   SNESObjectiveComputeFunctionDefaultFD - Computes the gradient of a user provided objective
+   Collective on SNES
+   Input Parameter:
++  snes - the SNES context
+.  X    - the state vector
+-  ctx  - the (ignored) function context
+   Output Parameter:
+.  F   - the function value
+   Options Database Key:
++  -snes_fd_function_eps - The differencing parameter
+-  -snes_fd_function - Compute function from user provided objective with finite difference
+   Notes:
+   SNESObjectiveComputeFunctionDefaultFD is similar in character to SNESComputeJacobianDefault.
+   Therefore, it should be used for debugging purposes only.  Using it in conjunction with
+   SNESComputeJacobianDefault is excessively costly and produces a Jacobian that is quite
+   noisy.  This is often necessary, but should be done with a grain of salt, even when debugging
+   small problems.
+   Note that this uses quadratic interpolation of the objective to form each value in the function.
+   Level: advanced
+.keywords: SNES, objective, debugging, finite differences, function
+.seealso: SNESSetFunction(), SNESComputeObjective(), SNESComputeJacobianDefault()
 PetscErrorCode SNESObjectiveComputeFunctionDefaultFD(SNES snes,Vec X,Vec F,void *ctx)
-  /* Quadratically interpolates the change in the objective based upon a change in a particular direction */
   Vec            Xh;
   PetscErrorCode ierr;
   PetscInt       i,N,start,end;