| #endif |
| EXTERN_C_BEGIN |
| static void (PETSC_STDCALL *f1)(EPS*,int*,int*,PetscScalar*,PetscScalar*,PetscReal*,int*,void*,int*); |
| /* |
| These are not usually called from Fortran but allow Fortran users |
| to transparently set these monitors from .F code, hence no STDCALL |
| */ |
| void epsdefaultmonitor_(EPS *eps,int *it,int *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,int *nest,void *ctx,PetscErrorCode *ierr) |
| { |
| *ierr = EPSDefaultMonitor(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx); |
| } |
| EXTERN_C_END |
| /* These are not extern C because they are passed into non-extern C user level functions */ |
| static PetscErrorCode ourmonitor(EPS eps,int i,int nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,int l,void* ctx) |
| { |
| int ierr = 0; |
| (*f1)(&eps,&i,&nc,er,ei,d,&l,ctx,&ierr);CHKERRQ(ierr); |
| return 0; |
| } |
| EXTERN_C_BEGIN |
| void PETSC_STDCALL epsview_(EPS *eps,PetscViewer *viewer, PetscErrorCode *ierr) |
| { |
| PetscViewer v; |
| FIXRETURNCHAR(name,len); |
| } |
| void PETSC_STDCALL epssetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len), |
| PetscErrorCode *ierr PETSC_END_LEN(len)) |
| void PETSC_STDCALL epssetoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) |
| { |
| char *t; |
| FREECHAR(prefix,t); |
| } |
| void PETSC_STDCALL epsappendoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len), |
| PetscErrorCode *ierr PETSC_END_LEN(len)) |
| void PETSC_STDCALL epsappendoptionsprefix_(EPS *eps,CHAR prefix PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) |
| { |
| char *t; |
| *ierr = EPSCreate((MPI_Comm)PetscToPointerComm(*comm),eps); |
| } |
| /* |
| These are not usually called from Fortran but allow Fortran users |
| to transparently set these monitors from .F code |
| functions, hence no STDCALL |
| */ |
| void epsdefaultmonitor_(EPS *eps,int *it,int *nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal *errest,int *nest,void *ctx,PetscErrorCode *ierr) |
| void PETSC_STDCALL epssetmonitor_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,int*,int*,PetscScalar*,PetscScalar*,PetscReal*,int*,void*,int*),void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,int *),PetscErrorCode *ierr) |
| { |
| *ierr = EPSDefaultMonitor(*eps,*it,*nconv,eigr,eigi,errest,*nest,ctx); |
| } |
| static void (PETSC_STDCALL *f1)(EPS*,int*,int*,PetscScalar*,PetscScalar*,PetscReal*,int*,void*,int*); |
| static int ourmonitor(EPS eps,int i,int nc,PetscScalar *er,PetscScalar *ei,PetscReal *d,int l,void* ctx) |
| { |
| int ierr = 0; |
| (*f1)(&eps,&i,&nc,er,ei,d,&l,ctx,&ierr);CHKERRQ(ierr); |
| return 0; |
| } |
| void PETSC_STDCALL epssetmonitor_(EPS *eps,void (PETSC_STDCALL *monitor)(EPS*,int*,int*,PetscScalar*,PetscScalar*,PetscReal*,int*,void*,int*), |
| void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,int *),PetscErrorCode *ierr) |
| { |
| if ((void(*)())monitor == (void(*)())epsdefaultmonitor_) { |
| *ierr = EPSSetMonitor(*eps,EPSDefaultMonitor,0); |
| } else { |