Actual source code: zitfuncf90.c
1: #include <petscksp.h>
2: #include <petsc/private/ftnimpl.h>
4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
5: #define kspgetresidualhistory_ KSPGETRESIDUALHISTORY
6: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
7: #define kspgetresidualhistory_ kspgetresidualhistory
8: #endif
10: PETSC_EXTERN void kspgetresidualhistory_(KSP *ksp, F90Array1d *indices, PetscInt *n, int *ierr PETSC_F90_2PTR_PROTO(ptrd))
11: {
12: PetscReal const *hist;
13: *ierr = KSPGetResidualHistory(*ksp, &hist, n);
14: if (*ierr) return;
15: *ierr = F90Array1dCreate((void *)hist, MPIU_REAL, 1, *n, indices PETSC_F90_2PTR_PARAM(ptrd));
16: }
18: PETSC_EXTERN void ksprestoreresidualhistory_(KSP *ksp, F90Array1d *indices, PetscInt *n, int *ierr PETSC_F90_2PTR_PROTO(ptrd))
19: {
20: *ierr = F90Array1dDestroy(indices, MPIU_SCALAR PETSC_F90_2PTR_PARAM(ptrd));
21: }