Actual source code: matregis.c

petsc-3.9.0 2018-04-07
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: PETSC_EXTERN PetscErrorCode MatCreate_SeqSELL(Mat);
 43: PETSC_EXTERN PetscErrorCode MatCreate_MPISELL(Mat);

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

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

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

 60: PETSC_EXTERN PetscErrorCode MatCreate_Preallocator(Mat);
 61: PETSC_EXTERN PetscErrorCode MatCreate_Dummy(Mat);

 63: #if defined PETSC_HAVE_HYPRE
 64: PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat);
 65: #endif

 67: /*@C
 68:   MatRegisterAll - Registers all of the matrix types in PETSc

 70:   Not Collective

 72:   Level: advanced

 74: .keywords: KSP, register, all

 76: .seealso:  MatRegister()
 77: @*/
 78: PetscErrorCode  MatRegisterAll(void)
 79: {

 83:   if (MatRegisterAllCalled) return(0);
 84:   MatRegisterAllCalled = PETSC_TRUE;

 86:   MatRegister(MATMFFD,           MatCreate_MFFD);

 88:   MatRegister(MATMPIMAIJ,        MatCreate_MAIJ);
 89:   MatRegister(MATSEQMAIJ,        MatCreate_MAIJ);
 90:   MatRegister(MATMAIJ,           MatCreate_MAIJ);

 92:   MatRegister(MATIS,             MatCreate_IS);
 93:   MatRegister(MATSHELL,          MatCreate_Shell);
 94:   MatRegister(MATCOMPOSITE,      MatCreate_Composite);

 96:   MatRegisterBaseName(MATAIJ,MATSEQAIJ,MATMPIAIJ);
 97:   MatRegister(MATMPIAIJ,         MatCreate_MPIAIJ);
 98:   MatRegister(MATSEQAIJ,         MatCreate_SeqAIJ);

100:   MatRegisterBaseName(MATAIJPERM,MATSEQAIJPERM,MATMPIAIJPERM);
101:   MatRegister(MATMPIAIJPERM,     MatCreate_MPIAIJPERM);
102:   MatRegister(MATSEQAIJPERM,     MatCreate_SeqAIJPERM);

104: #if defined PETSC_HAVE_MKL_SPARSE
105:   MatRegisterBaseName(MATAIJMKL, MATSEQAIJMKL,MATMPIAIJMKL);
106:   MatRegister(MATMPIAIJMKL,      MatCreate_MPIAIJMKL);
107:   MatRegister(MATSEQAIJMKL,      MatCreate_SeqAIJMKL);

109:   MatRegisterBaseName(MATBAIJMKL,MATSEQBAIJMKL,MATMPIBAIJMKL);
110:   MatRegister(MATMPIBAIJMKL,      MatCreate_MPIBAIJMKL);
111:   MatRegister(MATSEQBAIJMKL,      MatCreate_SeqBAIJMKL);
112: #endif

114:   MatRegisterBaseName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
115:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
116:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

118:   MatRegisterBaseName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
119:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
120:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

122:   MatRegisterBaseName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
123:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
124:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

126:   MatRegisterBaseName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
127:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
128:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);

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

135:   MatRegisterBaseName(MATSELL,MATSEQSELL,MATMPISELL);
136:   MatRegister(MATMPISELL,         MatCreate_MPISELL);
137:   MatRegister(MATSEQSELL,         MatCreate_SeqSELL);

139: #if defined PETSC_HAVE_VECCUDA
140:   MatRegisterBaseName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
141:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
142:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
143: #endif

145: #if defined PETSC_HAVE_VIENNACL
146:   MatRegisterBaseName(MATAIJVIENNACL,MATSEQAIJVIENNACL,MATMPIAIJVIENNACL);
147:   MatRegister(MATSEQAIJVIENNACL, MatCreate_SeqAIJViennaCL);
148:   MatRegister(MATMPIAIJVIENNACL, MatCreate_MPIAIJViennaCL);
149: #endif

151: #if defined PETSC_HAVE_FFTW
152:   MatRegister(MATFFTW,           MatCreate_FFTW);
153: #endif
154: #if defined PETSC_HAVE_ELEMENTAL
155:   MatRegister(MATELEMENTAL,      MatCreate_Elemental);
156: #endif

158:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
159:   MatRegister(MATDUMMY,          MatCreate_Dummy);

161: #if defined PETSC_HAVE_HYPRE
162:   MatRegister(MATHYPRE,          MatCreate_HYPRE);
163: #endif
164:   return(0);
165: }