Actual source code: matregis.c

petsc-3.5.0 2014-06-30
Report Typos and Errors
  2: #include <petscmat.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:   MatRegisterAllCalled = PETSC_TRUE;

 87:   MatRegister(MATMFFD,           MatCreate_MFFD);

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

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

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

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

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

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

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

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

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

125:   MatRegisterBaseName(MATDENSE,MATSEQDENSE,MATMPIDENSE);
126:   MatRegister(MATMPIDENSE,       MatCreate_MPIDense);
127:   MatRegister(MATSEQDENSE,       MatCreate_SeqDense);

129:   MatRegister(MATMPIADJ,         MatCreate_MPIAdj);
130:   MatRegister(MATSCATTER,        MatCreate_Scatter);
131:   MatRegister(MATBLOCKMAT,       MatCreate_BlockMat);
132:   MatRegister(MATNEST,           MatCreate_Nest);


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

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

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


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