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

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

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

revision 1818 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1819 by artak, Tue Sep 30 05:58:06 2008 UTC
# Line 36  void Paso_Preconditioner_free(Paso_Solve Line 36  void Paso_Preconditioner_free(Paso_Solve
36        Paso_Solver_ILU_free(in->ilu);        Paso_Solver_ILU_free(in->ilu);
37        Paso_Solver_RILU_free(in->rilu);        Paso_Solver_RILU_free(in->rilu);
38        Paso_Solver_Jacobi_free(in->jacobi);        Paso_Solver_Jacobi_free(in->jacobi);
39          Paso_Solver_GS_free(in->gs);
40        MEMFREE(in);        MEMFREE(in);
41      }      }
42  }  }
# Line 51  void Paso_Solver_setPreconditioner(Paso_ Line 52  void Paso_Solver_setPreconditioner(Paso_
52          prec->rilu=NULL;          prec->rilu=NULL;
53          prec->ilu=NULL;          prec->ilu=NULL;
54          prec->jacobi=NULL;          prec->jacobi=NULL;
55            prec->gs=NULL;
56          A->solver=prec;          A->solver=prec;
57          switch (options->preconditioner) {          switch (options->preconditioner) {
58             default:             default:
# Line 69  void Paso_Solver_setPreconditioner(Paso_ Line 71  void Paso_Solver_setPreconditioner(Paso_
71                prec->rilu=Paso_Solver_getRILU(A->mainBlock,options->verbose);                prec->rilu=Paso_Solver_getRILU(A->mainBlock,options->verbose);
72                prec->type=PASO_RILU;                prec->type=PASO_RILU;
73                break;                break;
74                case PASO_GS:
75                  if (options->verbose) printf("Gauss-Seidel preconditioner is used.\n");
76                  prec->gs=Paso_Solver_getGS(A->mainBlock,options->verbose);
77                  prec->type=PASO_GS;
78                  break;
79          }          }
80          if (! Paso_MPIInfo_noError(A->mpi_info ) ){          if (! Paso_MPIInfo_noError(A->mpi_info ) ){
81             Paso_Preconditioner_free(prec);             Paso_Preconditioner_free(prec);
# Line 93  void Paso_Solver_solvePreconditioner(Pas Line 100  void Paso_Solver_solvePreconditioner(Pas
100          case PASO_RILU:          case PASO_RILU:
101             Paso_Solver_solveRILU(prec->rilu,x,b);             Paso_Solver_solveRILU(prec->rilu,x,b);
102             break;             break;
103             case PASO_GS:
104               Paso_Solver_solveGS(prec->gs,x,b);
105               break;
106      }      }
107  }  }

Legend:
Removed from v.1818  
changed lines
  Added in v.1819

  ViewVC Help
Powered by ViewVC 1.1.26