--- trunk/paso/src/Solvers/Solver_preconditioner.c 2006/01/10 04:10:39 425 +++ trunk/paso/src/Solvers/Solver_preconditioner.c 2006/03/23 04:27:32 631 @@ -1,5 +1,17 @@ /* $Id$ */ + +/* +******************************************************************************** +* Copyright © 2006 by ACcESS MNRF * +* * +* http://www.access.edu.au * +* Primary Business: Queensland, Australia * +* Licensed under the Open Software License version 3.0 * +* http://www.opensource.org/licenses/osl-3.0.php * +******************************************************************************** +*/ + /**************************************************************/ /* Paso: SystemMatrix: sets-up the preconditioner */ @@ -22,6 +34,7 @@ void Paso_Preconditioner_free(Paso_Solver_Preconditioner* in) { if (in!=NULL) { Paso_Solver_ILU_free(in->ilu); + Paso_Solver_RILU_free(in->rilu); Paso_Solver_Jacobi_free(in->jacobi); MEMFREE(in); } @@ -35,6 +48,7 @@ prec=MEMALLOC(1,Paso_Solver_Preconditioner); if (Paso_checkPtr(prec)) return; prec->type=UNKNOWN; + prec->rilu=NULL; prec->ilu=NULL; prec->jacobi=NULL; A->solver=prec; @@ -50,6 +64,11 @@ prec->ilu=Paso_Solver_getILU(A,options->verbose); prec->type=PASO_ILU0; break; + case PASO_RILU: + if (options->verbose) printf("RILU preconditioner is used.\n"); + prec->rilu=Paso_Solver_getRILU(A,options->verbose); + prec->type=PASO_RILU; + break; } if (! Paso_noError()) { Paso_Preconditioner_free(prec); @@ -72,6 +91,9 @@ case PASO_ILU0: Paso_Solver_solveILU(prec->ilu,x,b); break; + case PASO_RILU: + Paso_Solver_solveRILU(prec->rilu,x,b); + break; } }