aboutsummaryrefslogtreecommitdiff
path: root/transfer.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-12 09:46:45 +0200
committerAnton Khirnov <anton@khirnov.net>2019-05-17 09:44:36 +0200
commitd8e503f1132c291977047bcbfd17cfdf630be4ae (patch)
tree7c4c90bd8d6fd84e0228d4d7541a295e27275121 /transfer.h
parent1980fccbc872d3c203034f236951eb9834fe916e (diff)
transfer: allow grids that do not start at coordinate zero
Diffstat (limited to 'transfer.h')
-rw-r--r--transfer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/transfer.h b/transfer.h
index bb9a035..d000dcd 100644
--- a/transfer.h
+++ b/transfer.h
@@ -34,8 +34,17 @@ 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.
*/
size_t size[2];