Actual source code: zdspepf.c
slepc-3.21.1 2024-04-26
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 <slepcds.h>
14: #if defined(PETSC_HAVE_FORTRAN_CAPS)
15: #define dspepsetcoefficients_ DSPEPSETCOEFFICIENTS
16: #define dspepgetcoefficients_ DSPEPGETCOEFFICIENTS
17: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
18: #define dspepsetcoefficients_ dspepsetcoefficients
19: #define dspepgetcoefficients_ dspepgetcoefficients
20: #endif
22: SLEPC_EXTERN void dspepsetcoefficients_(DS *ds,PetscReal *pbc,PetscErrorCode *ierr)
23: {
24: CHKFORTRANNULLREAL(pbc);
25: *ierr = DSPEPSetCoefficients(*ds,pbc);
26: }
28: SLEPC_EXTERN void dspepgetcoefficients_(DS *ds,PetscReal *pbc,PetscErrorCode *ierr)
29: {
30: PetscReal *opbc;
31: PetscInt d;
33: CHKFORTRANNULLREAL(pbc);
34: *ierr = DSPEPGetCoefficients(*ds,&opbc); if (*ierr) return;
35: *ierr = DSPEPGetDegree(*ds,&d); if (*ierr) return;
36: *ierr = PetscArraycpy(pbc,opbc,3*(d+1)); if (*ierr) return;
37: *ierr = PetscFree(opbc);
38: }