Skip to content

Commit

Permalink
Use 1D index for initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdeakin committed Jan 8, 2020
1 parent d65f305 commit 1642659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion heat_sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void initial_value(cl::sycl::queue& queue, const unsigned int n, const double dx
int j = idx[0];
double y = dx * (j+1); // Physical y position
double x = dx * (i+1); // Physical x position
ua[j][i] = cl::sycl::sin(PI * x / length) * cl::sycl::sin(PI * y / length);
ua[idx] = cl::sycl::sin(PI * x / length) * cl::sycl::sin(PI * y / length);
});
});
}
Expand Down

0 comments on commit 1642659

Please sign in to comment.