Revision 1109 trunk/src/df1b2-separable/df1b2lp6.cpp

df1b2lp6.cpp (revision 1109)
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
......
53 53
  //cout << tmpptr << endl;
54 54

  
55 55

  
56
  laplace_approximation_calculator::where_are_we_flag=2; 
56
  laplace_approximation_calculator::where_are_we_flag=2;
57 57
  double maxg=fabs(evaluate_function(uhat,pfmin));
58 58

  
59 59

  
60
  laplace_approximation_calculator::where_are_we_flag=0; 
60
  laplace_approximation_calculator::where_are_we_flag=0;
61 61
  dvector uhat_old(1,usize);
62 62
  for(int ii=1;ii<=num_nr_iters;ii++)
63
  {  
63
  {
64 64
    // test newton raphson
65 65
    switch(hesstype)
66 66
    {
......
178 178
        }
179 179
        */
180 180
      }
181
    
182
      if (maxg < 1.e-13) 
181

  
182
      if (maxg < 1.e-13)
183 183
      {
184 184
        break;
185 185
      }
186
    } 
186
    }
187 187
    else if (hesstype==4)
188 188
    {
189 189
      dvector step;
190
     
191
#     if defined(USE_ATLAS)   
192
        if (!ad_comm::no_atlas_flag) 
190

  
191
#     if defined(USE_ATLAS)
192
        if (!ad_comm::no_atlas_flag)
193 193
        {
194 194
          step=-atlas_solve_spd(Hess,grad,ierr);
195 195
        }
......
231 231
              int i;
232 232
              for (i=1;i<=ev.indexmax();i++)
233 233
               {
234
                  ofs3 << setw(4) << i  << " " 
234
                  ofs3 << setw(4) << i  << " "
235 235
                   << setshowpoint() << setw(14) << setprecision(10) << v(i) << " "
236 236
                   << setshowpoint() << setw(14) << setprecision(10)
237 237
                   << ev(i) << endl;
......
251 251
        break;
252 252
      uhat_old=uhat;
253 253
      uhat+=step;
254
    
254

  
255 255
      double maxg_old=maxg;
256 256
      maxg=fabs(evaluate_function(uhat,pfmin));
257 257
      if (maxg>maxg_old)
......
260 260
        evaluate_function(uhat,pfmin);
261 261
        break;
262 262
      }
263
      if (maxg < 1.e-13) 
263
      if (maxg < 1.e-13)
264 264
      {
265 265
        break;
266 266
      }
267 267
    }
268
    
268

  
269 269
    if (sparse_hessian_flag==0)
270 270
    {
271 271
      for (int i=1;i<=usize;i++)
......
273 273
        y(i+xsize)=uhat(i);
274 274
      }
275 275
    }
276
    else  
276
    else
277 277
    {
278 278
      for (int i=1;i<=usize;i++)
279 279
      {
......
292 292
  function_minimizer * pfmin,int& no_converge_flag)
293 293
{
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff