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

df1b2min2.cpp (revision 1110)
2 2
 * $Id: df1b2min2.cpp 2011-07-27 add by weihai,created by Dave$
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 df1b2min2.cpp
9
 * this file mainly added for defining double_x - df1b2variable_y, which define in df1b2fun.h   
9
 * this file mainly added for defining double_x - df1b2variable_y, which define in df1b2fun.h
10 10
 */
11 11
#include <df1b2fun.h>
12 12

  
......
21 21
    {
22 22
      *zd++ = - *yd++;
23 23
    }
24
    
24

  
25 25
    // WRITE WHATEVER ON TAPE
26 26
    if (!df1b2_gradlist::no_derivatives)
27 27
      f1b2gradlist->write_pass1_minuscv(&y,&z);
......
68 68
void read_pass2_1_minuscv(void);
69 69
void read_pass2_2_minuscv(void);
70 70
void read_pass2_3_minuscv(void);
71
  
71

  
72 72
void ad_read_pass2_minuscv(void)
73 73
{
74 74
  switch(df1b2variable::passnumber)
......
83 83
    read_pass2_3_minuscv();
84 84
    break;
85 85
  default:
86
    cerr << "illegal value for df1b2variable::pass = " 
86
    cerr << "illegal value for df1b2variable::pass = "
87 87
         << df1b2variable::passnumber << endl;
88 88
    exit(1);
89 89
  }
......
96 96
  // the current entry+2 in bptr is the size of the record i.e
97 97
  // points to the next record
98 98
  int nvar=df1b2variable::nvar;
99
  test_smartlist& list=f1b2gradlist->list; 
99
  test_smartlist& list=f1b2gradlist->list;
100 100
  int num_bytes=f1b2gradlist->nlist.bptr->numbytes;
101 101
  list-=num_bytes;
102 102
  list.saveposition(); // save pointer to beginning of record;
......
111 111
  df1b2_header * pz=(df1b2_header *) bptr;
112 112

  
113 113
  list.restoreposition(); // save pointer to beginning of record;
114
 
114

  
115 115
  // ****************************************************************
116 116
  // turn this off if no third derivatives are calculated
117 117
  // if (!no_third_derivatives)
......
128 128
  {
129 129
    py->u_dot_bar[i]-=pz->u_dot_bar[i];
130 130
  }
131
  
131

  
132 132
  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
133 133
  for (i=0;i<nvar;i++)
134 134
  {
......
148 148
  // list 1
149 149
  //
150 150
  int nvar=df1b2variable::nvar;
151
  test_smartlist & list=f1b2gradlist->list; 
151
  test_smartlist & list=f1b2gradlist->list;
152 152

  
153 153
  int total_bytes=2*sizeof(df1b2_header);
154 154
// string identifier debug stuff
......
161 161
// end of string identifier debug stuff
162 162

  
163 163
  list.saveposition(); // save pointer to beginning of record;
164
  fixed_smartlist & nlist=f1b2gradlist->nlist; 
164
  fixed_smartlist & nlist=f1b2gradlist->nlist;
165 165
  // get record size
166 166
  int num_bytes=nlist.bptr->numbytes;
167 167
  // get info from tape1
......
172 172
  list.bptr+=sizeof(df1b2_header);
173 173
  df1b2_header * pz=(df1b2_header *) list.bptr;
174 174
  list.restoreposition(num_bytes); // save pointer to beginning of record;
175
  
175

  
176 176
  double * y_bar_tilde=py->get_u_bar_tilde();
177 177
  double * y_dot_bar_tilde=py->get_u_dot_bar_tilde();
178 178
  double * z_bar_tilde=pz->get_u_bar_tilde();
179 179
  double * z_dot_bar_tilde=pz->get_u_dot_bar_tilde();
180 180
  // Do second "reverse-reverse" pass calculations
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff