Skip to content

Commit

Permalink
python: adopt to "all_1st_cc" moments name change
Browse files Browse the repository at this point in the history
  • Loading branch information
liangwang-phys authored and germasch committed Jul 17, 2023
1 parent 24890f3 commit 670ce2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/psc/psc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ def FieldToComponent(species):
map['d_rho'] = {'d_rho': 0}
map['div_j'] = {'div_j': 0}

# keeping 'all_1st' for backwards compatibility
map['all_1st'] = {}
map['all_1st_cc'] = {}
moments = ['rho', 'jx', 'jy', 'jz', 'px', 'py',
'pz', 'txx', 'tyy', 'tzz', 'txy', 'tyz', 'tzx']
for i_sp, sp in enumerate(species):
for i_mom, mom in enumerate(moments):
map['all_1st'][f"{mom}_{sp}"] = i_mom + 13 * i_sp
map['all_1st_cc'][f"{mom}_{sp}"] = i_mom + 13 * i_sp

return map

0 comments on commit 670ce2e

Please sign in to comment.