344 for(
int i= 0; i <
NSIMD; i++) {
353 if( data->
id[imrk * data->
Npnt] == 0 ) {
354 data->
id[idx] = (
real)(p_i->id[i]);
355 data->
mileage[idx]= p_i->mileage[i];
356 data->
r[idx] = p_i->r[i];
357 data->
phi[idx] = p_i->phi[i];
358 data->
z[idx] = p_i->z[i];
359 data->
ppar[idx] = p_i->ppar[i];
360 data->
mu[idx] = p_i->mu[i];
361 data->
zeta[idx] = p_i->zeta[i];
362 data->
weight[idx] = p_i->weight[i];
363 data->
charge[idx] = p_i->charge[i];
364 data->
rho[idx] = p_i->rho[i];
365 data->
theta[idx] = p_i->theta[i];
366 data->
B_r[idx] = p_i->B_r[i];
367 data->
B_phi[idx] = p_i->B_phi[i];
368 data->
B_z[idx] = p_i->B_z[i];
372 if(ipoint == data->
Npnt) {
384 if( dt <= 0 || p_f->endcond[i] > 0 ) {
385 idx = imrk * data->
Npnt + ipoint;
387 data->
id[idx] = (
real)p_f->id[i];
388 data->
mileage[idx]= p_f->mileage[i];
389 data->
r[idx] = p_f->r[i];
390 data->
phi[idx] = p_f->phi[i];
391 data->
z[idx] = p_f->z[i];
392 data->
ppar[idx] = p_f->ppar[i];
393 data->
mu[idx] = p_f->mu[i];
394 data->
zeta[idx] = p_f->zeta[i];
395 data->
weight[idx] = p_f->weight[i];
396 data->
charge[idx] = p_f->charge[i];
397 data->
rho[idx] = p_f->rho[i];
398 data->
theta[idx] = p_f->theta[i];
399 data->
B_r[idx] = p_f->B_r[i];
400 data->
B_phi[idx] = p_f->B_phi[i];
401 data->
B_z[idx] = p_f->B_z[i];
405 if(ipoint == data->
Npnt) {
416 for(
int i= 0; i <
NSIMD; i++) {
418 if( p_f->id[i] > 0 && (p_f->mileage[i] != p_i->mileage[i]) ) {
431 idx = imrk * data->
Npnt + ipoint;
432 data->
id[idx] = (
real)p_f->id[i];
433 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
434 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
435 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
436 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
437 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
438 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
439 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
440 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
441 data->
charge[idx] = p_i->charge[i];
442 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
443 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
444 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
445 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
446 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
448 data->
pncrdi[idx] = 1 - 2 * (p_f->phi[i] < p_i->phi[i]);
452 if(ipoint == data->
Npnt) {
467 idx = imrk * data->
Npnt + ipoint;
468 data->
id[idx] = (
real)p_f->id[i];
469 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
470 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
471 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
472 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
473 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
474 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
475 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
476 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
477 data->
charge[idx] = p_i->charge[i];
478 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
479 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
480 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
481 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
482 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
484 data->
pncrdi[idx] = 1 - 2 * (p_f->theta[i] < p_i->theta[i]);
488 if(ipoint == data->
Npnt) {
504 idx = imrk * data->
Npnt + ipoint;
505 data->
id[idx] = (
real)p_f->id[i];
506 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
507 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
508 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
509 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
510 data->
ppar[idx] = k*p_f->ppar[i] + d*p_i->ppar[i];
511 data->
mu[idx] = k*p_f->mu[i] + d*p_i->mu[i];
512 data->
zeta[idx] = k*p_f->zeta[i] + d*p_i->zeta[i];
513 data->
weight[idx] = k*p_f->weight[i] + d*p_i->weight[i];
514 data->
charge[idx] = p_i->charge[i];
515 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
516 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
517 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
518 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
519 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
522 data->
pncrdi[idx] = 1 - 2 * (p_f->rho[i] < p_i->rho[i]);
525 if(ipoint == data->
Npnt) {
552 for(
int i= 0; i <
NSIMD; i++) {
561 if( data->
id[imrk * data->
Npnt] == 0 ) {
562 data->
id[idx] = (
real)p_i->id[i];
563 data->
mileage[idx] = p_i->mileage[i];
564 data->
r[idx] = p_i->r[i];
565 data->
phi[idx] = p_i->phi[i];
566 data->
z[idx] = p_i->z[i];
567 data->
rho[idx] = p_i->rho[i];
568 data->
theta[idx] = p_i->theta[i];
569 data->
B_r[idx] = p_i->B_r[i];
570 data->
B_phi[idx] = p_i->B_phi[i];
571 data->
B_z[idx] = p_i->B_z[i];
575 if(ipoint == data->
Npnt) {
586 if( dt <= 0 || p_f->endcond[i] > 0 ) {
587 idx = imrk * data->
Npnt + ipoint;
588 data->
id[idx] = (
real)p_f->id[i];
589 data->
mileage[idx] = p_f->mileage[i];
590 data->
r[idx] = p_f->r[i];
591 data->
phi[idx] = p_f->phi[i];
592 data->
z[idx] = p_f->z[i];
593 data->
rho[idx] = p_f->rho[i];
594 data->
theta[idx] = p_f->theta[i];
595 data->
B_r[idx] = p_f->B_r[i];
596 data->
B_phi[idx] = p_f->B_phi[i];
597 data->
B_z[idx] = p_f->B_z[i];
601 if(ipoint == data->
Npnt) {
612 for(
int i= 0; i <
NSIMD; i++) {
614 if( p_f->id[i] > 0 && (p_f->mileage[i] != p_i->mileage[i]) ) {
627 idx = imrk * data->
Npnt + ipoint;
628 data->
id[idx] = (
real)p_f->id[i];
629 data->
mileage[idx]= k*p_f->mileage[i]+ d*p_i->mileage[i];
630 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
631 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
632 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
633 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
634 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
635 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
636 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
637 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
639 data->
pncrdi[idx] = 1 - 2 * (p_f->phi[i] < p_i->phi[i]);
643 if(ipoint == data->
Npnt) {
658 idx = imrk * data->
Npnt + ipoint;
659 data->
id[idx] = (
real)p_f->id[i];
660 data->
mileage[idx]= k*p_f->mileage[i] + d*p_i->mileage[i];
661 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
662 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
663 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
664 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
665 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
666 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
667 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
668 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
670 data->
pncrdi[idx] = 1 - 2 * (p_f->theta[i] < p_i->theta[i]);
674 if(ipoint == data->
Npnt) {
689 idx = imrk * data->
Npnt + ipoint;
690 data->
id[idx] = (
real)p_f->id[i];
691 data->
mileage[idx]= k*p_f->mileage[i] + d*p_i->mileage[i];
692 data->
r[idx] = k*p_f->r[i] + d*p_i->r[i];
693 data->
phi[idx] = k*p_f->phi[i] + d*p_i->phi[i];
694 data->
z[idx] = k*p_f->z[i] + d*p_i->z[i];
695 data->
rho[idx] = k*p_f->rho[i] + d*p_i->rho[i];
696 data->
theta[idx] = k*p_f->theta[i] + d*p_i->theta[i];
697 data->
B_r[idx] = k*p_f->B_r[i] + d*p_i->B_r[i];
698 data->
B_phi[idx] = k*p_f->B_phi[i] + d*p_i->B_phi[i];
699 data->
B_z[idx] = k*p_f->B_z[i] + d*p_i->B_z[i];
704 if(ipoint == data->
Npnt) {
Struct representing NSIMD particle markers.
Struct representing NSIMD guiding center markers.
Struct representing NSIMD field line markers.