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 MATLMVMBFGS        'lmvmbfgs'
168: #define MATLMVMSR1         'lmvmsr1'
169: #define MATLMVMBROYDEN     'lmvmbroyden'
170: #define MATLMVMBADBROYDEN  'lmvmbadbroyden'
171: #define MATLMVMSYMBROYDEN  'lmvmsymbroyden'
172: #define MATLMVMSYMBADBROYDEN 'lmvmsymbadbroyden'
173: #define MATLMVMDIAGBROYDEN 'lmvmdiagbroyden'
174: #define MATCONSTANTDIAGONAL 'constantdiagonal'
175: #define MATHTOOL           'htool'
176: #define MATH2OPUS          'h2opus'

178: !
179: ! MatMFFDType values
180: !
181: #define MATMFFD_DS 'ds'
182: #define MATMFFD_WP 'wp'

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

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

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

227: !
228: ! sparsity reducing ordering for STRUMPACK
229: !
230: #define MatSTRUMPACKReordering PetscEnum

232: #endif