Actual source code: petscksp.h

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

      8: #define KSP PetscFortranAddr
      9: #define KSPType character*(80)
     10: #define KSPCGType PetscEnum
     11: #define KSPConvergedReason PetscEnum
     12: #define KSPNormType PetscEnum
     13: #define KSPGMRESCGSRefinementType PetscEnum
     14: !
     15: !  Various Krylov subspace methods
     16: !
     17: #define KSPRICHARDSON 'richardson'
     18: #define KSPCHEBYCHEV 'chebychev'
     19: #define KSPCG 'cg'
     20: #define KSPCGNE 'cgne'
     21: #define KSPSTCG 'stcg'
     22: #define KSPGLTR 'gltr'
     23: #define KSPGMRES 'gmres'
     24: #define KSPFGMRES 'fgmres'
     25: #define KSPLGMRES 'lgmres'
     26: #define KSPTCQMR 'tcqmr'
     27: #define KSPBCGS 'bcgs'
     28: #define KSPBCGSL 'bcgsl'
     29: #define KSPCGS 'cgs'
     30: #define KSPTFQMR 'tfqmr'
     31: #define KSPCR 'cr'
     32: #define KSPLSQR 'lsqr'
     33: #define KSPPREONLY 'preonly'
     34: #define KSPQCG 'qcg'
     35: #define KSPBICG 'bicg'
     36: #define KSPMINRES 'minres'
     37: #define KSPSYMMLQ 'symmlq'
     38: #define KSPLCD 'lcd'
     39: #endif

     42: #if !defined (PETSC_AVOID_DECLARATIONS)

     44: !
     45: !  CG Types
     46: !
     47:       PetscEnum KSP_CG_SYMMETRIC,KSP_CG_HERMITIAN

     49:       parameter (KSP_CG_SYMMETRIC=0,KSP_CG_HERMITIAN=1)

     51:       PetscEnum KSP_CONVERGED_RTOL,KSP_CONVERGED_ATOL
     52:       PetscEnum KSP_CONVERGED_ITS
     53:       PetscEnum KSP_DIVERGED_ITS,KSP_DIVERGED_DTOL
     54:       PetscEnum KSP_DIVERGED_BREAKDOWN,KSP_CONVERGED_ITERATING
     55:       PetscEnum KSP_CONVERGED_QCG_NEG_CURVE
     56:       PetscEnum KSP_CONVERGED_QCG_CONSTRAINED
     57:       PetscEnum KSP_CONVERGED_STEP_LENGTH
     58:       PetscEnum KSP_CONVERGED_HAPPY_BREAKDOWN
     59:       PetscEnum KSP_DIVERGED_BREAKDOWN_BICG
     60:       PetscEnum KSP_DIVERGED_NONSYMMETRIC
     61:       PetscEnum KSP_DIVERGED_INDEFINITE_PC

     63:       parameter (KSP_CONVERGED_RTOL      = 2)
     64:       parameter (KSP_CONVERGED_ATOL      = 3)
     65:       parameter (KSP_CONVERGED_ITS       = 4)
     66:       parameter (KSP_CONVERGED_QCG_NEG_CURVE = 5)
     67:       parameter (KSP_CONVERGED_QCG_CONSTRAINED = 6)
     68:       parameter (KSP_CONVERGED_STEP_LENGTH = 7)
     69:       parameter (KSP_CONVERGED_HAPPY_BREAKDOWN = 8)

     71:       parameter (KSP_DIVERGED_ITS        = -3)
     72:       parameter (KSP_DIVERGED_DTOL       = -4)
     73:       parameter (KSP_DIVERGED_BREAKDOWN  = -5)
     74:       parameter (KSP_DIVERGED_BREAKDOWN_BICG = -6)
     75:       parameter (KSP_DIVERGED_NONSYMMETRIC = -7)
     76:       parameter (KSP_DIVERGED_INDEFINITE_PC = -8)

     78:       parameter (KSP_CONVERGED_ITERATING = 0)
     79: !
     80: !  Possible arguments to KSPSetNormType()
     81: !
     82:       PetscEnum KSP_NORM_NO
     83:       PetscEnum KSP_NORM_PRECONDITIONED
     84:       PetscEnum KSP_NORM_UNPRECONDITIONED
     85:       PetscEnum KSP_NORM_NATURAL
     86:
     87:       parameter (KSP_NORM_NO=0)
     88:       parameter (KSP_NORM_PRECONDITIONED=1)
     89:       parameter (KSP_NORM_UNPRECONDITIONED=2)
     90:       parameter (KSP_NORM_NATURAL=3)
     91: !
     92: !   Possible arguments to KSPMonitorSet()
     93: !
     94:       external KSPDEFAULTCONVERGED
     95:       external KSPMONITORDEFAULT
     96:       external KSPMONITORTRUERESIDUALNORM
     97:       external KSPMONITORLG
     98:       external KSPMONITORLGTRUERESIDUALNORM
     99:       external KSPMONITORSOLUTION
    100:       external KSPMONITORSINGULARVALUE
    101:       external KSPGMRESMONITORKRYLOV
    102: !
    103: !   Possible arguments to KSPGMRESSetRefinementType()
    104: !
    105:       PetscEnum KSP_GMRES_CGS_REFINE_NEVER
    106:       PetscEnum KSP_GMRES_CGS_REFINE_IFNEEDED
    107:       PetscEnum KSP_GMRES_CGS_REFINE_ALWAYS
    108: !
    109:       parameter (KSP_GMRES_CGS_REFINE_NEVER = 0)
    110:       parameter (KSP_GMRES_CGS_REFINE_IFNEEDED = 1)
    111:       parameter (KSP_GMRES_CGS_REFINE_ALWAYS = 2)
    112: !
    113: !PETSC_DEC_ATTRIBUTES(KSPDEFAULTCONVERGED,'_KSPDEFAULTCONVERGED')
    114: !PETSC_DEC_ATTRIBUTES(KSPMONITORDEFAULT,'_KSPMONITORDEFAULT')
    115: !PETSC_DEC_ATTRIBUTES(KSPMONITORTRUERESIDUALNORM,'_KSPMONITORTRUERESIDUALNORM')
    116: !PETSC_DEC_ATTRIBUTES(KSPMONITORLG,'_KSPMONITORLG')
    117: !PETSC_DEC_ATTRIBUTES(KSPMONITORLGTRUERESIDUALNORM,'_KSPMONITORLGTRUERESIDUALNORM')
    118: !PETSC_DEC_ATTRIBUTES(KSPMONITORSOLUTION,'_KSPMONITORSOLUTION')
    119: !PETSC_DEC_ATTRIBUTES(KSPMONITORSINGULARVALUE,'_KSPMONITORSINGULARVALUE')
    120: !PETSC_DEC_ATTRIBUTES(KSPGMRESMONITORKRYLOV,'_KSPGMRESMONITORKRYLOV')

    122: !
    123: !  End of Fortran include file for the KSP package in PETSc
    124: !

    126: #endif