Change Derived Function and Get Attribute Function Prototype
Originally, derived function and get attribute function prepare one grid data at a time, which is not that efficient. So we make them prepare multiple grids data in one function call. We have a restriction of supporting double data type in derived function only. But now, we have support int, long, float, double data type.
Now, user should get gid from list_gid, and then fill in required data in yt_array array according to gid.
Comparing old and new prototype.
Derived function for derived field:
Old: derived_func(long gid, double *data)
New: derived_func(int list_len, long *list_gid, yt_array *data_array
Update New API and Other Miscellaneous
Change Derived Function and Get Attribute Function Prototype
Originally, derived function and get attribute function prepare one grid data at a time, which is not that efficient. So we make them prepare multiple grids data in one function call. We have a restriction of supporting double data type in derived function only. But now, we have support int, long, float, double data type.
Now, user should get
gid
fromlist_gid
, and then fill in required data inyt_array
array according togid
.derived_func(long gid, double *data)
derived_func(int list_len, long *list_gid, yt_array *data_array
get_attr(long gid, char *attr_name, void *data)
get_attr(int list_len, long *list_gid, char *attr_name, yt_array *data_array)
Abort If Check Not Pass in libyt
yt_param_libyt
tolibyt
, ifcheck_data
is set to true,libyt
will do a series of check so that you are using it correctly.Update Documentation and Example
doc
to newest.example
also.