42 ivector lfe_index(1,(
int)funnel_init_var::num_active_parameters);
44 for (
int i=1;i<=(int)funnel_init_var::num_active_parameters;i++)
48 lre_index(++num_local_re)=i;
52 lfe_index(++num_local_fe)=i;
60 for (
int i=1;i<=num_local_re;i++)
62 int lrei=lre_index(i);
63 int i1=list(lrei,1)-xsize;
65 for (
int j=1;j<=num_local_re;j++)
67 int lrej=lre_index(j);
68 int j1=list(lrej,1)-xsize;
70 if (i1>=j1) (*bHess)(i1,j1)+=locy(i2).u_bar[j2-1];
76 if (sparse_hessian_flag==0)
78 int* plre_indexi = lre_index.
get_v() + 1;
79 for (
int i=1;i<=num_local_re;i++)
81 int lrei = *plre_indexi;
83 int i1 = *(plisti->
get_v() + 1) - xsize;
84 int i2 = *(plisti->
get_v() + 2);
87 int* plre_indexj = lre_index.
get_v() + 1;
88 for (
int j=1;j<=num_local_re;j++)
90 int lrej = *plre_indexj;
92 int j1 = *(plistj->
get_v() + 1) - xsize;
93 int j2 = *(plistj->
get_v() + 2);
94 Hess(i1,j1)+=locy(i2).u_bar[j2-1];
104 for (
int i=1;i<=num_local_re;i++)
106 int lrei=lre_index(i);
107 int i1=list(lrei,1)-xsize;
109 for (
int j=1;j<=num_local_re;j++)
111 int lrej=lre_index(j);
112 int j1=list(lrej,1)-xsize;
118 (*sparse_triplet2)((*sparse_iterator)(sparse_count))
119 +=locy(i2).u_bar[j2-1];
129 if (num_local_re > 0)
133 for (
int i=1;i<=num_local_re;i++)
135 int lrei=lre_index(i);
136 int i1=list(lrei,1)-xsize;
138 for (
int j=1;j<=num_local_re;j++)
140 int lrej=lre_index(j);
141 int j1=list(lrej,1)-xsize;
146 locy(i2).get_u_bar_tilde()[j2-1]=(*bHessadjoint)(i1,j1);
151 else if (hesstype==4)
153 if (pmin->lapprox->sparse_hessian_flag==0)
155 for (
int i=1;i<=num_local_re;i++)
157 int lrei=lre_index(i);
158 int i1=list(lrei,1)-xsize;
160 for (
int j=1;j<=num_local_re;j++)
162 int lrej=lre_index(j);
163 int j1=list(lrej,1)-xsize;
167 locy(i2).get_u_bar_tilde()[j2-1]=Hessadjoint(i1,j1);
175 pmin->lapprox->vsparse_triplet_adjoint;
176 for (
int i=1;i<=num_local_re;i++)
178 int lrei=lre_index(i);
179 int i1=list(lrei,1)-xsize;
181 for (
int j=1;j<=num_local_re;j++)
183 int lrej=lre_index(j);
184 int j1=list(lrej,1)-xsize;
193 sparse_count_adjoint++;
194 locy(i2).get_u_bar_tilde()[j2-1]=
195 (*vsparse_triplet_adjoint)
196 ((*sparse_iterator)(sparse_count_adjoint));
220 for (
int i=1;i<=num_local_fe;i++)
222 int lfei=lfe_index(i);
226 local_dtemp(i1)+=*locy(lfei).get_u_tilde();
227 #if !defined(OPT_LIB)
229 int mmax=xadjoint.indexmax();
230 if (i1<mmin || i1> mmax)
232 cerr <<
"this can't happen" <<
endl;
238 for (
int i=1;i<=num_local_re;i++)
240 int i1=list(lre_index(i),1)-xsize;
241 int i2=list(lre_index(i),2);
242 uadjoint(i1)+=*locy(i2).get_u_tilde();
253 funnel_init_var::num_active_parameters=0;
void initialize(void)
Description not yet available.
df1b2_gradlist * f1b2gradlist
void set_dependent_variable(const df1b2variable &_x)
Description not yet available.
static void set_no_derivatives(void)
Description not yet available.
static int num_inactive_vars
void initialize(void)
Description not yet available.
Description not yet available.
void initialize(void)
Description not yet available.
prnstream & endl(prnstream &)
Array of integers(int) with indexes from index_min to indexmax.
static unsigned int num_active_parameters
Description not yet available.
void do_separable_stuff_laplace_approximation_banded_adjoint(const df1b2variable &ff)
Description not yet available.
Description not yet available.
Description not yet available.
static unsigned int num_vars
static init_df1b2vector * py
void reset(void)
Description not yet available.
void df1b2_gradcalc1(void)
Description not yet available.