We assume that different fields can have different ghost cell in each dimension of the data array.
Field in different grids must have the same number of ghost cell.
short field_ghost_cell[6] is defined as number of cells to ignore at the beginning and the end of the data in each dimensions. Which means field_ghost_cell[0] is number of cells to ignore at the beginning of 0-dim of the data, and field_ghost_cell[1] is number of cells to ignore at the end of 0-dim.
We don't pass ghost cell in hierarchy.
We load them to python along with loading field_list dictionary.
grid_dimensions and data_dim:
Ghost cell does not include in grid_dimension, they are just dimensions read by yt.
data_dim define in yt_data are the actual data dimension of the data_ptr to be wrapped, it contains ghost cell.
API:
grid_dimensions: [x][y][z] dimension read by yt. (yt_getGridInfo_Dimensions API)
data_dim: The actual data dimension of the pointer. (yt_getGridInfo_FieldData API)
TODOs
[x] Define ghost cell inside yt_field.
[x] Each side can have different number of ghost zone.
[x] Update yt_type_field.h.
[x] Remove redundant assignment, since new call for constructor on initialization.
[x] Wrap the data array correctly. (append_grid.cpp)
[x] Pass in ghost cell in field_list in libyt.param_yt dictionary.
[x] For derived_func, they should only generate grid without ghost zone.
[x] No need to update yt_getGridInfo, since we define grid_dimension and data_dim in yt_data separately.
grid_dimensions: [x][y][z] dimension read by yt. (yt_getGridInfo_Dimensions API)
data_dim: The actual data dimension of the pointer. (yt_getGridInfo_FieldData API)
[x] Check gamer derived function. (No need to change, but still ...)
[x] yt_rma_field transfer full grid, including ghost zone.
[x] yt_rma_grid_info should change as well.
[x] Be aware of yt_rma_field::prepare_data, the data dimension should include ghost cell.
Support Ghost Zone
Definitions and Terms
yt_field
struct.short field_ghost_cell[6]
is defined as number of cells to ignore at the beginning and the end of the data in each dimensions. Which meansfield_ghost_cell[0]
is number of cells to ignore at the beginning of 0-dim of the data, andfield_ghost_cell[1]
is number of cells to ignore at the end of 0-dim.field_list
dictionary.grid_dimensions
anddata_dim
:grid_dimension
, they are just dimensions read byyt
.data_dim
define inyt_data
are the actual data dimension of thedata_ptr
to be wrapped, it contains ghost cell.grid_dimensions
: [x][y][z] dimension read byyt
. (yt_getGridInfo_Dimensions
API)data_dim
: The actual data dimension of the pointer. (yt_getGridInfo_FieldData
API)TODOs
ghost cell
insideyt_field
.yt_type_field.h
.new
call for constructor on initialization.append_grid.cpp
)field_list
inlibyt.param_yt
dictionary.derived_func
, they should only generate grid without ghost zone.yt_getGridInfo
, since we definegrid_dimension
anddata_dim
inyt_data
separately.grid_dimensions
: [x][y][z] dimension read byyt
. (yt_getGridInfo_Dimensions
API)data_dim
: The actual data dimension of the pointer. (yt_getGridInfo_FieldData
API)gamer
derived function. (No need to change, but still ...)yt_rma_field
transfer full grid, including ghost zone.yt_rma_grid_info
should change as well.yt_rma_field::prepare_data
, the data dimension should include ghost cell.MPI_PATH
toMakefile
.libyt yt frontend
.Test Run
libyt/example
ProjectionPlot
SlicePlot
Related Issue
4