Actual source code: petscmat.h

      1: !
      2: !
      3: !  Include file for Fortran use of the Mat package in PETSc
      4: !  Portions of this code are under:
      5: !  Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
      6: !
      7: #if !defined (PETSCMATDEF_H)
      8: #define PETSCMATDEF_H

     10: #include "petsc/finclude/petscvec.h"

     12: #define Mat type(tMat)
     13: #define MatNullSpace type(tMatNullSpace)
     14: #define MatFDColoring type(tMatFDColoring)

     16: #define MatColoring PetscFortranAddr
     17: #define MatPartitioning PetscFortranAddr
     18: #define MatCoarsen PetscFortranAddr
     19: #define MatAIJIndices PetscFortranAddr
     20: #define MatType character*(80)
     21: #define MatSolverType character*(80)
     22: #define MatOption PetscEnum
     23: #define MatCreateSubMatrixOption PetscEnum
     24: #define MPChacoGlobalType PetscEnum
     25: #define MPChacoLocalType PetscEnum
     26: #define MPChacoEigenType PetscEnum
     27: #define MPPTScotchStragegyType PetscEnum
     28: #define MatAssemblyType PetscEnum
     29: #define MatFactorType PetscEnum
     30: #define MatFactorError PetscEnum
     31: #define MatFactorShiftType PetscEnum
     32: #define MatProductType PetscEnum
     33: #define MatProductAlgorithm character*(80)
     34: #define MatFactorSchurStatus PetscEnum
     35: #define MatOrderingType character*(80)
     36: #define MatSORType PetscEnum
     37: #define MatInfoType PetscEnum
     38: #define MatReuse PetscEnum
     39: #define MatOperation PetscEnum
     40: #define MatColoringType character*(80)
     41: #define MatInfo PetscLogDouble
     42: #define MatFactorInfo PetscReal
     43: #define MatDuplicateOption PetscEnum
     44: #define MatStructure PetscEnum
     45: #define MatPartitioningType character*(80)
     46: #define MatCoarsenType character*(80)
     47: #define MatCompositeType PetscEnum
     48: #define MatCompositeMergeType PetscEnum
     49: #define MatStencil PetscInt
     50: #define MatStencil_k 1
     51: #define MatStencil_j 2
     52: #define MatStencil_i 3
     53: #define MatStencil_c 4

     55: #define MATPARTITIONING_CURRENT 'current'
     56: #define MATPARTITIONING_PARMETIS 'parmetis'

     58: #define MATCOARSEN_MIS 'mis'

     60: #define MATCOLORINGJP      'jp'
     61: #define MATCOLORINGPOWER   'power'
     62: #define MATCOLORINGNATURAL 'natural'
     63: #define MATCOLORINGSL      'sl'
     64: #define MATCOLORINGLF      'lf'
     65: #define MATCOLORINGID      'id'
     66: #define MATCOLORINGGREEDY  'greedy'

     68: #define MATORDERINGNATURAL   'natural'
     69: #define MATORDERINGNATURAL_OR_ND 'natural_or_nd'
     70: #define MATORDERINGND        'nd'
     71: #define MATORDERING1WD       '1wd'
     72: #define MATORDERINGRCM       'rcm'
     73: #define MATORDERINGQMD       'qmd'
     74: #define MATORDERINGROWLENGTH 'rowlength'
     75: #define MATORDERINGWBM       'wbm'
     76: #define MATORDERINGSPECTRAL  'spectral'
     77: #define MATORDERINGAMD       'amd'
     78: #define MATORDERINGEXTERNAL  'external'
     79: !
     80: !  Matrix types
     81: !
     82: #define MATSAME            'same'
     83: #define MATMAIJ            'maij'
     84: #define MATSEQMAIJ         'seqmaij'
     85: #define MATMPIMAIJ         'mpimaij'
     86: #define MATKAIJ            'kaij'
     87: #define MATSEQKAIJ         'seqkaij'
     88: #define MATMPIKAIJ         'mpikaij'
     89: #define MATIS              'is'
     90: #define MATAIJ             'aij'
     91: #define MATSEQAIJ          'seqaij'
     92: #define MATMPIAIJ          'mpiaij'
     93: #define MATAIJCRL          'aijcrl'
     94: #define MATSEQAIJCRL       'seqaijcrl'
     95: #define MATMPIAIJCRL       'mpiaijcrl'
     96: #define MATAIJCUSPARSE     'aijcusparse'
     97: #define MATSEQAIJCUSPARSE  'seqaijcusparse'
     98: #define MATMPIAIJCUSPARSE  'mpiaijcusparse'
     99: #define MATAIJHIPSPARSE    'aijhipsparse'
    100: #define MATSEQAIJHIPSPARSE 'seqaijhipsparse'
    101: #define MATMPIAIJHIPSPARSE 'mpiaijhipsparse'
    102: #define MATAIJKOKKOS       'aijkokkos'
    103: #define MATSEQAIJKOKKOS    'seqaijkokkos'
    104: #define MATMPIAIJKOKKOS    'mpiaijkokkos'
    105: #define MATAIJVIENNACL     'aijviennacl'
    106: #define MATSEQAIJVIENNACL  'seqaijviennacl'
    107: #define MATMPIAIJVIENNACL  'mpiaijviennacl'
    108: #define MATAIJPERM         'aijperm'
    109: #define MATSEQAIJPERM      'seqaijperm'
    110: #define MATMPIAIJPERM      'mpiaijperm'
    111: #define MATAIJSELL         'aijsell'
    112: #define MATSEQAIJSELL      'seqaijsell'
    113: #define MATMPIAIJSELL      'mpiaijsell'
    114: #define MATAIJMKL          'aijmkl'
    115: #define MATSEQAIJMKL       'seqaijmkl'
    116: #define MATMPIAIJMKL       'mpiaijmkl'
    117: #define MATBAIJMKL         'baijmkl'
    118: #define MATSEQBAIJMKL      'seqbaijmkl'
    119: #define MATMPIBAIJMKL      'mpibaijmkl'
    120: #define MATSHELL           'shell'
    121: #define MATCENTERING       'centering'
    122: #define MATDENSE           'dense'
    123: #define MATDENSECUDA       'densecuda'
    124: #define MATDENSEHIP        'densehip'
    125: #define MATSEQDENSE        'seqdense'
    126: #define MATSEQDENSECUDA    'seqdensecuda'
    127: #define MATSEQDENSEHIP     'seqdensehip'
    128: #define MATMPIDENSE        'mpidense'
    129: #define MATMPIDENSECUDA    'mpidensecuda'
    130: #define MATMPIDENSEHIP     'mpidensehip'
    131: #define MATELEMENTAL       'elemental'
    132: #define MATSCALAPACK       'scalapack'
    133: #define MATBAIJ            'baij'
    134: #define MATSEQBAIJ         'seqbaij'
    135: #define MATMPIBAIJ         'mpibaij'
    136: #define MATMPIADJ          'mpiadj'
    137: #define MATSBAIJ           'sbaij'
    138: #define MATSEQSBAIJ        'seqsbaij'
    139: #define MATMPISBAIJ        'mpisbaij'
    140: #define MATMFFD            'mffd'
    141: #define MATNORMAL          'normal'
    142: #define MATNORMALHERMITIAN 'normalh'
    143: #define MATLRC             'lrc'
    144: #define MATSCATTER         'scatter'
    145: #define MATBLOCKMAT        'blockmat'
    146: #define MATCOMPOSITE       'composite'
    147: #define MATFFT             'fft'
    148: #define MATFFTW            'fftw'
    149: #define MATSEQCUFFT        'seqcufft'
    150: #define MATTRANSPOSEVIRTUAL       'transpose'
    151: #define MATHERMITIANTRANSPOSEVIRTUAL 'hermitiantranspose'
    152: #define MATSCHURCOMPLEMENT 'schurcomplement'
    153: #define MATPYTHON          'python'
    154: #define MATHYPRE           'hypre'
    155: #define MATHYPRESTRUCT     'hyprestruct'
    156: #define MATHYPRESSTRUCT    'hypresstruct'
    157: #define MATSUBMATRIX       'submatrix'
    158: #define MATLOCALREF        'localref'
    159: #define MATNEST            'nest'
    160: #define MATPREALLOCATOR    'preallocator'
    161: #define MATSELL            'sell'
    162: #define MATSEQSELL         'seqsell'
    163: #define MATMPISELL         'mpisell'
    164: #define MATDUMMY           'dummy'
    165: #define MATLMVM            'lmvm'
    166: #define MATLMVMDFP         'lmvmdfp'
    167: #define MATLMVMDDFP        'lmvmddfp'
    168: #define MATLMVMBFGS        'lmvmbfgs'
    169: #define MATLMVMDBFGS       'lmvmdbfgs'
    170: #define MATLMVMDQN         'lmvmdqn'
    171: #define MATLMVMSR1         'lmvmsr1'
    172: #define MATLMVMBROYDEN     'lmvmbroyden'
    173: #define MATLMVMBADBROYDEN  'lmvmbadbroyden'
    174: #define MATLMVMSYMBROYDEN  'lmvmsymbroyden'
    175: #define MATLMVMSYMBADBROYDEN 'lmvmsymbadbroyden'
    176: #define MATLMVMDIAGBROYDEN 'lmvmdiagbroyden'
    177: #define MATCONSTANTDIAGONAL 'constantdiagonal'
    178: #define MATHTOOL           'htool'
    179: #define MATH2OPUS          'h2opus'

    181: !
    182: ! MatMFFDType values
    183: !
    184: #define MATMFFD_DS 'ds'
    185: #define MATMFFD_WP 'wp'

    187: !
    188: ! MatSolverTypes
    189: !
    190: #define MATSOLVERSUPERLU         'superlu'
    191: #define MATSOLVERSUPERLU_DIST    'superlu_dist'
    192: #define MATSOLVERSTRUMPACK       'strumpack'
    193: #define MATSOLVERUMFPACK         'umfpack'
    194: #define MATSOLVERCHOLMOD         'cholmod'
    195: #define MATSOLVERKLU             'klu'
    196: #define MATSOLVERELEMENTAL       'elemental'
    197: #define MATSOLVERSCALAPACK       'scalapack'
    198: #define MATSOLVERESSL            'essl'
    199: #define MATSOLVERLUSOL           'lusol'
    200: #define MATSOLVERMUMPS           'mumps'
    201: #define MATSOLVERMKL_PARDISO     'mkl_pardiso'
    202: #define MATSOLVERMKL_CPARDISO    'mkl_cpardiso'
    203: #define MATSOLVERPASTIX          'pastix'
    204: #define MATSOLVERMATLAB          'matlab'
    205: #define MATSOLVERPETSC           'petsc'
    206: #define MATSOLVERBAS             'bas'
    207: #define MATSOLVERCUSPARSE        'cusparse'
    208: #define MATSOLVERCUDA            'cuda'
    209: #define MATSOLVERHIPSPARSE       'hipsparse'
    210: #define MATSOLVERHIP             'hip'
    211: #define MATSOLVERKOKKOS          'kokkos'
    212: #define MATSOLVERSPQR            'spqr'

    214: !
    215: ! GPU Storage Formats for CUSPARSE
    216: !
    217: #define MatCUSPARSEStorageFormat PetscEnum
    218: #define MatCUSPARSEFormatOperation PetscEnum

    220: !
    221: ! GPU Storage Formats for HIPSPARSE
    222: !
    223: #define MatHIPSPARSEStorageFormat PetscEnum
    224: #define MatHIPSPARSEFormatOperation PetscEnum

    226: !
    227: ! sparsity reducing ordering for STRUMPACK
    228: !
    229: #define MatSTRUMPACKReordering PetscEnum
    230: !
    231: ! compression types for STRUMPACK
    232: !
    233: #define MatSTRUMPACKCompressionType PetscEnum

    235: #endif