26 double * xd=
x.get_u_dot();
27 double * yd=y.get_u_dot();
36 *zd++ = yu * *xd++ + xu * *yd++;
57 #if defined(CHECK_COUNT)
58 if (
ncount >= ncount_check)
66 +2*(nvar+1)*
sizeof(double);
70 size_t slen=strlen(ids);
86 size_t sizeofdouble =
sizeof(double);
89 memcpy(
list,px->get_u_dot(),nvar*sizeofdouble);
90 memcpy(
list,py->get_u_dot(),nvar*sizeofdouble);
121 cerr <<
"illegal value for df1b2variable::pass = "
150 #if defined(SAFE_ALL)
162 constexpr
size_t sizeofdouble =
sizeof(double);
163 size_t total_bytes=2*nvar*sizeofdouble;
164 memcpy(&xu,bptr,sizeofdouble);
166 memcpy(&yu,bptr,sizeofdouble);
168 double * xdot=(
double*)bptr;
169 bptr+=nvar*sizeofdouble;
170 double * ydot=(
double*)bptr;
183 #if defined(SAFE_ALL)
185 size_t slen=strlen(ids);
191 void * tmpptr=list2.
bptr;
192 #if defined(SAFE_ALL)
203 double* px_u_bari = px->
u_bar;
204 double* pz_u_bari = pz->
u_bar;
205 for (
size_t i=0;i<nvar;i++)
208 *px_u_bari += yu * *pz_u_bari;
212 double* py_u_bari = py->
u_bar;
213 pz_u_bari = pz->
u_bar;
214 for (
size_t i=0;i<nvar;i++)
217 *py_u_bari += xu * *pz_u_bari;
222 px_u_bari = px->
u_bar;
224 double* ydoti = ydot;
225 for (
size_t i=0;i<nvar;i++)
229 *px_u_bari += *ydoti * *pz_u_dot_bari;
235 py_u_bari = py->
u_bar;
236 double* xdoti = xdot;
238 for (
size_t i=0;i<nvar;i++)
242 *py_u_bari += *xdoti * *pz_u_dot_bari;
250 for (
size_t i=0;i<nvar;i++)
253 *px_u_dot_bari += yu * *pz_u_dot_bari;
260 for (
size_t i=0;i<nvar;i++)
263 *py_u_dot_bari += xu * *pz_u_dot_bari;
269 memset(pz->
u_bar, 0, nvar * sizeofdouble);
270 memset(pz->
u_dot_bar, 0, nvar * sizeofdouble);
287 constexpr
size_t sizeofdouble =
sizeof(double);
291 +2*(nvar+1)*sizeofdouble;
293 #if defined(SAFE_ALL)
295 size_t slen=strlen(ids);
313 int num_bytes2=*nlist2.
bptr;
329 #if defined(SAFE_ALL)
342 list.
bptr+=
sizeof(double);
344 list.
bptr+=
sizeof(double);
345 xdot=(
double*)list.
bptr;
346 list.
bptr+=nvar*sizeofdouble;
347 ydot=(
double*)list.
bptr;
353 zbar=(
double*)list2.
bptr;
354 zdotbar=(
double*)(list2.
bptr+nvar*
sizeof(double));
369 memset(z_bar_tilde, 0, nvar * sizeofdouble);
370 memset(z_dot_bar_tilde, 0, nvar * sizeofdouble);
373 double* x_bar_tildei = x_bar_tilde;
374 double* zbari = zbar;
375 double* z_bar_tildei = z_bar_tilde;
376 for (
size_t i=0;i<nvar;i++)
381 *z_bar_tildei += yu * *x_bar_tildei;
382 *y_tilde += *zbari * *x_bar_tildei;
388 double* x_dot_bar_tildei = x_dot_bar_tilde;
389 double* zdotbari = zdotbar;
390 double* z_dot_bar_tildei = z_dot_bar_tilde;
391 for (
size_t i=0;i<nvar;i++)
396 *y_tilde += *zdotbari * *x_dot_bar_tildei;
397 *z_dot_bar_tildei += yu * *x_dot_bar_tildei;
414 double* y_bar_tildei = y_bar_tilde;
416 z_bar_tildei = z_bar_tilde;
417 for (
size_t i=0;i<nvar;i++)
422 *x_tilde += *zbari * *y_bar_tildei;
423 *z_bar_tildei += xu * *y_bar_tildei;
429 double* y_dot_bar_tildei = y_dot_bar_tilde;
431 z_dot_bar_tildei = z_dot_bar_tilde;
432 for (
size_t i=0;i<nvar;i++)
437 *x_tilde += *zdotbari * *y_dot_bar_tildei;
438 *z_dot_bar_tildei += xu * *y_dot_bar_tildei;
453 x_bar_tildei = x_bar_tilde;
455 double* ydoti = ydot;
456 double* y_dot_tildei = y_dot_tilde;
457 z_dot_bar_tildei = z_dot_bar_tilde;
458 for (
size_t i=0;i<nvar;i++)
464 *y_dot_tildei += *zdotbari * *x_bar_tildei;
465 *z_dot_bar_tildei += *ydoti * *x_bar_tildei;
473 y_bar_tildei = y_bar_tilde;
474 double* xdoti = xdot;
476 double* x_dot_tildei = x_dot_tilde;
477 z_dot_bar_tildei = z_dot_bar_tilde;
478 for (
size_t i=0;i<nvar;i++)
484 *x_dot_tildei += *zdotbari * *y_bar_tildei;
485 *z_dot_bar_tildei += *xdoti * *y_bar_tildei;
523 #if defined(SAFE_ALL)
534 constexpr
size_t sizeofdouble =
sizeof(double);
536 list.
bptr+=sizeofdouble;
538 list.
bptr+=sizeofdouble;
539 xdot=(
double*)list.
bptr;
540 list.
bptr+=nvar*sizeofdouble;
541 ydot=(
double*)list.
bptr;
550 double* xdoti = xdot;
551 double* ydoti = ydot;
552 for (
size_t i=0;i<nvar;i++)
556 *(py->
u_tilde) += *xdoti * *pz_u_dot_tildei;
559 *(px->
u_tilde) += *ydoti * *pz_u_dot_tildei;
568 for (
size_t i=0;i<nvar;i++)
572 *px_u_dot_tildei += yu * *pz_u_dot_tildei;
573 *py_u_dot_tildei += xu * *pz_u_dot_tildei;
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_pass2_3_prod(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 restoreposition(void)
Description not yet available.
Description not yet available.
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
int write_pass1_prod(double x, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
Description not yet available.
prnstream & endl(prnstream &)
void read_pass2_2_prod(void)
Description not yet available.
static int no_derivatives
void read_pass2_1_prod(void)
Description not yet available.
Description not yet available.
void ad_read_pass2_prod(void)
Description not yet available.
Description not yet available.
void checkidentiferstring(const char *ids, test_smartlist &list)
Description not yet available.