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 petscsysdef
     12:   use petscmatdef
     13: #include <../src/sys/ftn-mod/slepcsys.h>
     14: end module slepcsysdef

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

     34:     if (filename /= PETSC_NULL_CHARACTER) then
     35:       call SlepcInitializeF(trim(filename), help, ierr)
     36:       CHKERRQ(ierr)
     37:     else
     38:       call SlepcInitializeF(filename, help, ierr)
     39:       CHKERRQ(ierr)
     40:     end if
     41:   end subroutine SlepcInitializeWithHelp

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

     50:     if (filename /= PETSC_NULL_CHARACTER) then
     51:       call SlepcInitializeF(trim(filename), PETSC_NULL_CHARACTER, ierr)
     52:       CHKERRQ(ierr)
     53:     else
     54:       call SlepcInitializeF(filename, PETSC_NULL_CHARACTER, ierr)
     55:       CHKERRQ(ierr)
     56:     end if
     57:   end subroutine SlepcInitializeNoHelp

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

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

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