Actual source code: matregis.c

petsc-3.8.4 2018-03-24
Report Typos and Errors

  2:  #include <petsc/private/matimpl.h>

  4: PETSC_EXTERN PetscErrorCode MatCreate_MFFD(Mat);
  5: PETSC_EXTERN PetscErrorCode MatCreate_MAIJ(Mat);
  6: PETSC_EXTERN PetscErrorCode MatCreate_IS(Mat);

  8: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJ(Mat);
  9: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJ(Mat);

 11: PETSC_EXTERN PetscErrorCode MatCreate_SeqBAIJ(Mat);
 12: PETSC_EXTERN PetscErrorCode MatCreate_MPIBAIJ(Mat);

 14: PETSC_EXTERN PetscErrorCode MatCreate_SeqSBAIJ(Mat);
 15: PETSC_EXTERN PetscErrorCode MatCreate_MPISBAIJ(Mat);

 17: PETSC_EXTERN PetscErrorCode MatCreate_SeqDense(Mat);
 18: PETSC_EXTERN PetscErrorCode MatCreate_MPIDense(Mat);

 20: PETSC_EXTERN PetscErrorCode MatCreate_MPIAdj(Mat);
 21: PETSC_EXTERN PetscErrorCode MatCreate_Shell(Mat);
 22: PETSC_EXTERN PetscErrorCode MatCreate_Composite(Mat);

 24: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJPERM(Mat);
 25: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJPERM(Mat);

 27: #if defined PETSC_HAVE_MKL_SPARSE
 28: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJMKL(Mat);
 29: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJMKL(Mat);

 31: PETSC_EXTERN PetscErrorCode MatCreate_SeqBAIJMKL(Mat);
 32: PETSC_EXTERN PetscErrorCode MatCreate_MPIBAIJMKL(Mat);
 33: #endif

 35: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCRL(Mat);
 36: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCRL(Mat);

 38: PETSC_EXTERN PetscErrorCode MatCreate_Scatter(Mat);
 39: PETSC_EXTERN PetscErrorCode MatCreate_BlockMat(Mat);
 40: PETSC_EXTERN PetscErrorCode MatCreate_Nest(Mat);

 42: #if defined PETSC_HAVE_CUSP
 43: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCUSP(Mat);
 44: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCUSP(Mat);
 45: #endif

 47: #if defined PETSC_HAVE_VECCUDA
 48: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCUSPARSE(Mat);
 49: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCUSPARSE(Mat);
 50: #endif

 52: #if defined PETSC_HAVE_VIENNACL
 53: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJViennaCL(Mat);
 54: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJViennaCL(Mat);
 55: #endif

 57: #if defined PETSC_HAVE_FFTW
 58: PETSC_EXTERN PetscErrorCode MatCreate_FFTW(Mat);
 59: #endif
 60: PETSC_EXTERN PetscErrorCode MatCreate_Elemental(Mat);

 62: PETSC_EXTERN PetscErrorCode MatCreate_Preallocator(Mat);
 63: PETSC_EXTERN PetscErrorCode MatCreate_Dummy(Mat);

 65: #if defined PETSC_HAVE_HYPRE
 66: PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat);
 67: #endif

 69: /*@C
 70:   MatRegisterAll - Registers all of the matrix types in PETSc

 72:   Not Collective

 74:   Level: advanced

 76: .keywords: KSP, register, all

 78: .seealso:  MatRegister()
 79: @*/
 80: PetscErrorCode  MatRegisterAll(void)
 81: {

 85:   if (MatRegisterAllCalled) return(0);
 86:   MatRegisterAllCalled = PETSC_TRUE;

 88:   MatRegister(MATMFFD,           MatCreate_MFFD);

 90:   MatRegister(MATMPIMAIJ,        MatCreate_MAIJ);
 91:   MatRegister(MATSEQMAIJ,        MatCreate_MAIJ);
 92:   MatRegister(MATMAIJ,           MatCreate_MAIJ);

 94:   MatRegister(MATIS,             MatCreate_IS);
 95:   MatRegister(MATSHELL,          MatCreate_Shell);
 96:   MatRegister(MATCOMPOSITE,      MatCreate_Composite);

 98:   MatRegisterBaseName(MATAIJ,MATSEQAIJ,MATMPIAIJ);
 99:   MatRegister(MATMPIAIJ,         MatCreate_MPIAIJ);
100:   MatRegister(MATSEQAIJ,         MatCreate_SeqAIJ);

102:   MatRegisterBaseName(MATAIJPERM,MATSEQAIJPERM,MATMPIAIJPERM);
103:   MatRegister(MATMPIAIJPERM,     MatCreate_MPIAIJPERM);
104:   MatRegister(MATSEQAIJPERM,     MatCreate_SeqAIJPERM);

106: #if defined PETSC_HAVE_MKL_SPARSE
107:   MatRegisterBaseName(MATAIJMKL, MATSEQAIJMKL,MATMPIAIJMKL);
108:   MatRegister(MATMPIAIJMKL,      MatCreate_MPIAIJMKL);
109:   MatRegister(MATSEQAIJMKL,      MatCreate_SeqAIJMKL);
110: 
111:   MatRegisterBaseName(MATBAIJMKL,MATSEQBAIJMKL,MATMPIBAIJMKL);
112:   MatRegister(MATMPIBAIJMKL,      MatCreate_MPIBAIJMKL);
113:   MatRegister(MATSEQBAIJMKL,      MatCreate_SeqBAIJMKL);
114: #endif

116:   MatRegisterBaseName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
117:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
118:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

120:   MatRegisterBaseName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
121:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
122:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

124:   MatRegisterBaseName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
125:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
126:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

128:   MatRegisterBaseName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
129:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
130:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);

132:   MatRegister(MATMPIADJ,         MatCreate_MPIAdj);
133:   MatRegister(MATSCATTER,        MatCreate_Scatter);
134:   MatRegister(MATBLOCKMAT,       MatCreate_BlockMat);
135:   MatRegister(MATNEST,           MatCreate_Nest);

137: #if defined PETSC_HAVE_CUSP
138:   MatRegisterBaseName(MATAIJCUSP,MATSEQAIJCUSP,MATMPIAIJCUSP);
139:   MatRegister(MATSEQAIJCUSP,     MatCreate_SeqAIJCUSP);
140:   MatRegister(MATMPIAIJCUSP,     MatCreate_MPIAIJCUSP);
141: #endif

143: #if defined PETSC_HAVE_VECCUDA
144:   MatRegisterBaseName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
145:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
146:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
147: #endif

149: #if defined PETSC_HAVE_VIENNACL
150:   MatRegisterBaseName(MATAIJVIENNACL,MATSEQAIJVIENNACL,MATMPIAIJVIENNACL);
151:   MatRegister(MATSEQAIJVIENNACL, MatCreate_SeqAIJViennaCL);
152:   MatRegister(MATMPIAIJVIENNACL, MatCreate_MPIAIJViennaCL);
153: #endif

155: #if defined PETSC_HAVE_FFTW
156:   MatRegister(MATFFTW,           MatCreate_FFTW);
157: #endif
158: #if defined PETSC_HAVE_ELEMENTAL
159:   MatRegister(MATELEMENTAL,      MatCreate_Elemental);
160: #endif

162:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
163:   MatRegister(MATDUMMY,          MatCreate_Dummy);

165: #if defined PETSC_HAVE_HYPRE
166:   MatRegister(MATHYPRE,          MatCreate_HYPRE);
167: #endif
168:   return(0);
169: }