diff -r 2ca25e2d98da src/ts/interface/ftn-custom/ztsf.c --- a/src/ts/interface/ftn-custom/ztsf.c Tue Aug 14 15:38:15 2012 -0500 +++ b/src/ts/interface/ftn-custom/ztsf.c Fri Aug 17 08:57:55 2012 -0500 @@ -3,10 +3,17 @@ #if defined(PETSC_HAVE_FORTRAN_CAPS) #define tssetrhsfunction_ TSSETRHSFUNCTION +#define tsgetrhsfunction_ TSGETRHSFUNCTION #define tssetrhsjacobian_ TSSETRHSJACOBIAN #define tsgetrhsjacobian_ TSGETRHSJACOBIAN +#define tssetifunction_ TSSETIFUNCTION +#define tsgetifunction_ TSGETIFUNCTION +#define tssetijacobian_ TSSETIJACOBIAN +#define tsgetijacobian_ TSGETIJACOBIAN #define tsview_ TSVIEW +#define tssetoptionsprefix_ TSSETOPTIONSPREFIX #define tsgetoptionsprefix_ TSGETOPTIONSPREFIX +#define tsappendoptionsprefix_ TSAPPENDOPTIONSPREFIX #define tsmonitorset_ TSMONITORSET #define tscomputerhsfunctionlinear_ TSCOMPUTERHSFUNCTIONLINEAR #define tscomputerhsjacobianconstant_ TSCOMPUTERHSJACOBIANCONSTANT @@ -17,10 +24,17 @@ #define tssetpoststep_ TSSETPOSTSTEP #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) #define tssetrhsfunction_ tssetrhsfunction +#define tsgetrhsfunction_ tsgetrhsfunction #define tssetrhsjacobian_ tssetrhsjacobian #define tsgetrhsjacobian_ tsgetrhsjacobian +#define tssetifunction_ tssetifunction +#define tssetifunction_ tsgetifunction +#define tssetijacobian_ tssetijacobian +#define tssetijacobian_ tsgetijacobian #define tsview_ tsview +#define tssetoptionsprefix_ tssetoptionsprefix #define tsgetoptionsprefix_ tsgetoptionsprefix +#define tsappendoptionsprefix_ tsappendoptionsprefix #define tsmonitorset_ tsmonitorset #define tscomputerhsfunctionlinear_ tscomputerhsfunctionlinear #define tscomputerhsjacobianconstant_ tscomputerhsjacobianconstant @@ -134,6 +148,12 @@ void PETSC_STDCALL tssetrhsfunction_(TS *ierr = TSSetRHSFunction(*ts,R,ourrhsfunction,fP); } } +void PETSC_STDCALL tsgetrhsfunction_(TS *ts,Vec *r,void *func,void **ctx,PetscErrorCode *ierr) +{ + CHKFORTRANNULLINTEGER(ctx); + CHKFORTRANNULLOBJECT(r); + *ierr = TSGetRHSFunction(*ts,r,PETSC_NULL,ctx); +} void tscomputeifunctionlinear_(TS *ts,PetscReal *t,Vec *X,Vec *Xdot,Vec *F,void *ctx,PetscErrorCode *ierr) { @@ -154,6 +174,12 @@ void PETSC_STDCALL tssetifunction_(TS *t *ierr = TSSetIFunction(*ts,R,ourifunction,fP); } } +void PETSC_STDCALL tsgetifunction_(TS *ts,Vec *r,void *func,void **ctx,PetscErrorCode *ierr) +{ + CHKFORTRANNULLINTEGER(ctx); + CHKFORTRANNULLOBJECT(r); + *ierr = TSGetIFunction(*ts,r,PETSC_NULL,ctx); +} /* ---------------------------------------------------------*/ void tscomputerhsjacobianconstant_(TS *ts,PetscReal *t,Vec *X,Mat *A,Mat *B,MatStructure *flg,void *ctx,PetscErrorCode *ierr) @@ -191,6 +217,10 @@ void PETSC_STDCALL tssetijacobian_(TS *t *ierr = TSSetIJacobian(*ts,*A,*B,ourijacobian,fP); } } +void PETSC_STDCALL tsgetijacobian_(TS *ts,Mat *J,Mat *M,int *func,void **ctx,PetscErrorCode *ierr) +{ + *ierr = TSGetIJacobian(*ts,J,M,0,ctx); +} /* ---------------------------------------------------------*/ @@ -227,6 +257,13 @@ void PETSC_STDCALL tsview_(TS *ts,PetscV *ierr = TSView(*ts,v); } +void PETSC_STDCALL tssetoptionsprefix_(TS *ts,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) +{ + char *t; + FIXCHAR(prefix,len,t); + *ierr = TSSetOptionsPrefix(*ts,t); + FREECHAR(prefix,t); +} void PETSC_STDCALL tsgetoptionsprefix_(TS *ts,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) { const char *tname; @@ -234,6 +271,13 @@ void PETSC_STDCALL tsgetoptionsprefix_(T *ierr = TSGetOptionsPrefix(*ts,&tname); *ierr = PetscStrncpy(prefix,tname,len); } +void PETSC_STDCALL tsappendoptionsprefix_(TS *ts,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) +{ + char *t; + FIXCHAR(prefix,len,t); + *ierr = TSAppendOptionsPrefix(*ts,t); + FREECHAR(prefix,t); +} EXTERN_C_END