xref: /petsc/src/mat/utils/gcreate.c (revision 11d228e413480561a5d195436da3b7496d0f4185)
17807a1faSBarry Smith 
27807a1faSBarry Smith #include "sys.h"
37807a1faSBarry Smith #include "options.h"
47807a1faSBarry Smith #include "sysio.h"
57807a1faSBarry Smith #include "mat.h"
67807a1faSBarry Smith #include "comm.h"
77807a1faSBarry Smith 
87807a1faSBarry Smith /*@C
97807a1faSBarry Smith       MatCreateInitialMatrix - Reads from command line to determine
107807a1faSBarry Smith            what type of matrix to create.
117807a1faSBarry Smith 
127807a1faSBarry Smith   Input Parameters:
137807a1faSBarry Smith .   m,n - matrix dimensions
147807a1faSBarry Smith 
157807a1faSBarry Smith   Output Parameter:
167807a1faSBarry Smith .   V - location to stash resulting matrix.
177807a1faSBarry Smith @*/
187807a1faSBarry Smith int MatCreateInitialMatrix(int m,int n,Mat *V)
197807a1faSBarry Smith {
207807a1faSBarry Smith   if (OptionsHasName(0,"-dense")) {
217807a1faSBarry Smith     fprintf(stdout,"Using BLAS+LAPACK sequential dense matrices\n");
227807a1faSBarry Smith     return MatCreateSequentialDense(m,n,V);
237807a1faSBarry Smith   }
24*11d228e4SBarry Smith   fprintf(stdout,"Using standard sequential AIJ matrices\n");
25*11d228e4SBarry Smith   return MatCreateSequentialAIJ(m,n,10,0,V);
267807a1faSBarry Smith }
277807a1faSBarry Smith 
28