[yt-svn] commit/yt: MatthewTurk: Ensuring that the refine_amr function sets up bounding box correctly.
Bitbucket
commits-noreply at bitbucket.org
Fri Jan 4 11:01:24 PST 2013
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/b0a41c2163cf/
changeset: b0a41c2163cf
branch: yt
user: MatthewTurk
date: 2013-01-04 20:01:16
summary: Ensuring that the refine_amr function sets up bounding box correctly.
affected #: 1 file
diff -r 16343bdac0321763c1dd7b7daa3c8643e94eacad -r b0a41c2163cf6f6439295841c2038ab50d2658b4 yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -671,6 +671,8 @@
last_gc = base_pf.h.num_grids
cur_gc = -1
pf = base_pf
+ bbox = np.array( [ (pf.domain_left_edge[i], pf.domain_right_edge[i])
+ for i in range(3) ])
while pf.h.max_level < max_level and last_gc != cur_gc:
mylog.info("Refining another level. Current max level: %s",
pf.h.max_level)
@@ -691,7 +693,7 @@
fg = FlaggingGrid(g, refinement_criteria)
nsg = fg.find_subgrids()
for sg in nsg:
- LE = sg.left_index * g.dds
+ LE = sg.left_index * g.dds + pf.domain_left_edge
dims = sg.dimensions * pf.refine_by
grid = pf.h.smoothed_covering_grid(g.Level + 1, LE, dims)
gd = dict(left_edge = LE, right_edge = grid.right_edge,
@@ -700,7 +702,9 @@
if not pf.field_info[field].particle_type :
gd[field] = grid[field]
grid_data.append(gd)
- pf = load_amr_grids(grid_data, pf.domain_dimensions, 1.0)
+
+ pf = load_amr_grids(grid_data, pf.domain_dimensions, 1.0,
+ bbox = bbox)
cur_gc = pf.h.num_grids
# Now reassign particle data to grids
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list