/[ascend]/trunk/models/johnpye/datareader/datareader.c
ViewVC logotype

Diff of /trunk/models/johnpye/datareader/datareader.c

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

revision 1774 by jpye, Mon Apr 7 09:06:56 2008 UTC revision 1775 by jpye, Wed May 21 09:51:59 2008 UTC
# Line 41  Line 41 
41    
42  #include "dr.h"  #include "dr.h"
43    
44    #define DATAREADER_DEBUG 0
45    
46  /*------------------------------------------------------------------------------  /*------------------------------------------------------------------------------
47    GLOBALS    GLOBALS
48  */  */
# Line 209  int asc_datareader_calc(struct BBoxInter Line 211  int asc_datareader_calc(struct BBoxInter
211          return 1;          return 1;
212      }      }
213    
214    #if DATAREADER_DEBUG
215      for(i=0; i< ninputs; ++i){      for(i=0; i< ninputs; ++i){
216          CONSOLE_DEBUG("inputs[%d] = %f", i, inputs[i]);          CONSOLE_DEBUG("inputs[%d] = %f", i, inputs[i]);
217      }      }
218    #endif
219    
220      switch(slv_interp->task){      switch(slv_interp->task){
221          case bb_func_eval:          case bb_func_eval:
222    #if DATAREADER_DEBUG
223              CONSOLE_DEBUG("DATA READER EVALUATION");              CONSOLE_DEBUG("DATA READER EVALUATION");
224    #endif
225              if(datareader_func(d,inputs,outputs)){              if(datareader_func(d,inputs,outputs)){
226                  CONSOLE_DEBUG("Datareader evaluation error");                  CONSOLE_DEBUG("Datareader evaluation error");
227                  return 1;                  return 1;
228              }              }
229    #if DATAREADER_DEBUG
230              for(i=0; i< noutputs; ++i){              for(i=0; i< noutputs; ++i){
231                  CONSOLE_DEBUG("outputs[%d] = %f", i, outputs[i]);                  CONSOLE_DEBUG("outputs[%d] = %f", i, outputs[i]);
232              }              }
233    #endif
234              return 0; /* success */              return 0; /* success */
235          case bb_deriv_eval:          case bb_deriv_eval:
236    #if DATAREADER_DEBUG
237              CONSOLE_DEBUG("DATA READER DERIVATIVE");              CONSOLE_DEBUG("DATA READER DERIVATIVE");
238    #endif
239              if(datareader_deriv(d,inputs,outputs)){              if(datareader_deriv(d,inputs,outputs)){
240                  CONSOLE_DEBUG("Datareader derivative evaluation error");                  CONSOLE_DEBUG("Datareader derivative evaluation error");
241                  return 1;                  return 1;

Legend:
Removed from v.1774  
changed lines
  Added in v.1775

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