Actual source code: matregis.c
petsc-3.15.0 2021-03-30
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: PETSC_EXTERN PetscErrorCode MatCreate_MPIDense(Mat);
     20: #if defined(PETSC_HAVE_CUDA)
     21: PETSC_EXTERN PetscErrorCode MatCreate_SeqDenseCUDA(Mat);
     22: PETSC_EXTERN PetscErrorCode MatCreate_MPIDenseCUDA(Mat);
     23: #endif

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

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

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

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

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

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

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

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

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

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

     65: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
     66: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJKokkos(Mat);
     67: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJKokkos(Mat);
     68: #endif

     70: #if defined(PETSC_HAVE_FFTW)
     71: PETSC_EXTERN PetscErrorCode MatCreate_FFTW(Mat);
     72: #endif
     73: #if defined(PETSC_HAVE_ELEMENTAL)
     74: PETSC_EXTERN PetscErrorCode MatCreate_Elemental(Mat);
     75: #endif
     76: #if defined(PETSC_HAVE_SCALAPACK)
     77: PETSC_EXTERN PetscErrorCode MatCreate_ScaLAPACK(Mat);
     78: #endif

     80: PETSC_EXTERN PetscErrorCode MatCreate_Preallocator(Mat);
     81: PETSC_EXTERN PetscErrorCode MatCreate_Dummy(Mat);

     83: #if defined(PETSC_HAVE_HYPRE)
     84: PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat);
     85: #endif

     87: PETSC_EXTERN PetscErrorCode MatCreate_ConstantDiagonal(Mat);

     89: #if defined(PETSC_HAVE_HARA)
     90: PETSC_EXTERN PetscErrorCode MatCreate_HARA(Mat);
     91: #endif

     93: /*@C
     94:   MatRegisterAll - Registers all of the matrix types in PETSc

     96:   Not Collective

     98:   Level: advanced

    100: .seealso:  MatRegister()
    101: @*/
    102: PetscErrorCode  MatRegisterAll(void)
    103: {

    107:   if (MatRegisterAllCalled) return(0);
    108:   MatRegisterAllCalled = PETSC_TRUE;

    110:   MatRegister(MATMFFD,           MatCreate_MFFD);

    112:   MatRegister(MATMPIMAIJ,        MatCreate_MAIJ);
    113:   MatRegister(MATSEQMAIJ,        MatCreate_MAIJ);
    114:   MatRegister(MATMAIJ,           MatCreate_MAIJ);

    116:   MatRegister(MATMPIKAIJ,        MatCreate_KAIJ);
    117:   MatRegister(MATSEQKAIJ,        MatCreate_KAIJ);
    118:   MatRegister(MATKAIJ,           MatCreate_KAIJ);

    120:   MatRegister(MATIS,             MatCreate_IS);
    121:   MatRegister(MATSHELL,          MatCreate_Shell);
    122:   MatRegister(MATCOMPOSITE,      MatCreate_Composite);

    124:   MatRegisterRootName(MATAIJ,MATSEQAIJ,MATMPIAIJ);
    125:   MatRegister(MATMPIAIJ,         MatCreate_MPIAIJ);
    126:   MatRegister(MATSEQAIJ,         MatCreate_SeqAIJ);

    128:   MatRegisterRootName(MATAIJPERM,MATSEQAIJPERM,MATMPIAIJPERM);
    129:   MatRegister(MATMPIAIJPERM,     MatCreate_MPIAIJPERM);
    130:   MatRegister(MATSEQAIJPERM,     MatCreate_SeqAIJPERM);

    132:   MatRegisterRootName(MATAIJSELL,MATSEQAIJSELL,MATMPIAIJSELL);
    133:   MatRegister(MATMPIAIJSELL,     MatCreate_MPIAIJSELL);
    134:   MatRegister(MATSEQAIJSELL,     MatCreate_SeqAIJSELL);

    136: #if defined(PETSC_HAVE_MKL_SPARSE)
    137:   MatRegisterRootName(MATAIJMKL, MATSEQAIJMKL,MATMPIAIJMKL);
    138:   MatRegister(MATMPIAIJMKL,      MatCreate_MPIAIJMKL);
    139:   MatRegister(MATSEQAIJMKL,      MatCreate_SeqAIJMKL);
    140: #endif

    142: #if defined(PETSC_HAVE_MKL_SPARSE_OPTIMIZE)
    143:   MatRegisterRootName(MATBAIJMKL,MATSEQBAIJMKL,MATMPIBAIJMKL);
    144:   MatRegister(MATMPIBAIJMKL,      MatCreate_MPIBAIJMKL);
    145:   MatRegister(MATSEQBAIJMKL,      MatCreate_SeqBAIJMKL);
    146: #endif

    148:   MatRegisterRootName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
    149:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
    150:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

    152:   MatRegisterRootName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
    153:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
    154:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

    156:   MatRegisterRootName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
    157:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
    158:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

    160:   MatRegisterRootName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
    161:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
    162:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);
    163: #if defined(PETSC_HAVE_CUDA)
    164:   MatRegisterRootName(MATDENSECUDA,MATSEQDENSECUDA,MATMPIDENSECUDA);
    165:   MatRegister(MATSEQDENSECUDA,   MatCreate_SeqDenseCUDA);
    166:   MatRegister(MATMPIDENSECUDA,   MatCreate_MPIDenseCUDA);
    167: #endif

    169:   MatRegister(MATMPIADJ,         MatCreate_MPIAdj);
    170:   MatRegister(MATSCATTER,        MatCreate_Scatter);
    171:   MatRegister(MATBLOCKMAT,       MatCreate_BlockMat);
    172:   MatRegister(MATNEST,           MatCreate_Nest);

    174:   MatRegisterRootName(MATSELL,MATSEQSELL,MATMPISELL);
    175:   MatRegister(MATMPISELL,         MatCreate_MPISELL);
    176:   MatRegister(MATSEQSELL,         MatCreate_SeqSELL);

    178: #if defined(PETSC_HAVE_CUDA)
    179:   MatRegisterRootName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
    180:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
    181:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
    182: #endif

    184: #if defined(PETSC_HAVE_VIENNACL)
    185:   MatRegisterRootName(MATAIJVIENNACL,MATSEQAIJVIENNACL,MATMPIAIJVIENNACL);
    186:   MatRegister(MATSEQAIJVIENNACL, MatCreate_SeqAIJViennaCL);
    187:   MatRegister(MATMPIAIJVIENNACL, MatCreate_MPIAIJViennaCL);
    188: #endif

    190: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
    191:   MatRegisterRootName(MATAIJKOKKOS,MATSEQAIJKOKKOS,MATMPIAIJKOKKOS);
    192:   MatRegister(MATSEQAIJKOKKOS,   MatCreate_SeqAIJKokkos);
    193:   MatRegister(MATMPIAIJKOKKOS,   MatCreate_MPIAIJKokkos);
    194: #endif

    196: #if defined(PETSC_HAVE_FFTW)
    197:   MatRegister(MATFFTW,           MatCreate_FFTW);
    198: #endif
    199: #if defined(PETSC_HAVE_ELEMENTAL)
    200:   MatRegister(MATELEMENTAL,      MatCreate_Elemental);
    201: #endif
    202: #if defined(PETSC_HAVE_SCALAPACK)
    203:   MatRegister(MATSCALAPACK,      MatCreate_ScaLAPACK);
    204: #endif

    206:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
    207:   MatRegister(MATDUMMY,          MatCreate_Dummy);

    209:   MatRegister(MATCONSTANTDIAGONAL,MatCreate_ConstantDiagonal);

    211: #if defined(PETSC_HAVE_HYPRE)
    212:   MatRegister(MATHYPRE,          MatCreate_HYPRE);
    213: #endif

    215: #if defined(PETSC_HAVE_HARA)
    216:   MatRegister(MATHARA,           MatCreate_HARA);
    217: #endif
    218:   return(0);
    219: }