/[escript]/branches/doubleplusgood/paso/src/TFQMR.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/paso/src/TFQMR.cpp

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

trunk/paso/src/TFQMR.c revision 4154 by jfenwick, Tue Jan 22 09:30:23 2013 UTC branches/doubleplusgood/paso/src/TFQMR.cpp revision 4275 by jfenwick, Tue Mar 5 09:32:52 2013 UTC
# Line 99  err_t Paso_Solver_TFQMR( Line 99  err_t Paso_Solver_TFQMR(
99  /*   ---------------------                                         */  /*   ---------------------                                         */
100  /*                                                                 */  /*                                                                 */
101  /*                                                                 */  /*                                                                 */
102    u1=TMPMEMALLOC(n,double);    u1=new double[n];
103    u2=TMPMEMALLOC(n,double);    u2=new double[n];
104    y1=TMPMEMALLOC(n,double);    y1=new double[n];
105    y2=TMPMEMALLOC(n,double);    y2=new double[n];
106    d=TMPMEMALLOC(n,double);    d=new double[n];
107    w=TMPMEMALLOC(n,double);    w=new double[n];
108    v=TMPMEMALLOC(n,double);    v=new double[n];
109    temp_vector=TMPMEMALLOC(n,double);    temp_vector=new double[n];
110    res=TMPMEMALLOC(n,double);    res=new double[n];
111    
112   if (u1 ==NULL || u2== NULL || y1 == NULL || y2== NULL || d==NULL || w==NULL || v==NULL ) {   if (u1 ==NULL || u2== NULL || y1 == NULL || y2== NULL || d==NULL || w==NULL || v==NULL ) {
113       status=SOLVER_MEMORY_ERROR;       status=SOLVER_MEMORY_ERROR;
# Line 245  err_t Paso_Solver_TFQMR( Line 245  err_t Paso_Solver_TFQMR(
245      /* end of iteration */      /* end of iteration */
246            
247      Performance_stopMonitor(pp,PERFORMANCE_SOLVER);      Performance_stopMonitor(pp,PERFORMANCE_SOLVER);
248      TMPMEMFREE(u1);      delete[] (u1);
249      TMPMEMFREE(u2);      delete[] (u2);
250      TMPMEMFREE(y1);      delete[] (y1);
251      TMPMEMFREE(y2);      delete[] (y2);
252      TMPMEMFREE(d);      delete[] (d);
253      TMPMEMFREE(w);      delete[] (w);
254      TMPMEMFREE(v);      delete[] (v);
255      TMPMEMFREE(temp_vector);      delete[] (temp_vector);
256      TMPMEMFREE(res);      delete[] (res);
257      *iter=num_iter;      *iter=num_iter;
258      *tolerance=norm_of_residual;      *tolerance=norm_of_residual;
259            

Legend:
Removed from v.4154  
changed lines
  Added in v.4275

  ViewVC Help
Powered by ViewVC 1.1.26