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

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

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

trunk/paso/src/Solver_RILU.c revision 3119 by jfenwick, Thu Jan 28 02:03:15 2010 UTC trunk/paso/src/RILU.c revision 3120 by gross, Mon Aug 30 10:48:00 2010 UTC
# Line 23  Line 23 
23  /**************************************************************/  /**************************************************************/
24    
25  #include "Paso.h"  #include "Paso.h"
26  #include "Solver.h"  #include "Preconditioner.h"
27  #include "PasoUtil.h"  #include "PasoUtil.h"
28    #include "BlockOps.h"
29    
30  /**************************************************************/  /**************************************************************/
31    
# Line 322  void Paso_Solver_solveRILU(Paso_Solver_R Line 323  void Paso_Solver_solveRILU(Paso_Solver_R
323            
324       if (rilu->n_C==0) {       if (rilu->n_C==0) {
325          /* x=invA_FF*b  */          /* x=invA_FF*b  */
326          Paso_Solver_applyBlockDiagonalMatrix(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,x,b);          Paso_BlockOps_allMV(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,x,b);
327       } else {       } else {
328          /* b->[b_F,b_C]     */          /* b->[b_F,b_C]     */
329          if (n_block==1) {          if (n_block==1) {
# Line 339  void Paso_Solver_solveRILU(Paso_Solver_R Line 340  void Paso_Solver_solveRILU(Paso_Solver_R
340                   for (k=0;k<n_block;k++) rilu->b_C[rilu->n_block*i+k]=b[n_block*rilu->rows_in_C[i]+k];                   for (k=0;k<n_block;k++) rilu->b_C[rilu->n_block*i+k]=b[n_block*rilu->rows_in_C[i]+k];
341          }          }
342          /* x_F=invA_FF*b_F  */          /* x_F=invA_FF*b_F  */
343          Paso_Solver_applyBlockDiagonalMatrix(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,rilu->x_F,rilu->b_F);          Paso_BlockOps_allMV(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,rilu->x_F,rilu->b_F);
344          /* b_C=b_C-A_CF*x_F */          /* b_C=b_C-A_CF*x_F */
345          Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(-1.,rilu->A_CF,rilu->x_F,1.,rilu->b_C);          Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(-1.,rilu->A_CF,rilu->x_F,1.,rilu->b_C);
346          /* x_C=RILU(b_C)     */          /* x_C=RILU(b_C)     */
# Line 347  void Paso_Solver_solveRILU(Paso_Solver_R Line 348  void Paso_Solver_solveRILU(Paso_Solver_R
348          /* b_F=b_F-A_FC*x_C */          /* b_F=b_F-A_FC*x_C */
349          Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(-1.,rilu->A_FC,rilu->x_C,1.,rilu->b_F);          Paso_SparseMatrix_MatrixVector_CSR_OFFSET0(-1.,rilu->A_FC,rilu->x_C,1.,rilu->b_F);
350          /* x_F=invA_FF*b_F  */          /* x_F=invA_FF*b_F  */
351          Paso_Solver_applyBlockDiagonalMatrix(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,rilu->x_F,rilu->b_F);          Paso_BlockOps_allMV(n_block,rilu->n_F,rilu->inv_A_FF,rilu->A_FF_pivot,rilu->x_F,rilu->b_F);
352          /* x<-[x_F,x_C]     */          /* x<-[x_F,x_C]     */
353          if (n_block==1) {          if (n_block==1) {
354             #pragma omp parallel for private(i) schedule(static)             #pragma omp parallel for private(i) schedule(static)

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

  ViewVC Help
Powered by ViewVC 1.1.26