@@ -167,11 +167,34 @@ def __init__(self, x_front_location=None, y_front_location=None, z_front_locatio
167
167
168
168
self .handle_init (kw )
169
169
170
-
170
+ class PICMI_LoadAppliedField (_ClassWithInit ):
171
+ """
172
+ The E and B fields read from file are applied to the particles directly. (They are not affected by the field solver.)
173
+ The expected format is the file is OpenPMD with axes (x,y,z) in Cartesian, or (r,z) in Cylindrical geometry.
174
+
175
+ Parameters
176
+ ----------
177
+ read_fields_from_path: string
178
+ Path to file with field data
179
+
180
+ load_B: bool, default=True
181
+ If False, do not load magnetic field
182
+
183
+ load_E: bool, default=True
184
+ If False, do not load electric field
185
+ """
186
+ def __init__ (self , read_fields_from_path , load_B = True , load_E = True , ** kw ):
187
+ self .load_B = load_B
188
+ self .load_E = load_E
189
+ self .read_fields_from_path = read_fields_from_path
190
+
191
+ self .handle_init (kw )
192
+
193
+
171
194
class PICMI_LoadGriddedField (_ClassWithInit ):
172
195
"""
173
- The data read in is used to initialize the E and B fields on the grid at the start of the simulation.
174
- The expected format is the file is OpenPMD with axes (x,y,z) in Cartesian, or (r,z) in Cylindrical geometry.
196
+ The data read in is used to initialize the E and B fields on the grid at the start of the simulation.
197
+ The expected format is the file is OpenPMD with axes (x,y,z) in Cartesian, or (r,z) in Cylindrical geometry.
175
198
176
199
Parameters
177
200
----------
@@ -188,5 +211,5 @@ def __init__(self, read_fields_from_path, load_B=True, load_E=True, **kw):
188
211
self .load_B = load_B
189
212
self .load_E = load_E
190
213
self .read_fields_from_path = read_fields_from_path
191
-
214
+
192
215
self .handle_init (kw )
0 commit comments