From 19f8bc71947719901e39f85ccae248b643db57b3 Mon Sep 17 00:00:00 2001 From: Michael Greenburg Date: Tue, 21 Nov 2023 12:08:15 -0700 Subject: [PATCH] Minor fix to phase 9 --- project/phase9.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/project/phase9.md b/project/phase9.md index c8e1320..6bb9f15 100644 --- a/project/phase9.md +++ b/project/phase9.md @@ -13,11 +13,12 @@ The self-contained [example code](https://github.com/BYUHPC/sci-comp-course-exam ### The Derivative Function -Defining the function that you'll pass to `SecondOrderODEProblem` itself isn't too bad, and `dhdt!` in the [example](https://github.com/BYUHPC/sci-comp-course-example-cxx/blob/main/src/initial.jl) offers some guidance. Notice that `dvdt!`'s main computation is just the [differential equation that defines the example problem](https://github.com/BYUHPC/sci-comp-course-example-cxx/tree/main#appendix-a-mathematical-justification)--you'll do something similar with the [damped wave equation differential equation](overview.md#appendix-c-mathematical-justification). Here's the gist: +Defining the function that you'll pass to `SecondOrderODEProblem` itself isn't too bad, and `dhdt!` in the [example](https://github.com/BYUHPC/sci-comp-course-example-cxx/blob/main/src/initial.jl) offers some guidance. Notice that `dhdt!`'s main computation is just the [differential equation that defines the example problem](https://github.com/BYUHPC/sci-comp-course-example-cxx/tree/main#appendix-a-mathematical-justification)--you'll do something similar with the [damped wave equation differential equation](overview.md#appendix-c-mathematical-justification). Here's the gist: ```julia function dvdt!(a, v, u, c, t) # u: displacement; v: velocity; a: acceleration - a = laplacian(u) - c*v # this is just pseudo-code, it needs some fixing + a = laplacian(u) - c*v # just pseudo-code, needs significant overhaul + return nothing end ```