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

Support vertex centred data #2615

Merged
merged 4 commits into from
Aug 14, 2020

Conversation

cphyc
Copy link
Member

@cphyc cphyc commented Jun 4, 2020

Adds support for vertex centred data. This has the effect of making isocontours possible on octree datasets using the same API as for the rest of yt.

This should be merged after #2425 has been merged. I marked it as draft to prevent people from reviewing it, since many files have been modified in the aforementioned PRs.

This allows for example to export a dataset to sketchfab.

Note that in its current form, the isosurface algorithm does work. However, it is very slow as it performs the marching cube algorithm on each individual oct. It also returns a non-connected set of points (that represent the isosurface), since the output of the marching cube algorithms aren't stitched together. Note that a quick hack would be to merge vertices of the isosurface if they are very close one from another. A better solution however would be to feed sets of connected octs that live at the same level to the marching cube algorithms, but this is well beyond the scope of the current PR.

@cphyc cphyc marked this pull request as draft June 4, 2020 09:56
@cphyc cphyc added the yt-4.0 feature targeted for the yt-4.0 release label Jun 11, 2020
@cphyc cphyc force-pushed the support-vertex-centred-data branch from 4d6c62e to 0d0a7f3 Compare July 20, 2020 12:49
@cphyc cphyc changed the base branch from yt-4.0 to master July 20, 2020 12:49
@cphyc cphyc marked this pull request as ready for review August 9, 2020 17:59
@cphyc
Copy link
Member Author

cphyc commented Aug 9, 2020

@yt-fido test this please

@cphyc
Copy link
Member Author

cphyc commented Aug 9, 2020

/format

@cphyc cphyc force-pushed the support-vertex-centred-data branch from 0d0a7f3 to ca02f97 Compare August 9, 2020 18:12
@cphyc cphyc added the new feature Something fun and new! label Aug 9, 2020
@cphyc
Copy link
Member Author

cphyc commented Aug 10, 2020

This one's ready to go!

Copy link
Member

@matthewturk matthewturk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me.

Copy link
Member

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a refactoring suggestion.
Unfortunately it's not really clear to me how this goes down to the user. Is this new code already hit by existing tests ? If so, which ones ?

yt/data_objects/octree_subset.py Outdated Show resolved Hide resolved
yt/frontends/ramses/data_structures.py Show resolved Hide resolved
@cphyc
Copy link
Member Author

cphyc commented Aug 10, 2020

I left a refactoring suggestion.
Unfortunately it's not really clear to me how this goes down to the user. Is this new code already hit by existing tests ? If so, which ones ?

This add support for computing e.g. isocontours for RAMSES datasets. This could in principle be extended to any oct-based dataset, but that'd require extra work.

@cphyc cphyc force-pushed the support-vertex-centred-data branch from 626610a to 04acdf8 Compare August 12, 2020 08:51
@neutrinoceros neutrinoceros merged commit c0f20b8 into yt-project:master Aug 14, 2020
@cphyc cphyc deleted the support-vertex-centred-data branch January 13, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
index: octree new feature Something fun and new! yt-4.0 feature targeted for the yt-4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants