@@ -57,7 +57,7 @@ namespace picongpu
57
57
const double endUpramp = mue;
58
58
const double startDownramp = mue + LASER_NOFOCUS_CONSTANT;
59
59
60
-
60
+ double integrationCorrectionFactor = 0.0 ;
61
61
62
62
if ( runTime > startDownramp )
63
63
{
@@ -66,28 +66,34 @@ namespace picongpu
66
66
( ( runTime - startDownramp )
67
67
/ PULSE_LENGTH / sqrt ( 2.0 ) );
68
68
envelope *= exp ( -0.5 * exponent * exponent );
69
+ integrationCorrectionFactor = ( runTime - startDownramp )/ (2.0 *PULSE_LENGTH*PULSE_LENGTH);
69
70
}
70
71
else if ( runTime < endUpramp )
71
72
{
72
73
// upramp = start
73
74
const double exponent = ( ( runTime - endUpramp ) / PULSE_LENGTH / sqrt ( 2.0 ) );
74
75
envelope *= exp ( -0.5 * exponent * exponent );
75
-
76
+ integrationCorrectionFactor = ( runTime - endUpramp )/ ( 2.0 *PULSE_LENGTH*PULSE_LENGTH);
76
77
}
77
78
78
79
const double timeOszi = runTime - endUpramp;
80
+ const double t_and_phase = w * timeOszi + LASER_PHASE;
79
81
if ( Polarisation == LINEAR_X )
80
82
{
81
- elong.x () = float_X ( envelope * math::sin ( w * timeOszi + LASER_PHASE));
83
+ elong.x () = float_X ( envelope * (math::sin (t_and_phase)
84
+ + math::cos (t_and_phase) * integrationCorrectionFactor));
82
85
}
83
86
else if ( Polarisation == LINEAR_Z)
84
87
{
85
- elong.z () = float_X ( envelope * math::sin ( w * timeOszi + LASER_PHASE));
88
+ elong.z () = float_X ( envelope * (math::sin (t_and_phase)
89
+ + math::cos (t_and_phase) * integrationCorrectionFactor));
86
90
}
87
91
else if ( Polarisation == CIRCULAR )
88
92
{
89
- elong.x () = float_X ( envelope / sqrt (2.0 ) * math::sin ( w * timeOszi + LASER_PHASE));
90
- elong.z () = float_X ( envelope / sqrt (2.0 ) * math::cos ( w * timeOszi + LASER_PHASE));
93
+ elong.x () = float_X ( envelope / sqrt (2.0 ) * (math::sin (t_and_phase)
94
+ + math::cos (t_and_phase) * integrationCorrectionFactor));
95
+ elong.z () = float_X ( envelope / sqrt (2.0 ) * (math::cos (t_and_phase)
96
+ - math::sin (t_and_phase) * integrationCorrectionFactor));
91
97
}
92
98
93
99
0 commit comments