Actual source code: matregis.c

      1: #define PETSCMAT_DLL

     3:  #include petscmat.h

      6: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MAIJ(Mat);
      7: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_IS(Mat);
      8: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIRowbs(Mat);
      9: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqAIJ(Mat);
     10: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIAIJ(Mat);
     11: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_AIJ(Mat);
     12: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqBAIJ(Mat);
     13: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIBAIJ(Mat);
     14: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_BAIJ(Mat);
     15: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqSBAIJ(Mat);
     16: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPISBAIJ(Mat);
     17: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SBAIJ(Mat);
     18: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqBDiag(Mat);
     19: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIBDiag(Mat);
     20: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_BDiag(Mat);
     21: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqDense(Mat);
     22: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIDense(Mat);
     23: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_Dense(Mat);
     24: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIAdj(Mat);
     25: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_Shell(Mat);
     26: #if defined(PETSC_HAVE_SPOOLES)
     27: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqAIJSpooles(Mat);
     28: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SeqSBAIJSpooles(Mat);
     29: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPIAIJSpooles(Mat);
     30: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_MPISBAIJSpooles(Mat);
     31: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_AIJSpooles(Mat);
     32: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SBAIJSpooles(Mat);
     33: #endif
     34: #if defined(PETSC_HAVE_SUPERLU)
     35: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SuperLU(Mat);
     36: #endif
     37: #if defined(PETSC_HAVE_SUPERLU_DIST)
     38: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SuperLU_DIST(Mat);
     39: #endif
     40: #if defined(PETSC_HAVE_UMFPACK)
     41: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_UMFPACK(Mat);
     42: #endif
     43: #if defined(PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX)
     44: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_Essl(Mat);
     45: #endif
     46: #if defined(PETSC_HAVE_LUSOL)
     47: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_LUSOL(Mat);
     48: #endif
     49: #if defined(PETSC_HAVE_MUMPS)
     50: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_AIJMUMPS(Mat);
     51: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_SBAIJMUMPS(Mat);
     52: #endif
     53: #if defined(PETSC_HAVE_DSCPACK)
     54: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_DSCPACK(Mat);
     55: #endif
     56: #if defined(PETSC_HAVE_MATLAB)
     57: EXTERN PetscErrorCode PETSCMAT_DLLEXPORT MatCreate_Matlab(Mat);
     58: #endif
     60:
     61: /*
     62:     This is used by MatSetType() to make sure that at least one
     63:     MatRegisterAll() is called. In general, if there is more than one
     64:     DLL, then MatRegisterAll() may be called several times.
     65: */
     66: EXTERN PetscTruth MatRegisterAllCalled;

     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:  MatRegisterDestroy()
     80: @*/
     81: PetscErrorCode PETSCMAT_DLLEXPORT MatRegisterAll(const char path[])
     82: {

     86:   MatRegisterAllCalled = PETSC_TRUE;

     88:   MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ",    MatCreate_MAIJ);
     89:   MatRegisterDynamic(MATSEQMAIJ, path,"MatCreate_MAIJ",    MatCreate_MAIJ);
     90:   MatRegisterDynamic(MATMAIJ,    path,"MatCreate_MAIJ",    MatCreate_MAIJ);

     92:   MatRegisterDynamic(MATIS,      path,"MatCreate_IS",      MatCreate_IS);
     93:   MatRegisterDynamic(MATSHELL,   path,"MatCreate_Shell",   MatCreate_Shell);
     94: #if defined(PETSC_HAVE_BLOCKSOLVE)
     95:   MatRegisterDynamic(MATMPIROWBS,path,"MatCreate_MPIRowbs",MatCreate_MPIRowbs);
     96: #endif
     97:   MatRegisterDynamic(MATMPIAIJ,  path,"MatCreate_MPIAIJ",  MatCreate_MPIAIJ);
     98:   MatRegisterDynamic(MATSEQAIJ,  path,"MatCreate_SeqAIJ",  MatCreate_SeqAIJ);
     99:   MatRegisterDynamic(MATAIJ,     path,"MatCreate_AIJ",     MatCreate_AIJ);

    101:   MatRegisterDynamic(MATMPIBAIJ,  path,"MatCreate_MPIBAIJ",  MatCreate_MPIBAIJ);
    102:   MatRegisterDynamic(MATSEQBAIJ,  path,"MatCreate_SeqBAIJ",  MatCreate_SeqBAIJ);
    103:   MatRegisterDynamic(MATBAIJ,     path,"MatCreate_BAIJ",     MatCreate_BAIJ);

    105:   MatRegisterDynamic(MATMPISBAIJ,  path,"MatCreate_MPISBAIJ",  MatCreate_MPISBAIJ);
    106:   MatRegisterDynamic(MATSEQSBAIJ,  path,"MatCreate_SeqSBAIJ",  MatCreate_SeqSBAIJ);
    107:   MatRegisterDynamic(MATSBAIJ,     path,"MatCreate_SBAIJ",     MatCreate_SBAIJ);
    108:   MatRegisterDynamic(MATMPIBDIAG,  path,"MatCreate_MPIBDiag",  MatCreate_MPIBDiag);
    109:   MatRegisterDynamic(MATSEQBDIAG,  path,"MatCreate_SeqBDiag",  MatCreate_SeqBDiag);
    110:   MatRegisterDynamic(MATBDIAG,     path,"MatCreate_BDiag",     MatCreate_BDiag);
    111:   MatRegisterDynamic(MATMPIDENSE,  path,"MatCreate_MPIDense",  MatCreate_MPIDense);
    112:   MatRegisterDynamic(MATSEQDENSE,  path,"MatCreate_SeqDense",  MatCreate_SeqDense);
    113:   MatRegisterDynamic(MATDENSE,     path,"MatCreate_Dense",     MatCreate_Dense);
    114:   MatRegisterDynamic(MATMPIADJ,    path,"MatCreate_MPIAdj",    MatCreate_MPIAdj);
    115: #if defined(PETSC_HAVE_SPOOLES)
    116:   MatRegisterDynamic(MATSEQAIJSPOOLES,  path,"MatCreate_SeqAIJSpooles",  MatCreate_SeqAIJSpooles);
    117:   MatRegisterDynamic(MATSEQSBAIJSPOOLES,path,"MatCreate_SeqSBAIJSpooles",MatCreate_SeqSBAIJSpooles);
    118:   MatRegisterDynamic(MATMPIAIJSPOOLES,  path,"MatCreate_MPIAIJSpooles",  MatCreate_MPIAIJSpooles);
    119:   MatRegisterDynamic(MATMPISBAIJSPOOLES,path,"MatCreate_MPISBAIJSpooles",MatCreate_MPISBAIJSpooles);
    120:   MatRegisterDynamic(MATAIJSPOOLES,  path,"MatCreate_AIJSpooles",MatCreate_AIJSpooles);
    121:   MatRegisterDynamic(MATSBAIJSPOOLES,path,"MatCreate_SBAIJSpooles",MatCreate_SBAIJSpooles);
    122: #endif
    123: #if defined(PETSC_HAVE_SUPERLU)
    124:   MatRegisterDynamic(MATSUPERLU,path,"MatCreate_SuperLU",MatCreate_SuperLU);
    125: #endif
    126: #if defined(PETSC_HAVE_SUPERLU_DIST)
    127:   MatRegisterDynamic(MATSUPERLU_DIST,path,"MatCreate_SuperLU_DIST",MatCreate_SuperLU_DIST);
    128: #endif
    129: #if defined(PETSC_HAVE_UMFPACK)
    130:   MatRegisterDynamic(MATUMFPACK,path,"MatCreate_UMFPACK",MatCreate_UMFPACK);
    131: #endif
    132: #if defined(PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX)
    133:   MatRegisterDynamic(MATESSL,path,"MatCreate_Essl",MatCreate_Essl);
    134: #endif
    135: #if defined(PETSC_HAVE_LUSOL)
    136:   MatRegisterDynamic(MATLUSOL,path,"MatCreate_LUSOL",MatCreate_LUSOL);
    137: #endif
    138: #if defined(PETSC_HAVE_MUMPS)
    139:   MatRegisterDynamic(MATAIJMUMPS,  path,"MatCreate_AIJMUMPS",MatCreate_AIJMUMPS);
    140:   MatRegisterDynamic(MATSBAIJMUMPS,path,"MatCreate_SBAIJMUMPS",MatCreate_SBAIJMUMPS);
    141: #endif
    142: #if defined(PETSC_HAVE_DSCPACK)
    143:   MatRegisterDynamic(MATDSCPACK,path,"MatCreate_DSCPACK",MatCreate_DSCPACK);
    144: #endif
    145: #if defined(PETSC_HAVE_MATLAB)
    146:   MatRegisterDynamic(MATMATLAB,path,"MatCreate_Matlab",MatCreate_Matlab);
    147: #endif
    148:   return(0);
    149: }