Actual source code: matregis.c

petsc-master 2019-09-23
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_KAIJ(Mat);
  7: PETSC_EXTERN PetscErrorCode MatCreate_IS(Mat);

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

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

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

 18: PETSC_EXTERN PetscErrorCode MatCreate_SeqDense(Mat);
 19: #if defined(PETSC_HAVE_CUDA)
 20: PETSC_EXTERN PetscErrorCode MatCreate_SeqDenseCUDA(Mat);
 21: #endif
 22: PETSC_EXTERN PetscErrorCode MatCreate_MPIDense(Mat);

 24: PETSC_EXTERN PetscErrorCode MatCreate_MPIAdj(Mat);
 25: PETSC_EXTERN PetscErrorCode MatCreate_Shell(Mat);
 26: PETSC_EXTERN PetscErrorCode MatCreate_Composite(Mat);

 28: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJPERM(Mat);
 29: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJPERM(Mat);

 31: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJSELL(Mat);
 32: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJSELL(Mat);

 34: #if defined(PETSC_HAVE_MKL_SPARSE)
 35: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJMKL(Mat);
 36: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJMKL(Mat);
 37: #endif

 39: #if defined(PETSC_HAVE_MKL_SPARSE_OPTIMIZE)
 40: PETSC_EXTERN PetscErrorCode MatCreate_SeqBAIJMKL(Mat);
 41: PETSC_EXTERN PetscErrorCode MatCreate_MPIBAIJMKL(Mat);
 42: #endif

 44: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCRL(Mat);
 45: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCRL(Mat);

 47: PETSC_EXTERN PetscErrorCode MatCreate_Scatter(Mat);
 48: PETSC_EXTERN PetscErrorCode MatCreate_BlockMat(Mat);
 49: PETSC_EXTERN PetscErrorCode MatCreate_Nest(Mat);

 51: PETSC_EXTERN PetscErrorCode MatCreate_SeqSELL(Mat);
 52: PETSC_EXTERN PetscErrorCode MatCreate_MPISELL(Mat);

 54: #if defined(PETSC_HAVE_CUDA)
 55: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCUSPARSE(Mat);
 56: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCUSPARSE(Mat);
 57: #endif

 59: #if defined(PETSC_HAVE_VIENNACL)
 60: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJViennaCL(Mat);
 61: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJViennaCL(Mat);
 62: #endif

 64: #if defined(PETSC_HAVE_FFTW)
 65: PETSC_EXTERN PetscErrorCode MatCreate_FFTW(Mat);
 66: #endif
 67: PETSC_EXTERN PetscErrorCode MatCreate_Elemental(Mat);

 69: PETSC_EXTERN PetscErrorCode MatCreate_Preallocator(Mat);
 70: PETSC_EXTERN PetscErrorCode MatCreate_Dummy(Mat);

 72: #if defined(PETSC_HAVE_HYPRE)
 73: PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat);
 74: #endif

 76: PETSC_EXTERN PetscErrorCode MatCreate_ConstantDiagonal(Mat);
 77: /*@C
 78:   MatRegisterAll - Registers all of the matrix types in PETSc

 80:   Not Collective

 82:   Level: advanced

 84: .seealso:  MatRegister()
 85: @*/
 86: PetscErrorCode  MatRegisterAll(void)
 87: {

 91:   if (MatRegisterAllCalled) return(0);
 92:   MatRegisterAllCalled = PETSC_TRUE;

 94:   MatRegister(MATMFFD,           MatCreate_MFFD);

 96:   MatRegister(MATMPIMAIJ,        MatCreate_MAIJ);
 97:   MatRegister(MATSEQMAIJ,        MatCreate_MAIJ);
 98:   MatRegister(MATMAIJ,           MatCreate_MAIJ);

100:   MatRegister(MATMPIKAIJ,        MatCreate_KAIJ);
101:   MatRegister(MATSEQKAIJ,        MatCreate_KAIJ);
102:   MatRegister(MATKAIJ,           MatCreate_KAIJ);

104:   MatRegister(MATIS,             MatCreate_IS);
105:   MatRegister(MATSHELL,          MatCreate_Shell);
106:   MatRegister(MATCOMPOSITE,      MatCreate_Composite);

108:   MatRegisterRootName(MATAIJ,MATSEQAIJ,MATMPIAIJ);
109:   MatRegister(MATMPIAIJ,         MatCreate_MPIAIJ);
110:   MatRegister(MATSEQAIJ,         MatCreate_SeqAIJ);

112:   MatRegisterRootName(MATAIJPERM,MATSEQAIJPERM,MATMPIAIJPERM);
113:   MatRegister(MATMPIAIJPERM,     MatCreate_MPIAIJPERM);
114:   MatRegister(MATSEQAIJPERM,     MatCreate_SeqAIJPERM);

116:   MatRegisterRootName(MATAIJSELL,MATSEQAIJSELL,MATMPIAIJSELL);
117:   MatRegister(MATMPIAIJSELL,     MatCreate_MPIAIJSELL);
118:   MatRegister(MATSEQAIJSELL,     MatCreate_SeqAIJSELL);

120: #if defined(PETSC_HAVE_MKL_SPARSE)
121:   MatRegisterRootName(MATAIJMKL, MATSEQAIJMKL,MATMPIAIJMKL);
122:   MatRegister(MATMPIAIJMKL,      MatCreate_MPIAIJMKL);
123:   MatRegister(MATSEQAIJMKL,      MatCreate_SeqAIJMKL);
124: #endif

126: #if defined(PETSC_HAVE_MKL_SPARSE_OPTIMIZE)
127:   MatRegisterRootName(MATBAIJMKL,MATSEQBAIJMKL,MATMPIBAIJMKL);
128:   MatRegister(MATMPIBAIJMKL,      MatCreate_MPIBAIJMKL);
129:   MatRegister(MATSEQBAIJMKL,      MatCreate_SeqBAIJMKL);
130: #endif

132:   MatRegisterRootName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
133:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
134:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

136:   MatRegisterRootName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
137:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
138:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

140:   MatRegisterRootName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
141:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
142:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

144:   MatRegisterRootName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
145:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
146:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);
147: #if defined(PETSC_HAVE_CUDA)
148:   MatRegister(MATSEQDENSECUDA,   MatCreate_SeqDenseCUDA);
149: #endif

