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

df1b2min3.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 df1b2min3.cpp
9
 * this file mainly added for defining df1b2variable_x - double_y, which define in df1b2fun.h  
9
 * this file mainly added for defining df1b2variable_x - double_y, which define in df1b2fun.h
10 10
 */
11 11
#include <df1b2fun.h>
12 12

  
13

  
14 13
  df1b2variable operator - (const df1b2variable& _y,double x)
15 14
  {
16 15
    ADUNCONST(df1b2variable,y)
......
22 21
    {
23 22
      *zd++ = *yd++;
24 23
    }
25
    
24

  
26 25
    // WRITE WHATEVER ON TAPE
27 26
    if (!df1b2_gradlist::no_derivatives)
28 27
      f1b2gradlist->write_pass1_minusvc(&y,&z);
......
69 68
void read_pass2_1_minusvc(void);
70 69
void read_pass2_2_minusvc(void);
71 70
void read_pass2_3_minusvc(void);
72
  
71

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

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

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

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

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

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

  
177 176
  double * y_bar_tilde=py->get_u_bar_tilde();
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff