1: ! 2: ! Include file for Fortran use of the TS (timestepping) package in PETSc 3: ! 4: #include "petsc/finclude/petscts.h" 6: type tTS 7: PetscFortranAddr:: v PETSC_FORTRAN_TYPE_INITIALIZE 8: end type tTS 9: type tTSAdapt 10: PetscFortranAddr:: v PETSC_FORTRAN_TYPE_INITIALIZE 11: end type tTSAdapt 12: type tTSTrajectory 13: PetscFortranAddr:: v PETSC_FORTRAN_TYPE_INITIALIZE 14: end type tTSTrajectory 16: TS, parameter :: PETSC_NULL_TS = tTS(0) 17: TSAdapt, parameter :: PETSC_NULL_TSADAPT = tTSAdapt(0) 18: TSTrajectory, parameter :: PETSC_NULL_TSTrajectory & 19: & = tTSTrajectory(0) 21: ! 22: ! Convergence flags 23: ! 24: PetscEnum TS_CONVERGED_ITERATING 25: PetscEnum TS_CONVERGED_TIME 26: PetscEnum TS_CONVERGED_ITS 27: PetscEnum TS_DIVERGED_NONLINEAR_SOLVE 28: PetscEnum TS_DIVERGED_STEP_REJECTED 30: parameter (TS_CONVERGED_ITERATING = 0) 31: parameter (TS_CONVERGED_TIME = 1) 32: parameter (TS_CONVERGED_ITS = 2) 33: parameter (TS_DIVERGED_NONLINEAR_SOLVE = -1) 34: parameter (TS_DIVERGED_STEP_REJECTED = -2) 36: ! 37: ! Equation type flags 38: ! 39: PetscEnum TS_EQ_UNSPECIFIED 40: PetscEnum TS_EQ_EXPLICIT 41: PetscEnum TS_EQ_ODE_EXPLICIT 42: PetscEnum TS_EQ_DAE_SEMI_EXPLICIT_INDEX1 43: PetscEnum TS_EQ_DAE_SEMI_EXPLICIT_INDEX2 44: PetscEnum TS_EQ_DAE_SEMI_EXPLICIT_INDEX3 45: PetscEnum TS_EQ_DAE_SEMI_EXPLICIT_INDEXHI 46: PetscEnum TS_EQ_IMPLICIT 47: PetscEnum TS_EQ_ODE_IMPLICIT 48: PetscEnum TS_EQ_DAE_IMPLICIT_INDEX1 49: PetscEnum TS_EQ_DAE_IMPLICIT_INDEX2 50: PetscEnum TS_EQ_DAE_IMPLICIT_INDEX3 51: PetscEnum TS_EQ_DAE_IMPLICIT_INDEXHI 53: parameter (TS_EQ_UNSPECIFIED = -1) 54: parameter (TS_EQ_EXPLICIT = 0) 55: parameter (TS_EQ_ODE_EXPLICIT = 1) 56: parameter (TS_EQ_DAE_SEMI_EXPLICIT_INDEX1 = 100) 57: parameter (TS_EQ_DAE_SEMI_EXPLICIT_INDEX2 = 200) 58: parameter (TS_EQ_DAE_SEMI_EXPLICIT_INDEX3 = 300) 59: parameter (TS_EQ_DAE_SEMI_EXPLICIT_INDEXHI = 500) 60: parameter (TS_EQ_IMPLICIT = 1000) 61: parameter (TS_EQ_ODE_IMPLICIT = 1001) 62: parameter (TS_EQ_DAE_IMPLICIT_INDEX1 = 1100) 63: parameter (TS_EQ_DAE_IMPLICIT_INDEX2 = 1200) 64: parameter (TS_EQ_DAE_IMPLICIT_INDEX3 = 1300) 65: parameter (TS_EQ_DAE_IMPLICIT_INDEXHI = 1500) 67: ! 68: ! TSExactFinalTime 69: ! 70: PetscEnum TS_EXACTFINALTIME_UNSPECIFIED 71: PetscEnum TS_EXACTFINALTIME_STEPOVER 72: PetscEnum TS_EXACTFINALTIME_INTERPOLATE 73: PetscEnum TS_EXACTFINALTIME_MATCHSTEP 75: parameter (TS_EXACTFINALTIME_UNSPECIFIED = 0) 76: parameter (TS_EXACTFINALTIME_STEPOVER = 1) 77: parameter (TS_EXACTFINALTIME_INTERPOLATE = 2) 78: parameter (TS_EXACTFINALTIME_MATCHSTEP = 3) 80: ! 81: ! TSProblemType 82: ! 83: PetscEnum TS_LINEAR 84: PetscEnum TS_NONLINEAR 85: parameter (TS_LINEAR = 0,TS_NONLINEAR = 1) 86: ! 87: ! TSSundialsType 88: ! 89: PetscEnum SUNDIALS_ADAMS 90: PetscEnum SUNDIALS_BDF 91: parameter (SUNDIALS_ADAMS=1,SUNDIALS_BDF=2) 92: ! 93: ! TSSundialsGramSchmidtType 94: ! 95: PetscEnum SUNDIALS_MODIFIED_GS 96: PetscEnum SUNDIALS_CLASSICAL_GS 97: parameter (SUNDIALS_MODIFIED_GS=1,SUNDIALS_CLASSICAL_GS=2) 98: #define SUNDIALS_UNMODIFIED_GS SUNDIALS_CLASSICAL_GS 99: ! 100: ! Some PETSc fortran functions that the user might pass as arguments 101: ! 102: external TSCOMPUTERHSFUNCTIONLINEAR 103: external TSCOMPUTERHSJACOBIANCONSTANT 104: external TSCOMPUTEIFUNCTIONLINEAR 105: external TSCOMPUTEIJACOBIANCONSTANT 107: ! End of Fortran include file for the TS package in PETSc