Skip to content

Commit 30ec3fa

Browse files
committed
Fix
1 parent 418d951 commit 30ec3fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xfields/config_tools/spacecharge_config_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ def replace_spacecharge_with_PIC(
355355
base_sc = pic_collection.get_pic(xlim, ylim)
356356
sc = base_sc.copy(_buffer=base_sc._buffer)
357357
sc.length = ee.length
358-
line.element_dict[nn] = sc
358+
line.env.remove(nn)
359+
line.env.elements[nn] = sc
359360
all_pics.append(sc)
360361

361362
return pic_collection, all_pics

0 commit comments

Comments
 (0)