~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to paso/src/ILU.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
  double time0=0,time_fac=0;
56
56
  /* allocations: */  
57
57
  Paso_Solver_ILU* out=MEMALLOC(1,Paso_Solver_ILU);
58
 
  if (Paso_checkPtr(out)) return NULL;
 
58
  if (Esys_checkPtr(out)) return NULL;
59
59
  out->factors=MEMALLOC(A->len,double);
60
60
  
61
 
  if ( ! Paso_checkPtr(out->factors)  ) {
 
61
  if ( ! Esys_checkPtr(out->factors)  ) {
62
62
 
63
 
       time0=Paso_timer();
 
63
       time0=Esys_timer();
64
64
 
65
65
       #pragma omp parallel for schedule(static) private(i,iptr,k)
66
66
       for (i = 0; i < n; ++i) {
69
69
               }
70
70
       }        
71
71
       /* start factorization */
72
 
       for (color=0;color<num_colors && Paso_noError();++color) {
 
72
       for (color=0;color<num_colors && Esys_noError();++color) {
73
73
              if (n_block==1) {
74
74
                 #pragma omp parallel for schedule(static) private(i,color2,iptr_ik,k,iptr_kj,S11,j,iptr_ij,A11,iptr_main,D)
75
75
                 for (i = 0; i < n; ++i) {
109
109
                             }                               
110
110
                          }
111
111
                       } else {
112
 
                            Paso_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
 
112
                            Esys_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
113
113
                       }
114
114
                    }
115
115
                 }
178
178
                             }                               
179
179
                          }
180
180
                       } else {
181
 
                            Paso_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
 
181
                            Esys_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
182
182
                       }
183
183
                    }
184
184
                 }
289
289
                             }                               
290
290
                          }
291
291
                       } else {
292
 
                            Paso_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
 
292
                            Esys_setError(ZERO_DIVISION_ERROR, "Paso_Solver_getILU: non-regular main diagonal block.");
293
293
                       }
294
294
                    }
295
295
                 }
296
296
              } else {
297
 
                 Paso_setError(VALUE_ERROR, "Paso_Solver_getILU: block size greater than 3 is not supported.");
 
297
                 Esys_setError(VALUE_ERROR, "Paso_Solver_getILU: block size greater than 3 is not supported.");
298
298
              }       
299
299
              #pragma omp barrier
300
300
       }
301
 
       time_fac=Paso_timer()-time0;
 
301
       time_fac=Esys_timer()-time0;
302
302
  }
303
 
  if (Paso_noError()) {
 
303
  if (Esys_noError()) {
304
304
      if (verbose) printf("timing: ILU: coloring/elemination : %e sec\n",time_fac);
305
305
     return out;
306
306
  } else  {