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

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

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

revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3283 by gross, Mon Oct 18 22:39:28 2010 UTC
# Line 161  void Paso_Preconditioner_LocalSmoother_s Line 161  void Paso_Preconditioner_LocalSmoother_s
161        
162     while (nsweeps > 0 ) {     while (nsweeps > 0 ) {
163       Paso_Copy(n, b_new, b);       Paso_Copy(n, b_new, b);
164       Paso_SparseMatrix_MatrixVector_CSC_OFFSET0((-1.), A_p, x, 1., b_new); /* b_new = b - A*x */  
165         Paso_SparseMatrix_MatrixVector_CSR_OFFSET0((-1.), A_p, x, 1., b_new); /* b_new = b - A*x */
166       Paso_Preconditioner_LocalSmoother_Sweep(A_p,smoother,b_new);       Paso_Preconditioner_LocalSmoother_Sweep(A_p,smoother,b_new);
167       Paso_AXPY(n, x, 1., b_new);       Paso_AXPY(n, x, 1., b_new);
168       nsweeps--;       nsweeps--;
# Line 170  void Paso_Preconditioner_LocalSmoother_s Line 171  void Paso_Preconditioner_LocalSmoother_s
171    
172  void Paso_Preconditioner_LocalSmoother_Sweep(Paso_SparseMatrix* A, Paso_Preconditioner_LocalSmoother * smoother, double * x)  void Paso_Preconditioner_LocalSmoother_Sweep(Paso_SparseMatrix* A, Paso_Preconditioner_LocalSmoother * smoother, double * x)
173  {  {
    #ifdef _OPENMP  
174     const dim_t nt=omp_get_max_threads();     const dim_t nt=omp_get_max_threads();
    #else  
    const dim_t nt = 1;  
    #endif  
175     if (smoother->Jacobi) {     if (smoother->Jacobi) {
176        Paso_BlockOps_allMV(A->row_block_size,A->numRows,smoother->diag,smoother->pivot,x);        Paso_BlockOps_allMV(A->row_block_size,A->numRows,smoother->diag,smoother->pivot,x);
177     } else {     } else {
# Line 258  void Paso_Preconditioner_LocalSmoother_S Line 255  void Paso_Preconditioner_LocalSmoother_S
255             Paso_BlockOps_SMV_2(&x[2*i], &A_p->val[4*iptr_ik], &x[2*k]);             Paso_BlockOps_SMV_2(&x[2*i], &A_p->val[4*iptr_ik], &x[2*k]);
256          }          }
257          Paso_BlockOps_MV_2(&x[2*i], &diag[i*4], &x[2*i]);          Paso_BlockOps_MV_2(&x[2*i], &diag[i*4], &x[2*i]);
258            
259        }        }
260     } else if (n_block==3) {     } else if (n_block==3) {
261        for (i = n-2; i > -1; --i) {        for (i = n-2; i > -1; --i) {

Legend:
Removed from v.3259  
changed lines
  Added in v.3283

  ViewVC Help
Powered by ViewVC 1.1.26