Actual source code: matregis.c
petsc-3.10.5 2019-03-28
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: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJSELL(Mat);
     28: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJSELL(Mat);

     30: #if defined PETSC_HAVE_MKL_SPARSE
     31: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJMKL(Mat);
     32: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJMKL(Mat);

     34: PETSC_EXTERN PetscErrorCode MatCreate_SeqBAIJMKL(Mat);
     35: PETSC_EXTERN PetscErrorCode MatCreate_MPIBAIJMKL(Mat);
     36: #endif

     38: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCRL(Mat);
     39: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCRL(Mat);

     41: PETSC_EXTERN PetscErrorCode MatCreate_Scatter(Mat);
     42: PETSC_EXTERN PetscErrorCode MatCreate_BlockMat(Mat);
     43: PETSC_EXTERN PetscErrorCode MatCreate_Nest(Mat);

     45: PETSC_EXTERN PetscErrorCode MatCreate_SeqSELL(Mat);
     46: PETSC_EXTERN PetscErrorCode MatCreate_MPISELL(Mat);

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

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

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

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

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

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

     73:   Not Collective

     75:   Level: advanced

     77: .keywords: KSP, register, all

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

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

     89:   MatRegister(MATMFFD,           MatCreate_MFFD);

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

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

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

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

    107:   MatRegisterBaseName(MATAIJSELL,MATSEQAIJSELL,MATMPIAIJSELL);
    108:   MatRegister(MATMPIAIJSELL,     MatCreate_MPIAIJSELL);
    109:   MatRegister(MATSEQAIJSELL,     MatCreate_SeqAIJSELL);

    111: #if defined PETSC_HAVE_MKL_SPARSE
    112:   MatRegisterBaseName(MATAIJMKL, MATSEQAIJMKL,MATMPIAIJMKL);
    113:   MatRegister(MATMPIAIJMKL,      MatCreate_MPIAIJMKL);
    114:   MatRegister(MATSEQAIJMKL,      MatCreate_SeqAIJMKL);

    116:   MatRegisterBaseName(MATBAIJMKL,MATSEQBAIJMKL,MATMPIBAIJMKL);
    117:   MatRegister(MATMPIBAIJMKL,      MatCreate_MPIBAIJMKL);
    118:   MatRegister(MATSEQBAIJMKL,      MatCreate_SeqBAIJMKL);
    119: #endif

    121:   MatRegisterBaseName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
    122:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
    123:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

    125:   MatRegisterBaseName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
    126:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
    127:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

    129:   MatRegisterBaseName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
    130:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
    131:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

    133:   MatRegisterBaseName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
    134:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
    135:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);

    137:   MatRegister(MATMPIADJ,         MatCreate_MPIAdj);
    138:   MatRegister(MATSCATTER,        MatCreate_Scatter);
    139:   MatRegister(MATBLOCKMAT,       MatCreate_BlockMat);
    140:   MatRegister(MATNEST,           MatCreate_Nest);

    142:   MatRegisterBaseName(MATSELL,MATSEQSELL,MATMPISELL);
    143:   MatRegister(MATMPISELL,         MatCreate_MPISELL);
    144:   MatRegister(MATSEQSELL,         MatCreate_SeqSELL);

    146: #if defined PETSC_HAVE_VECCUDA
    147:   MatRegisterBaseName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
    148:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
    149:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
    150: #endif

    152: #if defined PETSC_HAVE_VIENNACL
    153:   MatRegisterBaseName(MATAIJVIENNACL,MATSEQAIJVIENNACL,MATMPIAIJVIENNACL);
    154:   MatRegister(MATSEQAIJVIENNACL, MatCreate_SeqAIJViennaCL);
    155:   MatRegister(MATMPIAIJVIENNACL, MatCreate_MPIAIJViennaCL);
    156: #endif

    158: #if defined PETSC_HAVE_FFTW
    159:   MatRegister(MATFFTW,           MatCreate_FFTW);
    160: #endif
    161: #if defined PETSC_HAVE_ELEMENTAL
    162:   MatRegister(MATELEMENTAL,      MatCreate_Elemental);
    163: #endif

    165:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
    166:   MatRegister(MATDUMMY,          MatCreate_Dummy);

    168: #if defined PETSC_HAVE_HYPRE
    169:   MatRegister(MATHYPRE,          MatCreate_HYPRE);
    170: #endif
    171:   return(0);
    172: }