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

df1b2sumc.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
......
25 25
    {
26 26
      *zd++ = *yd++;
27 27
    }
28
    
28

  
29 29
    // WRITE WHATEVER ON TAPE
30 30
    if (!df1b2_gradlist::no_derivatives)
31 31
      f1b2gradlist->write_pass1_sum(x,&y,&z);
......
95 95
    read_pass2_3_sumc();
96 96
    break;
97 97
  default:
98
    cerr << "illegal value for df1b2variable::pass = " 
98
    cerr << "illegal value for df1b2variable::pass = "
99 99
         << df1b2variable::passnumber << endl;
100 100
    exit(1);
101 101
  }
......
112 112
  // the current entry+2 in bptr is the size of the record i.e
113 113
  // points to the next record
114 114
  int nvar=df1b2variable::nvar;
115
  test_smartlist& list=f1b2gradlist->list; 
115
  test_smartlist& list=f1b2gradlist->list;
116 116
  int num_bytes=f1b2gradlist->nlist.bptr->numbytes;
117 117
  list-=num_bytes;
118 118
  list.saveposition(); // save pointer to beginning of record;
......
127 127
  df1b2_header * pz=(df1b2_header *) bptr;
128 128

  
129 129
  list.restoreposition(); // save pointer to beginning of record;
130
 
130

  
131 131
  // ****************************************************************
132 132
  // turn this off if no third derivatives are calculated
133 133
  // if (!no_third_derivatives)
......
144 144
  {
145 145
    py->u_dot_bar[i]+=pz->u_dot_bar[i];
146 146
  }
147
  
147

  
148 148
  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
149 149
  for (i=0;i<nvar;i++)
150 150
  {
......
168 168
  // list 1
169 169
  //
170 170
  int nvar=df1b2variable::nvar;
171
  test_smartlist & list=f1b2gradlist->list; 
171
  test_smartlist & list=f1b2gradlist->list;
172 172

  
173 173
  int total_bytes=2*sizeof(df1b2_header);
174 174
// string identifier debug stuff
......
181 181
// end of string identifier debug stuff
182 182

  
183 183
  list.saveposition(); // save pointer to beginning of record;
184
  fixed_smartlist & nlist=f1b2gradlist->nlist; 
184
  fixed_smartlist & nlist=f1b2gradlist->nlist;
185 185
  // get record size
186 186
  int num_bytes=nlist.bptr->numbytes;
187 187
  // get info from tape1
......
192 192
  list.bptr+=sizeof(df1b2_header);
193 193
  df1b2_header * pz=(df1b2_header *) list.bptr;
194 194
  list.restoreposition(num_bytes); // save pointer to beginning of record;
195
  
195

  
196 196
  double * y_bar_tilde=py->get_u_bar_tilde();
197 197
  double * y_dot_bar_tilde=py->get_u_dot_bar_tilde();
198 198
  double * z_bar_tilde=pz->get_u_bar_tilde();
199 199
  double * z_dot_bar_tilde=pz->get_u_dot_bar_tilde();
200 200
  // Do second "reverse-reverse" pass calculations
201 201
  int i;
202
  
202

  
203 203
  for (i=0;i<nvar;i++)
204 204
  {
205 205
    z_bar_tilde[i]=0;
206 206
    z_dot_bar_tilde[i]=0;
207 207
  }
208
  
208

  
209 209
  // start with y and add x
210 210
  for (i=0;i<nvar;i++)
211 211
  {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff