xref: /petsc/src/mat/utils/gcreate.c (revision 7807a1fad4139fba6164672f0e8ae3a049325cc9)
1*7807a1faSBarry Smith 
2*7807a1faSBarry Smith #include "sys.h"
3*7807a1faSBarry Smith #include "options.h"
4*7807a1faSBarry Smith #include "sysio.h"
5*7807a1faSBarry Smith #include "mat.h"
6*7807a1faSBarry Smith #include "comm.h"
7*7807a1faSBarry Smith 
8*7807a1faSBarry Smith /*@C
9*7807a1faSBarry Smith       MatCreateInitialMatrix - Reads from command line to determine
10*7807a1faSBarry Smith            what type of matrix to create.
11*7807a1faSBarry Smith 
12*7807a1faSBarry Smith   Input Parameters:
13*7807a1faSBarry Smith .   m,n - matrix dimensions
14*7807a1faSBarry Smith 
15*7807a1faSBarry Smith   Output Parameter:
16*7807a1faSBarry Smith .   V - location to stash resulting matrix.
17*7807a1faSBarry Smith @*/
18*7807a1faSBarry Smith int MatCreateInitialMatrix(int m,int n,Mat *V)
19*7807a1faSBarry Smith {
20*7807a1faSBarry Smith   if (OptionsHasName(0,"-dense")) {
21*7807a1faSBarry Smith     fprintf(stdout,"Using BLAS+LAPACK sequential dense matrices\n");
22*7807a1faSBarry Smith     return MatCreateSequentialDense(m,n,V);
23*7807a1faSBarry Smith   }
24*7807a1faSBarry Smith   fprintf(stdout,"Using standard sequential AIJ vectors\n");
25*7807a1faSBarry Smith   return MatCreateSequentialAIJ(m,n,10,V);
26*7807a1faSBarry Smith }
27*7807a1faSBarry Smith 
28