@@ -43,11 +43,17 @@ namespace picongpu
43
43
PMACC_ALIGN(unitField, const float3_64);
44
44
45
45
/* TWTS E-fields need to be initialized on host,
46
- * so they can look up global grid dimensions. */
46
+ * so they can look up global grid dimensions.
47
+ *
48
+ * Note: No PMACC_ALIGN(...) used, since this *additional* memory alignment would require
49
+ * roughly double the number of registers in the corresponding kernel on the device.
50
+ */
47
51
const templates::twts::EField twtsFieldE;
48
52
49
53
/* Constructor is host-only, because of subGrid and halfSimSize initialization */
50
- HINLINE FieldBackgroundE( const float3_64 unitField ) : unitField(unitField),
54
+ HINLINE FieldBackgroundE( const float3_64 unitField ) :
55
+
56
+ unitField(unitField),
51
57
52
58
twtsFieldE(
53
59
/* focus_y [m], the distance to the laser focus in y-direction */
@@ -78,8 +84,7 @@ namespace picongpu
78
84
operator()( const DataSpace<simDim>& cellIdx,
79
85
const uint32_t currentStep ) const
80
86
{
81
- /* example 1: TWTS background pulse */
82
- /** unit: meter */
87
+ /* unit: meter */
83
88
const double WAVE_LENGTH_SI = 0.8e-6;
84
89
85
90
/** UNITCONV */
@@ -92,24 +97,27 @@ namespace picongpu
92
97
* SI::ELECTRON_MASS_SI * SI::SPEED_OF_LIGHT_SI
93
98
* SI::SPEED_OF_LIGHT_SI / SI::ELECTRON_CHARGE_SI;
94
99
95
- /** unit: W / m^2 */
96
- /* const double _PEAK_INTENSITY_SI = 3.4e19 * 1.0e4; */
97
- /** unit: none */
98
- /* const double _A0 = _PEAK_INTENSITY_SI * UNITCONV_Intens_to_A0; */
100
+ /* unit: W / m^2
101
+ * const double _PEAK_INTENSITY_SI = 3.4e19 * 1.0e4;
102
+ * unit: none
103
+ * const double _A0 = _PEAK_INTENSITY_SI * UNITCONV_Intens_to_A0;
104
+ */
99
105
100
- /** unit: none */
106
+ /* unit: none */
101
107
const double _A0 = 1.0;
102
108
103
- /** unit: Volt /meter */
104
- /*\todo #738 implement math::vector, native type operations */
109
+ /* unit: Volt /meter
110
+ *\todo #738 implement math::vector, native type operations
111
+ */
105
112
const float3_64 invUnitField = float3_64(1.0 / unitField[0],
106
113
1.0 / unitField[1],
107
114
1.0 / unitField[2] );
108
115
109
116
/* laser amplitude in picongpu units [ unit: (Volt /meter) / unitField-factor ]
110
117
* Note: the laser amplitude is included in all field components
111
118
* polarization and other properties are established by the peak amplitude
112
- * normalized twtsFieldE(...) */
119
+ * normalized twtsFieldE(...)
120
+ */
113
121
const float3_X amplitude = precisionCast<float_X>(
114
122
float_64(_A0 * UNITCONV_A0_to_Amplitude_SI) * invUnitField );
115
123
@@ -125,13 +133,19 @@ namespace picongpu
125
133
static const bool InfluenceParticlePusher = PARAM_INCLUDE_FIELDBACKGROUND;
126
134
127
135
/* TWTS B-fields need to be initialized on host,
128
- * so they can look up global grid dimensions. */
136
+ * so they can look up global grid dimensions.
137
+ *
138
+ * Note: No PMACC_ALIGN(...) used, since this *additional* memory alignment would require
139
+ * roughly double the number of registers in the corresponding kernel on the device.
140
+ */
129
141
const templates::twts::BField twtsFieldB;
130
142
131
143
/* We use this to calculate your SI input back to our unit system */
132
144
PMACC_ALIGN(unitField, const float3_64);
133
145
134
- HINLINE FieldBackgroundB( const float3_64 unitField ) : unitField(unitField),
146
+ HINLINE FieldBackgroundB( const float3_64 unitField ) :
147
+
148
+ unitField(unitField),
135
149
136
150
twtsFieldB(
137
151
/* focus_y [m], the distance to the laser focus in y-direction */
@@ -162,7 +176,7 @@ namespace picongpu
162
176
operator()( const DataSpace<simDim>& cellIdx,
163
177
const uint32_t currentStep ) const
164
178
{
165
- /** unit: meter */
179
+ /* unit: meter */
166
180
const double WAVE_LENGTH_SI = 0.8e-6;
167
181
168
182
/** UNITCONV */
@@ -175,10 +189,11 @@ namespace picongpu
175
189
* SI::ELECTRON_MASS_SI * SI::SPEED_OF_LIGHT_SI
176
190
* SI::SPEED_OF_LIGHT_SI / SI::ELECTRON_CHARGE_SI;
177
191
178
- /** unit: W / m^2 */
179
- /* const double _PEAK_INTENSITY_SI = 3.4e19 * 1.0e4; */
180
- /** unit: none */
181
- /* const double _A0 = _PEAK_INTENSITY_SI * UNITCONV_Intens_to_A0; */
192
+ /* unit: W / m^2
193
+ * const double _PEAK_INTENSITY_SI = 3.4e19 * 1.0e4;
194
+ * unit: none
195
+ * const double _A0 = _PEAK_INTENSITY_SI * UNITCONV_Intens_to_A0;
196
+ */
182
197
183
198
/** unit: none */
184
199
const double _A0 = 1.0;
@@ -191,7 +206,8 @@ namespace picongpu
191
206
/* laser amplitude in picongpu units [ unit: (Volt/meter) / unitField-factor ]
192
207
* Note: the laser amplitude is included in all field components
193
208
* polarization and other properties are established by the peak amplitude
194
- * normalized twtsFieldB(...) */
209
+ * normalized twtsFieldB(...)
210
+ */
195
211
const float3_X amplitude = precisionCast<float_X>(
196
212
float_64(_A0 * UNITCONV_A0_to_Amplitude_SI) * invUnitField );
197
213
0 commit comments