/[escript]/trunk/paso/src/Solver.c
ViewVC logotype

Diff of /trunk/paso/src/Solver.c

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

revision 3119 by gross, Thu Apr 22 05:59:31 2010 UTC revision 3120 by gross, Mon Aug 30 10:48:00 2010 UTC
# Line 32  Line 32 
32  /*  free space */  /*  free space */
33    
34  void Paso_Solver_free(Paso_SystemMatrix* A) {  void Paso_Solver_free(Paso_SystemMatrix* A) {
35     Paso_Preconditioner_free(A->solver);     Paso_SystemMatrix_freePreconditioner(A);
    A->solver=NULL;  
36  }  }
37  /*  call the iterative solver: */  /*  call the iterative solver: */
38    
# Line 86  void Paso_Solver(Paso_SystemMatrix* A,do Line 85  void Paso_Solver(Paso_SystemMatrix* A,do
85       if (method==PASO_NONLINEAR_GMRES) {       if (method==PASO_NONLINEAR_GMRES) {
86          Paso_Function* F=NULL;          Paso_Function* F=NULL;
87          F=Paso_Function_LinearSystem_alloc(A,b,options);          F=Paso_Function_LinearSystem_alloc(A,b,options);
88          Paso_Solver_solvePreconditioner(A,x,b);          Paso_SystemMatrix_solvePreconditioner(A,x,b);
89          errorCode=Paso_Solver_NewtonGMRES(F,x,options,pp);          errorCode=Paso_Solver_NewtonGMRES(F,x,options,pp);
90          if (errorCode!=NO_ERROR) {          if (errorCode!=NO_ERROR) {
91             Paso_setError(SYSTEM_ERROR,"Paso_Solver_NewtonGMRES: an error has occured.");             Paso_setError(SYSTEM_ERROR,"Paso_Solver_NewtonGMRES: an error has occured.");
# Line 168  void Paso_Solver(Paso_SystemMatrix* A,do Line 167  void Paso_Solver(Paso_SystemMatrix* A,do
167              /* construct the preconditioner */              /* construct the preconditioner */
168              blocktimer_precond = blocktimer_time();              blocktimer_precond = blocktimer_time();
169              Performance_startMonitor(pp,PERFORMANCE_PRECONDITIONER_INIT);              Performance_startMonitor(pp,PERFORMANCE_PRECONDITIONER_INIT);
170              Paso_Solver_setPreconditioner(A,options);          Paso_SystemMatrix_setPreconditioner(A,options);
171              Performance_stopMonitor(pp,PERFORMANCE_PRECONDITIONER_INIT);              Performance_stopMonitor(pp,PERFORMANCE_PRECONDITIONER_INIT);
172              blocktimer_increment("Paso_Solver_setPreconditioner()", blocktimer_precond);              blocktimer_increment("Paso_Solver_setPreconditioner()", blocktimer_precond);
173              options->set_up_time=Paso_timer()-time_iter;              options->set_up_time=Paso_timer()-time_iter;
174              if (! Paso_noError()) return;              if (! Paso_noError()) return;
175                /* get an initial guess by evaluating the preconditioner */                /* get an initial guess by evaluating the preconditioner */
176                Paso_Solver_solvePreconditioner(A,x,b);            Paso_SystemMatrix_solvePreconditioner(A,x,b);
177                /* start the iteration process :*/                /* start the iteration process :*/
178                r=TMPMEMALLOC(numEqua,double);                r=TMPMEMALLOC(numEqua,double);
179                x0=TMPMEMALLOC(numEqua,double);                x0=TMPMEMALLOC(numEqua,double);

Legend:
Removed from v.3119  
changed lines
  Added in v.3120

  ViewVC Help
Powered by ViewVC 1.1.26