yt-project / libyt

In-situ analysis with yt
https://libyt.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Support Wrapping Particle Array and Fix Bugs #85

Closed cindytsai closed 1 year ago

cindytsai commented 1 year ago

Support Wrapping Particle Array

Wrap particle array and put it under libyt.particle_data[gid][ptype][attr]. libyt first look for data under this dictionary, if it cannot find the data, it then use get_par_attr to generate the data.

Test

Related Issue

Bugs

yt_getGridInfo_FieldData/ParticleData

The API is a look-up method. If it failed to find the data, it returns YT_FAIL and should dereference python object before returning. I forgot to do this previously.

Enhancement

Makefile

Set rpath when compiling libyt and example, so that we don't have to add library search path explicitly.