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

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

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

revision 3641 by gross, Tue Dec 7 07:36:12 2010 UTC revision 3642 by caltinay, Thu Oct 27 03:41:51 2011 UTC
# Line 17  Line 17 
17    
18  /**************************************************************/  /**************************************************************/
19    
20  /* Copyrights by ACcESS Australia 2003/04 */  /* Copyrights by ACcESS Australia 2003/04                     */
21  /* Author: Lutz Gross, l.gross@uq.edu.au */  /* Author: Lutz Gross, l.gross@uq.edu.au                      */
22    
23  /**************************************************************/  /**************************************************************/
24    
# Line 27  Line 27 
27  #include "Solver.h"  #include "Solver.h"
28  #include "esysUtils/blocktimer.h"  #include "esysUtils/blocktimer.h"
29    
30  /***********************************************************************************/  /****************************************************************************/
31    
32  /*  free space */  /*  free space */
33    
# Line 62  void Paso_Solver(Paso_SystemMatrix* A,do Line 62  void Paso_Solver(Paso_SystemMatrix* A,do
62         Esys_setError(VALUE_ERROR,"Paso_Solver: Tolerance is too small.");         Esys_setError(VALUE_ERROR,"Paso_Solver: Tolerance is too small.");
63       }       }
64       if (tolerance >1.) {       if (tolerance >1.) {
65         Esys_setError(VALUE_ERROR,"Paso_Solver: Tolerance mut be less than one.");         Esys_setError(VALUE_ERROR,"Paso_Solver: Tolerance must be less than one.");
66       }       }
67       method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric,A->mpi_info);       method=Paso_Options_getSolver(options->method,PASO_PASO,options->symmetric,A->mpi_info);
68       /* check matrix type */       /* check matrix type */
# Line 138  void Paso_Solver(Paso_SystemMatrix* A,do Line 138  void Paso_Solver(Paso_SystemMatrix* A,do
138    
139              #pragma omp parallel for private(i) schedule(static)              #pragma omp parallel for private(i) schedule(static)
140              for (i = 0; i < numSol; i++) x[i]=0.;              for (i = 0; i < numSol; i++) x[i]=0.;
141              if (options->verbose) printf("right hand side is identical zero.\n");              if (options->verbose) printf("right hand side is identical to zero.\n");
142    
143          } else {          } else {
144    
# Line 278  void Paso_Solver(Paso_SystemMatrix* A,do Line 278  void Paso_Solver(Paso_SystemMatrix* A,do
278                          if (errorCode==SOLVER_NO_ERROR) {                          if (errorCode==SOLVER_NO_ERROR) {
279                             finalizeIteration = FALSE;                             finalizeIteration = FALSE;
280                          } else if (errorCode==SOLVER_MAXITER_REACHED) {                          } else if (errorCode==SOLVER_MAXITER_REACHED) {
281                             Esys_setError(DIVERGED,"Paso_Solver: maximum number of iteration step reached.\nReturned solution does not fulfil stopping criterion.");                             Esys_setError(DIVERGED,"Paso_Solver: maximum number of iteration steps reached.\nReturned solution does not fulfill stopping criterion.");
282                             if (options->verbose) printf("Paso_Solver: Maximum number of iterations reached.!\n");                             if (options->verbose) printf("Paso_Solver: Maximum number of iterations reached.\n");
283                          } else if (errorCode == SOLVER_INPUT_ERROR ) {                          } else if (errorCode == SOLVER_INPUT_ERROR ) {
284                             Esys_setError(SYSTEM_ERROR,"Paso_Solver: illegal dimension in iterative solver.");                             Esys_setError(SYSTEM_ERROR,"Paso_Solver: illegal dimension in iterative solver.");
285                             if (options->verbose) printf("Paso_Solver: Internal error!\n");                             if (options->verbose) printf("Paso_Solver: Internal error!\n");
# Line 295  void Paso_Solver(Paso_SystemMatrix* A,do Line 295  void Paso_Solver(Paso_SystemMatrix* A,do
295                                finalizeIteration = FALSE;                                finalizeIteration = FALSE;
296                             }                             }
297                          } else {                          } else {
298                 Esys_setError(SYSTEM_ERROR,"Paso_Solver:generic error in solver.");                 Esys_setError(SYSTEM_ERROR,"Paso_Solver: Generic error in solver.");
299                 if (options->verbose) printf("Paso_Solver: generic error in solver!\n");                 if (options->verbose) printf("Paso_Solver: Generic error in solver!\n");
300                          }                          }
301                        } else {                        } else {
302                           if (options->verbose) printf(". convergence! \n");                           if (options->verbose) printf(" convergence!\n");
303                           options->converged=TRUE;                           options->converged=TRUE;
304                        }                        }
305                     }                     }

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

  ViewVC Help
Powered by ViewVC 1.1.26