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

f1b2v10.cpp (revision 1107)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier and Mollie Brooks
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
......
146 146
    dvar_vector tmp(v1.indexmin(),v1.indexmax());
147 147
    for (int i=v1.indexmin();i<=v1.indexmax();i++)
148 148
    {
149
      tmp.elem(i)=pow(v1.elem(i),v2.elem(i));             
149
      tmp.elem(i)=pow(v1.elem(i),v2.elem(i));
150 150
    }
151 151
    RETURN_ARRAYS_DECREMENT();
152 152
    return(tmp);
153
  }        
153
  }
154 154
/**
155 155
 \brief raise x to the power v.
156 156
 \param x vector of bases
157 157
 \param v vector of exponents	
158
 */  
158
 */
159 159
  df1b2vector pow(df1b2vector const& _x,dvector const& v)
160 160
  {
161 161
   ADUNCONST(df1b2vector,x);
......
166 166
   for (int i=mmin;i<=mmax;i++) tmp(i)=pow(x(i),v(i));
167 167
   return tmp;
168 168
  }
169
  
169

  
170 170
/**
171 171
 * Description not yet available.
172 172
 * \param
......
195 195
    double * yd=y(i).get_u_dot();
196 196
    double xu= *x(i).get_u();
197 197
    double yu= *y(i).get_u();
198
  
198

  
199 199
    for (int j=0;j<df1b2variable::nvar;j++)
200 200
    {
201 201
      *zd++ += yu * *xd++ + xu * *yd++;
......
204 204
  // WRITE WHATEVER ON TAPE
205 205
  if (!df1b2_gradlist::no_derivatives)
206 206
    f1b2gradlist->write_pass1_prod(&x,&y,&tmp);
207
    
208 207

  
209 208
  return tmp;
210 209
}
......
215 214
 */
216 215
void ad_read_pass2_prod_vector(void);
217 216

  
218
 int df1b2_gradlist::write_pass1_prod(const df1b2vector * _px, 
217
 int df1b2_gradlist::write_pass1_prod(const df1b2vector * _px,
219 218
   const df1b2vector * _py,df1b2variable * pz)
220 219
 {
221 220
   ADUNCONST(df1b2vector*,px)
......
301 300
    read_pass2_3_prod_vector();
302 301
    break;
303 302
  default:
304
    cerr << "illegal value for df1b2variable::pass = " 
303
    cerr << "illegal value for df1b2variable::pass = "
305 304
         << df1b2variable::passnumber << endl;
306 305
    exit(1);
307 306
  }
......
314 313
void read_pass2_1_prod_vector(void)
315 314
{
316 315
  int nvar=df1b2variable::nvar;
317
  test_smartlist& list=f1b2gradlist->list; 
316
  test_smartlist& list=f1b2gradlist->list;
318 317
  int num_bytes=f1b2gradlist->nlist.bptr->numbytes;
319 318
  list-=num_bytes;
320 319
  list.saveposition(); // save pointer to beginning of record;
......
339 338
    // df1b2_header *
340 339
    px(i)=(df1b2_header *) bptr;
341 340
    bptr+=sizeof(df1b2_header);
342
    // df1b2_header * 
341
    // df1b2_header *
343 342
    py(i)=(df1b2_header *) bptr;
344 343
    bptr+=sizeof(df1b2_header);
345 344
  }
......
354 353
  }
355 354
  for (i=mmin;i<=mmax;i++)
356 355
  {
357
    // double * 
356
    // double *
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff