Actual source code: zstoarf.c
slepc-3.21.2 2024-09-25
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
6: This file is part of SLEPc.
7: SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9: */
11: #include <petsc/private/fortranimpl.h>
12: #include <slepcpep.h>
14: #if defined(PETSC_HAVE_FORTRAN_CAPS)
15: #define pepstoargetinertias_ PEPSTOARGETINERTIAS
16: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
17: #define pepstoargetinertias_ pepstoargetinertias
18: #endif
20: SLEPC_EXTERN void pepstoargetinertias_(PEP *pep,PetscInt *nshift,PetscReal *shifts,PetscInt *inertias,PetscErrorCode *ierr)
21: {
22: PetscReal *oshifts;
23: PetscInt *oinertias;
24: PetscInt n;
26: CHKFORTRANNULLREAL(shifts);
27: CHKFORTRANNULLINTEGER(inertias);
28: *ierr = PEPSTOARGetInertias(*pep,&n,&oshifts,&oinertias); if (*ierr) return;
29: if (shifts) { *ierr = PetscArraycpy(shifts,oshifts,n); if (*ierr) return; }
30: if (inertias) { *ierr = PetscArraycpy(inertias,oinertias,n); if (*ierr) return; }
31: *nshift = n;
32: *ierr = PetscFree(oshifts);if (*ierr) return;
33: *ierr = PetscFree(oinertias);
34: }