gridap / Tutorials

Start solving PDEs in Julia with Gridap.jl
MIT License
124 stars 41 forks source link

add topology optimization tutorial #142

Closed WenjieYao closed 2 years ago

WenjieYao commented 2 years ago

Somehow I can't create a preview on my computer, so there might be some small mistakes needed to be fixed. @stevengj @fverdugo

fverdugo commented 2 years ago

Hi @WenjieYao Thanks a lot for writing this!

I have built the html version of the tutorial and it has several minor typos regarding the rendering of equations etc. Try please to generate the pages on your laptop and fix the small issues (see below).

I have also added the new tutorial to the test suite (It is is failing). Try to run it locally to fix the errors. The tutorial is run as any other .jl file.

Steps to generate the html pages locally

Here you have some info. But, to summarise, these are the steps:

$ cd /your/path/to/Tutorials # Replace this with your correct path
$ julia --project=.
(Tutorials) pkg> instantiate
(Tutorials) pkg> build
julia> exit()
$ julia --project=docs
julia> using Revise # I assume that you have Revise in your global environment
(docs) pkg> dev .
julia> include("docs/make.jl")  # Open the generated web in docs/build/index.html and correct errors
julia> include("docs/make.jl") # Refresh you browser and fix more errors 
julia> include("docs/make.jl") # Refresh you browser and fix more errors 
WenjieYao commented 2 years ago

I have fixed the typos in equations and also adopted the comments from @stevengj . @fverdugo @raelch

WenjieYao commented 2 years ago

@fverdugo It is failing now mainly because we need to add Zygote, ChainRulesCore and NLopt packages to the environment. I suspect that this should be a few lines added to the Project.toml file but I don't know what I should add exactly...

fverdugo commented 2 years ago

Thanks @WenjieYao @stevengj for this very nice new tutorial!