Revision 1107 trunk/src/df1b2-separable/newfunc.cpp

newfunc.cpp (revision 1107)
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
......
20 20
 * Description not yet available.
21 21
 * \param
22 22
 */
23
static void begin_local_calculations(int& nap) 
24
{ 
25
  df1b2_gradlist::set_no_derivatives();  
26
  local_init_var::allocate_all();  
27
  local_dep_var::allocate_all();  
23
static void begin_local_calculations(int& nap)
24
{
25
  df1b2_gradlist::set_no_derivatives();
26
  local_init_var::allocate_all();
27
  local_dep_var::allocate_all();
28 28
  nap=local_init_var::num_active_parameters;
29
}  
29
}
30 30

  
31
int write_pass1(const df1b2variable * _px, 
31
int write_pass1(const df1b2variable * _px,
32 32
  const df1b2variable * _py,
33 33
  const df1b2variable * _pz,int nap);
34 34

  
......
72 72
 * Description not yet available.
73 73
 * \param
74 74
 */
75
int write_pass1(const df1b2variable * px, 
75
int write_pass1(const df1b2variable * px,
76 76
  const df1b2variable * py,
77 77
  const df1b2variable * pz,int nap)
78 78
 {
......
144 144
  // the current entry+2 in bptr is the size of the record i.e
145 145
  // points to the next record
146 146
  //int nvar=df1b2variable::nvar;
147
  fixed_smartlist & nlist=f1b2gradlist->nlist; 
148
  test_smartlist& list=f1b2gradlist->list; 
147
  fixed_smartlist & nlist=f1b2gradlist->nlist;
148
  test_smartlist& list=f1b2gradlist->list;
149 149
   // nlist-=sizeof(int);
150 150
  // get record size
151 151
  int num_bytes=nlist.bptr->numbytes;
......
195 195
  list.restoreposition(); // save pointer to beginning of record;
196 196

  
197 197
  f1b2gradlist=localf1b2gradlist;
198
  df1b2variable::save_adpool_pointer(); 
198
  df1b2variable::save_adpool_pointer();
199 199

  
200 200

  
201 201
  adpool * tmppool=df1b2variable::pool;
......
229 229
      }
230 230
      if (!found_pool_flag)
231 231
      {
232
        cerr << "coudn't find right sized pool -- this can't happen" 
232
        cerr << "coudn't find right sized pool -- this can't happen"
233 233
             << endl;
234 234
        ad_exit(1);
235
      }    
235
      }
236 236
    }
237 237
  }
238 238

  
239
  df1b2_gradlist::set_yes_derivatives();  
239
  df1b2_gradlist::set_yes_derivatives();
240 240
  //local_init_df1b2variable x(xu,xpudot), y(yu,ypudot);
241 241

  
242 242
  local_init_pass1_df1b2variable x(xu,xudot);
......
251 251

  
252 252
  z=square(x+2.0*y+2.5);
253 253

  
254
  df1b2_gradlist::set_no_derivatives();  
254
  df1b2_gradlist::set_no_derivatives();
255 255

  
256 256
  set_dependent_variable(z);
257 257
  df1b2variable::passnumber=1;
258 258
  df1b2_gradcalc1();
259
  df1b2variable::restore_adpool_pointer(); 
259
  df1b2variable::restore_adpool_pointer();
260 260
  f1b2gradlist=globalf1b2gradlist;
261 261

  
262 262
  double * zprime=z.get_u_dot();   // size nvp
......
276 276
     // pzubar[1]+=xudot[i]*pzudotbar[i];
277 277
      xudotbar[i]+=zprime[0]*pzudotbar[i];
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff