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 MatSNESMFCtx PetscFortranAddr
     11: #define MatSNESMFType PetscFortranAddr
     12: !
     13: !  SNESType
     14: !
     15: #define SNESLS 'ls'
     16: #define SNESTR 'tr'
     17: #define SNESTEST 'test'
     18: !
     19: ! MatSNESMFCtx
     20: !
     21: #define MATSNESMF_DEFAULT 'default'
     22: #define MATSNESMF_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_TR_DELTA

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

     47:       parameter (SNES_DIVERGED_FUNCTION_COUNT     = -2)
     48:       parameter (SNES_DIVERGED_FNORM_NAN          = -4)
     49:       parameter (SNES_DIVERGED_MAX_IT             = -5)
     50:       parameter (SNES_DIVERGED_LS_FAILURE         = -6)
     51:       parameter (SNES_DIVERGED_LOCAL_MIN          = -8)
     52:       parameter (SNES_CONVERGED_ITERATING         =  0)
     53:
     54: !
     55: !  Some PETSc fortran functions that the user might pass as arguments
     56: !
     57:       external SNESDEFAULTCOMPUTEJACOBIAN
     58:       external SNESDEFAULTCOMPUTEJACOBIANCOLOR
     59:       external SNESDEFAULTMONITOR
     60:       external SNESLGMONITOR
     61:       external SNESVECVIEWMONITOR
     62:       external SNESVECVIEWUPDATEMONITOR

     64: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTCOMPUTEJACOBIAN,'_SNESDEFAULTCOMPUTEJACOBIAN')
     65: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTCOMPUTEJACOBIANCOLOR,'_SNESDEFAULTCOMPUTEJACOBIANCOLOR')
     66: !PETSC_DEC_ATTRIBUTES(SNESDEFAULTMONITOR,'_SNESDEFAULTMONITOR')
     67: !PETSC_DEC_ATTRIBUTES(SNESLGMONITOR,'_SNESLGMONITOR')
     68: !PETSC_DEC_ATTRIBUTES(SNESVECVIEWMONITOR,'_SNESVECVIEWMONITOR')
     69: !PETSC_DEC_ATTRIBUTES(SNESVECVIEWUPDATEMONITOR,'_SNESVECVIEWUPDATEMONITOR')

     71:       external SNESCONVERGED_LS
     72:       external SNESCONVERGED_TR

     74: !PETSC_DEC_ATTRIBUTES(SNESCONVERGED_LS,'_SNESCONVERGED_LS')
     75: !PETSC_DEC_ATTRIBUTES(SNESCONVERGED_TR,'_SNESCONVERGED_TR')

     77:       external SNESLINESEARCHCUBIC
     78:       external SNESLINESEARCHQUADRATIC
     79:       external SNESLINESEARCHNO
     80:       external SNESLINESEARCHNONORMS

     82: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHCUBIC,'_SNESLINESEARCHCUBIC')
     83: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHQUADRATIC,'_SNESLINESEARCHQUADRATIC')
     84: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHNO,'_SNESLINESEARCHNO')
     85: !PETSC_DEC_ATTRIBUTES(SNESLINESEARCHNONORMS,'_SNESLINESEARCHNONORMS')

     87:       external SNESDAFORMFUNCTION
     88:       external SNESDACOMPUTEJACOBIANWITHADIFOR
     89:       external SNESDACOMPUTEJACOBIAN

     91: !PETSC_DEC_ATTRIBUTES(SNESDAFORMFUNCTION,'_SNESDAFORMFUNCTION')
     92: !PETSC_DEC_ATTRIBUTES(SNESDACOMPUTEJACOBIANWITHADIFOR,'_SNESDACOMPUTEJACOBIANWITHADIFOR')
     93: !PETSC_DEC_ATTRIBUTES(SNESDACOMPUTEJACOBIAN,'_SNESDACOMPUTEJACOBIAN')
     94: !
     95: !  End of Fortran include file for the SNES package in PETSc

     97: #endif