Usage: Get dimension of grid gid. dimensions[0] corresponds to dimension in x-axis, dimensions[1] corresponds to dimension in y-axis, and dimensions[2] corresponds to dimension in z-axis, excluding ghost cells.
Usage: Get left edge of grid gid. left_edge[0] is left edge of the grid in x-axis in code length, left_edge[1] for y-axis, and left_edge[2] for z-axis.
Usage: Get right edge of grid gid. right_edge[0] is right edge of the grid in x-axis in code length, right_edge[1] for y-axis, and right_edge[2] for z-axis.
Usage: Get the field data field_name in grid id gid. The result will be stored in field_data.
Return: YT_SUCCESS or YT_FAIL if it cannot get data.
yt_data
data_ptr: Data pointer.
data_dimensions[3]: Dimension of the data_ptr array, in the point of view of itself.
data_dtype: Data type of the array.
Field name field_name should be same as what you passed in yt_get_FieldsPtr.
Do not mix grid dimensions get through yt_getGridInfo_Dimensions with data dimensions get through yt_getGridInfo_FieldData. Grid dimensions are numbers of cells in [x][y][z] <–> [0][1][2], excluding ghost cells. Whereas data dimensions are just data length in data’s point of view, which may consist of ghost cells.
You should not modify data_ptr, because they are actual simulation data passed in by user when setting grid information yt_get_GridsPtr.