Actual source code: matregis.c

petsc-3.6.1 2015-08-06
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_CUSP
 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: /*
 61:     This is used by MatSetType() to make sure that at least one
 62:     MatRegisterAll() is called. In general, if there is more than one
 63:     DLL, then MatRegisterAll() may be called several times.
 64: */
 65: extern PetscBool MatRegisterAllCalled;

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

 72:   Not Collective

 74:   Level: advanced

 76: .keywords: KSP, register, all

 78: .seealso:  MatRegisterDestroy()
 79: @*/
 80: PetscErrorCode  MatRegisterAll(void)
 81: {

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

 88:   MatRegister(MATMFFD,           MatCreate_MFFD);

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

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

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

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

106:   MatRegisterBaseName(MATAIJCRL,MATSEQAIJCRL,MATMPIAIJCRL);
107:   MatRegister(MATSEQAIJCRL,      MatCreate_SeqAIJCRL);
108:   MatRegister(MATMPIAIJCRL,      MatCreate_MPIAIJCRL);

110:   MatRegisterBaseName(MATBAIJ,MATSEQBAIJ,MATMPIBAIJ);
111:   MatRegister(MATMPIBAIJ,        MatCreate_MPIBAIJ);
112:   MatRegister(MATSEQBAIJ,        MatCreate_SeqBAIJ);

114:   MatRegisterBaseName(MATSBAIJ,MATSEQSBAIJ,MATMPISBAIJ);
115:   MatRegister(MATMPISBAIJ,       MatCreate_MPISBAIJ);
116:   MatRegister(MATSEQSBAIJ,       MatCreate_SeqSBAIJ);

118:   MatRegisterBaseName(MATBSTRM,MATSEQBSTRM,MATMPIBSTRM);
119:   MatRegister(MATMPIBSTRM,       MatCreate_MPIBSTRM);
120:   MatRegister(MATSEQBSTRM,       MatCreate_SeqBSTRM);

122:   MatRegisterBaseName(MATSBSTRM,MATSEQSBSTRM,MATMPISBSTRM);
123:   MatRegister(MATMPISBSTRM,      MatCreate_MPISBSTRM);
124:   MatRegister(MATSEQSBSTRM,      MatCreate_SeqSBSTRM);

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


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

142: #if defined PETSC_HAVE_CUSP
143:   MatRegisterBaseName(MATAIJCUSPARSE,MATSEQAIJCUSPARSE,MATMPIAIJCUSPARSE);
144:   MatRegister(MATSEQAIJCUSPARSE, MatCreate_SeqAIJCUSPARSE);
145:   MatRegister(MATMPIAIJCUSPARSE, MatCreate_MPIAIJCUSPARSE);
146: #endif

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


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