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)
 15: #define MatColoring type(tMatColoring)
 16: #define MatTransposeColoring type(tMatTransposeColoring)
 17: #define MatPartitioning type(tMatPartitioning)
 18: #define MatCoarsen type(tMatCoarsen)

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

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

 59: #define MATCOARSEN_MIS 'mis'

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

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

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

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

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

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

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

237: #endif