source: CIVL/examples/compare/provesa/tap_driver.c

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 719 bytes
Line 
1#include <stdio.h>
2#include "DIFFSIZES.inc"
3
4void o_fcn_bv(double *obj, double (*objb)[NBDirsMax], double x[6], double xb[6][NBDirsMax], int nbdirs);
5
6int g_fcn(double *obj, double g_obj[6], const double cx[6])
7{
8 double xb[6][NBDirsMax], objb[NBDirsMax];
9 int i, j;
10 int o_fcn = 0 ;
11 int nbdirs;
12 double x[6];
13 nbdirs = NBDirsMax;
14 for(i=0;i<6;i++) {
15 x[i] = cx[i];
16 }
17 for(i=0;i<NBDirsMax;i++) {
18 objb[i] = 1.0;
19 }
20 for(i=0;i<6;i++) {
21 for(j=0;j<NBDirsMax;j++) {
22 xb[i][j] = 0.0;
23 }
24 }
25
26 o_fcn_bv(obj, &objb, x, xb, nbdirs);
27
28 //SHK: Forced to add this line
29 *obj = 0.0;
30
31 for(i=0;i<6;i++) g_obj[i] = xb[i][0];
32 return o_fcn;
33}
Note: See TracBrowser for help on using the repository browser.