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

df1b2sum.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
......
27 27
    {
28 28
      *zd++ = *xd++ + *yd++;
29 29
    }
30
    
30

  
31 31
    // WRITE WHATEVER ON TAPE
32 32
    if (!df1b2_gradlist::no_derivatives)
33 33
      f1b2gradlist->write_pass1_sum(&x,&y,&z);
......
40 40
 * Description not yet available.
41 41
 * \param
42 42
 */
43
 int df1b2_gradlist::write_pass1_sum(const df1b2variable * _px, 
43
 int df1b2_gradlist::write_pass1_sum(const df1b2variable * _px,
44 44
   const df1b2variable * _py,df1b2variable * pz)
45 45
 {
46 46
   ADUNCONST(df1b2variable*,px)
......
99 99
    read_pass2_3_sum();
100 100
    break;
101 101
  default:
102
    cerr << "illegal value for df1b2variable::pass = " 
102
    cerr << "illegal value for df1b2variable::pass = "
103 103
         << df1b2variable::passnumber << endl;
104 104
    exit(1);
105 105
  }
......
116 116
  // the current entry+2 in bptr is the size of the record i.e
117 117
  // points to the next record
118 118
  int nvar=df1b2variable::nvar;
119
  test_smartlist& list=f1b2gradlist->list; 
119
  test_smartlist& list=f1b2gradlist->list;
120 120
  int num_bytes=f1b2gradlist->nlist.bptr->numbytes;
121 121
  list-=num_bytes;
122 122
  list.saveposition(); // save pointer to beginning of record;
......
133 133
  df1b2_header * pz=(df1b2_header *) bptr;
134 134

  
135 135
  list.restoreposition(); // save pointer to beginning of record;
136
 
136

  
137 137
  // ****************************************************************
138 138
  // turn this off if no third derivatives are calculated
139 139
  // if (!no_third_derivatives)
......
158 158
  {
159 159
    py->u_dot_bar[i]+=pz->u_dot_bar[i];
160 160
  }
161
  
161

  
162 162
  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
163 163
  for (i=0;i<nvar;i++)
164 164
  {
......
182 182
  // list 1
183 183
  //
184 184
  int nvar=df1b2variable::nvar;
185
  test_smartlist & list=f1b2gradlist->list; 
185
  test_smartlist & list=f1b2gradlist->list;
186 186

  
187 187
  int total_bytes=3*sizeof(df1b2_header);
188 188
// string identifier debug stuff
......
195 195
// end of string identifier debug stuff
196 196

  
197 197
  list.saveposition(); // save pointer to beginning of record;
198
  fixed_smartlist & nlist=f1b2gradlist->nlist; 
198
  fixed_smartlist & nlist=f1b2gradlist->nlist;
199 199
  // get record size
200 200
  int num_bytes=nlist.bptr->numbytes;
201 201
  // get info from tape1
......
208 208
  list.bptr+=sizeof(df1b2_header);
209 209
  df1b2_header * pz=(df1b2_header *) list.bptr;
210 210
  list.restoreposition(num_bytes); // save pointer to beginning of record;
211
  
211

  
212 212
  double * x_bar_tilde=px->get_u_bar_tilde();
213 213
  double * x_dot_bar_tilde=px->get_u_dot_bar_tilde();
214 214
  double * y_bar_tilde=py->get_u_bar_tilde();
......
217 217
  double * z_dot_bar_tilde=pz->get_u_dot_bar_tilde();
218 218
  // Do second "reverse-reverse" pass calculations
219 219
  int i;
220
  
220

  
221 221
  for (i=0;i<nvar;i++)
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff