Skip to content

Commit

Permalink
Merge pull request #4914 from neutrinoceros/amrex/cln/drop_dead_weigh…
Browse files Browse the repository at this point in the history
…t_parsing
  • Loading branch information
neutrinoceros committed May 30, 2024
2 parents 36cc02b + 6051ad8 commit 3813ea4
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions yt/frontends/amrex/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import string

import numpy as np

Expand Down Expand Up @@ -369,14 +368,6 @@ def setup_fluid_fields(self):
function=func,
units=self.ds.unit_system["density"],
)
# We know this will either have one letter, or two.
if field[3] in string.ascii_letters:
element, weight = field[2:4], field[4:-1]
else:
element, weight = field[2:3], field[3:-1] # NOQA

# Here we can, later, add number density
# right now element and weight inferred above are unused


class MaestroFieldInfo(FieldInfoContainer):
Expand Down Expand Up @@ -491,20 +482,6 @@ def setup_fluid_fields(self):
display_name=rf"\rho {tex_label}",
)

# Most of the time our species will be of the form
# element name + atomic weight (e.g. C12), but
# sometimes we make up descriptive names (e.g. ash)
if any(char.isdigit() for char in field):
# We know this will either have one letter, or two.
if field[3] in string.ascii_letters:
element, weight = field[2:4], field[4:-1]
else:
element, weight = field[2:3], field[3:-1] # NOQA
weight = int(weight)

# Here we can, later, add number density using 'element' and
# 'weight' inferred above

elif field.startswith("omegadot("):
nice_name, tex_label = _nice_species_name(field)
display_name = rf"\dot{{\omega}}\left[{tex_label}\right]"
Expand Down

0 comments on commit 3813ea4

Please sign in to comment.