151:   MatRegister(MATMPIADJ,         MatCreate_MPIAdj);
152:   MatRegister(MATSCATTER,        MatCreate_Scatter);
153:   MatRegister(MATBLOCKMAT,       MatCreate_BlockMat);
154:   MatRegister(MATNEST,           MatCreate_Nest);

156:   MatRegisterRootName(MATSELL,MATSEQSELL,MATMPISELL);
157:   MatRegister(MATMPISELL,         MatCreate_MPISELL);
158:   MatRegister(MATSEQSELL,         MatCreate_SeqSELL);

160: #if defined(PETSC_HAVE_CUDA)
161:   MatRegisterRootName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
162:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
163:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
164: #endif

166: #if defined(PETSC_HAVE_VIENNACL)
167:   MatRegisterRootName(MATAIJVIENNACL,MATSEQAIJVIENNACL,MATMPIAIJVIENNACL);
168:   MatRegister(MATSEQAIJVIENNACL, MatCreate_SeqAIJViennaCL);
169:   MatRegister(MATMPIAIJVIENNACL, MatCreate_MPIAIJViennaCL);
170: #endif

172: #if defined(PETSC_HAVE_FFTW)
173:   MatRegister(MATFFTW,           MatCreate_FFTW);
174: #endif
175: #if defined(PETSC_HAVE_ELEMENTAL)
176:   MatRegister(MATELEMENTAL,      MatCreate_Elemental);
177: #endif

179:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
180:   MatRegister(MATDUMMY,          MatCreate_Dummy);

182:   MatRegister(MATCONSTANTDIAGONAL,MatCreate_ConstantDiagonal);

184: #if defined(PETSC_HAVE_HYPRE)
185:   MatRegister(MATHYPRE,          MatCreate_HYPRE);
186: #endif
187:   return(0);
188: }