29 real* offload_array) {
54 data->
pncrid = &(offload_array[step*offload_data->
Nfld]);
55 data->
pncrdi = &(offload_array[step*(offload_data->
Nfld+1)]);
61 data->
id = &(offload_array[step*0]);
62 data->
mileage = &(offload_array[step*1]);
63 data->
r = &(offload_array[step*2]);
64 data->
phi = &(offload_array[step*3]);
65 data->
z = &(offload_array[step*4]);
66 data->
p_r = &(offload_array[step*5]);
67 data->
p_phi = &(offload_array[step*6]);
68 data->
p_z = &(offload_array[step*7]);
69 data->
weight = &(offload_array[step*8]);
70 data->
charge = &(offload_array[step*9]);
71 data->
rho = &(offload_array[step*10]);
72 data->
theta = &(offload_array[step*11]);
73 data->
B_r = &(offload_array[step*12]);
74 data->
B_phi = &(offload_array[step*13]);
75 data->
B_z = &(offload_array[step*14]);
76 data->
simmode = &(offload_array[step*15]);
80 data->
id = &(offload_array[step*0]);
81 data->
mileage = &(offload_array[step*1]);
82 data->
r = &(offload_array[step*2]);
83 data->
phi = &(offload_array[step*3]);
84 data->
z = &(offload_array[step*4]);
85 data->
ppar = &(offload_array[step*5]);
86 data->
mu = &(offload_array[step*6]);
87 data->
zeta = &(offload_array[step*7]);
88 data->
weight = &(offload_array[step*8]);
89 data->
charge = &(offload_array[step*9]);
90 data->
rho = &(offload_array[step*10]);
91 data->
theta = &(offload_array[step*11]);
92 data->
B_r = &(offload_array[step*12]);
93 data->
B_phi = &(offload_array[step*13]);
94 data->
B_z = &(offload_array[step*14]);
95 data->
simmode = &(offload_array[step*15]);
99 data->
id = &(offload_array[step*0]);
100 data->
mileage = &(offload_array[step*1]);
101 data->
r = &(offload_array[step*2]);
102 data->
phi = &(offload_array[step*3]);
103 data->
z = &(offload_array[step*4]);
104 data->
rho = &(offload_array[step*5]);
105 data->
theta = &(offload_array[step*6]);
106 data->
B_r = &(offload_array[step*7]);
107 data->
B_phi = &(offload_array[step*8]);
108 data->
B_z = &(offload_array[step*9]);
109 data->
simmode = &(offload_array[step*10]);
113 data->
id = &(offload_array[step*0]);
114 data->
mileage = &(offload_array[step*1]);
115 data->
r = &(offload_array[step*2]);
116 data->
phi = &(offload_array[step*3]);
117 data->
z = &(offload_array[step*4]);
118 data->
p_r = &(offload_array[step*5]);
119 data->
p_phi = &(offload_array[step*6]);
120 data->
p_z = &(offload_array[step*7]);
121 data->
ppar = &(offload_array[step*8]);
122 data->
mu = &(offload_array[step*9]);
123 data->
zeta = &(offload_array[step*10]);
124 data->
weight = &(offload_array[step*11]);
125 data->
charge = &(offload_array[step*12]);
126 data->
rho = &(offload_array[step*13]);
127 data->
theta = &(offload_array[step*14]);
128 data->
B_r = &(offload_array[step*15]);
129 data->
B_phi = &(offload_array[step*16]);
130 data->
B_z = &(offload_array[step*17]);
131 data->
simmode = &(offload_array[step*18]);
372 for(
int i= 0; i <
NSIMD; i++) {
381 if( data->
id[imrk * data->
Npnt] == 0 ) {
382 data->
id[idx] = (
real)(p_i->id[i]);
383 data->
mileage[idx]= p_i->mileage[i];
384 data->
r[idx] = p_i->r[i];
385 data->
phi[idx] = p_i->phi[i];
386 data->
z[idx] = p_i->z[i];
387 data->
ppar[idx] = p_i->ppar[i];
388 data->
mu[idx] = p_i->mu[i];
389 data->
zeta[idx] = p_i->zeta[i];
390 data->
weight[idx] = p_i->weight[i];
391 data->
charge[idx] = p_i->charge[i];
392 data->
rho[idx] = p_i->rho[i];
393 data->
theta[idx] = p_i->theta[i];
394 data->
B_r[idx] = p_i->B_r[i];
395 data->
B_phi[idx] = p_i->B_phi[i];
396 data->
B_z[idx] = p_i->B_z[i];
400 if(ipoint == data->
Npnt) {
412 if( dt <= 0 || p_f->endcond[i] > 0 ) {
413 idx = imrk * data->
Npnt + ipoint;
415 data->
id[idx] = (
real)p_f->id[i];
416 data->
mileage[idx]= p_f->mileage[i];
417 data->
r[idx] = p_f->r[i];
418 data->
phi[idx] = p_f->phi[i];
419 data->
z[idx] = p_f->z[i];
420 data->
ppar[idx] = p_f->ppar[i];
421 data->
mu[idx] = p_f->mu[i];
422 data->
zeta[idx] = p_f->zeta[i];
423 data->
weight[idx] = p_f->weight[i];
424 data->
charge[idx] = p_f->charge[i];
425 data->
rho[idx] = p_f->rho[i];
426 data->
theta[idx] = p_f->theta[i];
427 data->
B_r[idx] = p_f->B_r[i];
428 data->
B_phi[idx] = p_f->B_phi[i];
429 data->
B_z[idx] = p_f->B_z[i];
433 if(ipoint == data->
Npnt) {
444 for(
int i= 0; i <
NSIMD; i++) {
446 if( p_f->id[i] > 0 && (p_f->mileage[i] != p_i->mileage[i]) ) {
459 idx = imrk * data->
Npnt + ipoint;
460 data->
id[idx] = (
real)p_f->id[i];
461 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
462 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
463 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
464 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
465 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
466 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
467 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
468 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
469 data->
charge[idx] = p_i->charge[i];
470 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
471 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
472 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
473 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
474 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
476 data->
pncrdi[idx] = 1 - 2 * (p_f->phi[i] < p_i->phi[i]);
480 if(ipoint == data->
Npnt) {
495 idx = imrk * data->
Npnt + ipoint;
496 data->
id[idx] = (
real)p_f->id[i];
497 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
498 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
499 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
500 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
501 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
502 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
503 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
504 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
505 data->
charge[idx] = p_i->charge[i];
506 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
507 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
508 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
509 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
510 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
512 data->
pncrdi[idx] = 1 - 2 * (p_f->theta[i] < p_i->theta[i]);
516 if(ipoint == data->
Npnt) {
532 idx = imrk * data->
Npnt + ipoint;
533 data->
id[idx] = (
real)p_f->id[i];
534 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
535 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
536 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
537 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
538 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
539 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
540 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
541 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
542 data->
charge[idx] = p_i->charge[i];
543 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
544 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
545 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
546 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
547 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
550 data->
pncrdi[idx] = 1 - 2 * (p_f->rho[i] < p_i->rho[i]);
553 if(ipoint == data->
Npnt) {
580 for(
int i= 0; i <
NSIMD; i++) {
589 if( data->
id[imrk * data->
Npnt] == 0 ) {
590 data->
id[idx] = (
real)p_i->id[i];
591 data->
mileage[idx] = p_i->mileage[i];
592 data->
r[idx] = p_i->r[i];
593 data->
phi[idx] = p_i->phi[i];
594 data->
z[idx] = p_i->z[i];
595 data->
rho[idx] = p_i->rho[i];
596 data->
theta[idx] = p_i->theta[i];
597 data->
B_r[idx] = p_i->B_r[i];
598 data->
B_phi[idx] = p_i->B_phi[i];
599 data->
B_z[idx] = p_i->B_z[i];
603 if(ipoint == data->
Npnt) {
614 if( dt <= 0 || p_f->endcond[i] > 0 ) {
615 idx = imrk * data->
Npnt + ipoint;
616 data->
id[idx] = (
real)p_f->id[i];
617 data->
mileage[idx] = p_f->mileage[i];
618 data->
r[idx] = p_f->r[i];
619 data->
phi[idx] = p_f->phi[i];
620 data->
z[idx] = p_f->z[i];
621 data->
rho[idx] = p_f->rho[i];
622 data->
theta[idx] = p_f->theta[i];
623 data->
B_r[idx] = p_f->B_r[i];
624 data->
B_phi[idx] = p_f->B_phi[i];
625 data->
B_z[idx] = p_f->B_z[i];
629 if(ipoint == data->
Npnt) {
640 for(
int i= 0; i <
NSIMD; i++) {
642 if( p_f->id[i] > 0 && (p_f->mileage[i] != p_i->mileage[i]) ) {
655 idx = imrk * data->
Npnt + ipoint;
656 data->
id[idx] = (
real)p_f->id[i];
657 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
658 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
659 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
660 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
661 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
662 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
663 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
664 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
665 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
667 data->
pncrdi[idx] = 1 - 2 * (p_f->phi[i] < p_i->phi[i]);
671 if(ipoint == data->
Npnt) {
686 idx = imrk * data->
Npnt + ipoint;
687 data->
id[idx] = (
real)p_f->id[i];
688 data->
mileage[idx]= k*p_f->mileage[i] + d*p_i->mileage[i];
689 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
690 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
691 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
692 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
693 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
694 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
695 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
696 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
698 data->
pncrdi[idx] = 1 - 2 * (p_f->theta[i] < p_i->theta[i]);
702 if(ipoint == data->
Npnt) {
717 idx = imrk * data->
Npnt + ipoint;
718 data->
id[idx] = (
real)p_f->id[i];
719 data->
mileage[idx]= k*p_f->mileage[i] + d*p_i->mileage[i];
720 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
721 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
722 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
723 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
724 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
725 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
726 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
727 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
732 if(ipoint == data->
Npnt) {
Struct representing NSIMD particle markers.
Struct representing NSIMD guiding center markers.
Struct representing NSIMD field line markers.