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

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

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

revision 3792 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3793 by gross, Wed Feb 1 07:39:43 2012 UTC
# Line 35  Line 35 
35    
36    
37            
38  err_t  Paso_ReactiveSolver_solve(Paso_ReactiveSolver* support, Paso_TransportProblem* fctp, double* u, const double dt, const double* source, Paso_Options* options, Paso_Performance *pp)  err_t  Paso_ReactiveSolver_solve(Paso_ReactiveSolver* support, Paso_TransportProblem* fctp, double* u, double* u_old,  const double* source, Paso_Options* options, Paso_Performance *pp)
39  {  {
40       const double EXP_LIM_MIN =PASO_RT_EXP_LIM_MIN;       const double EXP_LIM_MIN =PASO_RT_EXP_LIM_MIN;
41       const double EXP_LIM_MAX =PASO_RT_EXP_LIM_MAX;       const double EXP_LIM_MAX =PASO_RT_EXP_LIM_MAX;
42         const double dt = support->dt;
43       index_t fail=0;       index_t fail=0;
44       register double d_ii, m_i, x_i, e_i, u_i, F_i;       register double d_ii, m_i, x_i, e_i, u_i, F_i;
45       dim_t i;       dim_t i;
# Line 54  err_t  Paso_ReactiveSolver_solve(Paso_Re Line 55  err_t  Paso_ReactiveSolver_solve(Paso_Re
55      } else  {      } else  {
56          F_i=source[i];          F_i=source[i];
57          e_i=exp(x_i);          e_i=exp(x_i);
58          u_i=e_i*u[i];          u_i=e_i*u_old[i];
59          if ( abs(x_i) > EXP_LIM_MIN) {          if ( abs(x_i) > EXP_LIM_MIN) {
60          u_i+=F_i/d_ii*(e_i-1.);          u_i+=F_i/d_ii*(e_i-1.);
61          } else {          } else {
# Line 148  double Paso_ReactiveSolver_getSafeTimeSt Line 149  double Paso_ReactiveSolver_getSafeTimeSt
149     }     }
150     return dt_max;     return dt_max;
151  }  }
152  void Paso_ReactiveSolver_initialize(const double dt, Paso_TransportProblem* fctp, Paso_Options* options)  void Paso_ReactiveSolver_initialize(const double dt, Paso_ReactiveSolver* rsolver, Paso_Options* options)
153  {  {
154        rsolver->dt=dt;
155  }  }

Legend:
Removed from v.3792  
changed lines
  Added in v.3793

  ViewVC Help
Powered by ViewVC 1.1.26