/[ascend]/trunk/base/generic/compiler/extfunc.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/extfunc.c

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

revision 707 by johnpye, Tue Jun 27 05:49:11 2006 UTC revision 708 by johnpye, Tue Jun 27 07:34:31 2006 UTC
# Line 134  double blackbox_evaluate_residual(struct Line 134  double blackbox_evaluate_residual(struct
134          inst = RelationVariable(r,i);          inst = RelationVariable(r,i);
135          tmp = WriteInstanceNameString(inst, NULL);          tmp = WriteInstanceNameString(inst, NULL);
136          if(i<=NumberInputArgs(efunc)){          if(i<=NumberInputArgs(efunc)){
137              CONSOLE_DEBUG("Input %d: '%s'", i, tmp);              CONSOLE_DEBUG("Input %d: '%s' (at %p)", i, tmp, inst);
138          }else{          }else{
139              CONSOLE_DEBUG("Output %d: '%s'", i-NumberInputArgs(efunc), tmp);              CONSOLE_DEBUG("Output %d: '%s'", i-NumberInputArgs(efunc), tmp);
140          }          }
141          ASC_FREE(tmp);          ASC_FREE(tmp);
142      }      }
143    
144        /* allocate space for the evaluation inputs and outputs */
145      in = ASC_NEW_ARRAY(double,NumberInputArgs(efunc));      in = ASC_NEW_ARRAY(double,NumberInputArgs(efunc));
146      out = ASC_NEW_ARRAY(double,NumberOutputArgs(efunc));      out = ASC_NEW_ARRAY_CLEAR(double,NumberOutputArgs(efunc));
147    
148        /* pull the current input values and place them in our 'in' array */
149      for(i=0; i < NumberInputArgs(efunc); ++i){      for(i=0; i < NumberInputArgs(efunc); ++i){
150          inst = RelationVariable(r,i+1);          inst = RelationVariable(r,i+1);
151          tmp = WriteInstanceNameString(inst,NULL);          tmp = WriteInstanceNameString(inst,NULL);
# Line 157  double blackbox_evaluate_residual(struct Line 159  double blackbox_evaluate_residual(struct
159          ASC_FREE(tmp);          ASC_FREE(tmp);
160      }      }
161    
162        /* call the evaluation function */
163    
164        /* push the current output values back into the instance hierarchy */
165    
166      ERROR_REPORTER_HERE(ASC_PROG_WARNING,"Blackbox not implemented, returning -1");      ERROR_REPORTER_HERE(ASC_PROG_WARNING,"Blackbox not implemented, returning -1");
167      return -1;      return -1;
168  }  }

Legend:
Removed from v.707  
changed lines
  Added in v.708

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