Revision 1110 trunk/src/df1b2-separable/df1b2prd.cpp

df1b2prd.cpp (revision 1110)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
/**
8 8
 * \file
......
14 14
 * Description not yet available.
15 15
 * \param
16 16
 */
17
  df1b2variable operator * (const df1b2variable& _x,const df1b2variable& _y) 
17
  df1b2variable operator * (const df1b2variable& _x,const df1b2variable& _y)
18 18
  {
19 19
    ADUNCONST(df1b2variable,x)
20 20
    ADUNCONST(df1b2variable,y)
......
31 31
    {
32 32
      *zd++ = yu * *xd++ + xu * *yd++;
33 33
    }
34
    
34

  
35 35
    // WRITE WHATEVER ON TAPE
36 36
    if (!df1b2_gradlist::no_derivatives)
37 37
      f1b2gradlist->write_pass1_prod(&x,&y,&z);
38 38
    return z;
39 39
  }
40 40

  
41

  
42 41
void ad_read_pass2_prod(void);
43 42

  
44 43
/**
45 44
 * Description not yet available.
46 45
 * \param
47 46
 */
48
 int df1b2_gradlist::write_pass1_prod(const df1b2variable * _px, 
47
 int df1b2_gradlist::write_pass1_prod(const df1b2variable * _px,
49 48
   const df1b2variable * _py,df1b2variable * pz)
50 49
 {
51 50
   ADUNCONST(df1b2variable*,px)
......
113 112
    read_pass2_3_prod();
114 113
    break;
115 114
  default:
116
    cerr << "illegal value for df1b2variable::pass = " 
115
    cerr << "illegal value for df1b2variable::pass = "
117 116
         << df1b2variable::passnumber << endl;
118 117
    exit(1);
119 118
  }
......
129 128
  // and  forward for bptr2 and nbptr2
130 129
  // the current entry+2 in bptr is the size of the record i.e
131 130
  // points to the next record
132
  //char * bptr=f1b2gradlist->bptr; 
133
  //char * bptr2=f1b2gradlist2->bptr; 
131
  //char * bptr=f1b2gradlist->bptr;
132
  //char * bptr2=f1b2gradlist2->bptr;
134 133
  int nvar=df1b2variable::nvar;
135
  test_smartlist& list=f1b2gradlist->list; 
134
  test_smartlist& list=f1b2gradlist->list;
136 135
  //f1b2gradlist->nlist-=sizeof(int);
137 136
  int num_bytes=f1b2gradlist->nlist.bptr->numbytes;
138 137
  list-=num_bytes;
......
163 162
  double * ydot=(double*)bptr;
164 163

  
165 164
  list.restoreposition(); // save pointer to beginning of record;
166
 
165

  
167 166
  // ****************************************************************
168 167
  // turn this off if no third derivatives are calculated
169 168
  // if (!no_third_derivatives)
......
204 203
    //py->u_bar[i]+=(pf->df2)(xu,yu)*pz->u_bar[i];
205 204
    py->u_bar[i]+=xu*pz->u_bar[i];
206 205
  }
207
  
206

  
208 207
  for (i=0;i<nvar;i++)
209 208
  {
210 209
    //px->u_bar[i]+=(pf->d2f11)(xu,yu)*xdot[i]*pz->u_dot_bar[i];
211 210
    //px->u_bar[i]+=(pf->d2f12)(xu,yu)*ydot[i]*pz->u_dot_bar[i];
212 211
    px->u_bar[i]+=ydot[i]*pz->u_dot_bar[i];
213 212
  }
214
  
213

  
215 214
  for (i=0;i<nvar;i++)
216 215
  {
217 216
    //py->u_bar[i]+=(pf->d2f22)(xu,yu)*ydot[i]*pz->u_dot_bar[i];
......
252 251
  // list 1
253 252
  //
254 253
  int nvar=df1b2variable::nvar;
255
  test_smartlist & list=f1b2gradlist->list; 
254
  test_smartlist & list=f1b2gradlist->list;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff