37 #if defined(CHECK_COUNT)
38 if (
ncount >= ncount_check)
45 +4*
sizeof(double)+nvar*
sizeof(
double);
74 memcpy(
list,px->get_u_dot(),nvar*(int)
sizeof(
double));
101 cerr <<
"illegal value for df1b2variable::pass = "
132 #if defined(SAFE_ALL)
135 constexpr
size_t sizeofdouble =
sizeof(double);
140 double df=*(
double*) list.
bptr;
141 list.
bptr+=sizeofdouble;
142 double d2f=*(
double*) list.
bptr;
143 list.
bptr+=sizeofdouble;
145 list.
bptr+=sizeofdouble;
148 list.
bptr+=sizeofdouble;
149 double* xdot=(
double*)list.
bptr;
162 size_t total_bytes=2*nvar*sizeofdouble;
164 #if defined(SAFE_ALL)
166 int slen=strlen(ids);
171 void * tmpptr2=list2.
bptr;
173 #if defined(SAFE_ALL)
184 #if defined(PRINT_DERS)
193 double* px_u_bari = px->
u_bar;
194 double* pz_u_bari = pz->
u_bar;
195 for (
size_t i=0;i<nvar;i++)
198 *px_u_bari += df * *pz_u_bari;
203 px_u_bari = px->
u_bar;
204 double* pxdoti = xdot;
206 for (
size_t i=0;i<nvar;i++)
209 *px_u_bari += d2f * *pxdoti * *pz_u_dot_bari;
217 for (
size_t i=0;i<nvar;i++)
220 *px_u_dot_bari += df * *pz_u_dot_bari;
227 memset(pz->
u_bar, 0, nvar * sizeofdouble);
228 memset(pz->
u_dot_bar, 0, nvar * sizeofdouble);
230 #if defined(PRINT_DERS)
251 +
sizeof(
double)+nvar*
sizeof(double);
253 #if defined(SAFE_ALL)
255 int slen=strlen(ids);
274 int num_bytes2=*nlist2.
bptr;
289 #if defined(SAFE_ALL)
300 constexpr
size_t sizeofdouble =
sizeof(double);
301 double df=*(
double*) list.
bptr;
302 list.
bptr+=sizeofdouble;
303 double d2f=*(
double*) list.
bptr;
304 list.
bptr+=sizeofdouble;
305 double d3f=*(
double*) list.
bptr;
306 list.
bptr+=sizeofdouble;
309 list.
bptr+=
sizeof(double);
310 xdot=(
double*)list.
bptr;
313 double* zbar = (
double*)list2.
bptr;
314 double* zdotbar = (
double*)(list2.
bptr+nvar*sizeofdouble);
322 #if defined(PRINT_DERS)
329 memset(z_bar_tilde, 0, nvar * sizeofdouble);
330 memset(z_dot_bar_tilde, 0, nvar * sizeofdouble);
335 double* x_bar_tildei = x_bar_tilde;
336 double* zbari = zbar;
337 double* z_bar_tildei = z_bar_tilde;
338 for (
size_t i=0;i<nvar;i++)
341 *x_tilde += d2f * *zbari * *x_bar_tildei;
343 *z_bar_tildei += df * *x_bar_tildei;
350 double* x_dot_bar_tildei = x_dot_bar_tilde;
351 double* z_dot_bar_tildei = z_dot_bar_tilde;
352 double* zdotbari = zdotbar;
353 z_bar_tildei = z_bar_tilde;
354 for (
size_t i=0;i<nvar;i++)
357 *x_tilde += d2f * *zdotbari * *x_dot_bar_tildei;
359 *z_dot_bar_tildei += df * *x_dot_bar_tildei;
365 x_bar_tildei = x_bar_tilde;
367 double* xdoti = xdot;
368 z_dot_bar_tildei = z_dot_bar_tilde;
369 double* x_dot_tildei = x_dot_tilde;
370 for (
size_t i=0;i<nvar;i++)
375 *x_dot_tildei += d2f * *zdotbari * *x_bar_tildei;
376 *z_dot_bar_tildei +=d2f * *xdoti * *x_bar_tildei;
377 *x_tilde += d3f * *xdoti * *zdotbari * *x_bar_tildei;
386 #if defined(PRINT_DERS)
415 #if defined(SAFE_ALL)
422 constexpr
size_t sizeofdouble =
sizeof(double);
425 double df=*(
double*) list.
bptr;
426 list.
bptr+=sizeofdouble;
427 double d2f=*(
double*) list.
bptr;
428 list.
bptr+=sizeofdouble;
430 list.
bptr+=sizeofdouble;
433 list.
bptr+=sizeofdouble;
434 double* xdot=(
double*)list.
bptr;
437 #if defined(PRINT_DERS)
447 double* pxdoti = xdot;
449 for (
size_t i=0;i<nvar;i++)
452 *(px->
u_tilde) += d2f * *pxdoti * *pz_u_dot_tildei;
459 for (
size_t i=0;i<nvar;i++)
462 *px_u_dot_tildei += df * *pz_u_dot_tildei;
469 #if defined(PRINT_DERS)
void check_buffer_size(const size_t)
Description not yet available.
df1b2_gradlist * f1b2gradlist
void memcpy(test_smartlist &dest, void *source, const size_t nsize)
memcpy for test_smartlist
void read_pass1_1_dv(void)
Description not yet available.
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
int adptr_diff(void *x, void *y)
void read_pass1_2_dv(void)
Description not yet available.
void ncount_checker(int ncount, int ncount_check)
void restoreposition(void)
Description not yet available.
Description not yet available.
Description not yet available.
prnstream & endl(prnstream &)
void print_derivatives(const adstring &s, double f, double df, double d2f, double d3f, int bflag)
Description not yet available.
void read_pass1_3_dv(void)
Description not yet available.
Description not yet available.
int write_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, df1b2function2 *pf)
Description not yet available.
void ad_read_pass1_der_values(void)
Description not yet available.
Description not yet available.
void checkidentiferstring(const char *ids, test_smartlist &list)
Description not yet available.