212
edits
Changes
BetaT
,→Parallelize
}'''
In order to get this algorithm to work using a 1D array some changes are made, see below '''for (int i = 0; i <= nt - 1; i++)
{
for (int k =0; k <= nx - 1; k++)
if (i*dx >= 0.5 && i*dx <= 1)
{
u[i * nt + 0] = 2;
}