/[ascend]/trunk/base/generic/packages/sensitivity.c
ViewVC logotype

Diff of /trunk/base/generic/packages/sensitivity.c

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

revision 533 by ben.allan, Mon Apr 17 03:18:06 2006 UTC revision 534 by johnpye, Tue Apr 25 13:25:04 2006 UTC
# Line 208  int do_solve_eval( struct Instance *i, Line 208  int do_solve_eval( struct Instance *i,
208    len = gl_length(arglist);    len = gl_length(arglist);
209    
210    /* Ignore unused params */    /* Ignore unused params */
211    (void)i;    (void)i;
212    
213    if (len!=2) {    if (len!=2) {
214      ERROR_REPORTER_HERE(ASC_USER_ERROR,      ERROR_REPORTER_HERE(ASC_USER_ERROR,
# Line 340  int do_finite_diff_eval( struct Instance Line 340  int do_finite_diff_eval( struct Instance
340    int result;    int result;
341    
342    /* Ignore unused params */    /* Ignore unused params */
343    (void)i;    (void)i;
344    
345    if (FiniteDiffCheckArgs(arglist))    if (FiniteDiffCheckArgs(arglist))
346      return 1;      return 1;
# Line 1167  int do_sensitivity_eval_all( struct Inst Line 1167  int do_sensitivity_eval_all( struct Inst
1167    return result;    return result;
1168  }  }
1169    
1170    
1171    int sensitivity_register(void){
1172    
1173      int result=0;
1174    
1175      char sensitivity_help[] =
1176        "This function does sensitivity analysis dy/dx. It requires 4 args:\n"
1177        "  1. name: name of a reference instance or SELF.\n"
1178        "  2. x: x, where x is an array of > solver_var.\n"
1179        "  3. y: where y is an array of > solver_var.\n"
1180        "  4. dy/dx: which dy_dx[1..n_y][1..n_x].";
1181    
1182      result = CreateUserFunctionMethod("do_solve",
1183                      do_solve_eval,
1184                      2,NULL); /* was 2,0,null */
1185      result += CreateUserFunctionMethod("do_finite_difference",
1186                       do_finite_diff_eval,
1187                       4,NULL); /* 4,0,null */
1188      result += CreateUserFunctionMethod("do_sensitivity",
1189                       do_sensitivity_eval,
1190                       4,sensitivity_help);
1191      result += CreateUserFunctionMethod("do_sensitivity_all",
1192                       do_sensitivity_eval_all,
1193                       4,"See do_sensitivity_eval for details");
1194    
1195      return result;
1196    }
1197    
1198  #undef DEBUG  #undef DEBUG

Legend:
Removed from v.533  
changed lines
  Added in v.534

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