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

df1b2lp9.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
......
19 19
              }
20 20
              static void crap(double ff,dvector& uuu,dvector& gg)
21 21
              {
22
                //cout << setprecision(10) << setw(19) << ff << " " 
22
                //cout << setprecision(10) << setw(19) << ff << " "
23 23
                 //    << setw(19) << uuu   << "  "  << setw(19) << gg << endl;
24 24
              }
25 25

  
......
39 39
    separable_function_difference=0;
40 40
  }
41 41
  separable_function_difference = new dvector(1,num_separable_calls);
42
  
42

  
43 43
  fmm ** pfmc1 = new pfmm[num_separable_calls];
44 44
  pfmc1--;
45 45
  int i;
......
93 93
  fmc1.ialph=0;
94 94
  fmc1.ihang=0;
95 95
  fmc1.ihflag=0;
96
  
96

  
97 97
  if (init_switch)
98 98
  {
99 99
    u.initialize();
100 100
  }
101
 
101

  
102 102
  for (int ii=1;ii<=2;ii++)
103 103
  {
104 104
    // get the initial u into the uu's
......
116 116
    int initrun_flag=1;
117 117
    int loop_counter=0;
118 118
    int loop_flag=0;
119
  
119

  
120 120
    while (converged==0)
121 121
    {
122 122
      if (loop_flag) loop_counter++;
......
164 164
          u((*derindex)(i2)(j))=uu(i2,j);
165 165
        }
166 166
      }
167
      // put the 
167
      // put the
168 168
      //if (fmc1.ireturn>0)
169 169
      {
170 170
        dvariable vf=0.0;
171 171
        pen=initial_params::reset(dvar_vector(u));
172 172
        *objective_function_value::pobjfun=0.0;
173
  
173

  
174 174
        //num_separable_calls=0;
175
  
175

  
176 176
        pmin->inner_opt_flag=1;
177 177
        pfmin->AD_uf_inner();
178 178
        pmin->inner_opt_flag=0;
......
186 186
          quadratic_prior::get_M_calculations();
187 187
        }
188 188
        vf+=*objective_function_value::pobjfun;
189
       
189

  
190 190
        objective_function_value::fun_without_pen=value(vf);
191 191
        vf+=pen;
192
          
192

  
193 193
        gradcalc(usize,g);
194 194
        for (int i=1;i<=num_separable_calls;i++)
195 195
        {
......
211 211
            ff[i]=-(*separable_function_difference)(i);
212 212
            //ff[i]=-(*separable_function_difference)(i)
213 213
             // +(*separable_function_difference)(i-1);
214
  
214

  
215 215
            if (ff[i] < ffb[i])
216 216
            {
217 217
              ffb[i]=ff[i];
......
228 228
            ff[i]=(*separable_function_difference)(i);
229 229
            //ff[i]=(*separable_function_difference)(i)
230 230
             // -(*separable_function_difference)(i-1);
231
  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff