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

f1b2fnl5.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
......
25 25
  df1b2_gradlist::set_no_derivatives();
26 26
  df1b2variable::passnumber=1;
27 27
  df1b2_gradcalc1();
28
   
28

  
29 29
  init_df1b2vector & locy= *funnel_init_var::py;
30 30
  imatrix& list=*funnel_init_var::plist;
31 31
  int num_local_re=0;
......
38 38

  
39 39
  for (i=1;i<=funnel_init_var::num_active_parameters;i++)
40 40
  {
41
    if (list(i,1)>xsize) 
41
    if (list(i,1)>xsize)
42 42
    {
43 43
      lre_index(++num_local_re)=i;
44 44
    }
45
    else if (list(i,1)>0) 
45
    else if (list(i,1)>0)
46 46
    {
47 47
      lfe_index(++num_fixed_effects)=i;
48 48
    }
49 49
  }
50
  
50

  
51 51
  if (num_local_re > 0)
52 52
  {
53
    dmatrix& local_Hess=(*block_diagonal_hessian)(num_separable_calls); 
54
    dmatrix& local_Dux=(*block_diagonal_Dux)(num_separable_calls); 
55
    ivector& local_re_list=(*block_diagonal_re_list)(num_separable_calls); 
56
    ivector& local_fe_list=(*block_diagonal_fe_list)(num_separable_calls); 
53
    dmatrix& local_Hess=(*block_diagonal_hessian)(num_separable_calls);
54
    dmatrix& local_Dux=(*block_diagonal_Dux)(num_separable_calls);
55
    ivector& local_re_list=(*block_diagonal_re_list)(num_separable_calls);
56
    ivector& local_fe_list=(*block_diagonal_fe_list)(num_separable_calls);
57 57
    local_re_list.initialize();
58 58
    local_fe_list.initialize();
59 59
    local_Hess.initialize();
......
62 62
    {
63 63
      local_re_list(i)=list(lre_index(i),1);
64 64
    }
65
      
65

  
66 66
    for (i=1;i<=num_fixed_effects;i++)
67 67
    {
68 68
      local_fe_list(i)=list(lfe_index(i),1);
69 69
    }
70
      
70

  
71 71
    for (i=1;i<=num_local_re;i++)
72 72
    {
73 73
      int lrei=lre_index(i);
......
89 89
        local_Dux(i,j)=locy(i2).u_bar[j2-1];
90 90
      }
91 91
    }
92
  
93
    
92

  
94 93
    have_bounded_random_effects=0;
95 94
    if (have_bounded_random_effects)
96 95
    {
97
  
98 96
      for (i=1;i<=num_local_re;i++)
99 97
      {
100 98
        int lrei=lre_index(i);
......
107 105
        }
108 106
      }
109 107
    }
110
  } 
108
  }
111 109

  
112 110
  f1b2gradlist->reset();
113 111
  f1b2gradlist->list.initialize();
......
116 114
  f1b2gradlist->nlist.initialize();
117 115
  f1b2gradlist->nlist2.initialize();
118 116
  f1b2gradlist->nlist3.initialize();
119
  funnel_init_var::num_vars=0; 
120
  funnel_init_var::num_active_parameters=0; 
121
  funnel_init_var::num_inactive_vars=0; 
117
  funnel_init_var::num_vars=0;
118
  funnel_init_var::num_active_parameters=0;
119
  funnel_init_var::num_inactive_vars=0;
122 120
}
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff