Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double octree building #83

Open
dnarayanan opened this issue May 22, 2020 · 0 comments
Open

double octree building #83

dnarayanan opened this issue May 22, 2020 · 0 comments

Comments

@dnarayanan
Copy link
Owner

we currently go through gadget_field_add twice in grid_construction.py. the first time is to establish the field aliases, and the second is to actually perform the smoothing on the octree.

this said, the octree is built twice. we can probably avoid this by implementing something like:

        if add_smoothed_quantities == True:
            left = np.array([pos[0] for pos in bounding_box])
            right = np.array([pos[1] for pos in bounding_box])
            #octree = ds.octree(left, right, over_refine_factor=cfg.par.oref, n_ref=cfg.par.n_ref, force_build=True)
            octree = ds.octree(left,right,n_ref=cfg.par.n_ref)
            ds.parameters['octree'] = octree```

in `gadget2pd.py`around line 240 or so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant