Commit 78f43b25 authored by Lukas Riedel's avatar Lukas Riedel 📝

Fix warning where a variable was unused in interpolator

2D case does not require `x_d` to be set.
parent fdd6f7b1
......@@ -281,7 +281,7 @@ public:
DataType c_00, c_01, c_10, c_11;
DF x_d = 1.0, y_d, z_d;
DF y_d, z_d;
// actual computation
if constexpr (dim == 2) {
......@@ -291,8 +291,8 @@ public:
c_11 = data[to_index(idx_upper)];
// use y, z here for common computation after if-clause
y_d = pos_unit_diff[0];
z_d = pos_unit_diff[1];
y_d = pos_unit_diff[0]; // actually x
z_d = pos_unit_diff[1]; // actually y
}
else {
DataType c_000, c_001, c_010, c_100, c_011, c_110, c_101, c_111;
......@@ -305,7 +305,7 @@ public:
c_101 = data[to_index({idx_upper[0], idx_lower[1], idx_upper[2]})];
c_111 = data[to_index(idx_upper)];
x_d = pos_unit_diff[0];
DF x_d = pos_unit_diff[0];
y_d = pos_unit_diff[1];
z_d = pos_unit_diff[2];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment