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 <slepcsys.h> 14: #if defined(PETSC_HAVE_FORTRAN_CAPS) 15: #define slepcinitializefortran_ SLEPCINITIALIZEFORTRAN 16: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 17: #define slepcinitializefortran_ slepcinitializefortran 18: #endif 20: /*@C 21: SlepcInitializeFortran - Routine that should be called from C after 22: the call to SlepcInitialize() if one is using a C main program 23: that calls Fortran routines that in turn call SLEPc routines. 25: Collective on PETSC_COMM_WORLD 27: Level: beginner 29: Notes: 30: SlepcInitializeFortran() initializes some of the default SLEPc variables 31: for use in Fortran if a user's main program is written in C. 32: SlepcInitializeFortran() is NOT needed if a user's main 33: program is written in Fortran; in this case, just calling 34: SlepcInitialize() in the main (Fortran) program is sufficient. 36: .seealso: SlepcInitialize() 37: @*/ 39: PetscErrorCode SlepcInitializeFortran(void) 40: { 41: PetscCall(PetscInitializeFortran()); 42: return PETSC_SUCCESS; 43: } 45: SLEPC_EXTERN void slepcinitializefortran_(PetscErrorCode *info) 46: { 47: *info = SlepcInitializeFortran(); 48: }