Date: 2025-03-28T21:11:20+00:00

Actual source code: petscvecmod.F90

      1:         module petscisdefdummy
      2:         use petscsysdef
      3: #include <../src/vec/f90-mod/petscis.h>
      4: #include <../src/vec/f90-mod/petscislocaltoglobalmapping.h>
      5:         end module petscisdefdummy

      7:         module petscisdef
      8:         use petscisdefdummy
      9:         interface operator(.ne.)
     10:           function isnotequal(A,B)
     11:             import tIs
     12:             logical isnotequal
     13:             type(tIS), intent(in) :: A,B
     14:           end function
     15:           function petscsfnotequal(A,B)
     16:             import tPetscSF
     17:             logical petscsfnotequal
     18:             type(tPetscSF), intent(in) :: A,B
     19:           end function
     20:         end interface operator (.ne.)
     21:         interface operator(.eq.)
     22:           function isequals(A,B)
     23:             import tIs
     24:             logical isequals
     25:             type(tIS), intent(in) :: A,B
     26:           end function
     27:           function petscsfequals(A,B)
     28:             import tPetscSF
     29:             logical petscsfequals
     30:             type(tPetscSF), intent(in) :: A,B
     31:           end function
     32:         end interface operator (.eq.)
     33:         end module

     35:         function isnotequal(A,B)
     36:           use petscisdefdummy, only: tIS
     37:           logical isnotequal
     38:           type(tIS), intent(in) :: A,B
     39:           isnotequal = (A%v .ne. B%v)
     40:         end function

     42:         function isequals(A,B)
     43:           use petscisdefdummy, only: tIS
     44:           logical isequals
     45:           type(tIS), intent(in) :: A,B
     46:           isequals = (A%v .eq. B%v)
     47:         end function

     49:         function petscsfnotequal(A,B)
     50:           use petscisdefdummy, only: tPetscSF
     51:           logical petscsfnotequal
     52:           type(tPetscSF), intent(in) :: A,B
     53:           petscsfnotequal = (A%v .ne. B%v)
     54:         end function

     56:         function petscsfequals(A,B)
     57:           use petscisdefdummy, only: tPetscSF
     58:           logical petscsfequals
     59:           type(tPetscSF), intent(in) :: A,B
     60:           petscsfequals = (A%v .eq. B%v)
     61:         end function

     63: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     64: !DEC$ ATTRIBUTES DLLEXPORT::isnotequal
     65: !DEC$ ATTRIBUTES DLLEXPORT::petscsfnotequal
     66: !DEC$ ATTRIBUTES DLLEXPORT::isequals
     67: !DEC$ ATTRIBUTES DLLEXPORT::petscsfequals
     68: #endif

     70:         module  petscaodef
     71:         use petscisdef
     72:         use petscsysdef
     73: #include <../src/vec/f90-mod/petscao.h>
     74:         end module

     76:         module petscvecdefdummy
     77:         use petscisdef
     78:         use petscaodef
     79: #include <../src/vec/f90-mod/petscvec.h>
     80:         end module

     82:         module petscvecdef
     83:         use petscvecdefdummy
     84:         interface operator(.ne.)
     85:           function vecnotequal(A,B)
     86:             import tVec
     87:             logical vecnotequal
     88:             type(tVec), intent(in) :: A,B
     89:           end function
     90:           function vecscatternotequal(A,B)
     91:             import tVecScatter
     92:             logical vecscatternotequal
     93:             type(tVecScatter), intent(in) :: A,B
     94:           end function
     95:         end interface operator (.ne.)
     96:         interface operator(.eq.)
     97:           function vecequals(A,B)
     98:             import tVec
     99:             logical vecequals
    100:             type(tVec), intent(in) :: A,B
    101:           end function
    102:           function vecscatterequals(A,B)
    103:             import tVecScatter
    104:             logical vecscatterequals
    105:             type(tVecScatter), intent(in) :: A,B
    106:           end function
    107:         end interface operator (.eq.)
    108:         end module

    110:         function vecnotequal(A,B)
    111:           use petscvecdefdummy, only: tVec
    112:           logical vecnotequal
    113:           type(tVec), intent(in) :: A,B
    114:           vecnotequal = (A%v .ne. B%v)
    115:         end function

    117:         function vecequals(A,B)
    118:           use petscvecdefdummy, only: tVec
    119:           logical vecequals
    120:           type(tVec), intent(in) :: A,B
    121:           vecequals = (A%v .eq. B%v)
    122:         end function

    124:         function vecscatternotequal(A,B)
    125:           use petscvecdefdummy, only: tVecScatter
    126:           logical vecscatternotequal
    127:           type(tVecScatter), intent(in) :: A,B
    128:           vecscatternotequal = (A%v .ne. B%v)
    129:         end function

    131:         function vecscatterequals(A,B)
    132:           use petscvecdefdummy, only: tVecScatter
    133:           logical vecscatterequals
    134:           type(tVecScatter), intent(in) :: A,B
    135:           vecscatterequals = (A%v .eq. B%v)
    136:         end function

    138: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    139: !DEC$ ATTRIBUTES DLLEXPORT::vecnotequal
    140: !DEC$ ATTRIBUTES DLLEXPORT::vecscatternotequal
    141: !DEC$ ATTRIBUTES DLLEXPORT::vecequals
    142: !DEC$ ATTRIBUTES DLLEXPORT::vecscatterequals
    143: #endif

    145:         module petscis
    146:         use petscisdef
    147:         use petscsys
    148: #include <../src/vec/f90-mod/petscis.h90>
    149:         interface
    150: #include <../src/vec/f90-mod/ftn-auto-interfaces/petscis.h90>
    151:         end interface
    152:         end module

    154:         module petscao
    155:         use petscis
    156:         use petscaodef
    157:         end module

    159:         module petscvec
    160:         use petscvecdef
    161:         use petscis
    162:         use petscao
    163: #include <../src/vec/f90-mod/petscvec.h90>
    164:         interface
    165: #include <../src/vec/f90-mod/ftn-auto-interfaces/petscvec.h90>
    166:         end interface
    167:         end module

    169:       subroutine F90ArraySFNodeCreate(array,n,ptr)
    170:       use petscis, only: PetscSFNode
    171:       implicit none
    172:       PetscInt n,array(2*n)
    173:       type(PetscSFNode), pointer :: ptr(:)
    174:       PetscInt i
    175:       allocate(ptr(n))
    176:       do i=1,n
    177:         ptr(i)%rank  = array(2*i-1)
    178:         ptr(i)%index = array(2*i)
    179:       enddo

    181:       end subroutine