source: issm/trunk-jpl/src/m/classes/autodiff.js@ 19759

Last change on this file since 19759 was 19759, checked in by Eric.Larour, 9 years ago

CHG: finished implementing all classes and modules needed to parameterize
test101 in javascript.

File size: 1.7 KB
Line 
1//AUTODIFF class definition
2//
3// Usage:
4// autodiff=new autodiff();
5
6function autodiff (){
7 //methods
8 this.setdefaultparameters = function(){// {{{
9
10 this.obufsize = 524288;
11 this.lbufsize = 524288;
12 this.cbufsize = 524288;
13 this.tbufsize = 524288;
14 this.gcTriggerRatio=2.0;
15 this.gcTriggerMaxSize=65536;
16
17 }// }}}
18 this.disp= function(){// {{{
19
20 console.log(sprintf(' automatic differentiation parameters:'));
21 fielddisplay(this,'isautodiff','indicates if the automatic differentiation is activated');
22 fielddisplay(this,'dependents','list of dependent variables');
23 fielddisplay(this,'independents','list of independent variables');
24 fielddisplay(this,'driver',"ADOLC driver ('fos_forward' or 'fov_forward')");
25 fielddisplay(this,'obufsize','Number of operations per buffer (==OBUFSIZE in usrparms.h)');
26 fielddisplay(this,'lbufsize','Number of locations per buffer (==LBUFSIZE in usrparms.h)');
27 fielddisplay(this,'cbufsize','Number of values per buffer (==CBUFSIZE in usrparms.h)');
28 fielddisplay(this,'tbufsize','Number of taylors per buffer (<=TBUFSIZE in usrparms.h)');
29 fielddisplay(this,'gcTriggerRatio','free location block sorting/consolidation triggered if the ratio between allocated and used locations exceeds gcTriggerRatio');
30 fielddisplay(this,'gcTriggerMaxSize','free location block sorting/consolidation triggered if the allocated locations exceed gcTriggerMaxSize');
31
32 }// }}}
33 //properties
34 // {{{
35 this.isautodiff = false;
36 this.dependents = {};
37 this.independents = {};
38 this.driver = 'fos_forward';
39 this.obufsize = NaN;
40 this.lbufsize = NaN;
41 this.cbufsize = NaN;
42 this.tbufsize = NaN;
43 this.gcTriggerRatio = NaN;
44 this.gcTriggerMaxSize = NaN;
45
46 this.setdefaultparameters();
47 //}}}
48}
Note: See TracBrowser for help on using the repository browser.