Date: 2025-03-29T05:58:39+00:00

Actual source code: petscmatmod.F90

      1:         module petscmatdef
      2:         use petscvecdef
      3: #include "petsc/finclude/petscmat.h"
      4: #include "petsc/finclude/petscmatcoarsen.h"
      5: #include "petsc/finclude/petscpartitioner.h"
      6: #include "petsc/finclude/petscmathypre.h"
      7: #include "petsc/finclude/petscmathtool.h"
      8: #include "petsc/finclude/petscmatelemental.h"
      9: #include <../ftn/mat/petscmat.h>
     10: #include <../ftn/mat/petscmatcoarsen.h>
     11: #include <../ftn/mat/petscpartitioner.h>

     13:         end module

     15: !     ----------------------------------------------

     17:         module petscmat
     18:         use petscmatdef
     19:         use petscvec

     21: #include <../src/mat/ftn-mod/petscmat.h90>
     22: #include <../ftn/mat/petscmat.h90>
     23: #include <../ftn/mat/petscmatcoarsen.h90>
     24: #include <../ftn/mat/petscpartitioner.h90>

     26: !     deprecated functions

     28:         interface MatDenseGetArrayF90
     29:           module procedure MatDenseGetArrayF901d, MatDenseGetArrayF902d
     30:         end interface

     32:         interface  MatDenseRestoreArrayF90
     33:           module procedure MatDenseRestoreArrayF901d, MatDenseRestoreArrayF902d
     34:         end interface

     36:         interface MatDenseGetArrayReadF90
     37:           module procedure MatDenseGetArrayReadF901d, MatDenseGetArrayReadF902d
     38:         end interface

     40:         interface  MatDenseRestoreArrayReadF90
     41:           module procedure MatDenseRestoreArrayWriteF901d, MatDenseRestoreArrayWriteF902d
     42:         end interface

     44:         interface MatDenseGetArrayWriteF90
     45:           module procedure MatDenseGetArrayWriteF901d, MatDenseGetArrayWriteF902d
     46:         end interface

     48:         interface  MatDenseRestoreArrayWriteF90
     49:           module procedure MatDenseRestoreArrayWriteF901d, MatDenseRestoreArrayWriteF902d
     50:         end interface

     52:         contains

     54: #include <../ftn/mat/petscmat.hf90>
     55: #include <../ftn/mat/petscmatcoarsen.hf90>
     56: #include <../ftn/mat/petscpartitioner.hf90>

     58: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     59: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayF901d
     60: #endif
     61:         Subroutine MatDenseGetArrayF901d(v,array,ierr)
     62:           PetscScalar, pointer :: array(:)
     63:           PetscErrorCode ierr
     64:           Mat     v
     65:           call MatDenseGetArray(v,array,ierr)
     66:         End Subroutine

     68: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     69: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayF901d
     70: #endif
     71:         Subroutine MatDenseRestoreArrayF901d(v,array,ierr)
     72:           PetscScalar, pointer :: array(:)
     73:           PetscErrorCode ierr
     74:           Mat     v
     75:           call MatDenseRestoreArray(v,array,ierr)
     76:         End Subroutine

     78: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     79: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayReadF901d
     80: #endif
     81:         Subroutine MatDenseGetArrayReadF901d(v,array,ierr)
     82:           PetscScalar, pointer :: array(:)
     83:           PetscErrorCode ierr
     84:           Mat     v
     85:           call MatDenseGetArrayRead(v,array,ierr)
     86:         End Subroutine

     88: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     89: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayReadF901d
     90: #endif
     91:         Subroutine MatDenseRestoreArrayReadF901d(v,array,ierr)
     92:           PetscScalar, pointer :: array(:)
     93:           PetscErrorCode ierr
     94:           Mat     v
     95:           call MatDenseRestoreArrayRead(v,array,ierr)
     96:         End Subroutine

     98: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
     99: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayWriteF901d
    100: #endif
    101:         Subroutine MatDenseGetArrayWriteF901d(v,array,ierr)
    102:           PetscScalar, pointer :: array(:)
    103:           PetscErrorCode ierr
    104:           Mat     v
    105:           call MatDenseGetArrayWrite(v,array,ierr)
    106:         End Subroutine

    108: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    109: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayWriteF901d
    110: #endif
    111:         Subroutine MatDenseRestoreArrayWriteF901d(v,array,ierr)
    112:           PetscScalar, pointer :: array(:)
    113:           PetscErrorCode ierr
    114:           Mat     v
    115:           call MatDenseRestoreArrayWrite(v,array,ierr)
    116:         End Subroutine

    118: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    119: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayF902d
    120: #endif
    121:         Subroutine MatDenseGetArrayF902d(v,array,ierr)
    122:           PetscScalar, pointer :: array(:,:)
    123:           PetscErrorCode ierr
    124:           Mat     v
    125:           call MatDenseGetArray(v,array,ierr)
    126:         End Subroutine

    128: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    129: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayF902d
    130: #endif
    131:         Subroutine MatDenseRestoreArrayF902d(v,array,ierr)
    132:           PetscScalar, pointer :: array(:,:)
    133:           PetscErrorCode ierr
    134:           Mat     v
    135:           call MatDenseRestoreArray(v,array,ierr)
    136:         End Subroutine

    138: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    139: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayReadF902d
    140: #endif
    141:         Subroutine MatDenseGetArrayReadF902d(v,array,ierr)
    142:           PetscScalar, pointer :: array(:,:)
    143:           PetscErrorCode ierr
    144:           Mat     v
    145:           call MatDenseGetArrayRead(v,array,ierr)
    146:         End Subroutine

    148: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    149: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayReadF90
    150: #endif
    151:         Subroutine MatDenseRestoreArrayReadF902d(v,array,ierr)
    152:           PetscScalar, pointer :: array(:,:)
    153:           PetscErrorCode ierr
    154:           Mat     v
    155:           call MatDenseRestoreArrayRead(v,array,ierr)
    156:         End Subroutine

    158: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    159: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseGetArrayWriteF90
    160: #endif
    161:         Subroutine MatDenseGetArrayWriteF902d(v,array,ierr)
    162:           PetscScalar, pointer :: array(:,:)
    163:           PetscErrorCode ierr
    164:           Mat     v
    165:           call MatDenseGetArrayWrite(v,array,ierr)
    166:         End Subroutine

    168: #if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
    169: !DEC$ ATTRIBUTES DLLEXPORT:: MatDenseRestoreArrayWriteF90
    170: #endif
    171:         Subroutine MatDenseRestoreArrayWriteF902d(v,array,ierr)
    172:           PetscScalar, pointer :: array(:,:)
    173:           PetscErrorCode ierr
    174:           Mat     v
    175:           call MatDenseRestoreArrayWrite(v,array,ierr)
    176:         End Subroutine

    178:         end module