/[ascend]/trunk/base/generic/integrator/ida.c
ViewVC logotype

Diff of /trunk/base/generic/integrator/ida.c

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

revision 1270 by johnpye, Sun Jan 28 04:03:01 2007 UTC revision 1271 by johnpye, Sun Feb 4 02:00:01 2007 UTC
# Line 936  int integrator_ida_fex(realtype tt, N_Ve Line 936  int integrator_ida_fex(realtype tt, N_Ve
936      CONSOLE_DEBUG("EVALUTE RESIDUALS...");      CONSOLE_DEBUG("EVALUTE RESIDUALS...");
937  #endif  #endif
938    
939        if(NV_LENGTH_S(rr)!=enginedata->nrels){
940            ERROR_REPORTER_HERE(ASC_PROG_ERR,"Invalid residuals nrels!=length(rr)");
941            return -1; /* unrecoverable */
942        }
943    
944      /* pass the values of everything back to the compiler */      /* pass the values of everything back to the compiler */
945      integrator_set_t(blsys, (double)tt);      integrator_set_t(blsys, (double)tt);
946      integrator_set_y(blsys, NV_DATA_S(yy));      integrator_set_y(blsys, NV_DATA_S(yy));
947      integrator_set_ydot(blsys, NV_DATA_S(yp));      integrator_set_ydot(blsys, NV_DATA_S(yp));
948    
949      if(NV_LENGTH_S(rr)!=enginedata->nrels){      /* perform bounds checking on all variables */
950          ERROR_REPORTER_HERE(ASC_PROG_ERR,"Invalid residuals nrels!=length(rr)");      if(slv_check_bounds(blsys->system, 0, -1)){
951          return -1; /* unrecoverable */          /* ERROR_REPORTER_HERE(ASC_PROG_WARNING,"Variable(s) out of bounds"); */
952            return 1;
953      }      }
954    
     /**  
         @TODO does this function (fex) do bounds checking already?  
     */  
   
955      /* evaluate each residual in the rellist */      /* evaluate each residual in the rellist */
956      is_error = 0;      is_error = 0;
957      relptr = enginedata->rellist;      relptr = enginedata->rellist;
# Line 1102  int integrator_ida_djex(long int Neq, re Line 1104  int integrator_ida_djex(long int Neq, re
1104      integrator_set_y(blsys, NV_DATA_S(yy));      integrator_set_y(blsys, NV_DATA_S(yy));
1105      integrator_set_ydot(blsys, NV_DATA_S(yp));      integrator_set_ydot(blsys, NV_DATA_S(yp));
1106    
1107        /* perform bounds checking on all variables */
1108        if(slv_check_bounds(blsys->system, 0, -1)){
1109            /* ERROR_REPORTER_HERE(ASC_PROG_WARNING,"Variable(s) out of bounds"); */
1110            return 1;
1111        }
1112    
1113  #ifdef DJEX_DEBUG  #ifdef DJEX_DEBUG
1114      varlist = slv_get_solvers_var_list(blsys->system);      varlist = slv_get_solvers_var_list(blsys->system);
1115    

Legend:
Removed from v.1270  
changed lines
  Added in v.1271

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22