aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-05-16 14:08:27 +0200
committerAnton Khirnov <anton@khirnov.net>2019-05-17 09:44:36 +0200
commit6ca76797cb4034a961166ae782db550ba9a7e6e6 (patch)
tree825fa46bed435a143707b025a2f454b7f3370912
parentd8e503f1132c291977047bcbfd17cfdf630be4ae (diff)
transfer: implement fw4
-rw-r--r--transfer.c5
-rw-r--r--transfer.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/transfer.c b/transfer.c
index 40acd0a..6db1ad2 100644
--- a/transfer.c
+++ b/transfer.c
@@ -264,6 +264,7 @@ static const GridTransfer transfer_lagrange = {
static const double fw_factors_1[] = { 0.5, 1.0, 0.5 };
static const double fw_factors_2[] = { -1.0 / 16, 9.0 / 16, 1.0, 9.0 / 16, -1.0 / 16 };
static const double fw_factors_3[] = { 3.0 / 256, -25.0 / 256, 75.0 / 128, 1.0, 75.0 / 128, -25.0 / 256, 3.0 / 256 };
+static const double fw_factors_4[] = { -5.0 / 2048, 49.0 / 2048, -245.0 / 2048, 1225.0 / 2048, 1.0, 1225.0 / 2048, -245.0 / 2048, 49.0 / 2048, -5.0 / 2048 };
typedef struct GridTransferFW {
ptrdiff_t order;
@@ -343,6 +344,10 @@ static int transfer_fw_init(GridTransferContext *ctx)
fw->order = 3;
fw->factors = fw_factors_3;
break;
+ case GRID_TRANSFER_FW_4:
+ fw->order = 4;
+ fw->factors = fw_factors_4;
+ break;
default:
return -EINVAL;
}
diff --git a/transfer.h b/transfer.h
index d000dcd..0a10f3a 100644
--- a/transfer.h
+++ b/transfer.h
@@ -32,6 +32,7 @@ enum GridTransferOperator {
GRID_TRANSFER_FW_1,
GRID_TRANSFER_FW_2,
GRID_TRANSFER_FW_3,
+ GRID_TRANSFER_FW_4,
};
/**