Revision 1935 trunk/src/nh99/xmodelm3.cpp

xmodelm3.cpp (revision 1935)
9 9

  
10 10
#include <admodel.h>
11 11

  
12
#if defined(USE_LAPLACE)
13 12
#  include <df1b2fun.h>
14 13
#  include <adrndeff.h>
15
#endif
16 14

  
17 15
void check_java_flags(int& start_flag,int& quit_flag,int& der_flag,
18 16
  int& next_flag);
......
38 36

  
39 37
void tracing_message(int traceflag,const char *s);
40 38

  
41
#if defined(USE_LAPLACE)
42 39
  int function_minimizer::inner_opt(void)
43 40
  {
44 41
    return inner_opt_flag;
45 42
  }
46 43

  
47 44
  int function_minimizer::inner_opt_flag=0;
48
#endif
49 45

  
50 46

  
51 47
  int function_minimizer::bad_step_flag=0;
......
54 50
  {
55 51
    int nopt=0;
56 52
    int on=0;
57
#   if defined(USE_LAPLACE)
58 53
    if ( (on=option_match(ad_comm::argc,ad_comm::argv,"-shess"))>-1)
59 54
    {
60 55
      laplace_approximation_calculator::sparse_hessian_flag=1;
......
80 75
        }
81 76
#    endif
82 77

  
83
#   endif
84 78
    //initial_params::read(); // read in the values for the initial parameters
85 79
    if (initial_params::restart_phase)
86 80
    {
......
226 220
    {
227 221
      between_phases_calculations();
228 222

  
229
#if defined(USE_LAPLACE)
230 223
      if (random_effects_flag)
231 224
        initial_params::set_inactive_random_effects();
232
#endif
233 225

  
234 226
      int nvar=initial_params::nvarcalc(); // get the number of active
235 227
             // parameters
......
322 314
      }
323 315
      if ( (lmnflag=option_match(ad_comm::argc,ad_comm::argv,"-lmn",nopt))>-1)
324 316
      {
325
#if   defined(USE_LAPLACE)
326 317
        if (random_effects_flag)
327 318
        {
328 319
          cerr << "At present you can not use the -lmn option for the outer"
329 320
               << endl << " optimiation in a random-effects model" << endl;
330 321
          ad_exit(1);
331 322
        }
332
#endif
333 323
        if (!nopt)
334 324
        {
335 325
          cerr << "Usage -lmn option needs integer  -- set to default 10.\n";
......
352 342
      {
353 343
        // *********************************************************
354 344
        // block for quasi newton minimization
355
#if   defined(USE_LAPLACE)
356 345
        if (negative_eigenvalue_flag)
357 346
        {
358 347
          trust_region_update(nvar,_crit,x,g,f);
359 348
        }
360
#endif   //defined(USE_LAPLACE)
361 349
        if (!ad_comm::pvm_manager)
362 350
        {
363 351
          do
......
412 400
        else
413 401
        {
414 402
#if defined(USE_ADPVM)
415
#if   defined(USE_LAPLACE)
416 403
      if (random_effects_flag)
417 404
      {
418 405
        if (maxfn>0)
......
434 421
        }
435 422
      }
436 423
      else
437
#  endif // #if   defined(USE_LAPLACE)
438 424
      {
439 425
        if (maxfn>0)
440 426
        {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff