Skip to content

Commit

Permalink
Merge pull request #3445 from yt-project/amrex_dim_fix
Browse files Browse the repository at this point in the history
Fix for 2D AMReX datasets in which 3 values are in the amr.n_cell entry in the job_info file.
  • Loading branch information
neutrinoceros committed Jul 21, 2021
2 parents dd3f795 + e2fc73b commit ba44836
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/tests.yaml
Expand Up @@ -138,7 +138,7 @@ answer_tests:
- yt/frontends/boxlib/tests/test_outputs.py:test_units_override
- yt/frontends/boxlib/tests/test_outputs.py:test_raw_fields

local_boxlib_particles_008:
local_boxlib_particles_009:
- yt/frontends/boxlib/tests/test_outputs.py:test_LyA
- yt/frontends/boxlib/tests/test_outputs.py:test_nyx_particle_io
- yt/frontends/boxlib/tests/test_outputs.py:test_castro_particle_io
Expand Down
4 changes: 2 additions & 2 deletions yt/frontends/boxlib/data_structures.py
Expand Up @@ -751,9 +751,9 @@ def _parse_cparams(self):
# domain_dimensions to have three elements, with 1 in the additional
# slots if we're not in 3D, so append them as necessary.

if len(vals) == 1:
if self.dimensionality == 1:
vals = self.domain_dimensions = np.array([vals[0], 1, 1])
elif len(vals) == 2:
elif self.dimensionality == 2:
vals = self.domain_dimensions = np.array([vals[0], vals[1], 1])
elif param == "amr.ref_ratio":
vals = self.refine_by = int(vals[0])
Expand Down

0 comments on commit ba44836

Please sign in to comment.