/[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 3032 by gross, Wed May 5 00:14:45 2010 UTC revision 3033 by gross, Wed Jun 2 10:17:00 2010 UTC
# Line 114  double Paso_ReactiveSolver_getSafeTimeSt Line 114  double Paso_ReactiveSolver_getSafeTimeSt
114                    d_ii=fctp->reactive_matrix[i];                    d_ii=fctp->reactive_matrix[i];
115                    m_i=fctp->lumped_mass_matrix[i];                    m_i=fctp->lumped_mass_matrix[i];
116            if (m_i > 0) {            if (m_i > 0) {
117                if (d_ii>0) dt_max_loc=MIN(dt_max_loc, m_i/d_ii);                if ( d_ii>0 ) dt_max_loc=MIN(dt_max_loc, m_i/d_ii);
118            } else {            } else {
119                fail_loc=-1;                fail_loc=-1;
120            }            }
121                 }                 }
122                 #pragma omp critical                 #pragma omp critical
123                 {                 {
124                    dt_max=MIN(dt_max,dt_max_loc);                    dt_max=MIN(dt_max, dt_max_loc);
125            fail=MIN(fail, fail_loc);            fail=MIN(fail, fail_loc);
126                 }                 }
127          }          }
# Line 139  double Paso_ReactiveSolver_getSafeTimeSt Line 139  double Paso_ReactiveSolver_getSafeTimeSt
139         Paso_setError(VALUE_ERROR, "Paso_ReactiveSolver_getSafeTimeStepSize: negative mass term detected.");         Paso_setError(VALUE_ERROR, "Paso_ReactiveSolver_getSafeTimeStepSize: negative mass term detected.");
140         return -1;         return -1;
141      } else {      } else {
142          if (dt_max<LARGE_POSITIVE_FLOAT) dt_max*=0.5*EXP_LIM_MAX;          if (dt_max < LARGE_POSITIVE_FLOAT ) {
143                   dt_max*=0.5*EXP_LIM_MAX;
144                } else {
145                   dt_max=LARGE_POSITIVE_FLOAT;
146                }
147      }      }
148     }     }
149     return dt_max;     return dt_max;

Legend:
Removed from v.3032  
changed lines
  Added in v.3033

  ViewVC Help
Powered by ViewVC 1.1.26