Actual source code: matregis.c
petsc-3.7.1 2016-05-15
Report Typos and Errors

      2: #include <petsc/private/matimpl.h>  /*I "petscmat.h" I*/

      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_SeqBSTRM(Mat);
     18: PETSC_EXTERN PetscErrorCode MatCreate_MPIBSTRM(Mat);

     20: PETSC_EXTERN PetscErrorCode MatCreate_SeqSBSTRM(Mat);
     21: PETSC_EXTERN PetscErrorCode MatCreate_MPISBSTRM(Mat);

     23: PETSC_EXTERN PetscErrorCode MatCreate_SeqDense(Mat);
     24: PETSC_EXTERN PetscErrorCode MatCreate_MPIDense(Mat);

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

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

     33: PETSC_EXTERN PetscErrorCode MatCreate_SeqAIJCRL(Mat);
     34: PETSC_EXTERN PetscErrorCode MatCreate_MPIAIJCRL(Mat);

     36: PETSC_EXTERN PetscErrorCode MatCreate_Scatter(Mat);
     37: PETSC_EXTERN PetscErrorCode MatCreate_BlockMat(Mat);
     38: PETSC_EXTERN PetscErrorCode MatCreate_Nest(Mat);

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

     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);

     62: /*
     63:     This is used by MatSetType() to make sure that at least one
     64:     MatRegisterAll() is called. In general, if there is more than one
     65:     DLL, then MatRegisterAll() may be called several times.
     66: */
     67: extern PetscBool MatRegisterAllCalled;

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

     74:   Not Collective

     76:   Level: advanced

     78: .keywords: KSP, register, all

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

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

     90:   MatRegister(MATMFFD,           MatCreate_MFFD);

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

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

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

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

    108:   MatRegisterBaseName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
    109:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
    110:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

    112:   MatRegisterBaseName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
    113:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
    114:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

    116:   MatRegisterBaseName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
    117:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
    118:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

    120:   MatRegisterBaseName(MATBSTRM,MATSEQBSTRM,MATMPIBSTRM);
    121:   MatRegister(MATMPIBSTRM,       MatCreate_MPIBSTRM);
    122:   MatRegister(MATSEQBSTRM,       MatCreate_SeqBSTRM);

    124:   MatRegisterBaseName(MATSBSTRM,MATSEQSBSTRM,MATMPISBSTRM);
    125:   MatRegister(MATMPISBSTRM,      MatCreate_MPISBSTRM);
    126:   MatRegister(MATSEQSBSTRM,      MatCreate_SeqSBSTRM);

    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);

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

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

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

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

    164:   MatRegister(MATPREALLOCATOR,   MatCreate_Preallocator);
    165:   return(0);
    166: }