Actual source code: petscsnes.h

      1: !
      2: !  Include file for Fortran use of the SNES package in PETSc
      3: !
      4: #if !defined (__PETSCSNES_H)

      7: #define SNES PetscFortranAddr
      8: #define SNESType character*(80)
      9: #define SNESConvergedReason integer
     10: #define MatMFFD PetscFortranAddr
     11: #define MatMFFDType PetscFortranAddr
     12: !
     13: !  SNESType
     14: !
     15: #define SNESLS 'ls'
     16: #define SNESTR 'tr'
     17: #define SNESTEST 'test'
     18: !
     19: ! MatSNESMF
     20: !
     21: #define MATMFFD_DEFAULT 'ds'
     22: #define MATMFFD_WP 'wp'

     24: #endif

     26: #if !defined (PETSC_AVOID_DECLARATIONS)
     27: !
     28: !  Convergence flags
     29: !
     30:       PetscEnum SNES_CONVERGED_FNORM_ABS
     31:       PetscEnum SNES_CONVERGED_FNORM_RELATIVE
     32:       PetscEnum SNES_CONVERGED_PNORM_RELATIVE
     33:       PetscEnum SNES_CONVERGED_ITS
     34:       PetscEnum SNES_CONVERGED_TR_DELTA

     36:       PetscEnum SNES_DIVERGED_FUNCTION_COUNT
     37:       PetscEnum SNES_DIVERGED_LINEAR_SOLVE
     38:       PetscEnum SNES_DIVERGED_FNORM_NAN
     39:       PetscEnum SNES_DIVERGED_MAX_IT
     40:       PetscEnum SNES_DIVERGED_LS_FAILURE
     41:       PetscEnum SNES_DIVERGED_LOCAL_MIN
     42:       PetscEnum SNES_CONVERGED_ITERATING
     43:
     44:       parameter (SNES_CONVERGED_FNORM_ABS         =  2)
     45:       parameter (SNES_CONVERGED_FNORM_RELATIVE    =  3)
     46:       parameter (SNES_CONVERGED_PNORM_RELATIVE    =  4)
     47:       parameter (SNES_CONVERGED_ITS               =  5)
     48:       parameter (SNES_CONVERGED_TR_DELTA          =  7)

     50:       parameter (SNES_DIVERGED_FUNCTION_COUNT     = -2)
     51:       parameter (SNES_DIVERGED_LINEAR_SOLVE       = -3)
     52:       parameter (SNES_DIVERGED_FNORM_NAN          = -4)
     53:       parameter (SNES_DIVERGED_MAX_IT             = -5)
     54:       parameter (SNES_DIVERGED_LS_FAILURE         = -6)
     55:       parameter (SNES_DIVERGED_LOCAL_MIN          = -8)
     56:       parameter (SNES_CONVERGED_ITERATING         =  0)
     57:
     58: !
     59: !  Some PETSc fortran functions that the user might pass as arguments
     60: !
     61:       external SNESDEFAULTCOMPUTEJACOBIAN
     62:       external SNESDEFAULTCOMPUTEJACOBIANCOLOR
     63:       external SNESMONITORDEFAULT
     64:       external SNESMONITORLG
     65:       external SNESMONITORSOLUTION
     66:       external SNESMONITORSOLUTIONUPDATE

     68: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTCOMPUTEJACOBIAN,'_SNESDEFAULTCOMPUTEJACOBIAN')
     69: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTCOMPUTEJACOBIANCOLOR,'_SNESDEFAULTCOMPUTEJACOBIANCOLOR')
     70: !PETSC_DEC_ATTRIBUTES(SNESMONITORDEFAULT,'_SNESMONITORDEFAULT')
     71: !PETSC_DEC_ATTRIBUTES(SNESMONITORLG,'_SNESMONITORLG')
     72: !PETSC_DEC_ATTRIBUTES(SNESMONITORSOLUTION,'_SNESMONITORSOLUTION')
     73: !PETSC_DEC_ATTRIBUTES(SNESMONITORSOLUTIONUPDATE,'_SNESMONITORSOLUTIONUPDATE')

     75:       external SNESDEFAULTCONVERGED
     76:       external SNESSKIPCONVERGED
     77:       external SNESCONVERGED_LS
     78:       external SNESCONVERGED_TR

     80: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTCONVERGED,'_SNESDEFAULTCONVERGED')
     81: !PETSC_DEC_ATTRIBUTES(SNESSKIPCONVERGED,'_SNESSKIPCONVERGED')
     82: !PETSC_DEC_ATTRIBUTES(SNESCONVERGED_LS,'_SNESCONVERGED_LS')
     83: !PETSC_DEC_ATTRIBUTES(SNESCONVERGED_TR,'_SNESCONVERGED_TR')

     85:       external SNESLINESEARCHCUBIC
     86:       external SNESLINESEARCHQUADRATIC
     87:       external SNESLINESEARCHNO
     88:       external SNESLINESEARCHNONORMS

     90: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHCUBIC,'_SNESLINESEARCHCUBIC')
     91: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHQUADRATIC,'_SNESLINESEARCHQUADRATIC')
     92: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHNO,'_SNESLINESEARCHNO')
     93: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHNONORMS,'_SNESLINESEARCHNONORMS')

     95:       external SNESDAFORMFUNCTION
     96:       external SNESDACOMPUTEJACOBIANWITHADIFOR
     97:       external SNESDACOMPUTEJACOBIAN

     99: !PETSC_DEC_ATTRIBUTES(SNESDAFORMFUNCTION,'_SNESDAFORMFUNCTION')
    100: !PETSC_DEC_ATTRIBUTES(SNESDACOMPUTEJACOBIANWITHADIFOR,'_SNESDACOMPUTEJACOBIANWITHADIFOR')
    101: !PETSC_DEC_ATTRIBUTES(SNESDACOMPUTEJACOBIAN,'_SNESDACOMPUTEJACOBIAN')
    102: !
    103: !  End of Fortran include file for the SNES package in PETSc

    105: #endif