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

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

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

revision 2246 by gross, Thu Jan 8 05:49:16 2009 UTC revision 2247 by gross, Thu Feb 5 07:39:20 2009 UTC
# Line 182  void Paso_SolverFCT_solve(Paso_FCTranspo Line 182  void Paso_SolverFCT_solve(Paso_FCTranspo
182               dt2=dt;               dt2=dt;
183          }          }
184          while( (t<dt*(1.-sqrt(EPSILON))) && Paso_noError()) {          while( (t<dt*(1.-sqrt(EPSILON))) && Paso_noError()) {
185              printf("substep step %d at t=%e (step size= %e)\n",i_substeps+1,t+dt2,dt2);              if (options->verbose) printf("substep step %d at t=%e (step size= %e)\n",i_substeps+1,t+dt2,dt2);
186              Paso_FCT_setUp(fctp,dt2,sourceN,sourceP,b_n,uTilde_n,uTilde_n_coupler,QN_n,QN_n_coupler,QP_n,QP_n_coupler,              Paso_FCT_setUp(fctp,dt2,sourceN,sourceP,b_n,uTilde_n,uTilde_n_coupler,QN_n,QN_n_coupler,QP_n,QP_n_coupler,
187                             options,&pp);                             options,&pp);
188              /* now the iteration starts */              /* now the iteration starts */
# Line 219  void Paso_SolverFCT_solve(Paso_FCTranspo Line 219  void Paso_SolverFCT_solve(Paso_FCTranspo
219                     }                     }
220                     norm_u_m=Paso_lsup(n,u, fctp->mpi_info);                     norm_u_m=Paso_lsup(n,u, fctp->mpi_info);
221                     norm_du_m=Paso_lsup(n,du_m, fctp->mpi_info)*omega;                     norm_du_m=Paso_lsup(n,du_m, fctp->mpi_info)*omega;
222                     printf("iteration step %d completed: norm increment= %e (tolerance = %e)\n",m+1, norm_du_m, rtol * norm_u_m + atol);                     if (options->verbose) printf("iteration step %d completed: norm increment= %e (tolerance = %e)\n",m+1, norm_du_m, rtol * norm_u_m + atol);
223    
224                     max_m_reached=(m>max_m);                     max_m_reached=(m>max_m);
225                     converged=(norm_du_m <= rtol * norm_u_m + atol);                     converged=(norm_du_m <= rtol * norm_u_m + atol);
# Line 241  void Paso_SolverFCT_solve(Paso_FCTranspo Line 241  void Paso_SolverFCT_solve(Paso_FCTranspo
241                      if (Failed > FAILURES_MAX) {                      if (Failed > FAILURES_MAX) {
242                         Paso_setError(VALUE_ERROR,"Paso_SolverFCT_solve: no convergence after time step reduction.");                         Paso_setError(VALUE_ERROR,"Paso_SolverFCT_solve: no convergence after time step reduction.");
243                      } else {                      } else {
244                         printf("no convergence in Paso_Solver_NewtonGMRES: Trying smaller time step size.");                         if (options->verbose) printf("no convergence in Paso_Solver_NewtonGMRES: Trying smaller time step size.");
245                         dt2=dt*0.5;                         dt2=dt*0.5;
246                         Failed++;                         Failed++;
247                      }                      }
# Line 311  double Paso_FCTransportProblem_getSafeTi Line 311  double Paso_FCTransportProblem_getSafeTi
311               dt_max_loc = dt_max;               dt_max_loc = dt_max;
312               MPI_Allreduce(&dt_max_loc, &dt_max, 1, MPI_DOUBLE, MPI_MIN, fctp->mpi_info->comm);               MPI_Allreduce(&dt_max_loc, &dt_max, 1, MPI_DOUBLE, MPI_MIN, fctp->mpi_info->comm);
313           #endif           #endif
 printf("dt_max = %e %e\n",dt_max, fctp->dt_factor);  
314           if (dt_max<LARGE_POSITIVE_FLOAT) dt_max*=fctp->dt_factor;           if (dt_max<LARGE_POSITIVE_FLOAT) dt_max*=fctp->dt_factor;
315           if (dt_max <= 0.)  {           if (dt_max <= 0.)  {
316              Paso_setError(TYPE_ERROR,"Paso_SolverFCT_solve: dt must be positive.");              Paso_setError(TYPE_ERROR,"Paso_SolverFCT_solve: dt must be positive.");
317           } else {           }
             if (dt_max<LARGE_POSITIVE_FLOAT)  
                printf("maximum time step size is %e (theta = %e).\n",dt_max,fctp->theta);    
          }  
318           fctp->dt_max=dt_max;           fctp->dt_max=dt_max;
319           fctp->valid_matrices=Paso_noError();           fctp->valid_matrices=Paso_noError();
320        }        }

Legend:
Removed from v.2246  
changed lines
  Added in v.2247

  ViewVC Help
Powered by ViewVC 1.1.26