[yt-users] finding grid points within a volume

Nathan Goldbaum nathan12343 at gmail.com
Tue Oct 18 13:33:04 PDT 2016


If you can define your surface in terms of field values, you can use a
cut_region data object:

http://yt-project.org/doc/analyzing/filtering.html#cut-regions

http://yt-project.org/doc/reference/api/generated/yt.data_objects.selection_data_containers.YTCutRegion.html#yt.data_objects.selection_data_containers.YTCutRegion

I don't think there is a way to create a data object from a triangulated
surface. In principle it would be possible to add by creating a new data
object and adding new hooks to cython geometric selector API, but that has
not yet been implemented.

-Nathan

On Tue, Oct 18, 2016 at 3:26 PM, Slavin, Jonathan <jslavin at cfa.harvard.edu>
wrote:

> Hi all,
>
> I'm looking for a way to find all the grid points in a volume, or really
> within a surface.  I can get the surface using
> skimage.measure.marching_cubes (or I guess from the surface method of a
> data source).  That is, it provides vertices that define a surface.  What I
> then want to know is which grid points for an array that covers the
> simulation volume (fixed resolution array) are within that volume.  It
> appears that yt is set up to calculate the flux across an isocontour, but I
> don't see anything related to the volume within it.  Any help would be
> appreciated.
>
> Regards,
> Jon
>
> --
> ________________________________________________________
> Jonathan D. Slavin                 Harvard-Smithsonian CfA
> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
> phone: (617) 496-7981       Cambridge, MA 02138-1516
> cell: (781) 363-0035             USA
> ________________________________________________________
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20161018/1727104b/attachment-0001.htm>


More information about the yt-users mailing list