/[escript]/trunk/paso/profiling/Paso_tests.c
ViewVC logotype

Diff of /trunk/paso/profiling/Paso_tests.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2381 by artak, Tue Feb 17 04:25:08 2009 UTC revision 2382 by artak, Tue Apr 14 03:48:22 2009 UTC
# Line 39  void Paso_test_run(Paso_SystemMatrix* A, Line 39  void Paso_test_run(Paso_SystemMatrix* A,
39        
40   if(level==1) /* Solvers only*/   if(level==1) /* Solvers only*/
41      {      {
42          Paso_Options_setDefaults(&options);
43        options.method=PASO_PCG;        options.method=PASO_PCG;
44        options.verbose=TRUE;        options.verbose=TRUE;
45        options.preconditioner=PASO_JACOBI;        options.preconditioner=PASO_JACOBI;
# Line 46  void Paso_test_run(Paso_SystemMatrix* A, Line 47  void Paso_test_run(Paso_SystemMatrix* A,
47        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
48                
49        fprintf(stdout,"Test solver: BICGSTAB with JACOBI\n");        fprintf(stdout,"Test solver: BICGSTAB with JACOBI\n");
50          Paso_Options_setDefaults(&options);
51        A->solver=NULL;        A->solver=NULL;
52        options.method=PASO_BICGSTAB;        options.method=PASO_BICGSTAB;
53        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
54                
55        fprintf(stdout,"Test solver: GMRES with JACOBI\n");        fprintf(stdout,"Test solver: GMRES with JACOBI\n");
56          Paso_Options_setDefaults(&options);
57        A->solver=NULL;        A->solver=NULL;
58        options.method=PASO_GMRES;        options.method=PASO_GMRES;
59        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
60                
61        fprintf(stdout,"Test solver: PRES20 with JACOBI\n");        fprintf(stdout,"Test solver: PRES20 with JACOBI\n");
62          Paso_Options_setDefaults(&options);
63        A->solver=NULL;        A->solver=NULL;
64        options.method=PASO_PRES20;        options.method=PASO_PRES20;
65        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
66                
67        fprintf(stdout,"Test solver: MINRES with JACOBI\n");        fprintf(stdout,"Test solver: MINRES with JACOBI\n");
68          Paso_Options_setDefaults(&options);
69        A->solver=NULL;        A->solver=NULL;
70        options.method=PASO_MINRES;        options.method=PASO_MINRES;
71        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
72                
73        fprintf(stdout,"Test solver: TFQMR with JACOBI\n");        fprintf(stdout,"Test solver: TFQMR with JACOBI\n");
74          Paso_Options_setDefaults(&options);
75        A->solver=NULL;        A->solver=NULL;
76        options.method=PASO_TFQMR;        options.method=PASO_TFQMR;
77        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
# Line 73  void Paso_test_run(Paso_SystemMatrix* A, Line 79  void Paso_test_run(Paso_SystemMatrix* A,
79   else if (level==2) /* Preconditiones only with default solver*/   else if (level==2) /* Preconditiones only with default solver*/
80      {      {
81        Paso_Options_setDefaults(&options);        Paso_Options_setDefaults(&options);
82        options.method=PASO_DEFAULT;        options.method=PASO_PCG;
83        options.verbose=TRUE;        options.verbose=TRUE;
84        options.preconditioner=PASO_JACOBI;        options.preconditioner=PASO_JACOBI;
85        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with JACOBI\n");        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with JACOBI\n");
# Line 81  void Paso_test_run(Paso_SystemMatrix* A, Line 87  void Paso_test_run(Paso_SystemMatrix* A,
87                
88        Paso_Options_setDefaults(&options);        Paso_Options_setDefaults(&options);
89        A->solver=NULL;        A->solver=NULL;
90          options.method=PASO_PCG;
91        options.verbose=TRUE;        options.verbose=TRUE;
92        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with ILU\n");        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with ILU\n");
       options.method=PASO_DEFAULT;  
93        options.preconditioner=PASO_ILU0;        options.preconditioner=PASO_ILU0;
94        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
95                
96        Paso_Options_setDefaults(&options);        Paso_Options_setDefaults(&options);
97        A->solver=NULL;        A->solver=NULL;
98          options.method=PASO_PCG;
99        options.verbose=TRUE;        options.verbose=TRUE;
100        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with RILU\n");        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with RILU\n");
       options.method=PASO_DEFAULT;  
101        options.preconditioner=PASO_RILU;        options.preconditioner=PASO_RILU;
102        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
103    
104        Paso_Options_setDefaults(&options);        Paso_Options_setDefaults(&options);
105        A->solver=NULL;        A->solver=NULL;
106          options.method=PASO_PCG;
107        options.verbose=TRUE;        options.verbose=TRUE;
108        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with GS\n");        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with GS\n");
       options.method=PASO_DEFAULT;  
109        options.preconditioner=PASO_GS;        options.preconditioner=PASO_GS;
110        Paso_test_matrix(A,b,&options);        Paso_test_matrix(A,b,&options);
111    
112        Paso_Options_setDefaults(&options);        Paso_Options_setDefaults(&options);
113        A->solver=NULL;        A->solver=NULL;
114          options.method=PASO_PCG;
115        options.verbose=TRUE;        options.verbose=TRUE;
116        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with AMG\n");        fprintf(stdout,"Test preconditioner: PASO_DEFAULT with AMG\n");
       options.method=PASO_DEFAULT;  
117        options.preconditioner=PASO_AMG;        options.preconditioner=PASO_AMG;
118        Paso_test_matrix(A,b,&options);          Paso_test_matrix(A,b,&options);  
119                

Legend:
Removed from v.2381  
changed lines
  Added in v.2382

  ViewVC Help
Powered by ViewVC 1.1.26