Actual source code: petscsnes.h

      1: !
      2: ! Used by petscsnesmod.F90 to create Fortran module file
      3: !
      4: #include "petsc/finclude/petscsnes.h"

      6:       type, extends(tPetscObject) :: tSNES
      7:       end type tSNES
      8:       SNES, parameter :: PETSC_NULL_SNES = tSNES(0)
      9: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     10: !DEC$ ATTRIBUTES DLLEXPORT::PETSC_NULL_SNES
     11: #endif

     13:       type, extends(tPetscObject) :: tPetscConvEst
     14:       end type tPetscConvEst
     15:       PetscConvEst, parameter :: PETSC_NULL_CONVEST = tPetscConvEst(0)
     16: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     17: !DEC$ ATTRIBUTES DLLEXPORT::PETSC_NULL_CONVEST
     18: #endif
     19: !
     20: !  Convergence flags
     21: !
     22:       PetscEnum, parameter :: SNES_CONVERGED_FNORM_ABS         =  2
     23:       PetscEnum, parameter :: SNES_CONVERGED_FNORM_RELATIVE    =  3
     24:       PetscEnum, parameter :: SNES_CONVERGED_SNORM_RELATIVE    =  4
     25:       PetscEnum, parameter :: SNES_CONVERGED_ITS               =  5

     27:       PetscEnum, parameter :: SNES_DIVERGED_FUNCTION_DOMAIN    = -1
     28:       PetscEnum, parameter :: SNES_DIVERGED_FUNCTION_COUNT     = -2
     29:       PetscEnum, parameter :: SNES_DIVERGED_LINEAR_SOLVE       = -3
     30:       PetscEnum, parameter :: SNES_DIVERGED_FNORM_NAN          = -4
     31:       PetscEnum, parameter :: SNES_DIVERGED_MAX_IT             = -5
     32:       PetscEnum, parameter :: SNES_DIVERGED_LINE_SEARCH        = -6
     33:       PetscEnum, parameter :: SNES_DIVERGED_INNER              = -7
     34:       PetscEnum, parameter :: SNES_DIVERGED_LOCAL_MIN          = -8
     35:       PetscEnum, parameter :: SNES_DIVERGED_DTOL               = -9
     36:       PetscEnum, parameter :: SNES_DIVERGED_JACOBIAN_DOMAIN    = -10
     37:       PetscEnum, parameter :: SNES_DIVERGED_TR_DELTA           = -11
     38:       PetscEnum, parameter :: SNES_CONVERGED_ITERATING         =  0
     39: !
     40: !  SNESNormSchedule
     41: !
     42:       PetscEnum, parameter :: SNES_NORM_DEFAULT                = -1
     43:       PetscEnum, parameter :: SNES_NORM_NONE                   =  0
     44:       PetscEnum, parameter :: SNES_NORM_ALWAYS                 =  1
     45:       PetscEnum, parameter :: SNES_NORM_INITIAL_ONLY           =  2
     46:       PetscEnum, parameter :: SNES_NORM_FINAL_ONLY             =  3
     47:       PetscEnum, parameter :: SNES_NORM_INITIAL_FINAL_ONLY     =  4
     48: !
     49: !  SNESFunctionType
     50: !
     51:       PetscEnum, parameter :: SNES_FUNCTION_DEFAULT          = -1
     52:       PetscEnum, parameter :: SNES_FUNCTION_UNPRECONDITIONED = 0
     53:       PetscEnum, parameter :: SNES_FUNCTION_PRECONDITIONED   = 1
     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 SNESMONITORSOLUTION
     62:       external SNESMONITORSOLUTIONUPDATE

     64:       external SNESCONVERGEDDEFAULT
     65:       external SNESCONVERGEDSKIP

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