Actual source code: slepcsysmod.F90

      1: !
      2: !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3: !  SLEPc - Scalable Library for Eigenvalue Problem Computations
      4: !  Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
      5: !
      6: !  This file is part of SLEPc.
      7: !  SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8: !  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: !
     10:         module slepcsysdef
     11:         use petscmatdef
     12: #include <../src/sys/ftn-mod/slepcsys.h>
     13:         end module slepcsysdef

     15:         module slepcsys
     16:         use,intrinsic :: iso_c_binding
     17:         use slepcsysdef
     18:         use petscmat
     19: #include <../src/sys/ftn-mod/slepcsys.h90>
     20: #include <../ftn/sys/slepcall.h90>
     21:         interface SlepcInitialize
     22:           module procedure SlepcInitializeWithHelp, SlepcInitializeNoHelp, SlepcInitializeNoArguments
     23:         end interface
     24:       contains
     25: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     26: !DEC$ ATTRIBUTES DLLEXPORT::SlepcInitializeWithHelp
     27: #endif
     28:       subroutine SlepcInitializeWithHelp(filename,help,ierr)
     29:           character(len=*),intent(in):: filename
     30:           character(len=*),intent(in):: help
     31:           PetscErrorCode             :: ierr

     33:           if (filename .ne. PETSC_NULL_CHARACTER) then
     34:              call SlepcInitializeF(trim(filename),help,ierr)
     35:              CHKERRQ(ierr)
     36:           else
     37:              call SlepcInitializeF(filename,help,ierr)
     38:              CHKERRQ(ierr)
     39:           endif
     40:         end subroutine SlepcInitializeWithHelp

     42: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     43: !DEC$ ATTRIBUTES DLLEXPORT::SlepcInitializeNoHelp
     44: #endif
     45:         subroutine SlepcInitializeNoHelp(filename,ierr)
     46:           character(len=*),intent(in):: filename
     47:           PetscErrorCode             :: ierr

     49:           if (filename .ne. PETSC_NULL_CHARACTER) then
     50:              call SlepcInitializeF(trim(filename),PETSC_NULL_CHARACTER,ierr)
     51:              CHKERRQ(ierr)
     52:           else
     53:              call SlepcInitializeF(filename,PETSC_NULL_CHARACTER,ierr)
     54:              CHKERRQ(ierr)
     55:           endif
     56:         end subroutine SlepcInitializeNoHelp

     58: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     59: !DEC$ ATTRIBUTES DLLEXPORT::SlepcInitializeNoArguments
     60: #endif
     61:         subroutine SlepcInitializeNoArguments(ierr)
     62:           PetscErrorCode             :: ierr

     64:           call SlepcInitializeF(PETSC_NULL_CHARACTER,PETSC_NULL_CHARACTER,ierr)
     65:           CHKERRQ(ierr)
     66:         end subroutine SlepcInitializeNoArguments

     68: #include <../ftn/sys/slepcall.hf90>
     69:         end module slepcsys