xsuite 0.40.1__cp313-cp313-macosx_11_0_arm64.whl → 0.40.2__cp313-cp313-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xsuite might be problematic. Click here for more details.
- xsuite/lib/default_base_config.c +29744 -29744
- xsuite/lib/default_base_config.cpython-313-darwin.so +0 -0
- xsuite/lib/default_base_config.json +1 -1
- xsuite/lib/default_no_config.c +38768 -38768
- xsuite/lib/default_no_config.cpython-313-darwin.so +0 -0
- xsuite/lib/default_no_config.json +1 -1
- xsuite/lib/non_tracking_kernels.c +1325 -1325
- xsuite/lib/non_tracking_kernels.cpython-313-darwin.so +0 -0
- xsuite/lib/non_tracking_kernels.json +1 -1
- xsuite/lib/only_xtrack_with_synrad.c +25275 -25275
- xsuite/lib/only_xtrack_with_synrad.cpython-313-darwin.so +0 -0
- xsuite/lib/only_xtrack_with_synrad.json +1 -1
- {xsuite-0.40.1.dist-info → xsuite-0.40.2.dist-info}/METADATA +2 -2
- xsuite-0.40.2.dist-info/RECORD +23 -0
- xsuite-0.40.1.dist-info/RECORD +0 -23
- {xsuite-0.40.1.dist-info → xsuite-0.40.2.dist-info}/WHEEL +0 -0
- {xsuite-0.40.1.dist-info → xsuite-0.40.2.dist-info}/entry_points.txt +0 -0
- {xsuite-0.40.1.dist-info → xsuite-0.40.2.dist-info}/licenses/LICENSE +0 -0
- {xsuite-0.40.1.dist-info → xsuite-0.40.2.dist-info}/top_level.txt +0 -0
|
@@ -133,24 +133,6 @@ typedef struct ArrNInt64_s * ArrNInt64;
|
|
|
133
133
|
return ( int64_t*)(( char*) obj+offset);
|
|
134
134
|
}
|
|
135
135
|
#endif
|
|
136
|
-
#ifndef XOBJ_TYPEDEF_ArrNString
|
|
137
|
-
#define XOBJ_TYPEDEF_ArrNString
|
|
138
|
-
typedef struct ArrNString_s * ArrNString;
|
|
139
|
-
static inline ArrNString ArrNString_getp(ArrNString restrict obj){
|
|
140
|
-
int64_t offset=0;
|
|
141
|
-
return (ArrNString)(( char*) obj+offset);
|
|
142
|
-
}
|
|
143
|
-
static inline int64_t ArrNString_len(ArrNString restrict obj){
|
|
144
|
-
int64_t offset=0;
|
|
145
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
146
|
-
return arr[1];
|
|
147
|
-
}
|
|
148
|
-
static inline char* ArrNString_getp1(ArrNString restrict obj, int64_t i0){
|
|
149
|
-
int64_t offset=0;
|
|
150
|
-
offset=*( int64_t*)(( char*) obj+offset+16+i0*8);
|
|
151
|
-
return ( char*)(( char*) obj+offset);
|
|
152
|
-
}
|
|
153
|
-
#endif
|
|
154
136
|
#ifndef XOBJ_TYPEDEF_ArrNUint32
|
|
155
137
|
#define XOBJ_TYPEDEF_ArrNUint32
|
|
156
138
|
typedef struct ArrNUint32_s * ArrNUint32;
|
|
@@ -179,6 +161,24 @@ typedef struct ArrNUint32_s * ArrNUint32;
|
|
|
179
161
|
return ( uint32_t*)(( char*) obj+offset);
|
|
180
162
|
}
|
|
181
163
|
#endif
|
|
164
|
+
#ifndef XOBJ_TYPEDEF_ArrNString
|
|
165
|
+
#define XOBJ_TYPEDEF_ArrNString
|
|
166
|
+
typedef struct ArrNString_s * ArrNString;
|
|
167
|
+
static inline ArrNString ArrNString_getp(ArrNString restrict obj){
|
|
168
|
+
int64_t offset=0;
|
|
169
|
+
return (ArrNString)(( char*) obj+offset);
|
|
170
|
+
}
|
|
171
|
+
static inline int64_t ArrNString_len(ArrNString restrict obj){
|
|
172
|
+
int64_t offset=0;
|
|
173
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
174
|
+
return arr[1];
|
|
175
|
+
}
|
|
176
|
+
static inline char* ArrNString_getp1(ArrNString restrict obj, int64_t i0){
|
|
177
|
+
int64_t offset=0;
|
|
178
|
+
offset=*( int64_t*)(( char*) obj+offset+16+i0*8);
|
|
179
|
+
return ( char*)(( char*) obj+offset);
|
|
180
|
+
}
|
|
181
|
+
#endif
|
|
182
182
|
#ifndef XOBJ_TYPEDEF_MultiSetterData
|
|
183
183
|
#define XOBJ_TYPEDEF_MultiSetterData
|
|
184
184
|
typedef struct MultiSetterData_s * MultiSetterData;
|
|
@@ -3368,2110 +3368,1909 @@ void LocalParticle_scale_exact_xp_yp(LocalParticle* part, double value_x, double
|
|
|
3368
3368
|
}
|
|
3369
3369
|
|
|
3370
3370
|
|
|
3371
|
-
#ifndef
|
|
3372
|
-
#define
|
|
3373
|
-
typedef struct
|
|
3374
|
-
static inline
|
|
3371
|
+
#ifndef XOBJ_TYPEDEF_RandomUniformData
|
|
3372
|
+
#define XOBJ_TYPEDEF_RandomUniformData
|
|
3373
|
+
typedef struct RandomUniformData_s * RandomUniformData;
|
|
3374
|
+
static inline RandomUniformData RandomUniformData_getp(RandomUniformData restrict obj){
|
|
3375
3375
|
int64_t offset=0;
|
|
3376
|
-
return (
|
|
3376
|
+
return (RandomUniformData)(( char*) obj+offset);
|
|
3377
3377
|
}
|
|
3378
|
-
static inline
|
|
3378
|
+
static inline uint8_t RandomUniformData_get__dummy(const RandomUniformData restrict obj){
|
|
3379
|
+
int64_t offset=0;
|
|
3380
|
+
return *(( uint8_t*) obj+offset);
|
|
3381
|
+
}
|
|
3382
|
+
static inline void RandomUniformData_set__dummy(RandomUniformData restrict obj, uint8_t value){
|
|
3383
|
+
int64_t offset=0;
|
|
3384
|
+
*(( uint8_t*) obj+offset)=value;
|
|
3385
|
+
}
|
|
3386
|
+
static inline uint8_t* RandomUniformData_getp__dummy(RandomUniformData restrict obj){
|
|
3387
|
+
int64_t offset=0;
|
|
3388
|
+
return ( uint8_t*)(( char*) obj+offset);
|
|
3389
|
+
}
|
|
3390
|
+
static inline double RandomUniformData_get__sin_rot_s(const RandomUniformData restrict obj){
|
|
3379
3391
|
int64_t offset=0;
|
|
3380
3392
|
offset+=8;
|
|
3381
|
-
return *(
|
|
3393
|
+
return *( double*)(( char*) obj+offset);
|
|
3382
3394
|
}
|
|
3383
|
-
static inline void
|
|
3395
|
+
static inline void RandomUniformData_set__sin_rot_s(RandomUniformData restrict obj, double value){
|
|
3384
3396
|
int64_t offset=0;
|
|
3385
3397
|
offset+=8;
|
|
3386
|
-
*(
|
|
3398
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3387
3399
|
}
|
|
3388
|
-
static inline
|
|
3400
|
+
static inline double* RandomUniformData_getp__sin_rot_s(RandomUniformData restrict obj){
|
|
3389
3401
|
int64_t offset=0;
|
|
3390
3402
|
offset+=8;
|
|
3391
|
-
return (
|
|
3403
|
+
return ( double*)(( char*) obj+offset);
|
|
3392
3404
|
}
|
|
3393
|
-
static inline
|
|
3405
|
+
static inline double RandomUniformData_get__cos_rot_s(const RandomUniformData restrict obj){
|
|
3394
3406
|
int64_t offset=0;
|
|
3395
3407
|
offset+=16;
|
|
3396
|
-
return *(
|
|
3408
|
+
return *( double*)(( char*) obj+offset);
|
|
3397
3409
|
}
|
|
3398
|
-
static inline void
|
|
3410
|
+
static inline void RandomUniformData_set__cos_rot_s(RandomUniformData restrict obj, double value){
|
|
3399
3411
|
int64_t offset=0;
|
|
3400
3412
|
offset+=16;
|
|
3401
|
-
*(
|
|
3413
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3402
3414
|
}
|
|
3403
|
-
static inline
|
|
3415
|
+
static inline double* RandomUniformData_getp__cos_rot_s(RandomUniformData restrict obj){
|
|
3404
3416
|
int64_t offset=0;
|
|
3405
3417
|
offset+=16;
|
|
3406
|
-
return (
|
|
3418
|
+
return ( double*)(( char*) obj+offset);
|
|
3407
3419
|
}
|
|
3408
|
-
static inline
|
|
3420
|
+
static inline double RandomUniformData_get__shift_x(const RandomUniformData restrict obj){
|
|
3409
3421
|
int64_t offset=0;
|
|
3410
3422
|
offset+=24;
|
|
3411
|
-
return *(
|
|
3423
|
+
return *( double*)(( char*) obj+offset);
|
|
3412
3424
|
}
|
|
3413
|
-
static inline void
|
|
3425
|
+
static inline void RandomUniformData_set__shift_x(RandomUniformData restrict obj, double value){
|
|
3414
3426
|
int64_t offset=0;
|
|
3415
3427
|
offset+=24;
|
|
3416
|
-
*(
|
|
3428
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3417
3429
|
}
|
|
3418
|
-
static inline
|
|
3430
|
+
static inline double* RandomUniformData_getp__shift_x(RandomUniformData restrict obj){
|
|
3419
3431
|
int64_t offset=0;
|
|
3420
3432
|
offset+=24;
|
|
3421
|
-
return (
|
|
3433
|
+
return ( double*)(( char*) obj+offset);
|
|
3422
3434
|
}
|
|
3423
|
-
static inline
|
|
3435
|
+
static inline double RandomUniformData_get__shift_y(const RandomUniformData restrict obj){
|
|
3424
3436
|
int64_t offset=0;
|
|
3425
3437
|
offset+=32;
|
|
3426
|
-
return *(
|
|
3438
|
+
return *( double*)(( char*) obj+offset);
|
|
3427
3439
|
}
|
|
3428
|
-
static inline void
|
|
3440
|
+
static inline void RandomUniformData_set__shift_y(RandomUniformData restrict obj, double value){
|
|
3429
3441
|
int64_t offset=0;
|
|
3430
3442
|
offset+=32;
|
|
3431
|
-
*(
|
|
3443
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3432
3444
|
}
|
|
3433
|
-
static inline
|
|
3445
|
+
static inline double* RandomUniformData_getp__shift_y(RandomUniformData restrict obj){
|
|
3434
3446
|
int64_t offset=0;
|
|
3435
3447
|
offset+=32;
|
|
3436
|
-
return (
|
|
3448
|
+
return ( double*)(( char*) obj+offset);
|
|
3437
3449
|
}
|
|
3438
|
-
static inline
|
|
3450
|
+
static inline double RandomUniformData_get__shift_s(const RandomUniformData restrict obj){
|
|
3439
3451
|
int64_t offset=0;
|
|
3440
3452
|
offset+=40;
|
|
3441
|
-
return *(
|
|
3453
|
+
return *( double*)(( char*) obj+offset);
|
|
3442
3454
|
}
|
|
3443
|
-
static inline void
|
|
3455
|
+
static inline void RandomUniformData_set__shift_s(RandomUniformData restrict obj, double value){
|
|
3444
3456
|
int64_t offset=0;
|
|
3445
3457
|
offset+=40;
|
|
3446
|
-
*(
|
|
3458
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3447
3459
|
}
|
|
3448
|
-
static inline
|
|
3460
|
+
static inline double* RandomUniformData_getp__shift_s(RandomUniformData restrict obj){
|
|
3449
3461
|
int64_t offset=0;
|
|
3450
3462
|
offset+=40;
|
|
3451
|
-
return (
|
|
3463
|
+
return ( double*)(( char*) obj+offset);
|
|
3452
3464
|
}
|
|
3453
|
-
static inline
|
|
3465
|
+
static inline double RandomUniformData_get__rot_x_rad(const RandomUniformData restrict obj){
|
|
3454
3466
|
int64_t offset=0;
|
|
3455
3467
|
offset+=48;
|
|
3456
|
-
return *(
|
|
3468
|
+
return *( double*)(( char*) obj+offset);
|
|
3457
3469
|
}
|
|
3458
|
-
static inline void
|
|
3470
|
+
static inline void RandomUniformData_set__rot_x_rad(RandomUniformData restrict obj, double value){
|
|
3459
3471
|
int64_t offset=0;
|
|
3460
3472
|
offset+=48;
|
|
3461
|
-
*(
|
|
3473
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3462
3474
|
}
|
|
3463
|
-
static inline
|
|
3475
|
+
static inline double* RandomUniformData_getp__rot_x_rad(RandomUniformData restrict obj){
|
|
3464
3476
|
int64_t offset=0;
|
|
3465
3477
|
offset+=48;
|
|
3466
|
-
return (
|
|
3478
|
+
return ( double*)(( char*) obj+offset);
|
|
3467
3479
|
}
|
|
3468
|
-
static inline
|
|
3480
|
+
static inline double RandomUniformData_get__rot_y_rad(const RandomUniformData restrict obj){
|
|
3469
3481
|
int64_t offset=0;
|
|
3470
3482
|
offset+=56;
|
|
3471
|
-
return *(
|
|
3483
|
+
return *( double*)(( char*) obj+offset);
|
|
3472
3484
|
}
|
|
3473
|
-
static inline void
|
|
3485
|
+
static inline void RandomUniformData_set__rot_y_rad(RandomUniformData restrict obj, double value){
|
|
3474
3486
|
int64_t offset=0;
|
|
3475
3487
|
offset+=56;
|
|
3476
|
-
*(
|
|
3488
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3477
3489
|
}
|
|
3478
|
-
static inline
|
|
3490
|
+
static inline double* RandomUniformData_getp__rot_y_rad(RandomUniformData restrict obj){
|
|
3479
3491
|
int64_t offset=0;
|
|
3480
3492
|
offset+=56;
|
|
3481
|
-
return (
|
|
3493
|
+
return ( double*)(( char*) obj+offset);
|
|
3482
3494
|
}
|
|
3483
|
-
static inline
|
|
3495
|
+
static inline double RandomUniformData_get__rot_s_rad_no_frame(const RandomUniformData restrict obj){
|
|
3484
3496
|
int64_t offset=0;
|
|
3485
3497
|
offset+=64;
|
|
3486
|
-
return *(
|
|
3498
|
+
return *( double*)(( char*) obj+offset);
|
|
3487
3499
|
}
|
|
3488
|
-
static inline void
|
|
3500
|
+
static inline void RandomUniformData_set__rot_s_rad_no_frame(RandomUniformData restrict obj, double value){
|
|
3489
3501
|
int64_t offset=0;
|
|
3490
3502
|
offset+=64;
|
|
3491
|
-
*(
|
|
3503
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3492
3504
|
}
|
|
3493
|
-
static inline
|
|
3505
|
+
static inline double* RandomUniformData_getp__rot_s_rad_no_frame(RandomUniformData restrict obj){
|
|
3494
3506
|
int64_t offset=0;
|
|
3495
3507
|
offset+=64;
|
|
3496
|
-
return (
|
|
3497
|
-
}
|
|
3498
|
-
static inline int64_t ParticlesMonitorData_get_flag_auto_to_numpy(const ParticlesMonitorData restrict obj){
|
|
3499
|
-
int64_t offset=0;
|
|
3500
|
-
offset+=72;
|
|
3501
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
3502
|
-
}
|
|
3503
|
-
static inline void ParticlesMonitorData_set_flag_auto_to_numpy(ParticlesMonitorData restrict obj, int64_t value){
|
|
3504
|
-
int64_t offset=0;
|
|
3505
|
-
offset+=72;
|
|
3506
|
-
*( int64_t*)(( char*) obj+offset)=value;
|
|
3508
|
+
return ( double*)(( char*) obj+offset);
|
|
3507
3509
|
}
|
|
3508
|
-
static inline
|
|
3510
|
+
static inline double RandomUniformData_get_rot_shift_anchor(const RandomUniformData restrict obj){
|
|
3509
3511
|
int64_t offset=0;
|
|
3510
3512
|
offset+=72;
|
|
3511
|
-
return ( int64_t*)(( char*) obj+offset);
|
|
3512
|
-
}
|
|
3513
|
-
static inline ParticlesData ParticlesMonitorData_getp_data(ParticlesMonitorData restrict obj){
|
|
3514
|
-
int64_t offset=0;
|
|
3515
|
-
offset+=152;
|
|
3516
|
-
return (ParticlesData)(( char*) obj+offset);
|
|
3517
|
-
}
|
|
3518
|
-
static inline int64_t ParticlesMonitorData_get_data__capacity(const ParticlesMonitorData restrict obj){
|
|
3519
|
-
int64_t offset=0;
|
|
3520
|
-
offset+=160;
|
|
3521
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
3522
|
-
}
|
|
3523
|
-
static inline void ParticlesMonitorData_set_data__capacity(ParticlesMonitorData restrict obj, int64_t value){
|
|
3524
|
-
int64_t offset=0;
|
|
3525
|
-
offset+=160;
|
|
3526
|
-
*( int64_t*)(( char*) obj+offset)=value;
|
|
3527
|
-
}
|
|
3528
|
-
static inline int64_t* ParticlesMonitorData_getp_data__capacity(ParticlesMonitorData restrict obj){
|
|
3529
|
-
int64_t offset=0;
|
|
3530
|
-
offset+=160;
|
|
3531
|
-
return ( int64_t*)(( char*) obj+offset);
|
|
3532
|
-
}
|
|
3533
|
-
static inline int64_t ParticlesMonitorData_get_data__num_active_particles(const ParticlesMonitorData restrict obj){
|
|
3534
|
-
int64_t offset=0;
|
|
3535
|
-
offset+=168;
|
|
3536
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
3537
|
-
}
|
|
3538
|
-
static inline void ParticlesMonitorData_set_data__num_active_particles(ParticlesMonitorData restrict obj, int64_t value){
|
|
3539
|
-
int64_t offset=0;
|
|
3540
|
-
offset+=168;
|
|
3541
|
-
*( int64_t*)(( char*) obj+offset)=value;
|
|
3542
|
-
}
|
|
3543
|
-
static inline int64_t* ParticlesMonitorData_getp_data__num_active_particles(ParticlesMonitorData restrict obj){
|
|
3544
|
-
int64_t offset=0;
|
|
3545
|
-
offset+=168;
|
|
3546
|
-
return ( int64_t*)(( char*) obj+offset);
|
|
3547
|
-
}
|
|
3548
|
-
static inline int64_t ParticlesMonitorData_get_data__num_lost_particles(const ParticlesMonitorData restrict obj){
|
|
3549
|
-
int64_t offset=0;
|
|
3550
|
-
offset+=176;
|
|
3551
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
3552
|
-
}
|
|
3553
|
-
static inline void ParticlesMonitorData_set_data__num_lost_particles(ParticlesMonitorData restrict obj, int64_t value){
|
|
3554
|
-
int64_t offset=0;
|
|
3555
|
-
offset+=176;
|
|
3556
|
-
*( int64_t*)(( char*) obj+offset)=value;
|
|
3557
|
-
}
|
|
3558
|
-
static inline int64_t* ParticlesMonitorData_getp_data__num_lost_particles(ParticlesMonitorData restrict obj){
|
|
3559
|
-
int64_t offset=0;
|
|
3560
|
-
offset+=176;
|
|
3561
|
-
return ( int64_t*)(( char*) obj+offset);
|
|
3562
|
-
}
|
|
3563
|
-
static inline int64_t ParticlesMonitorData_get_data_start_tracking_at_element(const ParticlesMonitorData restrict obj){
|
|
3564
|
-
int64_t offset=0;
|
|
3565
|
-
offset+=184;
|
|
3566
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
3567
|
-
}
|
|
3568
|
-
static inline void ParticlesMonitorData_set_data_start_tracking_at_element(ParticlesMonitorData restrict obj, int64_t value){
|
|
3569
|
-
int64_t offset=0;
|
|
3570
|
-
offset+=184;
|
|
3571
|
-
*( int64_t*)(( char*) obj+offset)=value;
|
|
3572
|
-
}
|
|
3573
|
-
static inline int64_t* ParticlesMonitorData_getp_data_start_tracking_at_element(ParticlesMonitorData restrict obj){
|
|
3574
|
-
int64_t offset=0;
|
|
3575
|
-
offset+=184;
|
|
3576
|
-
return ( int64_t*)(( char*) obj+offset);
|
|
3577
|
-
}
|
|
3578
|
-
static inline double ParticlesMonitorData_get_data_q0(const ParticlesMonitorData restrict obj){
|
|
3579
|
-
int64_t offset=0;
|
|
3580
|
-
offset+=192;
|
|
3581
3513
|
return *( double*)(( char*) obj+offset);
|
|
3582
3514
|
}
|
|
3583
|
-
static inline void
|
|
3515
|
+
static inline void RandomUniformData_set_rot_shift_anchor(RandomUniformData restrict obj, double value){
|
|
3584
3516
|
int64_t offset=0;
|
|
3585
|
-
offset+=
|
|
3517
|
+
offset+=72;
|
|
3586
3518
|
*( double*)(( char*) obj+offset)=value;
|
|
3587
3519
|
}
|
|
3588
|
-
static inline double*
|
|
3520
|
+
static inline double* RandomUniformData_getp_rot_shift_anchor(RandomUniformData restrict obj){
|
|
3589
3521
|
int64_t offset=0;
|
|
3590
|
-
offset+=
|
|
3522
|
+
offset+=72;
|
|
3591
3523
|
return ( double*)(( char*) obj+offset);
|
|
3592
3524
|
}
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3525
|
+
#endif
|
|
3526
|
+
// copyright ############################### //
|
|
3527
|
+
// This file is part of the Xtrack Package. //
|
|
3528
|
+
// Copyright (c) CERN, 2021. //
|
|
3529
|
+
// ######################################### //
|
|
3530
|
+
|
|
3531
|
+
#ifndef XTRACK_CONSTANTS_H
|
|
3532
|
+
#define XTRACK_CONSTANTS_H
|
|
3533
|
+
|
|
3534
|
+
#if !defined( C_LIGHT )
|
|
3535
|
+
#define C_LIGHT ( 299792458.0 )
|
|
3536
|
+
#endif /* !defined( C_LIGHT ) */
|
|
3537
|
+
|
|
3538
|
+
#if !defined( EPSILON_0 )
|
|
3539
|
+
#define EPSILON_0 (8.854187817620e-12)
|
|
3540
|
+
#endif /* !defined( EPSILON_0 ) */
|
|
3541
|
+
|
|
3542
|
+
#if !defined( PI )
|
|
3543
|
+
#define PI (3.1415926535897932384626433832795028841971693993751)
|
|
3544
|
+
#endif /* !defined( PI ) */
|
|
3545
|
+
|
|
3546
|
+
#if !defined( MU_0 )
|
|
3547
|
+
#define MU_0 (PI*4.0e-7)
|
|
3548
|
+
#endif /* !defined( MU_0 ) */
|
|
3549
|
+
|
|
3550
|
+
#if !defined( DEG2RAD )
|
|
3551
|
+
#define DEG2RAD (0.0174532925199432957692369076848861271344287188854)
|
|
3552
|
+
#endif /* !defiend( DEG2RAD ) */
|
|
3553
|
+
|
|
3554
|
+
#if !defined( RAD2DEG )
|
|
3555
|
+
#define RAD2DEG (57.29577951308232087679815481410517033240547246656442)
|
|
3556
|
+
#endif /* !defiend( RAD2DEG ) */
|
|
3557
|
+
|
|
3558
|
+
#if !defined( SQRT_PI )
|
|
3559
|
+
#define SQRT_PI (1.7724538509055160272981674833411451827975494561224)
|
|
3560
|
+
#endif /* !defined( SQRT_PI ) */
|
|
3561
|
+
|
|
3562
|
+
#if !defined( QELEM )
|
|
3563
|
+
#define QELEM (1.60217662e-19)
|
|
3564
|
+
#endif /* !defined( QELEM ) */
|
|
3565
|
+
|
|
3566
|
+
#if !defined( DBL_MAX )
|
|
3567
|
+
#define DBL_MAX (1.7976931348623158e+308)
|
|
3568
|
+
#endif /* !defined( DBL_MAX ) */
|
|
3569
|
+
|
|
3570
|
+
#if !defined( DBL_MIN )
|
|
3571
|
+
#define DBL_MIN (2.2250738585072014e-308)
|
|
3572
|
+
#endif /* !defined( DBL_MIN ) */
|
|
3573
|
+
|
|
3574
|
+
#if !defined( DBL_EPSILON )
|
|
3575
|
+
#define DBL_EPSILON (2.2204460492503131e-16)
|
|
3576
|
+
#endif /* !defined( DBL_EPSILON ) */
|
|
3577
|
+
|
|
3578
|
+
#if !defined( RADIUS_ELECTRON )
|
|
3579
|
+
#define RADIUS_ELECTRON (2.8179403262e-15)
|
|
3580
|
+
#endif /* !defined( RADIUS_ELECTRON ) */
|
|
3581
|
+
|
|
3582
|
+
#if !defined( MASS_ELECTRON )
|
|
3583
|
+
#define MASS_ELECTRON (9.1093837e-31)
|
|
3584
|
+
#endif /* !defined( MASS_ELECTRON ) */
|
|
3585
|
+
|
|
3586
|
+
#endif /* XTRACK_CONSTANTS_H */
|
|
3587
|
+
|
|
3588
|
+
// copyright ############################### //
|
|
3589
|
+
// This file is part of the Xtrack Package. //
|
|
3590
|
+
// Copyright (c) CERN, 2023. //
|
|
3591
|
+
// ######################################### //
|
|
3592
|
+
|
|
3593
|
+
#ifndef XTRACK_FUNCTIONS_H
|
|
3594
|
+
#define XTRACK_FUNCTIONS_H
|
|
3595
|
+
|
|
3596
|
+
#include <headers/track.h>
|
|
3597
|
+
|
|
3598
|
+
|
|
3599
|
+
GPUFUN
|
|
3600
|
+
void kill_all_particles(LocalParticle* part0, int64_t kill_state) {
|
|
3601
|
+
START_PER_PARTICLE_BLOCK(part0, part);
|
|
3602
|
+
LocalParticle_kill_particle(part, kill_state);
|
|
3603
|
+
END_PER_PARTICLE_BLOCK;
|
|
3645
3604
|
}
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3605
|
+
|
|
3606
|
+
|
|
3607
|
+
GPUFUN
|
|
3608
|
+
int8_t assert_tracking(LocalParticle* part, int64_t kill_state){
|
|
3609
|
+
// Whenever we are not tracking, e.g. in a twiss, the particle will be at_turn < 0.
|
|
3610
|
+
// We test this to distinguish genuine tracking from twiss.
|
|
3611
|
+
if (LocalParticle_get_at_turn(part) < 0){
|
|
3612
|
+
LocalParticle_kill_particle(part, kill_state);
|
|
3613
|
+
return 0;
|
|
3614
|
+
}
|
|
3615
|
+
return 1;
|
|
3651
3616
|
}
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3617
|
+
|
|
3618
|
+
#endif /* XTRACK_FUNCTIONS_H */
|
|
3619
|
+
|
|
3620
|
+
// copyright ############################### //
|
|
3621
|
+
// This file is part of the Xtrack Package. //
|
|
3622
|
+
// Copyright (c) CERN, 2023. //
|
|
3623
|
+
// ######################################### //
|
|
3624
|
+
|
|
3625
|
+
#ifndef XTRACK_PARTICLE_STATES_H
|
|
3626
|
+
#define XTRACK_PARTICLE_STATES_H
|
|
3627
|
+
|
|
3628
|
+
#define XT_LOST_ON_APERTURE 0
|
|
3629
|
+
#define XT_LOST_ON_LONG_CUT -2
|
|
3630
|
+
#define XT_LOST_ALL_E_IN_SYNRAD -10
|
|
3631
|
+
#define RNG_ERR_SEEDS_NOT_SET -20
|
|
3632
|
+
#define RNG_ERR_INVALID_TRACK -21
|
|
3633
|
+
#define RNG_ERR_RUTH_NOT_SET -22
|
|
3634
|
+
#define XT_INVALID_SLICE_TRANSFORM -40
|
|
3635
|
+
#define XT_INVALID_CURVED_SLICE_TRANSFORM -41
|
|
3636
|
+
|
|
3637
|
+
#endif /* XTRACK_PARTICLE_STATES_H */
|
|
3638
|
+
|
|
3639
|
+
// copyright ############################### //
|
|
3640
|
+
// This file is part of the Xtrack Package. //
|
|
3641
|
+
// Copyright (c) CERN, 2025. //
|
|
3642
|
+
// ######################################### //
|
|
3643
|
+
#ifndef XTRACK_TRACK_SROTATION_H
|
|
3644
|
+
#define XTRACK_TRACK_SROTATION_H
|
|
3645
|
+
|
|
3646
|
+
#include <headers/track.h>
|
|
3647
|
+
|
|
3648
|
+
|
|
3649
|
+
GPUFUN
|
|
3650
|
+
void SRotation_single_particle(LocalParticle* part, double sin_z, double cos_z)
|
|
3651
|
+
{
|
|
3652
|
+
double const x = LocalParticle_get_x(part);
|
|
3653
|
+
double const y = LocalParticle_get_y(part);
|
|
3654
|
+
double const px = LocalParticle_get_px(part);
|
|
3655
|
+
double const py = LocalParticle_get_py(part);
|
|
3656
|
+
|
|
3657
|
+
double const x_hat = cos_z * x + sin_z * y;
|
|
3658
|
+
double const y_hat = -sin_z * x + cos_z * y;
|
|
3659
|
+
double const px_hat = cos_z * px + sin_z * py;
|
|
3660
|
+
double const py_hat = -sin_z * px + cos_z * py;
|
|
3661
|
+
|
|
3662
|
+
LocalParticle_set_x(part, x_hat);
|
|
3663
|
+
LocalParticle_set_y(part, y_hat);
|
|
3664
|
+
LocalParticle_set_px(part, px_hat);
|
|
3665
|
+
LocalParticle_set_py(part, py_hat);
|
|
3657
3666
|
}
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3667
|
+
|
|
3668
|
+
#endif
|
|
3669
|
+
// copyright ############################### //
|
|
3670
|
+
// This file is part of the Xtrack Package. //
|
|
3671
|
+
// Copyright (c) CERN, 2021. //
|
|
3672
|
+
// ######################################### //
|
|
3673
|
+
|
|
3674
|
+
#ifndef XTRACK_TRACK_DRIFT_H
|
|
3675
|
+
#define XTRACK_TRACK_DRIFT_H
|
|
3676
|
+
|
|
3677
|
+
|
|
3678
|
+
GPUFUN
|
|
3679
|
+
void Drift_single_particle_expanded(LocalParticle* part, double length){
|
|
3680
|
+
double const rpp = LocalParticle_get_rpp(part);
|
|
3681
|
+
double const rv0v = 1./LocalParticle_get_rvv(part);
|
|
3682
|
+
double const xp = LocalParticle_get_px(part) * rpp;
|
|
3683
|
+
double const yp = LocalParticle_get_py(part) * rpp;
|
|
3684
|
+
double const dzeta = 1 - rv0v * ( 1. + ( xp*xp + yp*yp ) / 2. );
|
|
3685
|
+
|
|
3686
|
+
LocalParticle_add_to_x(part, xp * length );
|
|
3687
|
+
LocalParticle_add_to_y(part, yp * length );
|
|
3688
|
+
LocalParticle_add_to_s(part, length);
|
|
3689
|
+
LocalParticle_add_to_zeta(part, length * dzeta );
|
|
3664
3690
|
}
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3691
|
+
|
|
3692
|
+
|
|
3693
|
+
GPUFUN
|
|
3694
|
+
void Drift_single_particle_exact(LocalParticle* part, double length){
|
|
3695
|
+
double const px = LocalParticle_get_px(part);
|
|
3696
|
+
double const py = LocalParticle_get_py(part);
|
|
3697
|
+
double const rv0v = 1./LocalParticle_get_rvv(part);
|
|
3698
|
+
double const one_plus_delta = 1. + LocalParticle_get_delta(part);
|
|
3699
|
+
|
|
3700
|
+
double const one_over_pz = 1./sqrt(one_plus_delta*one_plus_delta
|
|
3701
|
+
- px * px - py * py);
|
|
3702
|
+
double const dzeta = 1 - rv0v * one_plus_delta * one_over_pz;
|
|
3703
|
+
|
|
3704
|
+
LocalParticle_add_to_x(part, px * one_over_pz * length);
|
|
3705
|
+
LocalParticle_add_to_y(part, py * one_over_pz * length);
|
|
3706
|
+
LocalParticle_add_to_zeta(part, dzeta * length);
|
|
3707
|
+
LocalParticle_add_to_s(part, length);
|
|
3671
3708
|
}
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3709
|
+
|
|
3710
|
+
|
|
3711
|
+
GPUFUN
|
|
3712
|
+
void Drift_single_particle(LocalParticle* part, double length){
|
|
3713
|
+
#ifndef XTRACK_USE_EXACT_DRIFTS
|
|
3714
|
+
Drift_single_particle_expanded(part, length);
|
|
3715
|
+
#else
|
|
3716
|
+
Drift_single_particle_exact(part, length);
|
|
3717
|
+
#endif
|
|
3678
3718
|
}
|
|
3679
|
-
|
|
3719
|
+
|
|
3720
|
+
|
|
3721
|
+
#endif /* XTRACK_TRACK_DRIFT_H */
|
|
3722
|
+
|
|
3723
|
+
|
|
3724
|
+
#ifndef XSTUITE_TRACK_FLAGS_H
|
|
3725
|
+
#define XSTUITE_TRACK_FLAGS_H
|
|
3726
|
+
#define XS_FLAG_BACKTRACK (0)
|
|
3727
|
+
#define XS_FLAG_KILL_CAVITY_KICK (2)
|
|
3728
|
+
#define XS_FLAG_IGNORE_GLOBAL_APERTURE (3)
|
|
3729
|
+
#define XS_FLAG_IGNORE_LOCAL_APERTURE (4)
|
|
3730
|
+
#define XS_FLAG_SR_TAPER (5)
|
|
3731
|
+
#define XS_FLAG_SR_KICK_SAME_AS_FIRST (6)
|
|
3732
|
+
|
|
3733
|
+
#endif // XSTUITE_TRACK_FLAGS_H
|
|
3734
|
+
|
|
3735
|
+
#include <random/random_src/uniform.h>
|
|
3736
|
+
|
|
3737
|
+
|
|
3738
|
+
void sample_uniform(
|
|
3739
|
+
RandomUniformData el,
|
|
3740
|
+
|
|
3741
|
+
ParticlesData particles,
|
|
3742
|
+
double* samples, int64_t n_samples_per_seed,
|
|
3743
|
+
int64_t flag_increment_at_element,
|
|
3744
|
+
int8_t* io_buffer){
|
|
3745
|
+
|
|
3746
|
+
// #define CONTEXT_OPENMP //only_for_context cpu_openmp
|
|
3747
|
+
#ifdef CONTEXT_OPENMP
|
|
3748
|
+
const int64_t capacity = ParticlesData_get__capacity(particles);
|
|
3749
|
+
const int num_threads = omp_get_max_threads();
|
|
3750
|
+
|
|
3751
|
+
#ifndef XT_OMP_SKIP_REORGANIZE
|
|
3752
|
+
const int64_t num_particles_to_track = ParticlesData_get__num_active_particles(particles);
|
|
3753
|
+
|
|
3754
|
+
{
|
|
3755
|
+
LocalParticle lpart;
|
|
3756
|
+
lpart.io_buffer = io_buffer;
|
|
3757
|
+
Particles_to_LocalParticle(particles, &lpart, 0, capacity);
|
|
3758
|
+
check_is_active(&lpart);
|
|
3759
|
+
count_reorganized_particles(&lpart);
|
|
3760
|
+
LocalParticle_to_Particles(&lpart, particles, 0, capacity);
|
|
3761
|
+
}
|
|
3762
|
+
#else // When we skip reorganize, we cannot just batch active particles
|
|
3763
|
+
const int64_t num_particles_to_track = capacity;
|
|
3764
|
+
#endif
|
|
3765
|
+
|
|
3766
|
+
const int64_t chunk_size = (num_particles_to_track + num_threads - 1)/num_threads; // ceil division
|
|
3767
|
+
#endif // CONTEXT_OPENMP
|
|
3768
|
+
|
|
3769
|
+
// #pragma omp parallel for //only_for_context cpu_openmp
|
|
3770
|
+
// for (int64_t batch_id = 0; batch_id < num_threads; batch_id++) { //only_for_context cpu_openmp
|
|
3771
|
+
LocalParticle lpart;
|
|
3772
|
+
lpart.io_buffer = io_buffer;
|
|
3773
|
+
lpart.track_flags = 0;
|
|
3774
|
+
// int64_t part_id = batch_id * chunk_size; //only_for_context cpu_openmp
|
|
3775
|
+
// int64_t end_id = (batch_id + 1) * chunk_size; //only_for_context cpu_openmp
|
|
3776
|
+
// if (end_id > num_particles_to_track) end_id = num_particles_to_track; //only_for_context cpu_openmp
|
|
3777
|
+
|
|
3778
|
+
int64_t part_id = 0; //only_for_context cpu_serial
|
|
3779
|
+
// int64_t part_id = blockDim.x * blockIdx.x + threadIdx.x; //only_for_context cuda
|
|
3780
|
+
// int64_t part_id = get_global_id(0); //only_for_context opencl
|
|
3781
|
+
int64_t end_id = 0; // unused outside of openmp //only_for_context cpu_serial cuda opencl
|
|
3782
|
+
|
|
3783
|
+
int64_t part_capacity = ParticlesData_get__capacity(particles);
|
|
3784
|
+
if (part_id<part_capacity){
|
|
3785
|
+
Particles_to_LocalParticle(particles, &lpart, part_id, end_id);
|
|
3786
|
+
if (check_is_active(&lpart)>0){
|
|
3787
|
+
RandomUniform_sample(el, &lpart, samples, n_samples_per_seed);
|
|
3788
|
+
|
|
3789
|
+
}
|
|
3790
|
+
if (check_is_active(&lpart)>0 && flag_increment_at_element){
|
|
3791
|
+
increment_at_element(&lpart, 1);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
// } //only_for_context cpu_openmp
|
|
3795
|
+
|
|
3796
|
+
// On OpenMP we want to additionally by default reorganize all
|
|
3797
|
+
// the particles.
|
|
3798
|
+
// #ifndef XT_OMP_SKIP_REORGANIZE //only_for_context cpu_openmp
|
|
3799
|
+
// LocalParticle lpart; //only_for_context cpu_openmp
|
|
3800
|
+
// lpart.io_buffer = io_buffer; //only_for_context cpu_openmp
|
|
3801
|
+
// Particles_to_LocalParticle(particles, &lpart, 0, capacity);//only_for_context cpu_openmp
|
|
3802
|
+
// check_is_active(&lpart); //only_for_context cpu_openmp
|
|
3803
|
+
// #endif //only_for_context cpu_openmp
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
#ifndef XOBJ_TYPEDEF_ParticlesMonitorData
|
|
3807
|
+
#define XOBJ_TYPEDEF_ParticlesMonitorData
|
|
3808
|
+
typedef struct ParticlesMonitorData_s * ParticlesMonitorData;
|
|
3809
|
+
static inline ParticlesMonitorData ParticlesMonitorData_getp(ParticlesMonitorData restrict obj){
|
|
3680
3810
|
int64_t offset=0;
|
|
3681
|
-
offset
|
|
3682
|
-
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3683
|
-
offset+=16+i0*8;
|
|
3684
|
-
return ( double*)(( char*) obj+offset);
|
|
3811
|
+
return (ParticlesMonitorData)(( char*) obj+offset);
|
|
3685
3812
|
}
|
|
3686
|
-
static inline
|
|
3813
|
+
static inline int64_t ParticlesMonitorData_get_start_at_turn(const ParticlesMonitorData restrict obj){
|
|
3687
3814
|
int64_t offset=0;
|
|
3688
|
-
offset+=
|
|
3689
|
-
|
|
3690
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
3815
|
+
offset+=8;
|
|
3816
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3691
3817
|
}
|
|
3692
|
-
static inline
|
|
3818
|
+
static inline void ParticlesMonitorData_set_start_at_turn(ParticlesMonitorData restrict obj, int64_t value){
|
|
3693
3819
|
int64_t offset=0;
|
|
3694
|
-
offset+=
|
|
3695
|
-
|
|
3696
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3697
|
-
return arr[1];
|
|
3820
|
+
offset+=8;
|
|
3821
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3698
3822
|
}
|
|
3699
|
-
static inline
|
|
3823
|
+
static inline int64_t* ParticlesMonitorData_getp_start_at_turn(ParticlesMonitorData restrict obj){
|
|
3700
3824
|
int64_t offset=0;
|
|
3701
|
-
offset+=
|
|
3702
|
-
|
|
3703
|
-
offset+=16+i0*8;
|
|
3704
|
-
return *( double*)(( char*) obj+offset);
|
|
3825
|
+
offset+=8;
|
|
3826
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3705
3827
|
}
|
|
3706
|
-
static inline
|
|
3828
|
+
static inline int64_t ParticlesMonitorData_get_stop_at_turn(const ParticlesMonitorData restrict obj){
|
|
3707
3829
|
int64_t offset=0;
|
|
3708
|
-
offset+=
|
|
3709
|
-
|
|
3710
|
-
offset+=16+i0*8;
|
|
3711
|
-
*( double*)(( char*) obj+offset)=value;
|
|
3830
|
+
offset+=16;
|
|
3831
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3712
3832
|
}
|
|
3713
|
-
static inline
|
|
3833
|
+
static inline void ParticlesMonitorData_set_stop_at_turn(ParticlesMonitorData restrict obj, int64_t value){
|
|
3714
3834
|
int64_t offset=0;
|
|
3715
|
-
offset+=
|
|
3716
|
-
|
|
3717
|
-
offset+=16+i0*8;
|
|
3718
|
-
return ( double*)(( char*) obj+offset);
|
|
3835
|
+
offset+=16;
|
|
3836
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3719
3837
|
}
|
|
3720
|
-
static inline
|
|
3838
|
+
static inline int64_t* ParticlesMonitorData_getp_stop_at_turn(ParticlesMonitorData restrict obj){
|
|
3721
3839
|
int64_t offset=0;
|
|
3722
|
-
offset+=
|
|
3723
|
-
|
|
3724
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
3840
|
+
offset+=16;
|
|
3841
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3725
3842
|
}
|
|
3726
|
-
static inline int64_t
|
|
3843
|
+
static inline int64_t ParticlesMonitorData_get_part_id_start(const ParticlesMonitorData restrict obj){
|
|
3727
3844
|
int64_t offset=0;
|
|
3728
|
-
offset+=
|
|
3729
|
-
|
|
3730
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3731
|
-
return arr[1];
|
|
3845
|
+
offset+=24;
|
|
3846
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3732
3847
|
}
|
|
3733
|
-
static inline
|
|
3848
|
+
static inline void ParticlesMonitorData_set_part_id_start(ParticlesMonitorData restrict obj, int64_t value){
|
|
3734
3849
|
int64_t offset=0;
|
|
3735
|
-
offset+=
|
|
3736
|
-
|
|
3737
|
-
offset+=16+i0*8;
|
|
3738
|
-
return *( double*)(( char*) obj+offset);
|
|
3850
|
+
offset+=24;
|
|
3851
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3739
3852
|
}
|
|
3740
|
-
static inline
|
|
3853
|
+
static inline int64_t* ParticlesMonitorData_getp_part_id_start(ParticlesMonitorData restrict obj){
|
|
3741
3854
|
int64_t offset=0;
|
|
3742
|
-
offset+=
|
|
3743
|
-
|
|
3744
|
-
offset+=16+i0*8;
|
|
3745
|
-
*( double*)(( char*) obj+offset)=value;
|
|
3855
|
+
offset+=24;
|
|
3856
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3746
3857
|
}
|
|
3747
|
-
static inline
|
|
3858
|
+
static inline int64_t ParticlesMonitorData_get_part_id_end(const ParticlesMonitorData restrict obj){
|
|
3748
3859
|
int64_t offset=0;
|
|
3749
|
-
offset+=
|
|
3750
|
-
|
|
3751
|
-
offset+=16+i0*8;
|
|
3752
|
-
return ( double*)(( char*) obj+offset);
|
|
3860
|
+
offset+=32;
|
|
3861
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3753
3862
|
}
|
|
3754
|
-
static inline
|
|
3863
|
+
static inline void ParticlesMonitorData_set_part_id_end(ParticlesMonitorData restrict obj, int64_t value){
|
|
3755
3864
|
int64_t offset=0;
|
|
3756
|
-
offset+=
|
|
3757
|
-
|
|
3758
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
3865
|
+
offset+=32;
|
|
3866
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3759
3867
|
}
|
|
3760
|
-
static inline
|
|
3868
|
+
static inline int64_t* ParticlesMonitorData_getp_part_id_end(ParticlesMonitorData restrict obj){
|
|
3761
3869
|
int64_t offset=0;
|
|
3762
|
-
offset+=
|
|
3763
|
-
|
|
3764
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3765
|
-
return arr[1];
|
|
3870
|
+
offset+=32;
|
|
3871
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3766
3872
|
}
|
|
3767
|
-
static inline
|
|
3873
|
+
static inline int64_t ParticlesMonitorData_get_ebe_mode(const ParticlesMonitorData restrict obj){
|
|
3768
3874
|
int64_t offset=0;
|
|
3769
|
-
offset+=
|
|
3770
|
-
|
|
3771
|
-
offset+=16+i0*8;
|
|
3772
|
-
return *( double*)(( char*) obj+offset);
|
|
3875
|
+
offset+=40;
|
|
3876
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3773
3877
|
}
|
|
3774
|
-
static inline void
|
|
3878
|
+
static inline void ParticlesMonitorData_set_ebe_mode(ParticlesMonitorData restrict obj, int64_t value){
|
|
3775
3879
|
int64_t offset=0;
|
|
3776
|
-
offset+=
|
|
3777
|
-
|
|
3778
|
-
offset+=16+i0*8;
|
|
3779
|
-
*( double*)(( char*) obj+offset)=value;
|
|
3880
|
+
offset+=40;
|
|
3881
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3780
3882
|
}
|
|
3781
|
-
static inline
|
|
3883
|
+
static inline int64_t* ParticlesMonitorData_getp_ebe_mode(ParticlesMonitorData restrict obj){
|
|
3782
3884
|
int64_t offset=0;
|
|
3783
|
-
offset+=
|
|
3784
|
-
|
|
3785
|
-
offset+=16+i0*8;
|
|
3786
|
-
return ( double*)(( char*) obj+offset);
|
|
3885
|
+
offset+=40;
|
|
3886
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3787
3887
|
}
|
|
3788
|
-
static inline
|
|
3888
|
+
static inline int64_t ParticlesMonitorData_get_n_records(const ParticlesMonitorData restrict obj){
|
|
3789
3889
|
int64_t offset=0;
|
|
3790
|
-
offset+=
|
|
3791
|
-
|
|
3792
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
3890
|
+
offset+=48;
|
|
3891
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3793
3892
|
}
|
|
3794
|
-
static inline
|
|
3893
|
+
static inline void ParticlesMonitorData_set_n_records(ParticlesMonitorData restrict obj, int64_t value){
|
|
3795
3894
|
int64_t offset=0;
|
|
3796
|
-
offset+=
|
|
3797
|
-
|
|
3798
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3799
|
-
return arr[1];
|
|
3895
|
+
offset+=48;
|
|
3896
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3800
3897
|
}
|
|
3801
|
-
static inline
|
|
3898
|
+
static inline int64_t* ParticlesMonitorData_getp_n_records(ParticlesMonitorData restrict obj){
|
|
3802
3899
|
int64_t offset=0;
|
|
3803
|
-
offset+=
|
|
3804
|
-
|
|
3805
|
-
offset+=16+i0*8;
|
|
3806
|
-
return *( double*)(( char*) obj+offset);
|
|
3900
|
+
offset+=48;
|
|
3901
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3807
3902
|
}
|
|
3808
|
-
static inline
|
|
3903
|
+
static inline int64_t ParticlesMonitorData_get_n_repetitions(const ParticlesMonitorData restrict obj){
|
|
3809
3904
|
int64_t offset=0;
|
|
3810
|
-
offset+=
|
|
3811
|
-
|
|
3812
|
-
offset+=16+i0*8;
|
|
3813
|
-
*( double*)(( char*) obj+offset)=value;
|
|
3905
|
+
offset+=56;
|
|
3906
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3814
3907
|
}
|
|
3815
|
-
static inline
|
|
3908
|
+
static inline void ParticlesMonitorData_set_n_repetitions(ParticlesMonitorData restrict obj, int64_t value){
|
|
3816
3909
|
int64_t offset=0;
|
|
3817
|
-
offset+=
|
|
3818
|
-
|
|
3819
|
-
offset+=16+i0*8;
|
|
3820
|
-
return ( double*)(( char*) obj+offset);
|
|
3910
|
+
offset+=56;
|
|
3911
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3821
3912
|
}
|
|
3822
|
-
static inline
|
|
3913
|
+
static inline int64_t* ParticlesMonitorData_getp_n_repetitions(ParticlesMonitorData restrict obj){
|
|
3823
3914
|
int64_t offset=0;
|
|
3824
|
-
offset+=
|
|
3825
|
-
|
|
3826
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
3915
|
+
offset+=56;
|
|
3916
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3827
3917
|
}
|
|
3828
|
-
static inline int64_t
|
|
3918
|
+
static inline int64_t ParticlesMonitorData_get_repetition_period(const ParticlesMonitorData restrict obj){
|
|
3829
3919
|
int64_t offset=0;
|
|
3830
|
-
offset+=
|
|
3831
|
-
|
|
3832
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3833
|
-
return arr[1];
|
|
3920
|
+
offset+=64;
|
|
3921
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3834
3922
|
}
|
|
3835
|
-
static inline
|
|
3923
|
+
static inline void ParticlesMonitorData_set_repetition_period(ParticlesMonitorData restrict obj, int64_t value){
|
|
3924
|
+
int64_t offset=0;
|
|
3925
|
+
offset+=64;
|
|
3926
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3927
|
+
}
|
|
3928
|
+
static inline int64_t* ParticlesMonitorData_getp_repetition_period(ParticlesMonitorData restrict obj){
|
|
3929
|
+
int64_t offset=0;
|
|
3930
|
+
offset+=64;
|
|
3931
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3932
|
+
}
|
|
3933
|
+
static inline int64_t ParticlesMonitorData_get_flag_auto_to_numpy(const ParticlesMonitorData restrict obj){
|
|
3934
|
+
int64_t offset=0;
|
|
3935
|
+
offset+=72;
|
|
3936
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3937
|
+
}
|
|
3938
|
+
static inline void ParticlesMonitorData_set_flag_auto_to_numpy(ParticlesMonitorData restrict obj, int64_t value){
|
|
3939
|
+
int64_t offset=0;
|
|
3940
|
+
offset+=72;
|
|
3941
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3942
|
+
}
|
|
3943
|
+
static inline int64_t* ParticlesMonitorData_getp_flag_auto_to_numpy(ParticlesMonitorData restrict obj){
|
|
3944
|
+
int64_t offset=0;
|
|
3945
|
+
offset+=72;
|
|
3946
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3947
|
+
}
|
|
3948
|
+
static inline ParticlesData ParticlesMonitorData_getp_data(ParticlesMonitorData restrict obj){
|
|
3836
3949
|
int64_t offset=0;
|
|
3837
3950
|
offset+=152;
|
|
3838
|
-
|
|
3839
|
-
|
|
3951
|
+
return (ParticlesData)(( char*) obj+offset);
|
|
3952
|
+
}
|
|
3953
|
+
static inline int64_t ParticlesMonitorData_get_data__capacity(const ParticlesMonitorData restrict obj){
|
|
3954
|
+
int64_t offset=0;
|
|
3955
|
+
offset+=160;
|
|
3956
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3957
|
+
}
|
|
3958
|
+
static inline void ParticlesMonitorData_set_data__capacity(ParticlesMonitorData restrict obj, int64_t value){
|
|
3959
|
+
int64_t offset=0;
|
|
3960
|
+
offset+=160;
|
|
3961
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3962
|
+
}
|
|
3963
|
+
static inline int64_t* ParticlesMonitorData_getp_data__capacity(ParticlesMonitorData restrict obj){
|
|
3964
|
+
int64_t offset=0;
|
|
3965
|
+
offset+=160;
|
|
3966
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3967
|
+
}
|
|
3968
|
+
static inline int64_t ParticlesMonitorData_get_data__num_active_particles(const ParticlesMonitorData restrict obj){
|
|
3969
|
+
int64_t offset=0;
|
|
3970
|
+
offset+=168;
|
|
3971
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3972
|
+
}
|
|
3973
|
+
static inline void ParticlesMonitorData_set_data__num_active_particles(ParticlesMonitorData restrict obj, int64_t value){
|
|
3974
|
+
int64_t offset=0;
|
|
3975
|
+
offset+=168;
|
|
3976
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3977
|
+
}
|
|
3978
|
+
static inline int64_t* ParticlesMonitorData_getp_data__num_active_particles(ParticlesMonitorData restrict obj){
|
|
3979
|
+
int64_t offset=0;
|
|
3980
|
+
offset+=168;
|
|
3981
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3982
|
+
}
|
|
3983
|
+
static inline int64_t ParticlesMonitorData_get_data__num_lost_particles(const ParticlesMonitorData restrict obj){
|
|
3984
|
+
int64_t offset=0;
|
|
3985
|
+
offset+=176;
|
|
3986
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
3987
|
+
}
|
|
3988
|
+
static inline void ParticlesMonitorData_set_data__num_lost_particles(ParticlesMonitorData restrict obj, int64_t value){
|
|
3989
|
+
int64_t offset=0;
|
|
3990
|
+
offset+=176;
|
|
3991
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
3992
|
+
}
|
|
3993
|
+
static inline int64_t* ParticlesMonitorData_getp_data__num_lost_particles(ParticlesMonitorData restrict obj){
|
|
3994
|
+
int64_t offset=0;
|
|
3995
|
+
offset+=176;
|
|
3996
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
3997
|
+
}
|
|
3998
|
+
static inline int64_t ParticlesMonitorData_get_data_start_tracking_at_element(const ParticlesMonitorData restrict obj){
|
|
3999
|
+
int64_t offset=0;
|
|
4000
|
+
offset+=184;
|
|
4001
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4002
|
+
}
|
|
4003
|
+
static inline void ParticlesMonitorData_set_data_start_tracking_at_element(ParticlesMonitorData restrict obj, int64_t value){
|
|
4004
|
+
int64_t offset=0;
|
|
4005
|
+
offset+=184;
|
|
4006
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4007
|
+
}
|
|
4008
|
+
static inline int64_t* ParticlesMonitorData_getp_data_start_tracking_at_element(ParticlesMonitorData restrict obj){
|
|
4009
|
+
int64_t offset=0;
|
|
4010
|
+
offset+=184;
|
|
4011
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4012
|
+
}
|
|
4013
|
+
static inline double ParticlesMonitorData_get_data_q0(const ParticlesMonitorData restrict obj){
|
|
4014
|
+
int64_t offset=0;
|
|
4015
|
+
offset+=192;
|
|
3840
4016
|
return *( double*)(( char*) obj+offset);
|
|
3841
4017
|
}
|
|
3842
|
-
static inline void
|
|
4018
|
+
static inline void ParticlesMonitorData_set_data_q0(ParticlesMonitorData restrict obj, double value){
|
|
3843
4019
|
int64_t offset=0;
|
|
3844
|
-
offset+=
|
|
3845
|
-
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
3846
|
-
offset+=16+i0*8;
|
|
4020
|
+
offset+=192;
|
|
3847
4021
|
*( double*)(( char*) obj+offset)=value;
|
|
3848
4022
|
}
|
|
3849
|
-
static inline double*
|
|
4023
|
+
static inline double* ParticlesMonitorData_getp_data_q0(ParticlesMonitorData restrict obj){
|
|
3850
4024
|
int64_t offset=0;
|
|
3851
|
-
offset+=
|
|
3852
|
-
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
3853
|
-
offset+=16+i0*8;
|
|
4025
|
+
offset+=192;
|
|
3854
4026
|
return ( double*)(( char*) obj+offset);
|
|
3855
4027
|
}
|
|
3856
|
-
static inline
|
|
4028
|
+
static inline double ParticlesMonitorData_get_data_mass0(const ParticlesMonitorData restrict obj){
|
|
3857
4029
|
int64_t offset=0;
|
|
3858
|
-
offset+=
|
|
3859
|
-
|
|
3860
|
-
return (ArrNFloat64)(( char*) obj+offset);
|
|
4030
|
+
offset+=200;
|
|
4031
|
+
return *( double*)(( char*) obj+offset);
|
|
3861
4032
|
}
|
|
3862
|
-
static inline
|
|
4033
|
+
static inline void ParticlesMonitorData_set_data_mass0(ParticlesMonitorData restrict obj, double value){
|
|
3863
4034
|
int64_t offset=0;
|
|
3864
|
-
offset+=
|
|
3865
|
-
|
|
3866
|
-
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3867
|
-
return arr[1];
|
|
4035
|
+
offset+=200;
|
|
4036
|
+
*( double*)(( char*) obj+offset)=value;
|
|
3868
4037
|
}
|
|
3869
|
-
static inline
|
|
4038
|
+
static inline double* ParticlesMonitorData_getp_data_mass0(ParticlesMonitorData restrict obj){
|
|
3870
4039
|
int64_t offset=0;
|
|
3871
|
-
offset+=
|
|
3872
|
-
|
|
3873
|
-
|
|
4040
|
+
offset+=200;
|
|
4041
|
+
return ( double*)(( char*) obj+offset);
|
|
4042
|
+
}
|
|
4043
|
+
static inline double ParticlesMonitorData_get_data_t_sim(const ParticlesMonitorData restrict obj){
|
|
4044
|
+
int64_t offset=0;
|
|
4045
|
+
offset+=208;
|
|
3874
4046
|
return *( double*)(( char*) obj+offset);
|
|
3875
4047
|
}
|
|
3876
|
-
static inline void
|
|
4048
|
+
static inline void ParticlesMonitorData_set_data_t_sim(ParticlesMonitorData restrict obj, double value){
|
|
3877
4049
|
int64_t offset=0;
|
|
3878
|
-
offset+=
|
|
3879
|
-
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
3880
|
-
offset+=16+i0*8;
|
|
4050
|
+
offset+=208;
|
|
3881
4051
|
*( double*)(( char*) obj+offset)=value;
|
|
3882
4052
|
}
|
|
3883
|
-
static inline double*
|
|
4053
|
+
static inline double* ParticlesMonitorData_getp_data_t_sim(ParticlesMonitorData restrict obj){
|
|
3884
4054
|
int64_t offset=0;
|
|
3885
|
-
offset+=
|
|
3886
|
-
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
3887
|
-
offset+=16+i0*8;
|
|
4055
|
+
offset+=208;
|
|
3888
4056
|
return ( double*)(( char*) obj+offset);
|
|
3889
4057
|
}
|
|
3890
|
-
static inline ArrNFloat64
|
|
4058
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_p0c(ParticlesMonitorData restrict obj){
|
|
3891
4059
|
int64_t offset=0;
|
|
3892
|
-
offset+=
|
|
3893
|
-
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4060
|
+
offset+=464;
|
|
3894
4061
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
3895
4062
|
}
|
|
3896
|
-
static inline int64_t
|
|
4063
|
+
static inline int64_t ParticlesMonitorData_len_data_p0c(ParticlesMonitorData restrict obj){
|
|
3897
4064
|
int64_t offset=0;
|
|
3898
|
-
offset+=
|
|
3899
|
-
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4065
|
+
offset+=464;
|
|
3900
4066
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3901
4067
|
return arr[1];
|
|
3902
4068
|
}
|
|
3903
|
-
static inline double
|
|
4069
|
+
static inline double ParticlesMonitorData_get_data_p0c(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
3904
4070
|
int64_t offset=0;
|
|
3905
|
-
offset+=
|
|
3906
|
-
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4071
|
+
offset+=464;
|
|
3907
4072
|
offset+=16+i0*8;
|
|
3908
4073
|
return *( double*)(( char*) obj+offset);
|
|
3909
4074
|
}
|
|
3910
|
-
static inline void
|
|
4075
|
+
static inline void ParticlesMonitorData_set_data_p0c(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
3911
4076
|
int64_t offset=0;
|
|
3912
|
-
offset+=
|
|
3913
|
-
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4077
|
+
offset+=464;
|
|
3914
4078
|
offset+=16+i0*8;
|
|
3915
4079
|
*( double*)(( char*) obj+offset)=value;
|
|
3916
4080
|
}
|
|
3917
|
-
static inline double*
|
|
4081
|
+
static inline double* ParticlesMonitorData_getp1_data_p0c(ParticlesMonitorData restrict obj, int64_t i0){
|
|
3918
4082
|
int64_t offset=0;
|
|
3919
|
-
offset+=
|
|
3920
|
-
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4083
|
+
offset+=464;
|
|
3921
4084
|
offset+=16+i0*8;
|
|
3922
4085
|
return ( double*)(( char*) obj+offset);
|
|
3923
4086
|
}
|
|
3924
|
-
static inline ArrNFloat64
|
|
4087
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_gamma0(ParticlesMonitorData restrict obj){
|
|
3925
4088
|
int64_t offset=0;
|
|
3926
4089
|
offset+=152;
|
|
3927
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4090
|
+
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3928
4091
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
3929
4092
|
}
|
|
3930
|
-
static inline int64_t
|
|
4093
|
+
static inline int64_t ParticlesMonitorData_len_data_gamma0(ParticlesMonitorData restrict obj){
|
|
3931
4094
|
int64_t offset=0;
|
|
3932
4095
|
offset+=152;
|
|
3933
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4096
|
+
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3934
4097
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3935
4098
|
return arr[1];
|
|
3936
4099
|
}
|
|
3937
|
-
static inline double
|
|
4100
|
+
static inline double ParticlesMonitorData_get_data_gamma0(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
3938
4101
|
int64_t offset=0;
|
|
3939
4102
|
offset+=152;
|
|
3940
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4103
|
+
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3941
4104
|
offset+=16+i0*8;
|
|
3942
4105
|
return *( double*)(( char*) obj+offset);
|
|
3943
4106
|
}
|
|
3944
|
-
static inline void
|
|
4107
|
+
static inline void ParticlesMonitorData_set_data_gamma0(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
3945
4108
|
int64_t offset=0;
|
|
3946
4109
|
offset+=152;
|
|
3947
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4110
|
+
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3948
4111
|
offset+=16+i0*8;
|
|
3949
4112
|
*( double*)(( char*) obj+offset)=value;
|
|
3950
4113
|
}
|
|
3951
|
-
static inline double*
|
|
4114
|
+
static inline double* ParticlesMonitorData_getp1_data_gamma0(ParticlesMonitorData restrict obj, int64_t i0){
|
|
3952
4115
|
int64_t offset=0;
|
|
3953
4116
|
offset+=152;
|
|
3954
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4117
|
+
offset+=*( int64_t*)(( char*) obj+offset+64);
|
|
3955
4118
|
offset+=16+i0*8;
|
|
3956
4119
|
return ( double*)(( char*) obj+offset);
|
|
3957
4120
|
}
|
|
3958
|
-
static inline ArrNFloat64
|
|
4121
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_beta0(ParticlesMonitorData restrict obj){
|
|
3959
4122
|
int64_t offset=0;
|
|
3960
4123
|
offset+=152;
|
|
3961
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4124
|
+
offset+=*( int64_t*)(( char*) obj+offset+72);
|
|
3962
4125
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
3963
4126
|
}
|
|
3964
|
-
static inline int64_t
|
|
4127
|
+
static inline int64_t ParticlesMonitorData_len_data_beta0(ParticlesMonitorData restrict obj){
|
|
3965
4128
|
int64_t offset=0;
|
|
3966
4129
|
offset+=152;
|
|
3967
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4130
|
+
offset+=*( int64_t*)(( char*) obj+offset+72);
|
|
3968
4131
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
3969
4132
|
return arr[1];
|
|
3970
4133
|
}
|
|
3971
|
-
static inline double
|
|
4134
|
+
static inline double ParticlesMonitorData_get_data_beta0(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
3972
4135
|
int64_t offset=0;
|
|
3973
4136
|
offset+=152;
|
|
3974
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4137
|
+
offset+=*( int64_t*)(( char*) obj+offset+72);
|
|
3975
4138
|
offset+=16+i0*8;
|
|
3976
4139
|
return *( double*)(( char*) obj+offset);
|
|
3977
4140
|
}
|
|
3978
|
-
static inline void
|
|
4141
|
+
static inline void ParticlesMonitorData_set_data_beta0(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
3979
4142
|
int64_t offset=0;
|
|
3980
4143
|
offset+=152;
|
|
3981
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4144
|
+
offset+=*( int64_t*)(( char*) obj+offset+72);
|
|
3982
4145
|
offset+=16+i0*8;
|
|
3983
4146
|
*( double*)(( char*) obj+offset)=value;
|
|
3984
4147
|
}
|
|
3985
|
-
static inline double*
|
|
4148
|
+
static inline double* ParticlesMonitorData_getp1_data_beta0(ParticlesMonitorData restrict obj, int64_t i0){
|
|
3986
4149
|
int64_t offset=0;
|
|
3987
4150
|
offset+=152;
|
|
3988
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4151
|
+
offset+=*( int64_t*)(( char*) obj+offset+72);
|
|
3989
4152
|
offset+=16+i0*8;
|
|
3990
4153
|
return ( double*)(( char*) obj+offset);
|
|
3991
4154
|
}
|
|
3992
|
-
static inline ArrNFloat64
|
|
4155
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_s(ParticlesMonitorData restrict obj){
|
|
3993
4156
|
int64_t offset=0;
|
|
3994
4157
|
offset+=152;
|
|
3995
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4158
|
+
offset+=*( int64_t*)(( char*) obj+offset+80);
|
|
3996
4159
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
3997
4160
|
}
|
|
3998
|
-
static inline int64_t
|
|
4161
|
+
static inline int64_t ParticlesMonitorData_len_data_s(ParticlesMonitorData restrict obj){
|
|
3999
4162
|
int64_t offset=0;
|
|
4000
4163
|
offset+=152;
|
|
4001
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4164
|
+
offset+=*( int64_t*)(( char*) obj+offset+80);
|
|
4002
4165
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4003
4166
|
return arr[1];
|
|
4004
4167
|
}
|
|
4005
|
-
static inline double
|
|
4168
|
+
static inline double ParticlesMonitorData_get_data_s(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4006
4169
|
int64_t offset=0;
|
|
4007
4170
|
offset+=152;
|
|
4008
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4171
|
+
offset+=*( int64_t*)(( char*) obj+offset+80);
|
|
4009
4172
|
offset+=16+i0*8;
|
|
4010
4173
|
return *( double*)(( char*) obj+offset);
|
|
4011
4174
|
}
|
|
4012
|
-
static inline void
|
|
4175
|
+
static inline void ParticlesMonitorData_set_data_s(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4013
4176
|
int64_t offset=0;
|
|
4014
4177
|
offset+=152;
|
|
4015
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4178
|
+
offset+=*( int64_t*)(( char*) obj+offset+80);
|
|
4016
4179
|
offset+=16+i0*8;
|
|
4017
4180
|
*( double*)(( char*) obj+offset)=value;
|
|
4018
4181
|
}
|
|
4019
|
-
static inline double*
|
|
4182
|
+
static inline double* ParticlesMonitorData_getp1_data_s(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4020
4183
|
int64_t offset=0;
|
|
4021
4184
|
offset+=152;
|
|
4022
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4185
|
+
offset+=*( int64_t*)(( char*) obj+offset+80);
|
|
4023
4186
|
offset+=16+i0*8;
|
|
4024
4187
|
return ( double*)(( char*) obj+offset);
|
|
4025
4188
|
}
|
|
4026
|
-
static inline ArrNFloat64
|
|
4189
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_zeta(ParticlesMonitorData restrict obj){
|
|
4027
4190
|
int64_t offset=0;
|
|
4028
4191
|
offset+=152;
|
|
4029
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4192
|
+
offset+=*( int64_t*)(( char*) obj+offset+88);
|
|
4030
4193
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4031
4194
|
}
|
|
4032
|
-
static inline int64_t
|
|
4195
|
+
static inline int64_t ParticlesMonitorData_len_data_zeta(ParticlesMonitorData restrict obj){
|
|
4033
4196
|
int64_t offset=0;
|
|
4034
4197
|
offset+=152;
|
|
4035
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4198
|
+
offset+=*( int64_t*)(( char*) obj+offset+88);
|
|
4036
4199
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4037
4200
|
return arr[1];
|
|
4038
4201
|
}
|
|
4039
|
-
static inline double
|
|
4202
|
+
static inline double ParticlesMonitorData_get_data_zeta(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4040
4203
|
int64_t offset=0;
|
|
4041
4204
|
offset+=152;
|
|
4042
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4205
|
+
offset+=*( int64_t*)(( char*) obj+offset+88);
|
|
4043
4206
|
offset+=16+i0*8;
|
|
4044
4207
|
return *( double*)(( char*) obj+offset);
|
|
4045
4208
|
}
|
|
4046
|
-
static inline void
|
|
4209
|
+
static inline void ParticlesMonitorData_set_data_zeta(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4047
4210
|
int64_t offset=0;
|
|
4048
4211
|
offset+=152;
|
|
4049
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4212
|
+
offset+=*( int64_t*)(( char*) obj+offset+88);
|
|
4050
4213
|
offset+=16+i0*8;
|
|
4051
4214
|
*( double*)(( char*) obj+offset)=value;
|
|
4052
4215
|
}
|
|
4053
|
-
static inline double*
|
|
4216
|
+
static inline double* ParticlesMonitorData_getp1_data_zeta(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4054
4217
|
int64_t offset=0;
|
|
4055
4218
|
offset+=152;
|
|
4056
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4219
|
+
offset+=*( int64_t*)(( char*) obj+offset+88);
|
|
4057
4220
|
offset+=16+i0*8;
|
|
4058
4221
|
return ( double*)(( char*) obj+offset);
|
|
4059
4222
|
}
|
|
4060
|
-
static inline ArrNFloat64
|
|
4223
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_x(ParticlesMonitorData restrict obj){
|
|
4061
4224
|
int64_t offset=0;
|
|
4062
4225
|
offset+=152;
|
|
4063
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4226
|
+
offset+=*( int64_t*)(( char*) obj+offset+96);
|
|
4064
4227
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4065
4228
|
}
|
|
4066
|
-
static inline int64_t
|
|
4229
|
+
static inline int64_t ParticlesMonitorData_len_data_x(ParticlesMonitorData restrict obj){
|
|
4067
4230
|
int64_t offset=0;
|
|
4068
4231
|
offset+=152;
|
|
4069
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4232
|
+
offset+=*( int64_t*)(( char*) obj+offset+96);
|
|
4070
4233
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4071
4234
|
return arr[1];
|
|
4072
4235
|
}
|
|
4073
|
-
static inline double
|
|
4236
|
+
static inline double ParticlesMonitorData_get_data_x(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4074
4237
|
int64_t offset=0;
|
|
4075
4238
|
offset+=152;
|
|
4076
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4239
|
+
offset+=*( int64_t*)(( char*) obj+offset+96);
|
|
4077
4240
|
offset+=16+i0*8;
|
|
4078
4241
|
return *( double*)(( char*) obj+offset);
|
|
4079
4242
|
}
|
|
4080
|
-
static inline void
|
|
4243
|
+
static inline void ParticlesMonitorData_set_data_x(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4081
4244
|
int64_t offset=0;
|
|
4082
4245
|
offset+=152;
|
|
4083
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4246
|
+
offset+=*( int64_t*)(( char*) obj+offset+96);
|
|
4084
4247
|
offset+=16+i0*8;
|
|
4085
4248
|
*( double*)(( char*) obj+offset)=value;
|
|
4086
4249
|
}
|
|
4087
|
-
static inline double*
|
|
4250
|
+
static inline double* ParticlesMonitorData_getp1_data_x(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4088
4251
|
int64_t offset=0;
|
|
4089
4252
|
offset+=152;
|
|
4090
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4253
|
+
offset+=*( int64_t*)(( char*) obj+offset+96);
|
|
4091
4254
|
offset+=16+i0*8;
|
|
4092
4255
|
return ( double*)(( char*) obj+offset);
|
|
4093
4256
|
}
|
|
4094
|
-
static inline ArrNFloat64
|
|
4257
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_y(ParticlesMonitorData restrict obj){
|
|
4095
4258
|
int64_t offset=0;
|
|
4096
4259
|
offset+=152;
|
|
4097
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4260
|
+
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
4098
4261
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4099
4262
|
}
|
|
4100
|
-
static inline int64_t
|
|
4263
|
+
static inline int64_t ParticlesMonitorData_len_data_y(ParticlesMonitorData restrict obj){
|
|
4101
4264
|
int64_t offset=0;
|
|
4102
4265
|
offset+=152;
|
|
4103
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4266
|
+
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
4104
4267
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4105
4268
|
return arr[1];
|
|
4106
4269
|
}
|
|
4107
|
-
static inline double
|
|
4270
|
+
static inline double ParticlesMonitorData_get_data_y(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4108
4271
|
int64_t offset=0;
|
|
4109
4272
|
offset+=152;
|
|
4110
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4273
|
+
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
4111
4274
|
offset+=16+i0*8;
|
|
4112
4275
|
return *( double*)(( char*) obj+offset);
|
|
4113
4276
|
}
|
|
4114
|
-
static inline void
|
|
4277
|
+
static inline void ParticlesMonitorData_set_data_y(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4115
4278
|
int64_t offset=0;
|
|
4116
4279
|
offset+=152;
|
|
4117
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4280
|
+
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
4118
4281
|
offset+=16+i0*8;
|
|
4119
4282
|
*( double*)(( char*) obj+offset)=value;
|
|
4120
4283
|
}
|
|
4121
|
-
static inline double*
|
|
4284
|
+
static inline double* ParticlesMonitorData_getp1_data_y(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4122
4285
|
int64_t offset=0;
|
|
4123
4286
|
offset+=152;
|
|
4124
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4287
|
+
offset+=*( int64_t*)(( char*) obj+offset+104);
|
|
4125
4288
|
offset+=16+i0*8;
|
|
4126
4289
|
return ( double*)(( char*) obj+offset);
|
|
4127
4290
|
}
|
|
4128
|
-
static inline ArrNFloat64
|
|
4291
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_px(ParticlesMonitorData restrict obj){
|
|
4129
4292
|
int64_t offset=0;
|
|
4130
4293
|
offset+=152;
|
|
4131
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4294
|
+
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
4132
4295
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4133
4296
|
}
|
|
4134
|
-
static inline int64_t
|
|
4297
|
+
static inline int64_t ParticlesMonitorData_len_data_px(ParticlesMonitorData restrict obj){
|
|
4135
4298
|
int64_t offset=0;
|
|
4136
4299
|
offset+=152;
|
|
4137
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4300
|
+
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
4138
4301
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4139
4302
|
return arr[1];
|
|
4140
4303
|
}
|
|
4141
|
-
static inline double
|
|
4304
|
+
static inline double ParticlesMonitorData_get_data_px(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4142
4305
|
int64_t offset=0;
|
|
4143
4306
|
offset+=152;
|
|
4144
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4307
|
+
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
4145
4308
|
offset+=16+i0*8;
|
|
4146
4309
|
return *( double*)(( char*) obj+offset);
|
|
4147
4310
|
}
|
|
4148
|
-
static inline void
|
|
4311
|
+
static inline void ParticlesMonitorData_set_data_px(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4149
4312
|
int64_t offset=0;
|
|
4150
4313
|
offset+=152;
|
|
4151
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4314
|
+
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
4152
4315
|
offset+=16+i0*8;
|
|
4153
4316
|
*( double*)(( char*) obj+offset)=value;
|
|
4154
4317
|
}
|
|
4155
|
-
static inline double*
|
|
4318
|
+
static inline double* ParticlesMonitorData_getp1_data_px(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4156
4319
|
int64_t offset=0;
|
|
4157
4320
|
offset+=152;
|
|
4158
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4321
|
+
offset+=*( int64_t*)(( char*) obj+offset+112);
|
|
4159
4322
|
offset+=16+i0*8;
|
|
4160
4323
|
return ( double*)(( char*) obj+offset);
|
|
4161
4324
|
}
|
|
4162
|
-
static inline ArrNFloat64
|
|
4325
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_py(ParticlesMonitorData restrict obj){
|
|
4163
4326
|
int64_t offset=0;
|
|
4164
4327
|
offset+=152;
|
|
4165
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4328
|
+
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4166
4329
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4167
4330
|
}
|
|
4168
|
-
static inline int64_t
|
|
4331
|
+
static inline int64_t ParticlesMonitorData_len_data_py(ParticlesMonitorData restrict obj){
|
|
4169
4332
|
int64_t offset=0;
|
|
4170
4333
|
offset+=152;
|
|
4171
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4334
|
+
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4172
4335
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4173
4336
|
return arr[1];
|
|
4174
4337
|
}
|
|
4175
|
-
static inline double
|
|
4338
|
+
static inline double ParticlesMonitorData_get_data_py(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4176
4339
|
int64_t offset=0;
|
|
4177
4340
|
offset+=152;
|
|
4178
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4341
|
+
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4179
4342
|
offset+=16+i0*8;
|
|
4180
4343
|
return *( double*)(( char*) obj+offset);
|
|
4181
4344
|
}
|
|
4182
|
-
static inline void
|
|
4345
|
+
static inline void ParticlesMonitorData_set_data_py(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4183
4346
|
int64_t offset=0;
|
|
4184
4347
|
offset+=152;
|
|
4185
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4348
|
+
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4186
4349
|
offset+=16+i0*8;
|
|
4187
4350
|
*( double*)(( char*) obj+offset)=value;
|
|
4188
4351
|
}
|
|
4189
|
-
static inline double*
|
|
4352
|
+
static inline double* ParticlesMonitorData_getp1_data_py(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4190
4353
|
int64_t offset=0;
|
|
4191
4354
|
offset+=152;
|
|
4192
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4355
|
+
offset+=*( int64_t*)(( char*) obj+offset+120);
|
|
4193
4356
|
offset+=16+i0*8;
|
|
4194
4357
|
return ( double*)(( char*) obj+offset);
|
|
4195
4358
|
}
|
|
4196
|
-
static inline ArrNFloat64
|
|
4359
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_ptau(ParticlesMonitorData restrict obj){
|
|
4197
4360
|
int64_t offset=0;
|
|
4198
4361
|
offset+=152;
|
|
4199
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4362
|
+
offset+=*( int64_t*)(( char*) obj+offset+128);
|
|
4200
4363
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4201
4364
|
}
|
|
4202
|
-
static inline int64_t
|
|
4365
|
+
static inline int64_t ParticlesMonitorData_len_data_ptau(ParticlesMonitorData restrict obj){
|
|
4203
4366
|
int64_t offset=0;
|
|
4204
4367
|
offset+=152;
|
|
4205
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4368
|
+
offset+=*( int64_t*)(( char*) obj+offset+128);
|
|
4206
4369
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4207
4370
|
return arr[1];
|
|
4208
4371
|
}
|
|
4209
|
-
static inline double
|
|
4372
|
+
static inline double ParticlesMonitorData_get_data_ptau(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4210
4373
|
int64_t offset=0;
|
|
4211
4374
|
offset+=152;
|
|
4212
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4375
|
+
offset+=*( int64_t*)(( char*) obj+offset+128);
|
|
4213
4376
|
offset+=16+i0*8;
|
|
4214
4377
|
return *( double*)(( char*) obj+offset);
|
|
4215
4378
|
}
|
|
4216
|
-
static inline void
|
|
4379
|
+
static inline void ParticlesMonitorData_set_data_ptau(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4217
4380
|
int64_t offset=0;
|
|
4218
4381
|
offset+=152;
|
|
4219
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4382
|
+
offset+=*( int64_t*)(( char*) obj+offset+128);
|
|
4220
4383
|
offset+=16+i0*8;
|
|
4221
4384
|
*( double*)(( char*) obj+offset)=value;
|
|
4222
4385
|
}
|
|
4223
|
-
static inline double*
|
|
4386
|
+
static inline double* ParticlesMonitorData_getp1_data_ptau(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4224
4387
|
int64_t offset=0;
|
|
4225
4388
|
offset+=152;
|
|
4226
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4389
|
+
offset+=*( int64_t*)(( char*) obj+offset+128);
|
|
4227
4390
|
offset+=16+i0*8;
|
|
4228
4391
|
return ( double*)(( char*) obj+offset);
|
|
4229
4392
|
}
|
|
4230
|
-
static inline ArrNFloat64
|
|
4393
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_delta(ParticlesMonitorData restrict obj){
|
|
4231
4394
|
int64_t offset=0;
|
|
4232
4395
|
offset+=152;
|
|
4233
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4396
|
+
offset+=*( int64_t*)(( char*) obj+offset+136);
|
|
4234
4397
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4235
4398
|
}
|
|
4236
|
-
static inline int64_t
|
|
4399
|
+
static inline int64_t ParticlesMonitorData_len_data_delta(ParticlesMonitorData restrict obj){
|
|
4237
4400
|
int64_t offset=0;
|
|
4238
4401
|
offset+=152;
|
|
4239
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4402
|
+
offset+=*( int64_t*)(( char*) obj+offset+136);
|
|
4240
4403
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4241
4404
|
return arr[1];
|
|
4242
4405
|
}
|
|
4243
|
-
static inline double
|
|
4406
|
+
static inline double ParticlesMonitorData_get_data_delta(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4244
4407
|
int64_t offset=0;
|
|
4245
4408
|
offset+=152;
|
|
4246
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4409
|
+
offset+=*( int64_t*)(( char*) obj+offset+136);
|
|
4247
4410
|
offset+=16+i0*8;
|
|
4248
4411
|
return *( double*)(( char*) obj+offset);
|
|
4249
4412
|
}
|
|
4250
|
-
static inline void
|
|
4413
|
+
static inline void ParticlesMonitorData_set_data_delta(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4251
4414
|
int64_t offset=0;
|
|
4252
4415
|
offset+=152;
|
|
4253
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4416
|
+
offset+=*( int64_t*)(( char*) obj+offset+136);
|
|
4254
4417
|
offset+=16+i0*8;
|
|
4255
4418
|
*( double*)(( char*) obj+offset)=value;
|
|
4256
4419
|
}
|
|
4257
|
-
static inline double*
|
|
4420
|
+
static inline double* ParticlesMonitorData_getp1_data_delta(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4258
4421
|
int64_t offset=0;
|
|
4259
4422
|
offset+=152;
|
|
4260
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4423
|
+
offset+=*( int64_t*)(( char*) obj+offset+136);
|
|
4261
4424
|
offset+=16+i0*8;
|
|
4262
4425
|
return ( double*)(( char*) obj+offset);
|
|
4263
4426
|
}
|
|
4264
|
-
static inline ArrNFloat64
|
|
4427
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_rpp(ParticlesMonitorData restrict obj){
|
|
4265
4428
|
int64_t offset=0;
|
|
4266
4429
|
offset+=152;
|
|
4267
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4430
|
+
offset+=*( int64_t*)(( char*) obj+offset+144);
|
|
4268
4431
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4269
4432
|
}
|
|
4270
|
-
static inline int64_t
|
|
4433
|
+
static inline int64_t ParticlesMonitorData_len_data_rpp(ParticlesMonitorData restrict obj){
|
|
4271
4434
|
int64_t offset=0;
|
|
4272
4435
|
offset+=152;
|
|
4273
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4436
|
+
offset+=*( int64_t*)(( char*) obj+offset+144);
|
|
4274
4437
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4275
4438
|
return arr[1];
|
|
4276
4439
|
}
|
|
4277
|
-
static inline double
|
|
4440
|
+
static inline double ParticlesMonitorData_get_data_rpp(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4278
4441
|
int64_t offset=0;
|
|
4279
4442
|
offset+=152;
|
|
4280
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4443
|
+
offset+=*( int64_t*)(( char*) obj+offset+144);
|
|
4281
4444
|
offset+=16+i0*8;
|
|
4282
4445
|
return *( double*)(( char*) obj+offset);
|
|
4283
4446
|
}
|
|
4284
|
-
static inline void
|
|
4447
|
+
static inline void ParticlesMonitorData_set_data_rpp(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4285
4448
|
int64_t offset=0;
|
|
4286
4449
|
offset+=152;
|
|
4287
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4450
|
+
offset+=*( int64_t*)(( char*) obj+offset+144);
|
|
4288
4451
|
offset+=16+i0*8;
|
|
4289
4452
|
*( double*)(( char*) obj+offset)=value;
|
|
4290
4453
|
}
|
|
4291
|
-
static inline double*
|
|
4454
|
+
static inline double* ParticlesMonitorData_getp1_data_rpp(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4292
4455
|
int64_t offset=0;
|
|
4293
4456
|
offset+=152;
|
|
4294
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4457
|
+
offset+=*( int64_t*)(( char*) obj+offset+144);
|
|
4295
4458
|
offset+=16+i0*8;
|
|
4296
4459
|
return ( double*)(( char*) obj+offset);
|
|
4297
4460
|
}
|
|
4298
|
-
static inline ArrNFloat64
|
|
4461
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_rvv(ParticlesMonitorData restrict obj){
|
|
4299
4462
|
int64_t offset=0;
|
|
4300
4463
|
offset+=152;
|
|
4301
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4464
|
+
offset+=*( int64_t*)(( char*) obj+offset+152);
|
|
4302
4465
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4303
4466
|
}
|
|
4304
|
-
static inline int64_t
|
|
4467
|
+
static inline int64_t ParticlesMonitorData_len_data_rvv(ParticlesMonitorData restrict obj){
|
|
4305
4468
|
int64_t offset=0;
|
|
4306
4469
|
offset+=152;
|
|
4307
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4470
|
+
offset+=*( int64_t*)(( char*) obj+offset+152);
|
|
4308
4471
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4309
4472
|
return arr[1];
|
|
4310
4473
|
}
|
|
4311
|
-
static inline double
|
|
4474
|
+
static inline double ParticlesMonitorData_get_data_rvv(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4312
4475
|
int64_t offset=0;
|
|
4313
4476
|
offset+=152;
|
|
4314
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4477
|
+
offset+=*( int64_t*)(( char*) obj+offset+152);
|
|
4315
4478
|
offset+=16+i0*8;
|
|
4316
4479
|
return *( double*)(( char*) obj+offset);
|
|
4317
4480
|
}
|
|
4318
|
-
static inline void
|
|
4481
|
+
static inline void ParticlesMonitorData_set_data_rvv(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4319
4482
|
int64_t offset=0;
|
|
4320
4483
|
offset+=152;
|
|
4321
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4484
|
+
offset+=*( int64_t*)(( char*) obj+offset+152);
|
|
4322
4485
|
offset+=16+i0*8;
|
|
4323
4486
|
*( double*)(( char*) obj+offset)=value;
|
|
4324
4487
|
}
|
|
4325
|
-
static inline double*
|
|
4488
|
+
static inline double* ParticlesMonitorData_getp1_data_rvv(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4326
4489
|
int64_t offset=0;
|
|
4327
4490
|
offset+=152;
|
|
4328
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4491
|
+
offset+=*( int64_t*)(( char*) obj+offset+152);
|
|
4329
4492
|
offset+=16+i0*8;
|
|
4330
4493
|
return ( double*)(( char*) obj+offset);
|
|
4331
4494
|
}
|
|
4332
|
-
static inline ArrNFloat64
|
|
4495
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_chi(ParticlesMonitorData restrict obj){
|
|
4333
4496
|
int64_t offset=0;
|
|
4334
4497
|
offset+=152;
|
|
4335
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4498
|
+
offset+=*( int64_t*)(( char*) obj+offset+160);
|
|
4336
4499
|
return (ArrNFloat64)(( char*) obj+offset);
|
|
4337
4500
|
}
|
|
4338
|
-
static inline int64_t
|
|
4501
|
+
static inline int64_t ParticlesMonitorData_len_data_chi(ParticlesMonitorData restrict obj){
|
|
4339
4502
|
int64_t offset=0;
|
|
4340
4503
|
offset+=152;
|
|
4341
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4504
|
+
offset+=*( int64_t*)(( char*) obj+offset+160);
|
|
4342
4505
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4343
4506
|
return arr[1];
|
|
4344
4507
|
}
|
|
4345
|
-
static inline double
|
|
4508
|
+
static inline double ParticlesMonitorData_get_data_chi(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4346
4509
|
int64_t offset=0;
|
|
4347
4510
|
offset+=152;
|
|
4348
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4511
|
+
offset+=*( int64_t*)(( char*) obj+offset+160);
|
|
4349
4512
|
offset+=16+i0*8;
|
|
4350
4513
|
return *( double*)(( char*) obj+offset);
|
|
4351
4514
|
}
|
|
4352
|
-
static inline void
|
|
4515
|
+
static inline void ParticlesMonitorData_set_data_chi(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4353
4516
|
int64_t offset=0;
|
|
4354
4517
|
offset+=152;
|
|
4355
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4518
|
+
offset+=*( int64_t*)(( char*) obj+offset+160);
|
|
4356
4519
|
offset+=16+i0*8;
|
|
4357
4520
|
*( double*)(( char*) obj+offset)=value;
|
|
4358
4521
|
}
|
|
4359
|
-
static inline double*
|
|
4522
|
+
static inline double* ParticlesMonitorData_getp1_data_chi(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4360
4523
|
int64_t offset=0;
|
|
4361
4524
|
offset+=152;
|
|
4362
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4525
|
+
offset+=*( int64_t*)(( char*) obj+offset+160);
|
|
4363
4526
|
offset+=16+i0*8;
|
|
4364
4527
|
return ( double*)(( char*) obj+offset);
|
|
4365
4528
|
}
|
|
4366
|
-
static inline
|
|
4529
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_charge_ratio(ParticlesMonitorData restrict obj){
|
|
4367
4530
|
int64_t offset=0;
|
|
4368
4531
|
offset+=152;
|
|
4369
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4370
|
-
return (
|
|
4532
|
+
offset+=*( int64_t*)(( char*) obj+offset+168);
|
|
4533
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4371
4534
|
}
|
|
4372
|
-
static inline int64_t
|
|
4535
|
+
static inline int64_t ParticlesMonitorData_len_data_charge_ratio(ParticlesMonitorData restrict obj){
|
|
4373
4536
|
int64_t offset=0;
|
|
4374
4537
|
offset+=152;
|
|
4375
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4538
|
+
offset+=*( int64_t*)(( char*) obj+offset+168);
|
|
4376
4539
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4377
4540
|
return arr[1];
|
|
4378
4541
|
}
|
|
4379
|
-
static inline
|
|
4542
|
+
static inline double ParticlesMonitorData_get_data_charge_ratio(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4380
4543
|
int64_t offset=0;
|
|
4381
4544
|
offset+=152;
|
|
4382
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4545
|
+
offset+=*( int64_t*)(( char*) obj+offset+168);
|
|
4383
4546
|
offset+=16+i0*8;
|
|
4384
|
-
return *(
|
|
4547
|
+
return *( double*)(( char*) obj+offset);
|
|
4385
4548
|
}
|
|
4386
|
-
static inline void
|
|
4549
|
+
static inline void ParticlesMonitorData_set_data_charge_ratio(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4387
4550
|
int64_t offset=0;
|
|
4388
4551
|
offset+=152;
|
|
4389
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4552
|
+
offset+=*( int64_t*)(( char*) obj+offset+168);
|
|
4390
4553
|
offset+=16+i0*8;
|
|
4391
|
-
*(
|
|
4554
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4392
4555
|
}
|
|
4393
|
-
static inline
|
|
4556
|
+
static inline double* ParticlesMonitorData_getp1_data_charge_ratio(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4394
4557
|
int64_t offset=0;
|
|
4395
4558
|
offset+=152;
|
|
4396
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4559
|
+
offset+=*( int64_t*)(( char*) obj+offset+168);
|
|
4397
4560
|
offset+=16+i0*8;
|
|
4398
|
-
return (
|
|
4561
|
+
return ( double*)(( char*) obj+offset);
|
|
4399
4562
|
}
|
|
4400
|
-
static inline
|
|
4563
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_weight(ParticlesMonitorData restrict obj){
|
|
4401
4564
|
int64_t offset=0;
|
|
4402
4565
|
offset+=152;
|
|
4403
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4404
|
-
return (
|
|
4566
|
+
offset+=*( int64_t*)(( char*) obj+offset+176);
|
|
4567
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4405
4568
|
}
|
|
4406
|
-
static inline int64_t
|
|
4569
|
+
static inline int64_t ParticlesMonitorData_len_data_weight(ParticlesMonitorData restrict obj){
|
|
4407
4570
|
int64_t offset=0;
|
|
4408
4571
|
offset+=152;
|
|
4409
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4572
|
+
offset+=*( int64_t*)(( char*) obj+offset+176);
|
|
4410
4573
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4411
4574
|
return arr[1];
|
|
4412
4575
|
}
|
|
4413
|
-
static inline
|
|
4576
|
+
static inline double ParticlesMonitorData_get_data_weight(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4414
4577
|
int64_t offset=0;
|
|
4415
4578
|
offset+=152;
|
|
4416
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4579
|
+
offset+=*( int64_t*)(( char*) obj+offset+176);
|
|
4417
4580
|
offset+=16+i0*8;
|
|
4418
|
-
return *(
|
|
4581
|
+
return *( double*)(( char*) obj+offset);
|
|
4419
4582
|
}
|
|
4420
|
-
static inline void
|
|
4583
|
+
static inline void ParticlesMonitorData_set_data_weight(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4421
4584
|
int64_t offset=0;
|
|
4422
4585
|
offset+=152;
|
|
4423
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4586
|
+
offset+=*( int64_t*)(( char*) obj+offset+176);
|
|
4424
4587
|
offset+=16+i0*8;
|
|
4425
|
-
*(
|
|
4588
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4426
4589
|
}
|
|
4427
|
-
static inline
|
|
4590
|
+
static inline double* ParticlesMonitorData_getp1_data_weight(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4428
4591
|
int64_t offset=0;
|
|
4429
4592
|
offset+=152;
|
|
4430
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4593
|
+
offset+=*( int64_t*)(( char*) obj+offset+176);
|
|
4431
4594
|
offset+=16+i0*8;
|
|
4432
|
-
return (
|
|
4595
|
+
return ( double*)(( char*) obj+offset);
|
|
4433
4596
|
}
|
|
4434
|
-
static inline
|
|
4597
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_ax(ParticlesMonitorData restrict obj){
|
|
4435
4598
|
int64_t offset=0;
|
|
4436
4599
|
offset+=152;
|
|
4437
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4438
|
-
return (
|
|
4600
|
+
offset+=*( int64_t*)(( char*) obj+offset+184);
|
|
4601
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4439
4602
|
}
|
|
4440
|
-
static inline int64_t
|
|
4603
|
+
static inline int64_t ParticlesMonitorData_len_data_ax(ParticlesMonitorData restrict obj){
|
|
4441
4604
|
int64_t offset=0;
|
|
4442
4605
|
offset+=152;
|
|
4443
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4606
|
+
offset+=*( int64_t*)(( char*) obj+offset+184);
|
|
4444
4607
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4445
4608
|
return arr[1];
|
|
4446
4609
|
}
|
|
4447
|
-
static inline
|
|
4610
|
+
static inline double ParticlesMonitorData_get_data_ax(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4448
4611
|
int64_t offset=0;
|
|
4449
4612
|
offset+=152;
|
|
4450
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4613
|
+
offset+=*( int64_t*)(( char*) obj+offset+184);
|
|
4451
4614
|
offset+=16+i0*8;
|
|
4452
|
-
return *(
|
|
4615
|
+
return *( double*)(( char*) obj+offset);
|
|
4453
4616
|
}
|
|
4454
|
-
static inline void
|
|
4617
|
+
static inline void ParticlesMonitorData_set_data_ax(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4455
4618
|
int64_t offset=0;
|
|
4456
4619
|
offset+=152;
|
|
4457
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4620
|
+
offset+=*( int64_t*)(( char*) obj+offset+184);
|
|
4458
4621
|
offset+=16+i0*8;
|
|
4459
|
-
*(
|
|
4622
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4460
4623
|
}
|
|
4461
|
-
static inline
|
|
4624
|
+
static inline double* ParticlesMonitorData_getp1_data_ax(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4462
4625
|
int64_t offset=0;
|
|
4463
4626
|
offset+=152;
|
|
4464
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4627
|
+
offset+=*( int64_t*)(( char*) obj+offset+184);
|
|
4465
4628
|
offset+=16+i0*8;
|
|
4466
|
-
return (
|
|
4629
|
+
return ( double*)(( char*) obj+offset);
|
|
4467
4630
|
}
|
|
4468
|
-
static inline
|
|
4631
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_ay(ParticlesMonitorData restrict obj){
|
|
4469
4632
|
int64_t offset=0;
|
|
4470
4633
|
offset+=152;
|
|
4471
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4472
|
-
return (
|
|
4634
|
+
offset+=*( int64_t*)(( char*) obj+offset+192);
|
|
4635
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4473
4636
|
}
|
|
4474
|
-
static inline int64_t
|
|
4637
|
+
static inline int64_t ParticlesMonitorData_len_data_ay(ParticlesMonitorData restrict obj){
|
|
4475
4638
|
int64_t offset=0;
|
|
4476
4639
|
offset+=152;
|
|
4477
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4640
|
+
offset+=*( int64_t*)(( char*) obj+offset+192);
|
|
4478
4641
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4479
4642
|
return arr[1];
|
|
4480
4643
|
}
|
|
4481
|
-
static inline
|
|
4644
|
+
static inline double ParticlesMonitorData_get_data_ay(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4482
4645
|
int64_t offset=0;
|
|
4483
4646
|
offset+=152;
|
|
4484
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4647
|
+
offset+=*( int64_t*)(( char*) obj+offset+192);
|
|
4485
4648
|
offset+=16+i0*8;
|
|
4486
|
-
return *(
|
|
4649
|
+
return *( double*)(( char*) obj+offset);
|
|
4487
4650
|
}
|
|
4488
|
-
static inline void
|
|
4651
|
+
static inline void ParticlesMonitorData_set_data_ay(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4489
4652
|
int64_t offset=0;
|
|
4490
4653
|
offset+=152;
|
|
4491
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4654
|
+
offset+=*( int64_t*)(( char*) obj+offset+192);
|
|
4492
4655
|
offset+=16+i0*8;
|
|
4493
|
-
*(
|
|
4656
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4494
4657
|
}
|
|
4495
|
-
static inline
|
|
4658
|
+
static inline double* ParticlesMonitorData_getp1_data_ay(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4496
4659
|
int64_t offset=0;
|
|
4497
4660
|
offset+=152;
|
|
4498
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4661
|
+
offset+=*( int64_t*)(( char*) obj+offset+192);
|
|
4499
4662
|
offset+=16+i0*8;
|
|
4500
|
-
return (
|
|
4663
|
+
return ( double*)(( char*) obj+offset);
|
|
4501
4664
|
}
|
|
4502
|
-
static inline
|
|
4665
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_spin_x(ParticlesMonitorData restrict obj){
|
|
4503
4666
|
int64_t offset=0;
|
|
4504
4667
|
offset+=152;
|
|
4505
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4506
|
-
return (
|
|
4668
|
+
offset+=*( int64_t*)(( char*) obj+offset+200);
|
|
4669
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4507
4670
|
}
|
|
4508
|
-
static inline int64_t
|
|
4671
|
+
static inline int64_t ParticlesMonitorData_len_data_spin_x(ParticlesMonitorData restrict obj){
|
|
4509
4672
|
int64_t offset=0;
|
|
4510
4673
|
offset+=152;
|
|
4511
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4674
|
+
offset+=*( int64_t*)(( char*) obj+offset+200);
|
|
4512
4675
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4513
4676
|
return arr[1];
|
|
4514
4677
|
}
|
|
4515
|
-
static inline
|
|
4678
|
+
static inline double ParticlesMonitorData_get_data_spin_x(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4516
4679
|
int64_t offset=0;
|
|
4517
4680
|
offset+=152;
|
|
4518
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4681
|
+
offset+=*( int64_t*)(( char*) obj+offset+200);
|
|
4519
4682
|
offset+=16+i0*8;
|
|
4520
|
-
return *(
|
|
4683
|
+
return *( double*)(( char*) obj+offset);
|
|
4521
4684
|
}
|
|
4522
|
-
static inline void
|
|
4685
|
+
static inline void ParticlesMonitorData_set_data_spin_x(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4523
4686
|
int64_t offset=0;
|
|
4524
4687
|
offset+=152;
|
|
4525
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4688
|
+
offset+=*( int64_t*)(( char*) obj+offset+200);
|
|
4526
4689
|
offset+=16+i0*8;
|
|
4527
|
-
*(
|
|
4690
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4528
4691
|
}
|
|
4529
|
-
static inline
|
|
4692
|
+
static inline double* ParticlesMonitorData_getp1_data_spin_x(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4530
4693
|
int64_t offset=0;
|
|
4531
4694
|
offset+=152;
|
|
4532
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4695
|
+
offset+=*( int64_t*)(( char*) obj+offset+200);
|
|
4533
4696
|
offset+=16+i0*8;
|
|
4534
|
-
return (
|
|
4697
|
+
return ( double*)(( char*) obj+offset);
|
|
4535
4698
|
}
|
|
4536
|
-
static inline
|
|
4699
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_spin_y(ParticlesMonitorData restrict obj){
|
|
4537
4700
|
int64_t offset=0;
|
|
4538
4701
|
offset+=152;
|
|
4539
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4540
|
-
return (
|
|
4702
|
+
offset+=*( int64_t*)(( char*) obj+offset+208);
|
|
4703
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4541
4704
|
}
|
|
4542
|
-
static inline int64_t
|
|
4705
|
+
static inline int64_t ParticlesMonitorData_len_data_spin_y(ParticlesMonitorData restrict obj){
|
|
4543
4706
|
int64_t offset=0;
|
|
4544
4707
|
offset+=152;
|
|
4545
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4708
|
+
offset+=*( int64_t*)(( char*) obj+offset+208);
|
|
4546
4709
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4547
4710
|
return arr[1];
|
|
4548
4711
|
}
|
|
4549
|
-
static inline
|
|
4712
|
+
static inline double ParticlesMonitorData_get_data_spin_y(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4550
4713
|
int64_t offset=0;
|
|
4551
4714
|
offset+=152;
|
|
4552
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4715
|
+
offset+=*( int64_t*)(( char*) obj+offset+208);
|
|
4553
4716
|
offset+=16+i0*8;
|
|
4554
|
-
return *(
|
|
4717
|
+
return *( double*)(( char*) obj+offset);
|
|
4555
4718
|
}
|
|
4556
|
-
static inline void
|
|
4719
|
+
static inline void ParticlesMonitorData_set_data_spin_y(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4557
4720
|
int64_t offset=0;
|
|
4558
4721
|
offset+=152;
|
|
4559
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4722
|
+
offset+=*( int64_t*)(( char*) obj+offset+208);
|
|
4560
4723
|
offset+=16+i0*8;
|
|
4561
|
-
*(
|
|
4724
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4562
4725
|
}
|
|
4563
|
-
static inline
|
|
4726
|
+
static inline double* ParticlesMonitorData_getp1_data_spin_y(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4564
4727
|
int64_t offset=0;
|
|
4565
4728
|
offset+=152;
|
|
4566
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4729
|
+
offset+=*( int64_t*)(( char*) obj+offset+208);
|
|
4567
4730
|
offset+=16+i0*8;
|
|
4568
|
-
return (
|
|
4731
|
+
return ( double*)(( char*) obj+offset);
|
|
4569
4732
|
}
|
|
4570
|
-
static inline
|
|
4733
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_spin_z(ParticlesMonitorData restrict obj){
|
|
4571
4734
|
int64_t offset=0;
|
|
4572
4735
|
offset+=152;
|
|
4573
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4574
|
-
return (
|
|
4736
|
+
offset+=*( int64_t*)(( char*) obj+offset+216);
|
|
4737
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4575
4738
|
}
|
|
4576
|
-
static inline int64_t
|
|
4739
|
+
static inline int64_t ParticlesMonitorData_len_data_spin_z(ParticlesMonitorData restrict obj){
|
|
4577
4740
|
int64_t offset=0;
|
|
4578
4741
|
offset+=152;
|
|
4579
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4742
|
+
offset+=*( int64_t*)(( char*) obj+offset+216);
|
|
4580
4743
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4581
4744
|
return arr[1];
|
|
4582
4745
|
}
|
|
4583
|
-
static inline
|
|
4746
|
+
static inline double ParticlesMonitorData_get_data_spin_z(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4584
4747
|
int64_t offset=0;
|
|
4585
4748
|
offset+=152;
|
|
4586
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4587
|
-
offset+=16+i0*
|
|
4588
|
-
return *(
|
|
4749
|
+
offset+=*( int64_t*)(( char*) obj+offset+216);
|
|
4750
|
+
offset+=16+i0*8;
|
|
4751
|
+
return *( double*)(( char*) obj+offset);
|
|
4589
4752
|
}
|
|
4590
|
-
static inline void
|
|
4753
|
+
static inline void ParticlesMonitorData_set_data_spin_z(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4591
4754
|
int64_t offset=0;
|
|
4592
4755
|
offset+=152;
|
|
4593
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4594
|
-
offset+=16+i0*
|
|
4595
|
-
*(
|
|
4756
|
+
offset+=*( int64_t*)(( char*) obj+offset+216);
|
|
4757
|
+
offset+=16+i0*8;
|
|
4758
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4596
4759
|
}
|
|
4597
|
-
static inline
|
|
4760
|
+
static inline double* ParticlesMonitorData_getp1_data_spin_z(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4598
4761
|
int64_t offset=0;
|
|
4599
4762
|
offset+=152;
|
|
4600
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4601
|
-
offset+=16+i0*
|
|
4602
|
-
return (
|
|
4763
|
+
offset+=*( int64_t*)(( char*) obj+offset+216);
|
|
4764
|
+
offset+=16+i0*8;
|
|
4765
|
+
return ( double*)(( char*) obj+offset);
|
|
4603
4766
|
}
|
|
4604
|
-
static inline
|
|
4767
|
+
static inline ArrNFloat64 ParticlesMonitorData_getp_data_anomalous_magnetic_moment(ParticlesMonitorData restrict obj){
|
|
4605
4768
|
int64_t offset=0;
|
|
4606
4769
|
offset+=152;
|
|
4607
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4608
|
-
return (
|
|
4770
|
+
offset+=*( int64_t*)(( char*) obj+offset+224);
|
|
4771
|
+
return (ArrNFloat64)(( char*) obj+offset);
|
|
4609
4772
|
}
|
|
4610
|
-
static inline int64_t
|
|
4773
|
+
static inline int64_t ParticlesMonitorData_len_data_anomalous_magnetic_moment(ParticlesMonitorData restrict obj){
|
|
4611
4774
|
int64_t offset=0;
|
|
4612
4775
|
offset+=152;
|
|
4613
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4776
|
+
offset+=*( int64_t*)(( char*) obj+offset+224);
|
|
4614
4777
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4615
4778
|
return arr[1];
|
|
4616
4779
|
}
|
|
4617
|
-
static inline
|
|
4780
|
+
static inline double ParticlesMonitorData_get_data_anomalous_magnetic_moment(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4618
4781
|
int64_t offset=0;
|
|
4619
4782
|
offset+=152;
|
|
4620
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4621
|
-
offset+=16+i0*
|
|
4622
|
-
return *(
|
|
4783
|
+
offset+=*( int64_t*)(( char*) obj+offset+224);
|
|
4784
|
+
offset+=16+i0*8;
|
|
4785
|
+
return *( double*)(( char*) obj+offset);
|
|
4623
4786
|
}
|
|
4624
|
-
static inline void
|
|
4787
|
+
static inline void ParticlesMonitorData_set_data_anomalous_magnetic_moment(ParticlesMonitorData restrict obj, int64_t i0, double value){
|
|
4625
4788
|
int64_t offset=0;
|
|
4626
4789
|
offset+=152;
|
|
4627
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4628
|
-
offset+=16+i0*
|
|
4629
|
-
*(
|
|
4790
|
+
offset+=*( int64_t*)(( char*) obj+offset+224);
|
|
4791
|
+
offset+=16+i0*8;
|
|
4792
|
+
*( double*)(( char*) obj+offset)=value;
|
|
4630
4793
|
}
|
|
4631
|
-
static inline
|
|
4794
|
+
static inline double* ParticlesMonitorData_getp1_data_anomalous_magnetic_moment(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4632
4795
|
int64_t offset=0;
|
|
4633
4796
|
offset+=152;
|
|
4634
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4635
|
-
offset+=16+i0*
|
|
4636
|
-
return (
|
|
4797
|
+
offset+=*( int64_t*)(( char*) obj+offset+224);
|
|
4798
|
+
offset+=16+i0*8;
|
|
4799
|
+
return ( double*)(( char*) obj+offset);
|
|
4637
4800
|
}
|
|
4638
|
-
static inline
|
|
4801
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_pdg_id(ParticlesMonitorData restrict obj){
|
|
4639
4802
|
int64_t offset=0;
|
|
4640
4803
|
offset+=152;
|
|
4641
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4642
|
-
return (
|
|
4804
|
+
offset+=*( int64_t*)(( char*) obj+offset+232);
|
|
4805
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4643
4806
|
}
|
|
4644
|
-
static inline int64_t
|
|
4807
|
+
static inline int64_t ParticlesMonitorData_len_data_pdg_id(ParticlesMonitorData restrict obj){
|
|
4645
4808
|
int64_t offset=0;
|
|
4646
4809
|
offset+=152;
|
|
4647
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4810
|
+
offset+=*( int64_t*)(( char*) obj+offset+232);
|
|
4648
4811
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4649
4812
|
return arr[1];
|
|
4650
4813
|
}
|
|
4651
|
-
static inline
|
|
4814
|
+
static inline int64_t ParticlesMonitorData_get_data_pdg_id(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4652
4815
|
int64_t offset=0;
|
|
4653
4816
|
offset+=152;
|
|
4654
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4655
|
-
offset+=16+i0*
|
|
4656
|
-
return *(
|
|
4817
|
+
offset+=*( int64_t*)(( char*) obj+offset+232);
|
|
4818
|
+
offset+=16+i0*8;
|
|
4819
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4657
4820
|
}
|
|
4658
|
-
static inline void
|
|
4821
|
+
static inline void ParticlesMonitorData_set_data_pdg_id(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4659
4822
|
int64_t offset=0;
|
|
4660
4823
|
offset+=152;
|
|
4661
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4662
|
-
offset+=16+i0*
|
|
4663
|
-
*(
|
|
4824
|
+
offset+=*( int64_t*)(( char*) obj+offset+232);
|
|
4825
|
+
offset+=16+i0*8;
|
|
4826
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4664
4827
|
}
|
|
4665
|
-
static inline
|
|
4828
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_pdg_id(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4666
4829
|
int64_t offset=0;
|
|
4667
4830
|
offset+=152;
|
|
4668
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4669
|
-
offset+=16+i0*
|
|
4670
|
-
return (
|
|
4831
|
+
offset+=*( int64_t*)(( char*) obj+offset+232);
|
|
4832
|
+
offset+=16+i0*8;
|
|
4833
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4671
4834
|
}
|
|
4672
|
-
static inline
|
|
4835
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_particle_id(ParticlesMonitorData restrict obj){
|
|
4673
4836
|
int64_t offset=0;
|
|
4674
4837
|
offset+=152;
|
|
4675
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4676
|
-
return (
|
|
4838
|
+
offset+=*( int64_t*)(( char*) obj+offset+240);
|
|
4839
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4677
4840
|
}
|
|
4678
|
-
static inline int64_t
|
|
4841
|
+
static inline int64_t ParticlesMonitorData_len_data_particle_id(ParticlesMonitorData restrict obj){
|
|
4679
4842
|
int64_t offset=0;
|
|
4680
4843
|
offset+=152;
|
|
4681
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4844
|
+
offset+=*( int64_t*)(( char*) obj+offset+240);
|
|
4682
4845
|
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4683
4846
|
return arr[1];
|
|
4684
4847
|
}
|
|
4685
|
-
static inline
|
|
4848
|
+
static inline int64_t ParticlesMonitorData_get_data_particle_id(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4686
4849
|
int64_t offset=0;
|
|
4687
4850
|
offset+=152;
|
|
4688
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4689
|
-
offset+=16+i0*
|
|
4690
|
-
return *(
|
|
4851
|
+
offset+=*( int64_t*)(( char*) obj+offset+240);
|
|
4852
|
+
offset+=16+i0*8;
|
|
4853
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4691
4854
|
}
|
|
4692
|
-
static inline void
|
|
4855
|
+
static inline void ParticlesMonitorData_set_data_particle_id(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4693
4856
|
int64_t offset=0;
|
|
4694
4857
|
offset+=152;
|
|
4695
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4696
|
-
offset+=16+i0*
|
|
4697
|
-
*(
|
|
4858
|
+
offset+=*( int64_t*)(( char*) obj+offset+240);
|
|
4859
|
+
offset+=16+i0*8;
|
|
4860
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4698
4861
|
}
|
|
4699
|
-
static inline
|
|
4862
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_particle_id(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4700
4863
|
int64_t offset=0;
|
|
4701
4864
|
offset+=152;
|
|
4702
|
-
offset+=*( int64_t*)(( char*) obj+offset+
|
|
4703
|
-
offset+=16+i0*
|
|
4704
|
-
return (
|
|
4865
|
+
offset+=*( int64_t*)(( char*) obj+offset+240);
|
|
4866
|
+
offset+=16+i0*8;
|
|
4867
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4705
4868
|
}
|
|
4706
|
-
static inline
|
|
4869
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_at_element(ParticlesMonitorData restrict obj){
|
|
4707
4870
|
int64_t offset=0;
|
|
4708
|
-
offset+=
|
|
4709
|
-
|
|
4871
|
+
offset+=152;
|
|
4872
|
+
offset+=*( int64_t*)(( char*) obj+offset+248);
|
|
4873
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4710
4874
|
}
|
|
4711
|
-
static inline
|
|
4875
|
+
static inline int64_t ParticlesMonitorData_len_data_at_element(ParticlesMonitorData restrict obj){
|
|
4712
4876
|
int64_t offset=0;
|
|
4713
|
-
offset+=
|
|
4714
|
-
|
|
4877
|
+
offset+=152;
|
|
4878
|
+
offset+=*( int64_t*)(( char*) obj+offset+248);
|
|
4879
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4880
|
+
return arr[1];
|
|
4715
4881
|
}
|
|
4716
|
-
static inline
|
|
4882
|
+
static inline int64_t ParticlesMonitorData_get_data_at_element(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4717
4883
|
int64_t offset=0;
|
|
4718
|
-
offset+=
|
|
4719
|
-
|
|
4884
|
+
offset+=152;
|
|
4885
|
+
offset+=*( int64_t*)(( char*) obj+offset+248);
|
|
4886
|
+
offset+=16+i0*8;
|
|
4887
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4720
4888
|
}
|
|
4721
|
-
static inline
|
|
4889
|
+
static inline void ParticlesMonitorData_set_data_at_element(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4722
4890
|
int64_t offset=0;
|
|
4723
|
-
offset+=
|
|
4724
|
-
|
|
4891
|
+
offset+=152;
|
|
4892
|
+
offset+=*( int64_t*)(( char*) obj+offset+248);
|
|
4893
|
+
offset+=16+i0*8;
|
|
4894
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4725
4895
|
}
|
|
4726
|
-
static inline
|
|
4896
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_at_element(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4727
4897
|
int64_t offset=0;
|
|
4728
|
-
offset+=
|
|
4729
|
-
|
|
4898
|
+
offset+=152;
|
|
4899
|
+
offset+=*( int64_t*)(( char*) obj+offset+248);
|
|
4900
|
+
offset+=16+i0*8;
|
|
4901
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4730
4902
|
}
|
|
4731
|
-
static inline
|
|
4903
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_at_turn(ParticlesMonitorData restrict obj){
|
|
4732
4904
|
int64_t offset=0;
|
|
4733
|
-
offset+=
|
|
4734
|
-
|
|
4905
|
+
offset+=152;
|
|
4906
|
+
offset+=*( int64_t*)(( char*) obj+offset+256);
|
|
4907
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4735
4908
|
}
|
|
4736
|
-
static inline
|
|
4909
|
+
static inline int64_t ParticlesMonitorData_len_data_at_turn(ParticlesMonitorData restrict obj){
|
|
4737
4910
|
int64_t offset=0;
|
|
4738
|
-
offset+=
|
|
4739
|
-
|
|
4911
|
+
offset+=152;
|
|
4912
|
+
offset+=*( int64_t*)(( char*) obj+offset+256);
|
|
4913
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4914
|
+
return arr[1];
|
|
4740
4915
|
}
|
|
4741
|
-
static inline
|
|
4916
|
+
static inline int64_t ParticlesMonitorData_get_data_at_turn(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4742
4917
|
int64_t offset=0;
|
|
4743
|
-
offset+=
|
|
4744
|
-
|
|
4918
|
+
offset+=152;
|
|
4919
|
+
offset+=*( int64_t*)(( char*) obj+offset+256);
|
|
4920
|
+
offset+=16+i0*8;
|
|
4921
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4745
4922
|
}
|
|
4746
|
-
static inline
|
|
4923
|
+
static inline void ParticlesMonitorData_set_data_at_turn(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4747
4924
|
int64_t offset=0;
|
|
4748
|
-
offset+=
|
|
4749
|
-
|
|
4925
|
+
offset+=152;
|
|
4926
|
+
offset+=*( int64_t*)(( char*) obj+offset+256);
|
|
4927
|
+
offset+=16+i0*8;
|
|
4928
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4750
4929
|
}
|
|
4751
|
-
static inline
|
|
4930
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_at_turn(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4752
4931
|
int64_t offset=0;
|
|
4753
|
-
offset+=
|
|
4754
|
-
|
|
4932
|
+
offset+=152;
|
|
4933
|
+
offset+=*( int64_t*)(( char*) obj+offset+256);
|
|
4934
|
+
offset+=16+i0*8;
|
|
4935
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4755
4936
|
}
|
|
4756
|
-
static inline
|
|
4937
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_state(ParticlesMonitorData restrict obj){
|
|
4757
4938
|
int64_t offset=0;
|
|
4758
|
-
offset+=
|
|
4759
|
-
|
|
4939
|
+
offset+=152;
|
|
4940
|
+
offset+=*( int64_t*)(( char*) obj+offset+264);
|
|
4941
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4760
4942
|
}
|
|
4761
|
-
static inline
|
|
4943
|
+
static inline int64_t ParticlesMonitorData_len_data_state(ParticlesMonitorData restrict obj){
|
|
4762
4944
|
int64_t offset=0;
|
|
4763
|
-
offset+=
|
|
4764
|
-
|
|
4945
|
+
offset+=152;
|
|
4946
|
+
offset+=*( int64_t*)(( char*) obj+offset+264);
|
|
4947
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4948
|
+
return arr[1];
|
|
4765
4949
|
}
|
|
4766
|
-
static inline
|
|
4950
|
+
static inline int64_t ParticlesMonitorData_get_data_state(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4767
4951
|
int64_t offset=0;
|
|
4768
|
-
offset+=
|
|
4769
|
-
|
|
4952
|
+
offset+=152;
|
|
4953
|
+
offset+=*( int64_t*)(( char*) obj+offset+264);
|
|
4954
|
+
offset+=16+i0*8;
|
|
4955
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4770
4956
|
}
|
|
4771
|
-
static inline void
|
|
4957
|
+
static inline void ParticlesMonitorData_set_data_state(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4772
4958
|
int64_t offset=0;
|
|
4773
|
-
offset+=
|
|
4774
|
-
|
|
4959
|
+
offset+=152;
|
|
4960
|
+
offset+=*( int64_t*)(( char*) obj+offset+264);
|
|
4961
|
+
offset+=16+i0*8;
|
|
4962
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4775
4963
|
}
|
|
4776
|
-
static inline
|
|
4964
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_state(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4777
4965
|
int64_t offset=0;
|
|
4778
|
-
offset+=
|
|
4779
|
-
|
|
4966
|
+
offset+=152;
|
|
4967
|
+
offset+=*( int64_t*)(( char*) obj+offset+264);
|
|
4968
|
+
offset+=16+i0*8;
|
|
4969
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4780
4970
|
}
|
|
4781
|
-
static inline
|
|
4971
|
+
static inline ArrNInt64 ParticlesMonitorData_getp_data_parent_particle_id(ParticlesMonitorData restrict obj){
|
|
4782
4972
|
int64_t offset=0;
|
|
4783
|
-
offset+=
|
|
4784
|
-
|
|
4973
|
+
offset+=152;
|
|
4974
|
+
offset+=*( int64_t*)(( char*) obj+offset+272);
|
|
4975
|
+
return (ArrNInt64)(( char*) obj+offset);
|
|
4785
4976
|
}
|
|
4786
|
-
static inline
|
|
4977
|
+
static inline int64_t ParticlesMonitorData_len_data_parent_particle_id(ParticlesMonitorData restrict obj){
|
|
4787
4978
|
int64_t offset=0;
|
|
4788
|
-
offset+=
|
|
4789
|
-
|
|
4979
|
+
offset+=152;
|
|
4980
|
+
offset+=*( int64_t*)(( char*) obj+offset+272);
|
|
4981
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
4982
|
+
return arr[1];
|
|
4790
4983
|
}
|
|
4791
|
-
static inline
|
|
4984
|
+
static inline int64_t ParticlesMonitorData_get_data_parent_particle_id(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4792
4985
|
int64_t offset=0;
|
|
4793
|
-
offset+=
|
|
4794
|
-
|
|
4986
|
+
offset+=152;
|
|
4987
|
+
offset+=*( int64_t*)(( char*) obj+offset+272);
|
|
4988
|
+
offset+=16+i0*8;
|
|
4989
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
4795
4990
|
}
|
|
4796
|
-
static inline
|
|
4991
|
+
static inline void ParticlesMonitorData_set_data_parent_particle_id(ParticlesMonitorData restrict obj, int64_t i0, int64_t value){
|
|
4797
4992
|
int64_t offset=0;
|
|
4798
|
-
offset+=
|
|
4799
|
-
|
|
4993
|
+
offset+=152;
|
|
4994
|
+
offset+=*( int64_t*)(( char*) obj+offset+272);
|
|
4995
|
+
offset+=16+i0*8;
|
|
4996
|
+
*( int64_t*)(( char*) obj+offset)=value;
|
|
4800
4997
|
}
|
|
4801
|
-
static inline
|
|
4998
|
+
static inline int64_t* ParticlesMonitorData_getp1_data_parent_particle_id(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4802
4999
|
int64_t offset=0;
|
|
4803
|
-
offset+=
|
|
4804
|
-
|
|
5000
|
+
offset+=152;
|
|
5001
|
+
offset+=*( int64_t*)(( char*) obj+offset+272);
|
|
5002
|
+
offset+=16+i0*8;
|
|
5003
|
+
return ( int64_t*)(( char*) obj+offset);
|
|
4805
5004
|
}
|
|
4806
|
-
static inline
|
|
5005
|
+
static inline ArrNUint32 ParticlesMonitorData_getp_data__rng_s1(ParticlesMonitorData restrict obj){
|
|
4807
5006
|
int64_t offset=0;
|
|
4808
|
-
offset+=
|
|
4809
|
-
|
|
5007
|
+
offset+=152;
|
|
5008
|
+
offset+=*( int64_t*)(( char*) obj+offset+280);
|
|
5009
|
+
return (ArrNUint32)(( char*) obj+offset);
|
|
4810
5010
|
}
|
|
4811
|
-
static inline
|
|
5011
|
+
static inline int64_t ParticlesMonitorData_len_data__rng_s1(ParticlesMonitorData restrict obj){
|
|
4812
5012
|
int64_t offset=0;
|
|
4813
|
-
offset+=
|
|
4814
|
-
|
|
5013
|
+
offset+=152;
|
|
5014
|
+
offset+=*( int64_t*)(( char*) obj+offset+280);
|
|
5015
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
5016
|
+
return arr[1];
|
|
4815
5017
|
}
|
|
4816
|
-
static inline
|
|
5018
|
+
static inline uint32_t ParticlesMonitorData_get_data__rng_s1(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
4817
5019
|
int64_t offset=0;
|
|
4818
|
-
offset+=
|
|
4819
|
-
|
|
5020
|
+
offset+=152;
|
|
5021
|
+
offset+=*( int64_t*)(( char*) obj+offset+280);
|
|
5022
|
+
offset+=16+i0*4;
|
|
5023
|
+
return *( uint32_t*)(( char*) obj+offset);
|
|
4820
5024
|
}
|
|
4821
|
-
static inline
|
|
5025
|
+
static inline void ParticlesMonitorData_set_data__rng_s1(ParticlesMonitorData restrict obj, int64_t i0, uint32_t value){
|
|
4822
5026
|
int64_t offset=0;
|
|
4823
|
-
offset+=
|
|
4824
|
-
|
|
5027
|
+
offset+=152;
|
|
5028
|
+
offset+=*( int64_t*)(( char*) obj+offset+280);
|
|
5029
|
+
offset+=16+i0*4;
|
|
5030
|
+
*( uint32_t*)(( char*) obj+offset)=value;
|
|
4825
5031
|
}
|
|
4826
|
-
static inline
|
|
5032
|
+
static inline uint32_t* ParticlesMonitorData_getp1_data__rng_s1(ParticlesMonitorData restrict obj, int64_t i0){
|
|
4827
5033
|
int64_t offset=0;
|
|
4828
|
-
offset+=
|
|
4829
|
-
|
|
5034
|
+
offset+=152;
|
|
5035
|
+
offset+=*( int64_t*)(( char*) obj+offset+280);
|
|
5036
|
+
offset+=16+i0*4;
|
|
5037
|
+
return ( uint32_t*)(( char*) obj+offset);
|
|
4830
5038
|
}
|
|
4831
|
-
static inline
|
|
5039
|
+
static inline ArrNUint32 ParticlesMonitorData_getp_data__rng_s2(ParticlesMonitorData restrict obj){
|
|
4832
5040
|
int64_t offset=0;
|
|
4833
|
-
offset+=
|
|
4834
|
-
|
|
5041
|
+
offset+=152;
|
|
5042
|
+
offset+=*( int64_t*)(( char*) obj+offset+288);
|
|
5043
|
+
return (ArrNUint32)(( char*) obj+offset);
|
|
4835
5044
|
}
|
|
4836
|
-
static inline
|
|
5045
|
+
static inline int64_t ParticlesMonitorData_len_data__rng_s2(ParticlesMonitorData restrict obj){
|
|
4837
5046
|
int64_t offset=0;
|
|
4838
|
-
offset+=
|
|
4839
|
-
|
|
5047
|
+
offset+=152;
|
|
5048
|
+
offset+=*( int64_t*)(( char*) obj+offset+288);
|
|
5049
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
5050
|
+
return arr[1];
|
|
4840
5051
|
}
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
#ifndef XTRACK_CONSTANTS_H
|
|
4848
|
-
#define XTRACK_CONSTANTS_H
|
|
4849
|
-
|
|
4850
|
-
#if !defined( C_LIGHT )
|
|
4851
|
-
#define C_LIGHT ( 299792458.0 )
|
|
4852
|
-
#endif /* !defined( C_LIGHT ) */
|
|
4853
|
-
|
|
4854
|
-
#if !defined( EPSILON_0 )
|
|
4855
|
-
#define EPSILON_0 (8.854187817620e-12)
|
|
4856
|
-
#endif /* !defined( EPSILON_0 ) */
|
|
4857
|
-
|
|
4858
|
-
#if !defined( PI )
|
|
4859
|
-
#define PI (3.1415926535897932384626433832795028841971693993751)
|
|
4860
|
-
#endif /* !defined( PI ) */
|
|
4861
|
-
|
|
4862
|
-
#if !defined( MU_0 )
|
|
4863
|
-
#define MU_0 (PI*4.0e-7)
|
|
4864
|
-
#endif /* !defined( MU_0 ) */
|
|
4865
|
-
|
|
4866
|
-
#if !defined( DEG2RAD )
|
|
4867
|
-
#define DEG2RAD (0.0174532925199432957692369076848861271344287188854)
|
|
4868
|
-
#endif /* !defiend( DEG2RAD ) */
|
|
4869
|
-
|
|
4870
|
-
#if !defined( RAD2DEG )
|
|
4871
|
-
#define RAD2DEG (57.29577951308232087679815481410517033240547246656442)
|
|
4872
|
-
#endif /* !defiend( RAD2DEG ) */
|
|
4873
|
-
|
|
4874
|
-
#if !defined( SQRT_PI )
|
|
4875
|
-
#define SQRT_PI (1.7724538509055160272981674833411451827975494561224)
|
|
4876
|
-
#endif /* !defined( SQRT_PI ) */
|
|
4877
|
-
|
|
4878
|
-
#if !defined( QELEM )
|
|
4879
|
-
#define QELEM (1.60217662e-19)
|
|
4880
|
-
#endif /* !defined( QELEM ) */
|
|
4881
|
-
|
|
4882
|
-
#if !defined( DBL_MAX )
|
|
4883
|
-
#define DBL_MAX (1.7976931348623158e+308)
|
|
4884
|
-
#endif /* !defined( DBL_MAX ) */
|
|
4885
|
-
|
|
4886
|
-
#if !defined( DBL_MIN )
|
|
4887
|
-
#define DBL_MIN (2.2250738585072014e-308)
|
|
4888
|
-
#endif /* !defined( DBL_MIN ) */
|
|
4889
|
-
|
|
4890
|
-
#if !defined( DBL_EPSILON )
|
|
4891
|
-
#define DBL_EPSILON (2.2204460492503131e-16)
|
|
4892
|
-
#endif /* !defined( DBL_EPSILON ) */
|
|
4893
|
-
|
|
4894
|
-
#if !defined( RADIUS_ELECTRON )
|
|
4895
|
-
#define RADIUS_ELECTRON (2.8179403262e-15)
|
|
4896
|
-
#endif /* !defined( RADIUS_ELECTRON ) */
|
|
4897
|
-
|
|
4898
|
-
#if !defined( MASS_ELECTRON )
|
|
4899
|
-
#define MASS_ELECTRON (9.1093837e-31)
|
|
4900
|
-
#endif /* !defined( MASS_ELECTRON ) */
|
|
4901
|
-
|
|
4902
|
-
#endif /* XTRACK_CONSTANTS_H */
|
|
4903
|
-
|
|
4904
|
-
// copyright ############################### //
|
|
4905
|
-
// This file is part of the Xtrack Package. //
|
|
4906
|
-
// Copyright (c) CERN, 2023. //
|
|
4907
|
-
// ######################################### //
|
|
4908
|
-
|
|
4909
|
-
#ifndef XTRACK_FUNCTIONS_H
|
|
4910
|
-
#define XTRACK_FUNCTIONS_H
|
|
4911
|
-
|
|
4912
|
-
#include <headers/track.h>
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
GPUFUN
|
|
4916
|
-
void kill_all_particles(LocalParticle* part0, int64_t kill_state) {
|
|
4917
|
-
START_PER_PARTICLE_BLOCK(part0, part);
|
|
4918
|
-
LocalParticle_kill_particle(part, kill_state);
|
|
4919
|
-
END_PER_PARTICLE_BLOCK;
|
|
4920
|
-
}
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
GPUFUN
|
|
4924
|
-
int8_t assert_tracking(LocalParticle* part, int64_t kill_state){
|
|
4925
|
-
// Whenever we are not tracking, e.g. in a twiss, the particle will be at_turn < 0.
|
|
4926
|
-
// We test this to distinguish genuine tracking from twiss.
|
|
4927
|
-
if (LocalParticle_get_at_turn(part) < 0){
|
|
4928
|
-
LocalParticle_kill_particle(part, kill_state);
|
|
4929
|
-
return 0;
|
|
4930
|
-
}
|
|
4931
|
-
return 1;
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4934
|
-
#endif /* XTRACK_FUNCTIONS_H */
|
|
4935
|
-
|
|
4936
|
-
// copyright ############################### //
|
|
4937
|
-
// This file is part of the Xtrack Package. //
|
|
4938
|
-
// Copyright (c) CERN, 2023. //
|
|
4939
|
-
// ######################################### //
|
|
4940
|
-
|
|
4941
|
-
#ifndef XTRACK_PARTICLE_STATES_H
|
|
4942
|
-
#define XTRACK_PARTICLE_STATES_H
|
|
4943
|
-
|
|
4944
|
-
#define XT_LOST_ON_APERTURE 0
|
|
4945
|
-
#define XT_LOST_ON_LONG_CUT -2
|
|
4946
|
-
#define XT_LOST_ALL_E_IN_SYNRAD -10
|
|
4947
|
-
#define RNG_ERR_SEEDS_NOT_SET -20
|
|
4948
|
-
#define RNG_ERR_INVALID_TRACK -21
|
|
4949
|
-
#define RNG_ERR_RUTH_NOT_SET -22
|
|
4950
|
-
#define XT_INVALID_SLICE_TRANSFORM -40
|
|
4951
|
-
#define XT_INVALID_CURVED_SLICE_TRANSFORM -41
|
|
4952
|
-
|
|
4953
|
-
#endif /* XTRACK_PARTICLE_STATES_H */
|
|
4954
|
-
|
|
4955
|
-
// copyright ############################### //
|
|
4956
|
-
// This file is part of the Xtrack Package. //
|
|
4957
|
-
// Copyright (c) CERN, 2025. //
|
|
4958
|
-
// ######################################### //
|
|
4959
|
-
#ifndef XTRACK_TRACK_SROTATION_H
|
|
4960
|
-
#define XTRACK_TRACK_SROTATION_H
|
|
4961
|
-
|
|
4962
|
-
#include <headers/track.h>
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
GPUFUN
|
|
4966
|
-
void SRotation_single_particle(LocalParticle* part, double sin_z, double cos_z)
|
|
4967
|
-
{
|
|
4968
|
-
double const x = LocalParticle_get_x(part);
|
|
4969
|
-
double const y = LocalParticle_get_y(part);
|
|
4970
|
-
double const px = LocalParticle_get_px(part);
|
|
4971
|
-
double const py = LocalParticle_get_py(part);
|
|
4972
|
-
|
|
4973
|
-
double const x_hat = cos_z * x + sin_z * y;
|
|
4974
|
-
double const y_hat = -sin_z * x + cos_z * y;
|
|
4975
|
-
double const px_hat = cos_z * px + sin_z * py;
|
|
4976
|
-
double const py_hat = -sin_z * px + cos_z * py;
|
|
4977
|
-
|
|
4978
|
-
LocalParticle_set_x(part, x_hat);
|
|
4979
|
-
LocalParticle_set_y(part, y_hat);
|
|
4980
|
-
LocalParticle_set_px(part, px_hat);
|
|
4981
|
-
LocalParticle_set_py(part, py_hat);
|
|
4982
|
-
}
|
|
4983
|
-
|
|
4984
|
-
#endif
|
|
4985
|
-
// copyright ############################### //
|
|
4986
|
-
// This file is part of the Xtrack Package. //
|
|
4987
|
-
// Copyright (c) CERN, 2021. //
|
|
4988
|
-
// ######################################### //
|
|
4989
|
-
|
|
4990
|
-
#ifndef XTRACK_TRACK_DRIFT_H
|
|
4991
|
-
#define XTRACK_TRACK_DRIFT_H
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
GPUFUN
|
|
4995
|
-
void Drift_single_particle_expanded(LocalParticle* part, double length){
|
|
4996
|
-
double const rpp = LocalParticle_get_rpp(part);
|
|
4997
|
-
double const rv0v = 1./LocalParticle_get_rvv(part);
|
|
4998
|
-
double const xp = LocalParticle_get_px(part) * rpp;
|
|
4999
|
-
double const yp = LocalParticle_get_py(part) * rpp;
|
|
5000
|
-
double const dzeta = 1 - rv0v * ( 1. + ( xp*xp + yp*yp ) / 2. );
|
|
5001
|
-
|
|
5002
|
-
LocalParticle_add_to_x(part, xp * length );
|
|
5003
|
-
LocalParticle_add_to_y(part, yp * length );
|
|
5004
|
-
LocalParticle_add_to_s(part, length);
|
|
5005
|
-
LocalParticle_add_to_zeta(part, length * dzeta );
|
|
5006
|
-
}
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
GPUFUN
|
|
5010
|
-
void Drift_single_particle_exact(LocalParticle* part, double length){
|
|
5011
|
-
double const px = LocalParticle_get_px(part);
|
|
5012
|
-
double const py = LocalParticle_get_py(part);
|
|
5013
|
-
double const rv0v = 1./LocalParticle_get_rvv(part);
|
|
5014
|
-
double const one_plus_delta = 1. + LocalParticle_get_delta(part);
|
|
5015
|
-
|
|
5016
|
-
double const one_over_pz = 1./sqrt(one_plus_delta*one_plus_delta
|
|
5017
|
-
- px * px - py * py);
|
|
5018
|
-
double const dzeta = 1 - rv0v * one_plus_delta * one_over_pz;
|
|
5019
|
-
|
|
5020
|
-
LocalParticle_add_to_x(part, px * one_over_pz * length);
|
|
5021
|
-
LocalParticle_add_to_y(part, py * one_over_pz * length);
|
|
5022
|
-
LocalParticle_add_to_zeta(part, dzeta * length);
|
|
5023
|
-
LocalParticle_add_to_s(part, length);
|
|
5024
|
-
}
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
GPUFUN
|
|
5028
|
-
void Drift_single_particle(LocalParticle* part, double length){
|
|
5029
|
-
#ifndef XTRACK_USE_EXACT_DRIFTS
|
|
5030
|
-
Drift_single_particle_expanded(part, length);
|
|
5031
|
-
#else
|
|
5032
|
-
Drift_single_particle_exact(part, length);
|
|
5033
|
-
#endif
|
|
5034
|
-
}
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
#endif /* XTRACK_TRACK_DRIFT_H */
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
#ifndef XSTUITE_TRACK_FLAGS_H
|
|
5041
|
-
#define XSTUITE_TRACK_FLAGS_H
|
|
5042
|
-
#define XS_FLAG_BACKTRACK (0)
|
|
5043
|
-
#define XS_FLAG_KILL_CAVITY_KICK (2)
|
|
5044
|
-
#define XS_FLAG_IGNORE_GLOBAL_APERTURE (3)
|
|
5045
|
-
#define XS_FLAG_IGNORE_LOCAL_APERTURE (4)
|
|
5046
|
-
#define XS_FLAG_SR_TAPER (5)
|
|
5047
|
-
#define XS_FLAG_SR_KICK_SAME_AS_FIRST (6)
|
|
5048
|
-
|
|
5049
|
-
#endif // XSTUITE_TRACK_FLAGS_H
|
|
5050
|
-
|
|
5051
|
-
// copyright ############################### //
|
|
5052
|
-
// This file is part of the Xtrack Package. //
|
|
5053
|
-
// Copyright (c) CERN, 2021. //
|
|
5054
|
-
// ######################################### //
|
|
5055
|
-
|
|
5056
|
-
#ifndef XTRACK_MONITORS_H
|
|
5057
|
-
#define XTRACK_MONITORS_H
|
|
5058
|
-
|
|
5059
|
-
#include <headers/track.h>
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
GPUFUN
|
|
5063
|
-
void ParticlesMonitor_track_local_particle(ParticlesMonitorData el,
|
|
5064
|
-
LocalParticle* part0){
|
|
5065
|
-
|
|
5066
|
-
int64_t const start_at_turn = ParticlesMonitorData_get_start_at_turn(el);
|
|
5067
|
-
int64_t const stop_at_turn = ParticlesMonitorData_get_stop_at_turn(el);
|
|
5068
|
-
int64_t const part_id_start = ParticlesMonitorData_get_part_id_start(el);
|
|
5069
|
-
int64_t const part_id_end= ParticlesMonitorData_get_part_id_end(el);
|
|
5070
|
-
int64_t const ebe_mode = ParticlesMonitorData_get_ebe_mode(el);
|
|
5071
|
-
int64_t const n_repetitions = ParticlesMonitorData_get_n_repetitions(el);
|
|
5072
|
-
int64_t const repetition_period = ParticlesMonitorData_get_repetition_period(el);
|
|
5073
|
-
ParticlesData data = ParticlesMonitorData_getp_data(el);
|
|
5074
|
-
|
|
5075
|
-
int64_t n_turns_record = stop_at_turn - start_at_turn;
|
|
5076
|
-
|
|
5077
|
-
START_PER_PARTICLE_BLOCK(part0, part);
|
|
5078
|
-
int64_t at_turn;
|
|
5079
|
-
if (ebe_mode){
|
|
5080
|
-
at_turn = LocalParticle_get_at_element(part);
|
|
5081
|
-
}
|
|
5082
|
-
else{
|
|
5083
|
-
if (LocalParticle_check_track_flag(part, XS_FLAG_BACKTRACK)) {
|
|
5084
|
-
return; // do not log (only ebe monitor supported for now in backtrack)
|
|
5085
|
-
}
|
|
5086
|
-
at_turn = LocalParticle_get_at_turn(part);
|
|
5087
|
-
}
|
|
5088
|
-
if (n_repetitions == 1){
|
|
5089
|
-
if (at_turn>=start_at_turn && at_turn<stop_at_turn){
|
|
5090
|
-
int64_t const particle_id = LocalParticle_get_particle_id(part);
|
|
5091
|
-
if (particle_id<part_id_end && particle_id>=part_id_start){
|
|
5092
|
-
int64_t const store_at =
|
|
5093
|
-
n_turns_record * (particle_id - part_id_start)
|
|
5094
|
-
+ at_turn - start_at_turn;
|
|
5095
|
-
LocalParticle_to_Particles(part, data, store_at, 0);
|
|
5096
|
-
}
|
|
5097
|
-
}
|
|
5098
|
-
}
|
|
5099
|
-
else if (n_repetitions > 1){
|
|
5100
|
-
if (at_turn < start_at_turn){
|
|
5101
|
-
// return; //only_for_context cuda opencl
|
|
5102
|
-
break; //only_for_context cpu_serial cpu_openmp
|
|
5103
|
-
}
|
|
5104
|
-
int64_t const i_frame = (at_turn - start_at_turn) / repetition_period;
|
|
5105
|
-
if (i_frame < n_repetitions
|
|
5106
|
-
&& at_turn >= start_at_turn + i_frame*repetition_period
|
|
5107
|
-
&& at_turn < stop_at_turn + i_frame*repetition_period
|
|
5108
|
-
){
|
|
5109
|
-
int64_t const particle_id = LocalParticle_get_particle_id(part);
|
|
5110
|
-
if (particle_id<part_id_end && particle_id>=part_id_start){
|
|
5111
|
-
int64_t const store_at =
|
|
5112
|
-
n_turns_record * (part_id_end - part_id_start) * i_frame
|
|
5113
|
-
+ n_turns_record * (particle_id - part_id_start)
|
|
5114
|
-
+ (at_turn - i_frame * repetition_period) - start_at_turn;
|
|
5115
|
-
LocalParticle_to_Particles(part, data, store_at, 0);
|
|
5116
|
-
}
|
|
5117
|
-
}
|
|
5118
|
-
}
|
|
5119
|
-
|
|
5120
|
-
#ifdef XSUITE_RESTORE_LOSS
|
|
5121
|
-
LocalParticle_set_state(part, 1);
|
|
5122
|
-
#endif
|
|
5123
|
-
END_PER_PARTICLE_BLOCK;
|
|
5124
|
-
}
|
|
5125
|
-
|
|
5126
|
-
#endif
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
#include <headers/track.h>
|
|
5131
|
-
#include <headers/particle_states.h>
|
|
5132
|
-
#include <beam_elements/elements_src/track_misalignments.h>
|
|
5133
|
-
GPUFUN void ParticlesMonitor_track_local_particle_with_transformations(ParticlesMonitorData el, LocalParticle* part0){
|
|
5134
|
-
// Transform to local frame
|
|
5135
|
-
double const _sin_rot_s = ParticlesMonitorData_get__sin_rot_s(el);
|
|
5136
|
-
if (_sin_rot_s > -2.) {
|
|
5137
|
-
double const _cos_rot_s = ParticlesMonitorData_get__cos_rot_s(el);
|
|
5138
|
-
double const rot_s_rad = atan2(_sin_rot_s, _cos_rot_s);
|
|
5139
|
-
double const shift_x = ParticlesMonitorData_get__shift_x(el);
|
|
5140
|
-
double const shift_y = ParticlesMonitorData_get__shift_y(el);
|
|
5141
|
-
double const shift_s = ParticlesMonitorData_get__shift_s(el);
|
|
5142
|
-
double const rot_x_rad = ParticlesMonitorData_get__rot_x_rad(el);
|
|
5143
|
-
double const rot_y_rad = ParticlesMonitorData_get__rot_y_rad(el);
|
|
5144
|
-
double const rot_s_rad_no_frame = ParticlesMonitorData_get__rot_s_rad_no_frame(el);
|
|
5145
|
-
double const length = 0.;
|
|
5146
|
-
;
|
|
5147
|
-
double const anchor = ParticlesMonitorData_get_rot_shift_anchor(el);
|
|
5148
|
-
int8_t const backtrack = LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK);
|
|
5149
|
-
|
|
5150
|
-
if (!backtrack) {
|
|
5151
|
-
track_misalignment_entry_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack); } else {
|
|
5152
|
-
track_misalignment_exit_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack);
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
|
-
/* Spin tracking is disabled by the synrad compile flag */
|
|
5156
|
-
#ifndef XTRACK_MULTIPOLE_NO_SYNRAD
|
|
5157
|
-
// Rotate spin
|
|
5158
|
-
|
|
5159
|
-
{
|
|
5160
|
-
// const int64_t XT_part_block_start_idx = part0->ipart; //only_for_context cpu_openmp
|
|
5161
|
-
// const int64_t XT_part_block_end_idx = part0->endpart; //only_for_context cpu_openmp
|
|
5162
|
-
|
|
5163
|
-
const int64_t XT_part_block_start_idx = 0; //only_for_context cpu_serial
|
|
5164
|
-
const int64_t XT_part_block_end_idx = LocalParticle_get__num_active_particles(part0); //only_for_context cpu_serial
|
|
5165
|
-
|
|
5166
|
-
//#pragma omp simd // TODO: currently does not work, needs investigating
|
|
5167
|
-
for (int64_t XT_part_block_ii = XT_part_block_start_idx; XT_part_block_ii<XT_part_block_end_idx; XT_part_block_ii++) { //only_for_context cpu_openmp cpu_serial
|
|
5168
|
-
|
|
5169
|
-
LocalParticle lpart = *part0; //only_for_context cpu_serial cpu_openmp
|
|
5170
|
-
LocalParticle* part = &lpart; //only_for_context cpu_serial cpu_openmp
|
|
5171
|
-
part->ipart = XT_part_block_ii; //only_for_context cpu_serial cpu_openmp
|
|
5172
|
-
|
|
5173
|
-
// LocalParticle* part = part0; //only_for_context opencl cuda
|
|
5174
|
-
|
|
5175
|
-
// if (LocalParticle_get_state(part) > 0) { //only_for_context cpu_openmp
|
|
5176
|
-
|
|
5177
|
-
double const spin_x_0 = LocalParticle_get_spin_x(part);
|
|
5178
|
-
double const spin_y_0 = LocalParticle_get_spin_y(part);
|
|
5179
|
-
if ((spin_x_0 != 0) || (spin_y_0 != 0)){
|
|
5180
|
-
double const spin_x_1 = _cos_rot_s*spin_x_0 + _sin_rot_s*spin_y_0;
|
|
5181
|
-
double const spin_y_1 = -_sin_rot_s*spin_x_0 + _cos_rot_s*spin_y_0;
|
|
5182
|
-
LocalParticle_set_spin_x(part, spin_x_1);
|
|
5183
|
-
LocalParticle_set_spin_y(part, spin_y_1);
|
|
5184
|
-
}
|
|
5185
|
-
|
|
5186
|
-
// } //only_for_context cpu_openmp
|
|
5187
|
-
} //only_for_context cpu_serial cpu_openmp
|
|
5188
|
-
}
|
|
5189
|
-
|
|
5190
|
-
#endif
|
|
5191
|
-
|
|
5192
|
-
}
|
|
5193
|
-
ParticlesMonitor_track_local_particle(el, part0);
|
|
5194
|
-
// Transform back to global frame
|
|
5195
|
-
if (_sin_rot_s > -2.) {
|
|
5196
|
-
double const _cos_rot_s = ParticlesMonitorData_get__cos_rot_s(el);
|
|
5197
|
-
double const rot_s_rad = atan2(_sin_rot_s, _cos_rot_s);
|
|
5198
|
-
double const shift_x = ParticlesMonitorData_get__shift_x(el);
|
|
5199
|
-
double const shift_y = ParticlesMonitorData_get__shift_y(el);
|
|
5200
|
-
double const shift_s = ParticlesMonitorData_get__shift_s(el);
|
|
5201
|
-
double const rot_x_rad = ParticlesMonitorData_get__rot_x_rad(el);
|
|
5202
|
-
double const rot_y_rad = ParticlesMonitorData_get__rot_y_rad(el);
|
|
5203
|
-
double const rot_s_rad_no_frame = ParticlesMonitorData_get__rot_s_rad_no_frame(el);
|
|
5204
|
-
double const length = 0.;
|
|
5205
|
-
;
|
|
5206
|
-
double const anchor = ParticlesMonitorData_get_rot_shift_anchor(el);
|
|
5207
|
-
int8_t const backtrack = LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK);
|
|
5208
|
-
|
|
5209
|
-
/* Spin tracking is disabled by the synrad compile flag */
|
|
5210
|
-
#ifndef XTRACK_MULTIPOLE_NO_SYNRAD
|
|
5211
|
-
// Rotate spin
|
|
5212
|
-
|
|
5213
|
-
{
|
|
5214
|
-
// const int64_t XT_part_block_start_idx = part0->ipart; //only_for_context cpu_openmp
|
|
5215
|
-
// const int64_t XT_part_block_end_idx = part0->endpart; //only_for_context cpu_openmp
|
|
5216
|
-
|
|
5217
|
-
const int64_t XT_part_block_start_idx = 0; //only_for_context cpu_serial
|
|
5218
|
-
const int64_t XT_part_block_end_idx = LocalParticle_get__num_active_particles(part0); //only_for_context cpu_serial
|
|
5219
|
-
|
|
5220
|
-
//#pragma omp simd // TODO: currently does not work, needs investigating
|
|
5221
|
-
for (int64_t XT_part_block_ii = XT_part_block_start_idx; XT_part_block_ii<XT_part_block_end_idx; XT_part_block_ii++) { //only_for_context cpu_openmp cpu_serial
|
|
5222
|
-
|
|
5223
|
-
LocalParticle lpart = *part0; //only_for_context cpu_serial cpu_openmp
|
|
5224
|
-
LocalParticle* part = &lpart; //only_for_context cpu_serial cpu_openmp
|
|
5225
|
-
part->ipart = XT_part_block_ii; //only_for_context cpu_serial cpu_openmp
|
|
5226
|
-
|
|
5227
|
-
// LocalParticle* part = part0; //only_for_context opencl cuda
|
|
5228
|
-
|
|
5229
|
-
// if (LocalParticle_get_state(part) > 0) { //only_for_context cpu_openmp
|
|
5230
|
-
|
|
5231
|
-
double const spin_x_0 = LocalParticle_get_spin_x(part);
|
|
5232
|
-
double const spin_y_0 = LocalParticle_get_spin_y(part);
|
|
5233
|
-
if ((spin_x_0 != 0) || (spin_y_0 != 0)){
|
|
5234
|
-
double const spin_x_1 = _cos_rot_s*spin_x_0 - _sin_rot_s*spin_y_0;
|
|
5235
|
-
double const spin_y_1 = _sin_rot_s*spin_x_0 + _cos_rot_s*spin_y_0;
|
|
5236
|
-
LocalParticle_set_spin_x(part, spin_x_1);
|
|
5237
|
-
LocalParticle_set_spin_y(part, spin_y_1);
|
|
5238
|
-
}
|
|
5239
|
-
|
|
5240
|
-
// } //only_for_context cpu_openmp
|
|
5241
|
-
} //only_for_context cpu_serial cpu_openmp
|
|
5242
|
-
}
|
|
5243
|
-
|
|
5244
|
-
#endif
|
|
5245
|
-
|
|
5246
|
-
if (!backtrack) {
|
|
5247
|
-
track_misalignment_exit_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack); } else {
|
|
5248
|
-
track_misalignment_entry_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack);
|
|
5249
|
-
}
|
|
5052
|
+
static inline uint32_t ParticlesMonitorData_get_data__rng_s2(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
5053
|
+
int64_t offset=0;
|
|
5054
|
+
offset+=152;
|
|
5055
|
+
offset+=*( int64_t*)(( char*) obj+offset+288);
|
|
5056
|
+
offset+=16+i0*4;
|
|
5057
|
+
return *( uint32_t*)(( char*) obj+offset);
|
|
5250
5058
|
}
|
|
5059
|
+
static inline void ParticlesMonitorData_set_data__rng_s2(ParticlesMonitorData restrict obj, int64_t i0, uint32_t value){
|
|
5060
|
+
int64_t offset=0;
|
|
5061
|
+
offset+=152;
|
|
5062
|
+
offset+=*( int64_t*)(( char*) obj+offset+288);
|
|
5063
|
+
offset+=16+i0*4;
|
|
5064
|
+
*( uint32_t*)(( char*) obj+offset)=value;
|
|
5251
5065
|
}
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
void ParticlesMonitor_track_particles(
|
|
5256
|
-
ParticlesMonitorData el,
|
|
5257
|
-
|
|
5258
|
-
ParticlesData particles,
|
|
5259
|
-
|
|
5260
|
-
int64_t flag_increment_at_element,
|
|
5261
|
-
int8_t* io_buffer){
|
|
5262
|
-
|
|
5263
|
-
// #define CONTEXT_OPENMP //only_for_context cpu_openmp
|
|
5264
|
-
#ifdef CONTEXT_OPENMP
|
|
5265
|
-
const int64_t capacity = ParticlesData_get__capacity(particles);
|
|
5266
|
-
const int num_threads = omp_get_max_threads();
|
|
5267
|
-
|
|
5268
|
-
#ifndef XT_OMP_SKIP_REORGANIZE
|
|
5269
|
-
const int64_t num_particles_to_track = ParticlesData_get__num_active_particles(particles);
|
|
5270
|
-
|
|
5271
|
-
{
|
|
5272
|
-
LocalParticle lpart;
|
|
5273
|
-
lpart.io_buffer = io_buffer;
|
|
5274
|
-
Particles_to_LocalParticle(particles, &lpart, 0, capacity);
|
|
5275
|
-
check_is_active(&lpart);
|
|
5276
|
-
count_reorganized_particles(&lpart);
|
|
5277
|
-
LocalParticle_to_Particles(&lpart, particles, 0, capacity);
|
|
5278
|
-
}
|
|
5279
|
-
#else // When we skip reorganize, we cannot just batch active particles
|
|
5280
|
-
const int64_t num_particles_to_track = capacity;
|
|
5281
|
-
#endif
|
|
5282
|
-
|
|
5283
|
-
const int64_t chunk_size = (num_particles_to_track + num_threads - 1)/num_threads; // ceil division
|
|
5284
|
-
#endif // CONTEXT_OPENMP
|
|
5285
|
-
|
|
5286
|
-
// #pragma omp parallel for //only_for_context cpu_openmp
|
|
5287
|
-
// for (int64_t batch_id = 0; batch_id < num_threads; batch_id++) { //only_for_context cpu_openmp
|
|
5288
|
-
LocalParticle lpart;
|
|
5289
|
-
lpart.io_buffer = io_buffer;
|
|
5290
|
-
lpart.track_flags = 0;
|
|
5291
|
-
// int64_t part_id = batch_id * chunk_size; //only_for_context cpu_openmp
|
|
5292
|
-
// int64_t end_id = (batch_id + 1) * chunk_size; //only_for_context cpu_openmp
|
|
5293
|
-
// if (end_id > num_particles_to_track) end_id = num_particles_to_track; //only_for_context cpu_openmp
|
|
5294
|
-
|
|
5295
|
-
int64_t part_id = 0; //only_for_context cpu_serial
|
|
5296
|
-
// int64_t part_id = blockDim.x * blockIdx.x + threadIdx.x; //only_for_context cuda
|
|
5297
|
-
// int64_t part_id = get_global_id(0); //only_for_context opencl
|
|
5298
|
-
int64_t end_id = 0; // unused outside of openmp //only_for_context cpu_serial cuda opencl
|
|
5299
|
-
|
|
5300
|
-
int64_t part_capacity = ParticlesData_get__capacity(particles);
|
|
5301
|
-
if (part_id<part_capacity){
|
|
5302
|
-
Particles_to_LocalParticle(particles, &lpart, part_id, end_id);
|
|
5303
|
-
if (check_is_active(&lpart)>0){
|
|
5304
|
-
ParticlesMonitor_track_local_particle_with_transformations(el, &lpart);
|
|
5305
|
-
|
|
5306
|
-
}
|
|
5307
|
-
if (check_is_active(&lpart)>0 && flag_increment_at_element){
|
|
5308
|
-
increment_at_element(&lpart, 1);
|
|
5309
|
-
}
|
|
5310
|
-
}
|
|
5311
|
-
// } //only_for_context cpu_openmp
|
|
5312
|
-
|
|
5313
|
-
// On OpenMP we want to additionally by default reorganize all
|
|
5314
|
-
// the particles.
|
|
5315
|
-
// #ifndef XT_OMP_SKIP_REORGANIZE //only_for_context cpu_openmp
|
|
5316
|
-
// LocalParticle lpart; //only_for_context cpu_openmp
|
|
5317
|
-
// lpart.io_buffer = io_buffer; //only_for_context cpu_openmp
|
|
5318
|
-
// Particles_to_LocalParticle(particles, &lpart, 0, capacity);//only_for_context cpu_openmp
|
|
5319
|
-
// check_is_active(&lpart); //only_for_context cpu_openmp
|
|
5320
|
-
// #endif //only_for_context cpu_openmp
|
|
5321
|
-
}
|
|
5322
|
-
|
|
5323
|
-
#ifndef XOBJ_TYPEDEF_RandomUniformData
|
|
5324
|
-
#define XOBJ_TYPEDEF_RandomUniformData
|
|
5325
|
-
typedef struct RandomUniformData_s * RandomUniformData;
|
|
5326
|
-
static inline RandomUniformData RandomUniformData_getp(RandomUniformData restrict obj){
|
|
5066
|
+
static inline uint32_t* ParticlesMonitorData_getp1_data__rng_s2(ParticlesMonitorData restrict obj, int64_t i0){
|
|
5327
5067
|
int64_t offset=0;
|
|
5328
|
-
|
|
5068
|
+
offset+=152;
|
|
5069
|
+
offset+=*( int64_t*)(( char*) obj+offset+288);
|
|
5070
|
+
offset+=16+i0*4;
|
|
5071
|
+
return ( uint32_t*)(( char*) obj+offset);
|
|
5329
5072
|
}
|
|
5330
|
-
static inline
|
|
5073
|
+
static inline ArrNUint32 ParticlesMonitorData_getp_data__rng_s3(ParticlesMonitorData restrict obj){
|
|
5331
5074
|
int64_t offset=0;
|
|
5332
|
-
|
|
5075
|
+
offset+=152;
|
|
5076
|
+
offset+=*( int64_t*)(( char*) obj+offset+296);
|
|
5077
|
+
return (ArrNUint32)(( char*) obj+offset);
|
|
5333
5078
|
}
|
|
5334
|
-
static inline
|
|
5079
|
+
static inline int64_t ParticlesMonitorData_len_data__rng_s3(ParticlesMonitorData restrict obj){
|
|
5335
5080
|
int64_t offset=0;
|
|
5336
|
-
|
|
5081
|
+
offset+=152;
|
|
5082
|
+
offset+=*( int64_t*)(( char*) obj+offset+296);
|
|
5083
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
5084
|
+
return arr[1];
|
|
5337
5085
|
}
|
|
5338
|
-
static inline
|
|
5086
|
+
static inline uint32_t ParticlesMonitorData_get_data__rng_s3(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
5339
5087
|
int64_t offset=0;
|
|
5340
|
-
|
|
5088
|
+
offset+=152;
|
|
5089
|
+
offset+=*( int64_t*)(( char*) obj+offset+296);
|
|
5090
|
+
offset+=16+i0*4;
|
|
5091
|
+
return *( uint32_t*)(( char*) obj+offset);
|
|
5341
5092
|
}
|
|
5342
|
-
static inline
|
|
5093
|
+
static inline void ParticlesMonitorData_set_data__rng_s3(ParticlesMonitorData restrict obj, int64_t i0, uint32_t value){
|
|
5343
5094
|
int64_t offset=0;
|
|
5344
|
-
offset+=
|
|
5095
|
+
offset+=152;
|
|
5096
|
+
offset+=*( int64_t*)(( char*) obj+offset+296);
|
|
5097
|
+
offset+=16+i0*4;
|
|
5098
|
+
*( uint32_t*)(( char*) obj+offset)=value;
|
|
5099
|
+
}
|
|
5100
|
+
static inline uint32_t* ParticlesMonitorData_getp1_data__rng_s3(ParticlesMonitorData restrict obj, int64_t i0){
|
|
5101
|
+
int64_t offset=0;
|
|
5102
|
+
offset+=152;
|
|
5103
|
+
offset+=*( int64_t*)(( char*) obj+offset+296);
|
|
5104
|
+
offset+=16+i0*4;
|
|
5105
|
+
return ( uint32_t*)(( char*) obj+offset);
|
|
5106
|
+
}
|
|
5107
|
+
static inline ArrNUint32 ParticlesMonitorData_getp_data__rng_s4(ParticlesMonitorData restrict obj){
|
|
5108
|
+
int64_t offset=0;
|
|
5109
|
+
offset+=152;
|
|
5110
|
+
offset+=*( int64_t*)(( char*) obj+offset+304);
|
|
5111
|
+
return (ArrNUint32)(( char*) obj+offset);
|
|
5112
|
+
}
|
|
5113
|
+
static inline int64_t ParticlesMonitorData_len_data__rng_s4(ParticlesMonitorData restrict obj){
|
|
5114
|
+
int64_t offset=0;
|
|
5115
|
+
offset+=152;
|
|
5116
|
+
offset+=*( int64_t*)(( char*) obj+offset+304);
|
|
5117
|
+
int64_t* arr = ( int64_t*)(( char*) obj+offset);
|
|
5118
|
+
return arr[1];
|
|
5119
|
+
}
|
|
5120
|
+
static inline uint32_t ParticlesMonitorData_get_data__rng_s4(const ParticlesMonitorData restrict obj, int64_t i0){
|
|
5121
|
+
int64_t offset=0;
|
|
5122
|
+
offset+=152;
|
|
5123
|
+
offset+=*( int64_t*)(( char*) obj+offset+304);
|
|
5124
|
+
offset+=16+i0*4;
|
|
5125
|
+
return *( uint32_t*)(( char*) obj+offset);
|
|
5126
|
+
}
|
|
5127
|
+
static inline void ParticlesMonitorData_set_data__rng_s4(ParticlesMonitorData restrict obj, int64_t i0, uint32_t value){
|
|
5128
|
+
int64_t offset=0;
|
|
5129
|
+
offset+=152;
|
|
5130
|
+
offset+=*( int64_t*)(( char*) obj+offset+304);
|
|
5131
|
+
offset+=16+i0*4;
|
|
5132
|
+
*( uint32_t*)(( char*) obj+offset)=value;
|
|
5133
|
+
}
|
|
5134
|
+
static inline uint32_t* ParticlesMonitorData_getp1_data__rng_s4(ParticlesMonitorData restrict obj, int64_t i0){
|
|
5135
|
+
int64_t offset=0;
|
|
5136
|
+
offset+=152;
|
|
5137
|
+
offset+=*( int64_t*)(( char*) obj+offset+304);
|
|
5138
|
+
offset+=16+i0*4;
|
|
5139
|
+
return ( uint32_t*)(( char*) obj+offset);
|
|
5140
|
+
}
|
|
5141
|
+
static inline double ParticlesMonitorData_get__sin_rot_s(const ParticlesMonitorData restrict obj){
|
|
5142
|
+
int64_t offset=0;
|
|
5143
|
+
offset+=80;
|
|
5345
5144
|
return *( double*)(( char*) obj+offset);
|
|
5346
5145
|
}
|
|
5347
|
-
static inline void
|
|
5146
|
+
static inline void ParticlesMonitorData_set__sin_rot_s(ParticlesMonitorData restrict obj, double value){
|
|
5348
5147
|
int64_t offset=0;
|
|
5349
|
-
offset+=
|
|
5148
|
+
offset+=80;
|
|
5350
5149
|
*( double*)(( char*) obj+offset)=value;
|
|
5351
5150
|
}
|
|
5352
|
-
static inline double*
|
|
5151
|
+
static inline double* ParticlesMonitorData_getp__sin_rot_s(ParticlesMonitorData restrict obj){
|
|
5353
5152
|
int64_t offset=0;
|
|
5354
|
-
offset+=
|
|
5153
|
+
offset+=80;
|
|
5355
5154
|
return ( double*)(( char*) obj+offset);
|
|
5356
5155
|
}
|
|
5357
|
-
static inline double
|
|
5156
|
+
static inline double ParticlesMonitorData_get__cos_rot_s(const ParticlesMonitorData restrict obj){
|
|
5358
5157
|
int64_t offset=0;
|
|
5359
|
-
offset+=
|
|
5158
|
+
offset+=88;
|
|
5360
5159
|
return *( double*)(( char*) obj+offset);
|
|
5361
5160
|
}
|
|
5362
|
-
static inline void
|
|
5161
|
+
static inline void ParticlesMonitorData_set__cos_rot_s(ParticlesMonitorData restrict obj, double value){
|
|
5363
5162
|
int64_t offset=0;
|
|
5364
|
-
offset+=
|
|
5163
|
+
offset+=88;
|
|
5365
5164
|
*( double*)(( char*) obj+offset)=value;
|
|
5366
5165
|
}
|
|
5367
|
-
static inline double*
|
|
5166
|
+
static inline double* ParticlesMonitorData_getp__cos_rot_s(ParticlesMonitorData restrict obj){
|
|
5368
5167
|
int64_t offset=0;
|
|
5369
|
-
offset+=
|
|
5168
|
+
offset+=88;
|
|
5370
5169
|
return ( double*)(( char*) obj+offset);
|
|
5371
5170
|
}
|
|
5372
|
-
static inline double
|
|
5171
|
+
static inline double ParticlesMonitorData_get__shift_x(const ParticlesMonitorData restrict obj){
|
|
5373
5172
|
int64_t offset=0;
|
|
5374
|
-
offset+=
|
|
5173
|
+
offset+=96;
|
|
5375
5174
|
return *( double*)(( char*) obj+offset);
|
|
5376
5175
|
}
|
|
5377
|
-
static inline void
|
|
5176
|
+
static inline void ParticlesMonitorData_set__shift_x(ParticlesMonitorData restrict obj, double value){
|
|
5378
5177
|
int64_t offset=0;
|
|
5379
|
-
offset+=
|
|
5178
|
+
offset+=96;
|
|
5380
5179
|
*( double*)(( char*) obj+offset)=value;
|
|
5381
5180
|
}
|
|
5382
|
-
static inline double*
|
|
5181
|
+
static inline double* ParticlesMonitorData_getp__shift_x(ParticlesMonitorData restrict obj){
|
|
5383
5182
|
int64_t offset=0;
|
|
5384
|
-
offset+=
|
|
5183
|
+
offset+=96;
|
|
5385
5184
|
return ( double*)(( char*) obj+offset);
|
|
5386
5185
|
}
|
|
5387
|
-
static inline double
|
|
5186
|
+
static inline double ParticlesMonitorData_get__shift_y(const ParticlesMonitorData restrict obj){
|
|
5388
5187
|
int64_t offset=0;
|
|
5389
|
-
offset+=
|
|
5188
|
+
offset+=104;
|
|
5390
5189
|
return *( double*)(( char*) obj+offset);
|
|
5391
5190
|
}
|
|
5392
|
-
static inline void
|
|
5191
|
+
static inline void ParticlesMonitorData_set__shift_y(ParticlesMonitorData restrict obj, double value){
|
|
5393
5192
|
int64_t offset=0;
|
|
5394
|
-
offset+=
|
|
5193
|
+
offset+=104;
|
|
5395
5194
|
*( double*)(( char*) obj+offset)=value;
|
|
5396
5195
|
}
|
|
5397
|
-
static inline double*
|
|
5196
|
+
static inline double* ParticlesMonitorData_getp__shift_y(ParticlesMonitorData restrict obj){
|
|
5398
5197
|
int64_t offset=0;
|
|
5399
|
-
offset+=
|
|
5198
|
+
offset+=104;
|
|
5400
5199
|
return ( double*)(( char*) obj+offset);
|
|
5401
5200
|
}
|
|
5402
|
-
static inline double
|
|
5201
|
+
static inline double ParticlesMonitorData_get__shift_s(const ParticlesMonitorData restrict obj){
|
|
5403
5202
|
int64_t offset=0;
|
|
5404
|
-
offset+=
|
|
5203
|
+
offset+=112;
|
|
5405
5204
|
return *( double*)(( char*) obj+offset);
|
|
5406
5205
|
}
|
|
5407
|
-
static inline void
|
|
5206
|
+
static inline void ParticlesMonitorData_set__shift_s(ParticlesMonitorData restrict obj, double value){
|
|
5408
5207
|
int64_t offset=0;
|
|
5409
|
-
offset+=
|
|
5208
|
+
offset+=112;
|
|
5410
5209
|
*( double*)(( char*) obj+offset)=value;
|
|
5411
5210
|
}
|
|
5412
|
-
static inline double*
|
|
5211
|
+
static inline double* ParticlesMonitorData_getp__shift_s(ParticlesMonitorData restrict obj){
|
|
5413
5212
|
int64_t offset=0;
|
|
5414
|
-
offset+=
|
|
5213
|
+
offset+=112;
|
|
5415
5214
|
return ( double*)(( char*) obj+offset);
|
|
5416
5215
|
}
|
|
5417
|
-
static inline double
|
|
5216
|
+
static inline double ParticlesMonitorData_get__rot_x_rad(const ParticlesMonitorData restrict obj){
|
|
5418
5217
|
int64_t offset=0;
|
|
5419
|
-
offset+=
|
|
5218
|
+
offset+=120;
|
|
5420
5219
|
return *( double*)(( char*) obj+offset);
|
|
5421
5220
|
}
|
|
5422
|
-
static inline void
|
|
5221
|
+
static inline void ParticlesMonitorData_set__rot_x_rad(ParticlesMonitorData restrict obj, double value){
|
|
5423
5222
|
int64_t offset=0;
|
|
5424
|
-
offset+=
|
|
5223
|
+
offset+=120;
|
|
5425
5224
|
*( double*)(( char*) obj+offset)=value;
|
|
5426
5225
|
}
|
|
5427
|
-
static inline double*
|
|
5226
|
+
static inline double* ParticlesMonitorData_getp__rot_x_rad(ParticlesMonitorData restrict obj){
|
|
5428
5227
|
int64_t offset=0;
|
|
5429
|
-
offset+=
|
|
5228
|
+
offset+=120;
|
|
5430
5229
|
return ( double*)(( char*) obj+offset);
|
|
5431
5230
|
}
|
|
5432
|
-
static inline double
|
|
5231
|
+
static inline double ParticlesMonitorData_get__rot_y_rad(const ParticlesMonitorData restrict obj){
|
|
5433
5232
|
int64_t offset=0;
|
|
5434
|
-
offset+=
|
|
5233
|
+
offset+=128;
|
|
5435
5234
|
return *( double*)(( char*) obj+offset);
|
|
5436
5235
|
}
|
|
5437
|
-
static inline void
|
|
5236
|
+
static inline void ParticlesMonitorData_set__rot_y_rad(ParticlesMonitorData restrict obj, double value){
|
|
5438
5237
|
int64_t offset=0;
|
|
5439
|
-
offset+=
|
|
5238
|
+
offset+=128;
|
|
5440
5239
|
*( double*)(( char*) obj+offset)=value;
|
|
5441
5240
|
}
|
|
5442
|
-
static inline double*
|
|
5241
|
+
static inline double* ParticlesMonitorData_getp__rot_y_rad(ParticlesMonitorData restrict obj){
|
|
5443
5242
|
int64_t offset=0;
|
|
5444
|
-
offset+=
|
|
5243
|
+
offset+=128;
|
|
5445
5244
|
return ( double*)(( char*) obj+offset);
|
|
5446
5245
|
}
|
|
5447
|
-
static inline double
|
|
5246
|
+
static inline double ParticlesMonitorData_get__rot_s_rad_no_frame(const ParticlesMonitorData restrict obj){
|
|
5448
5247
|
int64_t offset=0;
|
|
5449
|
-
offset+=
|
|
5248
|
+
offset+=136;
|
|
5450
5249
|
return *( double*)(( char*) obj+offset);
|
|
5451
5250
|
}
|
|
5452
|
-
static inline void
|
|
5251
|
+
static inline void ParticlesMonitorData_set__rot_s_rad_no_frame(ParticlesMonitorData restrict obj, double value){
|
|
5453
5252
|
int64_t offset=0;
|
|
5454
|
-
offset+=
|
|
5253
|
+
offset+=136;
|
|
5455
5254
|
*( double*)(( char*) obj+offset)=value;
|
|
5456
5255
|
}
|
|
5457
|
-
static inline double*
|
|
5256
|
+
static inline double* ParticlesMonitorData_getp__rot_s_rad_no_frame(ParticlesMonitorData restrict obj){
|
|
5458
5257
|
int64_t offset=0;
|
|
5459
|
-
offset+=
|
|
5258
|
+
offset+=136;
|
|
5460
5259
|
return ( double*)(( char*) obj+offset);
|
|
5461
5260
|
}
|
|
5462
|
-
static inline double
|
|
5261
|
+
static inline double ParticlesMonitorData_get_rot_shift_anchor(const ParticlesMonitorData restrict obj){
|
|
5463
5262
|
int64_t offset=0;
|
|
5464
|
-
offset+=
|
|
5263
|
+
offset+=144;
|
|
5465
5264
|
return *( double*)(( char*) obj+offset);
|
|
5466
5265
|
}
|
|
5467
|
-
static inline void
|
|
5266
|
+
static inline void ParticlesMonitorData_set_rot_shift_anchor(ParticlesMonitorData restrict obj, double value){
|
|
5468
5267
|
int64_t offset=0;
|
|
5469
|
-
offset+=
|
|
5268
|
+
offset+=144;
|
|
5470
5269
|
*( double*)(( char*) obj+offset)=value;
|
|
5471
5270
|
}
|
|
5472
|
-
static inline double*
|
|
5271
|
+
static inline double* ParticlesMonitorData_getp_rot_shift_anchor(ParticlesMonitorData restrict obj){
|
|
5473
5272
|
int64_t offset=0;
|
|
5474
|
-
offset+=
|
|
5273
|
+
offset+=144;
|
|
5475
5274
|
return ( double*)(( char*) obj+offset);
|
|
5476
5275
|
}
|
|
5477
5276
|
#endif
|
|
@@ -5684,14 +5483,215 @@ void Drift_single_particle(LocalParticle* part, double length){
|
|
|
5684
5483
|
|
|
5685
5484
|
#endif // XSTUITE_TRACK_FLAGS_H
|
|
5686
5485
|
|
|
5687
|
-
|
|
5486
|
+
// copyright ############################### //
|
|
5487
|
+
// This file is part of the Xtrack Package. //
|
|
5488
|
+
// Copyright (c) CERN, 2021. //
|
|
5489
|
+
// ######################################### //
|
|
5490
|
+
|
|
5491
|
+
#ifndef XTRACK_MONITORS_H
|
|
5492
|
+
#define XTRACK_MONITORS_H
|
|
5493
|
+
|
|
5494
|
+
#include <headers/track.h>
|
|
5495
|
+
|
|
5496
|
+
|
|
5497
|
+
GPUFUN
|
|
5498
|
+
void ParticlesMonitor_track_local_particle(ParticlesMonitorData el,
|
|
5499
|
+
LocalParticle* part0){
|
|
5500
|
+
|
|
5501
|
+
int64_t const start_at_turn = ParticlesMonitorData_get_start_at_turn(el);
|
|
5502
|
+
int64_t const stop_at_turn = ParticlesMonitorData_get_stop_at_turn(el);
|
|
5503
|
+
int64_t const part_id_start = ParticlesMonitorData_get_part_id_start(el);
|
|
5504
|
+
int64_t const part_id_end= ParticlesMonitorData_get_part_id_end(el);
|
|
5505
|
+
int64_t const ebe_mode = ParticlesMonitorData_get_ebe_mode(el);
|
|
5506
|
+
int64_t const n_repetitions = ParticlesMonitorData_get_n_repetitions(el);
|
|
5507
|
+
int64_t const repetition_period = ParticlesMonitorData_get_repetition_period(el);
|
|
5508
|
+
ParticlesData data = ParticlesMonitorData_getp_data(el);
|
|
5509
|
+
|
|
5510
|
+
int64_t n_turns_record = stop_at_turn - start_at_turn;
|
|
5511
|
+
|
|
5512
|
+
START_PER_PARTICLE_BLOCK(part0, part);
|
|
5513
|
+
int64_t at_turn;
|
|
5514
|
+
if (ebe_mode){
|
|
5515
|
+
at_turn = LocalParticle_get_at_element(part);
|
|
5516
|
+
}
|
|
5517
|
+
else{
|
|
5518
|
+
if (LocalParticle_check_track_flag(part, XS_FLAG_BACKTRACK)) {
|
|
5519
|
+
return; // do not log (only ebe monitor supported for now in backtrack)
|
|
5520
|
+
}
|
|
5521
|
+
at_turn = LocalParticle_get_at_turn(part);
|
|
5522
|
+
}
|
|
5523
|
+
if (n_repetitions == 1){
|
|
5524
|
+
if (at_turn>=start_at_turn && at_turn<stop_at_turn){
|
|
5525
|
+
int64_t const particle_id = LocalParticle_get_particle_id(part);
|
|
5526
|
+
if (particle_id<part_id_end && particle_id>=part_id_start){
|
|
5527
|
+
int64_t const store_at =
|
|
5528
|
+
n_turns_record * (particle_id - part_id_start)
|
|
5529
|
+
+ at_turn - start_at_turn;
|
|
5530
|
+
LocalParticle_to_Particles(part, data, store_at, 0);
|
|
5531
|
+
}
|
|
5532
|
+
}
|
|
5533
|
+
}
|
|
5534
|
+
else if (n_repetitions > 1){
|
|
5535
|
+
if (at_turn < start_at_turn){
|
|
5536
|
+
// return; //only_for_context cuda opencl
|
|
5537
|
+
break; //only_for_context cpu_serial cpu_openmp
|
|
5538
|
+
}
|
|
5539
|
+
int64_t const i_frame = (at_turn - start_at_turn) / repetition_period;
|
|
5540
|
+
if (i_frame < n_repetitions
|
|
5541
|
+
&& at_turn >= start_at_turn + i_frame*repetition_period
|
|
5542
|
+
&& at_turn < stop_at_turn + i_frame*repetition_period
|
|
5543
|
+
){
|
|
5544
|
+
int64_t const particle_id = LocalParticle_get_particle_id(part);
|
|
5545
|
+
if (particle_id<part_id_end && particle_id>=part_id_start){
|
|
5546
|
+
int64_t const store_at =
|
|
5547
|
+
n_turns_record * (part_id_end - part_id_start) * i_frame
|
|
5548
|
+
+ n_turns_record * (particle_id - part_id_start)
|
|
5549
|
+
+ (at_turn - i_frame * repetition_period) - start_at_turn;
|
|
5550
|
+
LocalParticle_to_Particles(part, data, store_at, 0);
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
#ifdef XSUITE_RESTORE_LOSS
|
|
5556
|
+
LocalParticle_set_state(part, 1);
|
|
5557
|
+
#endif
|
|
5558
|
+
END_PER_PARTICLE_BLOCK;
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
#endif
|
|
5562
|
+
|
|
5563
|
+
|
|
5564
|
+
|
|
5565
|
+
#include <headers/track.h>
|
|
5566
|
+
#include <headers/particle_states.h>
|
|
5567
|
+
#include <beam_elements/elements_src/track_misalignments.h>
|
|
5568
|
+
GPUFUN void ParticlesMonitor_track_local_particle_with_transformations(ParticlesMonitorData el, LocalParticle* part0){
|
|
5569
|
+
// Transform to local frame
|
|
5570
|
+
double const _sin_rot_s = ParticlesMonitorData_get__sin_rot_s(el);
|
|
5571
|
+
if (_sin_rot_s > -2.) {
|
|
5572
|
+
double const _cos_rot_s = ParticlesMonitorData_get__cos_rot_s(el);
|
|
5573
|
+
double const rot_s_rad = atan2(_sin_rot_s, _cos_rot_s);
|
|
5574
|
+
double const shift_x = ParticlesMonitorData_get__shift_x(el);
|
|
5575
|
+
double const shift_y = ParticlesMonitorData_get__shift_y(el);
|
|
5576
|
+
double const shift_s = ParticlesMonitorData_get__shift_s(el);
|
|
5577
|
+
double const rot_x_rad = ParticlesMonitorData_get__rot_x_rad(el);
|
|
5578
|
+
double const rot_y_rad = ParticlesMonitorData_get__rot_y_rad(el);
|
|
5579
|
+
double const rot_s_rad_no_frame = ParticlesMonitorData_get__rot_s_rad_no_frame(el);
|
|
5580
|
+
double const length = 0.;
|
|
5581
|
+
;
|
|
5582
|
+
double const anchor = ParticlesMonitorData_get_rot_shift_anchor(el);
|
|
5583
|
+
int8_t const backtrack = LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK);
|
|
5584
|
+
|
|
5585
|
+
if (!backtrack) {
|
|
5586
|
+
track_misalignment_entry_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack); } else {
|
|
5587
|
+
track_misalignment_exit_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack);
|
|
5588
|
+
}
|
|
5589
|
+
|
|
5590
|
+
/* Spin tracking is disabled by the synrad compile flag */
|
|
5591
|
+
#ifndef XTRACK_MULTIPOLE_NO_SYNRAD
|
|
5592
|
+
// Rotate spin
|
|
5593
|
+
|
|
5594
|
+
{
|
|
5595
|
+
// const int64_t XT_part_block_start_idx = part0->ipart; //only_for_context cpu_openmp
|
|
5596
|
+
// const int64_t XT_part_block_end_idx = part0->endpart; //only_for_context cpu_openmp
|
|
5597
|
+
|
|
5598
|
+
const int64_t XT_part_block_start_idx = 0; //only_for_context cpu_serial
|
|
5599
|
+
const int64_t XT_part_block_end_idx = LocalParticle_get__num_active_particles(part0); //only_for_context cpu_serial
|
|
5600
|
+
|
|
5601
|
+
//#pragma omp simd // TODO: currently does not work, needs investigating
|
|
5602
|
+
for (int64_t XT_part_block_ii = XT_part_block_start_idx; XT_part_block_ii<XT_part_block_end_idx; XT_part_block_ii++) { //only_for_context cpu_openmp cpu_serial
|
|
5603
|
+
|
|
5604
|
+
LocalParticle lpart = *part0; //only_for_context cpu_serial cpu_openmp
|
|
5605
|
+
LocalParticle* part = &lpart; //only_for_context cpu_serial cpu_openmp
|
|
5606
|
+
part->ipart = XT_part_block_ii; //only_for_context cpu_serial cpu_openmp
|
|
5607
|
+
|
|
5608
|
+
// LocalParticle* part = part0; //only_for_context opencl cuda
|
|
5609
|
+
|
|
5610
|
+
// if (LocalParticle_get_state(part) > 0) { //only_for_context cpu_openmp
|
|
5611
|
+
|
|
5612
|
+
double const spin_x_0 = LocalParticle_get_spin_x(part);
|
|
5613
|
+
double const spin_y_0 = LocalParticle_get_spin_y(part);
|
|
5614
|
+
if ((spin_x_0 != 0) || (spin_y_0 != 0)){
|
|
5615
|
+
double const spin_x_1 = _cos_rot_s*spin_x_0 + _sin_rot_s*spin_y_0;
|
|
5616
|
+
double const spin_y_1 = -_sin_rot_s*spin_x_0 + _cos_rot_s*spin_y_0;
|
|
5617
|
+
LocalParticle_set_spin_x(part, spin_x_1);
|
|
5618
|
+
LocalParticle_set_spin_y(part, spin_y_1);
|
|
5619
|
+
}
|
|
5620
|
+
|
|
5621
|
+
// } //only_for_context cpu_openmp
|
|
5622
|
+
} //only_for_context cpu_serial cpu_openmp
|
|
5623
|
+
}
|
|
5624
|
+
|
|
5625
|
+
#endif
|
|
5626
|
+
|
|
5627
|
+
}
|
|
5628
|
+
ParticlesMonitor_track_local_particle(el, part0);
|
|
5629
|
+
// Transform back to global frame
|
|
5630
|
+
if (_sin_rot_s > -2.) {
|
|
5631
|
+
double const _cos_rot_s = ParticlesMonitorData_get__cos_rot_s(el);
|
|
5632
|
+
double const rot_s_rad = atan2(_sin_rot_s, _cos_rot_s);
|
|
5633
|
+
double const shift_x = ParticlesMonitorData_get__shift_x(el);
|
|
5634
|
+
double const shift_y = ParticlesMonitorData_get__shift_y(el);
|
|
5635
|
+
double const shift_s = ParticlesMonitorData_get__shift_s(el);
|
|
5636
|
+
double const rot_x_rad = ParticlesMonitorData_get__rot_x_rad(el);
|
|
5637
|
+
double const rot_y_rad = ParticlesMonitorData_get__rot_y_rad(el);
|
|
5638
|
+
double const rot_s_rad_no_frame = ParticlesMonitorData_get__rot_s_rad_no_frame(el);
|
|
5639
|
+
double const length = 0.;
|
|
5640
|
+
;
|
|
5641
|
+
double const anchor = ParticlesMonitorData_get_rot_shift_anchor(el);
|
|
5642
|
+
int8_t const backtrack = LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK);
|
|
5643
|
+
|
|
5644
|
+
/* Spin tracking is disabled by the synrad compile flag */
|
|
5645
|
+
#ifndef XTRACK_MULTIPOLE_NO_SYNRAD
|
|
5646
|
+
// Rotate spin
|
|
5647
|
+
|
|
5648
|
+
{
|
|
5649
|
+
// const int64_t XT_part_block_start_idx = part0->ipart; //only_for_context cpu_openmp
|
|
5650
|
+
// const int64_t XT_part_block_end_idx = part0->endpart; //only_for_context cpu_openmp
|
|
5651
|
+
|
|
5652
|
+
const int64_t XT_part_block_start_idx = 0; //only_for_context cpu_serial
|
|
5653
|
+
const int64_t XT_part_block_end_idx = LocalParticle_get__num_active_particles(part0); //only_for_context cpu_serial
|
|
5654
|
+
|
|
5655
|
+
//#pragma omp simd // TODO: currently does not work, needs investigating
|
|
5656
|
+
for (int64_t XT_part_block_ii = XT_part_block_start_idx; XT_part_block_ii<XT_part_block_end_idx; XT_part_block_ii++) { //only_for_context cpu_openmp cpu_serial
|
|
5657
|
+
|
|
5658
|
+
LocalParticle lpart = *part0; //only_for_context cpu_serial cpu_openmp
|
|
5659
|
+
LocalParticle* part = &lpart; //only_for_context cpu_serial cpu_openmp
|
|
5660
|
+
part->ipart = XT_part_block_ii; //only_for_context cpu_serial cpu_openmp
|
|
5661
|
+
|
|
5662
|
+
// LocalParticle* part = part0; //only_for_context opencl cuda
|
|
5663
|
+
|
|
5664
|
+
// if (LocalParticle_get_state(part) > 0) { //only_for_context cpu_openmp
|
|
5665
|
+
|
|
5666
|
+
double const spin_x_0 = LocalParticle_get_spin_x(part);
|
|
5667
|
+
double const spin_y_0 = LocalParticle_get_spin_y(part);
|
|
5668
|
+
if ((spin_x_0 != 0) || (spin_y_0 != 0)){
|
|
5669
|
+
double const spin_x_1 = _cos_rot_s*spin_x_0 - _sin_rot_s*spin_y_0;
|
|
5670
|
+
double const spin_y_1 = _sin_rot_s*spin_x_0 + _cos_rot_s*spin_y_0;
|
|
5671
|
+
LocalParticle_set_spin_x(part, spin_x_1);
|
|
5672
|
+
LocalParticle_set_spin_y(part, spin_y_1);
|
|
5673
|
+
}
|
|
5674
|
+
|
|
5675
|
+
// } //only_for_context cpu_openmp
|
|
5676
|
+
} //only_for_context cpu_serial cpu_openmp
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
#endif
|
|
5680
|
+
|
|
5681
|
+
if (!backtrack) {
|
|
5682
|
+
track_misalignment_exit_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack); } else {
|
|
5683
|
+
track_misalignment_entry_straight(part0, shift_x, shift_y, shift_s, rot_y_rad, rot_x_rad, rot_s_rad_no_frame, anchor, length, rot_s_rad, backtrack);
|
|
5684
|
+
}
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
5688
|
|
|
5689
5689
|
|
|
5690
|
-
void
|
|
5691
|
-
|
|
5690
|
+
void ParticlesMonitor_track_particles(
|
|
5691
|
+
ParticlesMonitorData el,
|
|
5692
5692
|
|
|
5693
5693
|
ParticlesData particles,
|
|
5694
|
-
|
|
5694
|
+
|
|
5695
5695
|
int64_t flag_increment_at_element,
|
|
5696
5696
|
int8_t* io_buffer){
|
|
5697
5697
|
|
|
@@ -5736,7 +5736,7 @@ void Drift_single_particle(LocalParticle* part, double length){
|
|
|
5736
5736
|
if (part_id<part_capacity){
|
|
5737
5737
|
Particles_to_LocalParticle(particles, &lpart, part_id, end_id);
|
|
5738
5738
|
if (check_is_active(&lpart)>0){
|
|
5739
|
-
|
|
5739
|
+
ParticlesMonitor_track_local_particle_with_transformations(el, &lpart);
|
|
5740
5740
|
|
|
5741
5741
|
}
|
|
5742
5742
|
if (check_is_active(&lpart)>0 && flag_increment_at_element){
|
|
@@ -5755,25 +5755,6 @@ void Drift_single_particle(LocalParticle* part, double length){
|
|
|
5755
5755
|
// #endif //only_for_context cpu_openmp
|
|
5756
5756
|
}
|
|
5757
5757
|
|
|
5758
|
-
#ifndef XOBJ_TYPEDEF_ElementRefClass
|
|
5759
|
-
#define XOBJ_TYPEDEF_ElementRefClass
|
|
5760
|
-
typedef struct ElementRefClass_s * ElementRefClass;
|
|
5761
|
-
enum ElementRefClass_e{ElementRefClass_ParticlesMonitorData_t};
|
|
5762
|
-
static inline ElementRefClass ElementRefClass_getp(ElementRefClass restrict obj){
|
|
5763
|
-
int64_t offset=0;
|
|
5764
|
-
return (ElementRefClass)(( char*) obj+offset);
|
|
5765
|
-
}
|
|
5766
|
-
static inline int64_t ElementRefClass_typeid(const ElementRefClass restrict obj){
|
|
5767
|
-
int64_t offset=0;
|
|
5768
|
-
offset+=8;
|
|
5769
|
-
return *( int64_t*)(( char*) obj+offset);
|
|
5770
|
-
}
|
|
5771
|
-
static inline void* ElementRefClass_member(const ElementRefClass restrict obj){
|
|
5772
|
-
int64_t offset=0;
|
|
5773
|
-
offset+=*( int64_t*)(( char*) obj+offset);
|
|
5774
|
-
return ( void*)(( char*) obj+offset);
|
|
5775
|
-
}
|
|
5776
|
-
#endif
|
|
5777
5758
|
#ifndef XOBJ_TYPEDEF_RandomNormalData
|
|
5778
5759
|
#define XOBJ_TYPEDEF_RandomNormalData
|
|
5779
5760
|
typedef struct RandomNormalData_s * RandomNormalData;
|
|
@@ -7139,6 +7120,25 @@ void Drift_single_particle(LocalParticle* part, double length){
|
|
|
7139
7120
|
// #endif //only_for_context cpu_openmp
|
|
7140
7121
|
}
|
|
7141
7122
|
|
|
7123
|
+
#ifndef XOBJ_TYPEDEF_ElementRefClass
|
|
7124
|
+
#define XOBJ_TYPEDEF_ElementRefClass
|
|
7125
|
+
typedef struct ElementRefClass_s * ElementRefClass;
|
|
7126
|
+
enum ElementRefClass_e{ElementRefClass_ParticlesMonitorData_t};
|
|
7127
|
+
static inline ElementRefClass ElementRefClass_getp(ElementRefClass restrict obj){
|
|
7128
|
+
int64_t offset=0;
|
|
7129
|
+
return (ElementRefClass)(( char*) obj+offset);
|
|
7130
|
+
}
|
|
7131
|
+
static inline int64_t ElementRefClass_typeid(const ElementRefClass restrict obj){
|
|
7132
|
+
int64_t offset=0;
|
|
7133
|
+
offset+=8;
|
|
7134
|
+
return *( int64_t*)(( char*) obj+offset);
|
|
7135
|
+
}
|
|
7136
|
+
static inline void* ElementRefClass_member(const ElementRefClass restrict obj){
|
|
7137
|
+
int64_t offset=0;
|
|
7138
|
+
offset+=*( int64_t*)(( char*) obj+offset);
|
|
7139
|
+
return ( void*)(( char*) obj+offset);
|
|
7140
|
+
}
|
|
7141
|
+
#endif
|
|
7142
7142
|
#ifndef XOBJ_TYPEDEF_ArrNElementRefClass
|
|
7143
7143
|
#define XOBJ_TYPEDEF_ArrNElementRefClass
|
|
7144
7144
|
typedef struct ArrNElementRefClass_s * ArrNElementRefClass;
|