Changeset 342


Ignore:
Timestamp:
Aug 16, 2012 12:43:41 PM (8 years ago)
Author:
utke
Message:

initialize for sanity so the 0 checks in forward/reverse make sense

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/externfcts.cpp

    r337 r342  
    3131
    3232ext_diff_fct *reg_ext_fct(ADOLC_ext_fct ext_fct) {
    33     return buffer.append(ext_fct);
     33
     34  // this call sets edf->function and edf->index:
     35  ext_diff_fct * edf=buffer.append(ext_fct);
     36
     37  // for sanity make sure everything else is properly nullified
     38  edf->zos_forward=0;
     39
     40  edf->fos_forward=0;
     41  edf->hos_forward=0;
     42  edf->fov_forward=0;
     43  edf->hov_forward=0;
     44
     45  edf->fos_reverse=0;
     46  edf->hos_reverse=0;
     47  edf->fov_reverse=0;
     48  edf->hov_reverse=0;
     49 
     50  edf->dp_x=0;
     51  edf->dp_X=0;
     52  edf->dpp_X=0;
     53  edf->dppp_X=0;
     54  edf->dp_y=0; 
     55  edf->dp_Y=0; 
     56  edf->dpp_Y=0;
     57  edf->dppp_Y=0;
     58
     59  edf->dp_U=0; 
     60  edf->dpp_U=0;
     61  edf->dp_Z=0; 
     62  edf->dpp_Z=0;
     63  edf->dppp_Z=0;
     64
     65  edf->spp_nz=0;
     66
     67  return edf;
    3468}
    3569
Note: See TracChangeset for help on using the changeset viewer.