From 8c021bebd77336c79257634629b134e57540b5f8 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Tue, 1 Oct 2024 14:59:24 -0700 Subject: [PATCH] Make the PDESystem tutorial materialization simpler, without `reshape` --- docs/src/tutorials/pdesystem.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/src/tutorials/pdesystem.md b/docs/src/tutorials/pdesystem.md index 3fbfd55d92..675635d4c4 100644 --- a/docs/src/tutorials/pdesystem.md +++ b/docs/src/tutorials/pdesystem.md @@ -159,10 +159,8 @@ dx = 0.05 xs, ys = [infimum(d.domain):(dx / 10):supremum(d.domain) for d in domains] analytic_sol_func(x, y) = (sin(pi * x) * sin(pi * y)) / (2pi^2) -u_predict = reshape([first(phi([x, y], res.u)) for x in xs for y in ys], - (length(xs), length(ys))) -u_real = reshape([analytic_sol_func(x, y) for x in xs for y in ys], - (length(xs), length(ys))) +u_predict = [first(phi([x, y], res.u)) for x in xs, y in ys] +u_real = [analytic_sol_func(x, y) for x in xs, y in ys] diff_u = abs.(u_predict .- u_real) p1 = plot(xs, ys, u_real, linetype = :contourf, title = "analytic");