/[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 3641 by jfenwick, Fri Aug 26 07:47:27 2011 UTC revision 3642 by caltinay, Thu Oct 27 03:41:51 2011 UTC
# Line 14  Line 14 
14    
15  /**************************************************************/  /**************************************************************/
16    
17  /* Paso: Gauss-Seidel                */  /* Paso: Gauss-Seidel                                         */
18    
19  /**************************************************************/  /**************************************************************/
20    
21  /* Author: artak@uq.edu.au                                   */  /* Author: artak@uq.edu.au                                    */
22    
23  /**************************************************************/  /**************************************************************/
24    
# Line 32  Line 32 
32    
33  /**************************************************************/  /**************************************************************/
34    
35  /* free all memory used by Smoother                                */  /* free all memory used by Smoother                           */
36    
37  void Paso_Preconditioner_Smoother_free(Paso_Preconditioner_Smoother * in) {  void Paso_Preconditioner_Smoother_free(Paso_Preconditioner_Smoother * in) {
38       if (in!=NULL) {       if (in!=NULL) {
# Line 50  void Paso_Preconditioner_LocalSmoother_f Line 50  void Paso_Preconditioner_LocalSmoother_f
50  }  }
51  /**************************************************************/  /**************************************************************/
52    
53  /*   constructs the symmetric Gauss-Seidel preconditioner      /*   constructs the symmetric Gauss-Seidel preconditioner     */
54    
 */  
55  Paso_Preconditioner_Smoother* Paso_Preconditioner_Smoother_alloc(Paso_SystemMatrix * A_p, const bool_t jacobi, const bool_t is_local, const bool_t verbose)  Paso_Preconditioner_Smoother* Paso_Preconditioner_Smoother_alloc(Paso_SystemMatrix * A_p, const bool_t jacobi, const bool_t is_local, const bool_t verbose)
56  {  {
57        
# Line 103  Paso_Preconditioner_LocalSmoother* Paso_ Line 102  Paso_Preconditioner_LocalSmoother* Paso_
102    
103  /*  /*
104    
105  performs a few sweeps of the  from  performs a few sweeps of the form
106    
107  S (x_{k} -  x_{k-1}) = b - A x_{k-1}  S (x_{k} -  x_{k-1}) = b - A x_{k-1}
108    
109  where x_{0}=0 and S provides some approximatioon of A.  where x_{0}=0 and S provides some approximation of A.
   
 Under MPI S is build on using A_p->mainBlock only.  
 if Smoother is local the defect b - A x_{k-1} is calculated using A_p->mainBlock only.  
110    
111    Under MPI S is built using A_p->mainBlock only.
112    If Smoother is local the defect b - A x_{k-1} is calculated using A_p->mainBlock only.
113  */  */
114    
115  void Paso_Preconditioner_Smoother_solve(Paso_SystemMatrix* A_p, Paso_Preconditioner_Smoother * smoother, double * x, const double * b,  void Paso_Preconditioner_Smoother_solve(Paso_SystemMatrix* A_p, Paso_Preconditioner_Smoother * smoother, double * x, const double * b,
# Line 176  void Paso_Preconditioner_LocalSmoother_S Line 174  void Paso_Preconditioner_LocalSmoother_S
174     }     }
175  }  }
176    
177  /* inplace Gauss-Seidel sweep in seqential mode: */  /* inplace Gauss-Seidel sweep in sequential mode: */
178    
179  void Paso_Preconditioner_LocalSmoother_Sweep_sequential(Paso_SparseMatrix* A_p, Paso_Preconditioner_LocalSmoother * smoother, double * x)  void Paso_Preconditioner_LocalSmoother_Sweep_sequential(Paso_SparseMatrix* A_p, Paso_Preconditioner_LocalSmoother * smoother, double * x)
180  {  {
# Line 194  void Paso_Preconditioner_LocalSmoother_S Line 192  void Paso_Preconditioner_LocalSmoother_S
192        
193     const index_t* ptr_main = Paso_SparseMatrix_borrowMainDiagonalPointer(A_p);     const index_t* ptr_main = Paso_SparseMatrix_borrowMainDiagonalPointer(A_p);
194        
195     (void)pivot;         /* silence warning from var being unused by macros */     (void)pivot;     /* silence warning from var being unused by macros */
196     (void)block_len;         (void)block_len;    
197     /* forward substitution */     /* forward substitution */
198        

Legend:
Removed from v.3641  
changed lines
  Added in v.3642

  ViewVC Help
Powered by ViewVC 1.1.26