From d8e503f1132c291977047bcbfd17cfdf630be4ae Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 12 May 2019 09:46:45 +0200 Subject: transfer: allow grids that do not start at coordinate zero --- transfer.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'transfer.h') diff --git a/transfer.h b/transfer.h index bb9a035..d000dcd 100644 --- a/transfer.h +++ b/transfer.h @@ -34,7 +34,16 @@ enum GridTransferOperator { GRID_TRANSFER_FW_3, }; +/** + * A 2-dimensional grid with regular spacing. + */ typedef struct RegularGrid2D { + /** + * Indices of the grid origin, relative to coordinate origin. + * (o0, o1) = (start[0] * step[0], start[1] * step[1]) + */ + ptrdiff_t start[2]; + /** * Number of points in the domain. */ -- cgit v1.2.3