Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting started tutorial #43

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Fix getting started tutorial #43

merged 1 commit into from
Sep 13, 2024

Conversation

ranocha
Copy link
Contributor

@ranocha ranocha commented Sep 13, 2024

I looked at the docs and wanted to follow the tutorial. While doing so, I noticed that it didn't work completely. Thus, I have updated the code accordingly.

Of course, the better solution would be to run this while generating the docs, but I didn't want to do this right now.

Comment on lines -55 to +56
arch = Arch(CPU())
backend = CPU()
arch = Arch(backend)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the main bug that made some code down below throw an error.

Comment on lines +132 to +144
You should get a result like in the following plot.

```julia
fig = Figure()
ax = Axis(fig[1, 1];
aspect = DataAspect(),
xlabel = "x", ylabel = "y",
title = "it = 0")
plt = heatmap!(ax, centers(grid)..., interior(C) |> Array;
colormap = :turbo)
Colorbar(fig[1, 2], plt)
display(fig)
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no code to show how to plot this stuff for reference.

@luraess
Copy link
Member

luraess commented Sep 13, 2024

Thanks for suggesting this. I believe @utkinis could check and merge.

@utkinis
Copy link
Member

utkinis commented Sep 13, 2024

Thanks for the fix. Yeah, the old version of the code had more doc-specific features like jldoctest blocks, but it quickly became outdated, it would be good to introduce it back though.

@utkinis utkinis merged commit e8cd25b into PTsolvers:main Sep 13, 2024
2 checks passed
@ranocha ranocha deleted the patch-2 branch September 13, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants