Actual source code: petscsnes.h

petsc-3.14.6 2021-03-30
Report Typos and Errors
  1: !
  2: ! Used by petscsnesmod.F90 to create Fortran module file
  3: !
  4: #include "petsc/finclude/petscsnes.h"

  6:       type tSNES
  7:         PetscFortranAddr:: v PETSC_FORTRAN_TYPE_INITIALIZE
  8:       end type tSNES

 10:       type tPetscConvEst
 11:         PetscFortranAddr:: v PETSC_FORTRAN_TYPE_INITIALIZE
 12:       end type tPetscConvEst

 14:       SNES, parameter :: PETSC_NULL_SNES = tSNES(0)
 15:       PetscConvEst, parameter :: PETSC_NULL_CONVEST = tPetscConvEst(0)
 16: !
 17: !  Convergence flags
 18: !
 19:       PetscEnum, parameter :: SNES_CONVERGED_FNORM_ABS         =  2
 20:       PetscEnum, parameter :: SNES_CONVERGED_FNORM_RELATIVE    =  3
 21:       PetscEnum, parameter :: SNES_CONVERGED_SNORM_RELATIVE    =  4
 22:       PetscEnum, parameter :: SNES_CONVERGED_ITS               =  5

 24:       PetscEnum, parameter :: SNES_DIVERGED_FUNCTION_DOMAIN    = -1
 25:       PetscEnum, parameter :: SNES_DIVERGED_FUNCTION_COUNT     = -2
 26:       PetscEnum, parameter :: SNES_DIVERGED_LINEAR_SOLVE       = -3
 27:       PetscEnum, parameter :: SNES_DIVERGED_FNORM_NAN          = -4
 28:       PetscEnum, parameter :: SNES_DIVERGED_MAX_IT             = -5
 29:       PetscEnum, parameter :: SNES_DIVERGED_LINE_SEARCH        = -6
 30:       PetscEnum, parameter :: SNES_DIVERGED_INNER              = -7
 31:       PetscEnum, parameter :: SNES_DIVERGED_LOCAL_MIN          = -8
 32:       PetscEnum, parameter :: SNES_DIVERGED_DTOL               = -9
 33:       PetscEnum, parameter :: SNES_DIVERGED_JACOBIAN_DOMAIN    = -10
 34:       PetscEnum, parameter :: SNES_DIVERGED_TR_DELTA           = -11
 35:       PetscEnum, parameter :: SNES_CONVERGED_ITERATING         =  0
 36: !
 37: !     SNESLineSearchReason
 38: !
 39:       PetscEnum, parameter :: SNES_LINESEARCH_SUCCEEDED       = 0
 40:       PetscEnum, parameter :: SNES_LINESEARCH_FAILED_NANORINF = 1
 41:       PetscEnum, parameter :: SNES_LINESEARCH_FAILED_DOMAIN   = 2
 42:       PetscEnum, parameter :: SNES_LINESEARCH_FAILED_REDUCT   = 3
 43:       PetscEnum, parameter :: SNES_LINESEARCH_FAILED_USER     = 4
 44:       PetscEnum, parameter :: SNES_LINESEARCH_FAILED_FUNCTION = 5
 45: !
 46: !  SNESNormSchedule
 47: !
 48:       PetscEnum, parameter :: SNES_NORM_DEFAULT                = -1
 49:       PetscEnum, parameter :: SNES_NORM_NONE                   =  0
 50:       PetscEnum, parameter :: SNES_NORM_ALWAYS                 =  1
 51:       PetscEnum, parameter :: SNES_NORM_INITIAL_ONLY           =  2
 52:       PetscEnum, parameter :: SNES_NORM_FINAL_ONLY             =  3
 53:       PetscEnum, parameter :: SNES_NORM_INITIAL_FINAL_ONLY     =  4
 54: !
 55: !  Some PETSc fortran functions that the user might pass as arguments
 56: !
 57:       external SNESCOMPUTEJACOBIANDEFAULT
 58:       external MATMFFDCOMPUTEJACOBIAN
 59:       external SNESCOMPUTEJACOBIANDEFAULTCOLOR
 60:       external SNESMONITORDEFAULT
 61:       external SNESMONITORLGRESIDUALNORM
 62:       external SNESMONITORSOLUTION
 63:       external SNESMONITORSOLUTIONUPDATE

 65:       external SNESCONVERGEDDEFAULT
 66:       external SNESCONVERGEDSKIP

 68: !
 69: ! SNESNGMRESRestartType
 70: !
 71:       PetscEnum, parameter :: SNES_NGMRES_RESTART_NONE       = 0
 72:       PetscEnum, parameter :: SNES_NGMRES_RESTART_PERIODIC   = 1
 73:       PetscEnum, parameter :: SNES_NGMRES_RESTART_DIFFERENCE = 2
 74: !
 75: ! SNESNGMRESSelectionType
 76: !
 77:       PetscEnum, parameter :: SNES_NGMRES_SELECT_NONE       = 0
 78:       PetscEnum, parameter :: SNES_NGMRES_SELECT_DIFFERENCE = 1
 79:       PetscEnum, parameter :: SNES_NGMRES_SELECT_LINESEARCH = 2
 80: !
 81: ! SNESQNType
 82: !
 83:       PetscEnum, parameter :: SNES_QN_LBFGS       = 0
 84:       PetscEnum, parameter :: SNES_QN_BROYDEN     = 1
 85:       PetscEnum, parameter :: SNES_QN_BADBROYDEN  = 2
 86: !
 87: ! SNESQNScaleType
 88: !
 89:       PetscEnum, parameter :: SNES_QN_SCALE_DEFAULT    = 0
 90:       PetscEnum, parameter :: SNES_QN_SCALE_NONE       = 1
 91:       PetscEnum, parameter :: SNES_QN_SCALE_SHANNO     = 2
 92:       PetscEnum, parameter :: SNES_QN_SCALE_LINESEARCH = 3
 93:       PetscEnum, parameter :: SNES_QN_SCALE_JACOBIAN   = 4
 94: !
 95: ! SNESQNRestartType
 96: !
 97:       PetscEnum, parameter :: SNES_QN_RESTART_DEFAULT  = 0
 98:       PetscEnum, parameter :: SNES_QN_RESTART_NONE     = 1
 99:       PetscEnum, parameter :: SNES_QN_RESTART_POWELL   = 2
100:       PetscEnum, parameter :: SNES_QN_RESTART_PERIODIC = 3
101: !
102: ! SNESNCGType
103: !
104:       PetscEnum, parameter :: SNES_NCG_FR  = 0
105:       PetscEnum, parameter :: SNES_NCG_PRP = 1
106:       PetscEnum, parameter :: SNES_NCG_HS  = 2
107:       PetscEnum, parameter :: SNES_NCG_DY  = 3
108:       PetscEnum, parameter :: SNES_NCG_CD  = 4