Skip to content

Commit cad2d00

Browse files
committed
Starting to add more tutorials
1 parent 59800df commit cad2d00

File tree

5 files changed

+52
-3
lines changed

5 files changed

+52
-3
lines changed

deps/build.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@ using Literate
33
repo_src = joinpath(@__DIR__,"..","src")
44
notebooks_dir = joinpath(@__DIR__,"..","notebooks")
55

6-
Literate.notebook(joinpath(repo_src,"t001_poisson.jl"), notebooks_dir; documenter=false, execute=false)
6+
files = []
7+
8+
files = ["t001_poisson","t002_elasticity", "t003_hyperelasticity"]
9+
10+
for file in files
11+
file_jl = file*".jl"
12+
Literate.notebook(joinpath(repo_src,file_jl), notebooks_dir; documenter=false, execute=false)
13+
end

docs/make.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,24 @@ notebooks_dir = joinpath(@__DIR__,"src","notebooks")
1818

1919
repo_src = joinpath(@__DIR__,"..","src")
2020

21-
files = ["t001_poisson"]
21+
files = ["t001_poisson","t002_elasticity", "t003_hyperelasticity"]
2222

2323
for file in files
2424
file_jl = file*".jl"
2525
Literate.markdown(joinpath(repo_src,file_jl), pages_dir; codefence="```julia" => "```")
2626
Literate.notebook(joinpath(repo_src,file_jl), notebooks_dir; documenter=false, execute=false)
2727
end
2828

29+
pages = [
30+
"Introduction"=> "index.md",
31+
"1 Poisson equation" => "pages/t001_poisson.md",
32+
"2 Linear elasticity" => "pages/t002_elasticity.md",
33+
"3 Hyper-elasticity" => "pages/t003_hyperelasticity.md"]
34+
2935
makedocs(
3036
sitename = "Gridap tutorials",
3137
format = Documenter.HTML(),
32-
pages =["Introduction"=> "index.md", "1 Poisson equation" => "pages/t001_poisson.md"]
38+
pages = pages
3339
)
3440

3541
# Documenter can also automatically deploy documentation to gh-pages.

src/t002_elasticity.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# # Tutorial 2: Linear elasticity
2+
#
3+
#md # [![](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/notebooks/t002_elasticity.ipynb)
4+
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/notebooks/t002_elasticity.ipynb)
5+
#
6+
# ## Problem statement
7+
8+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
9+
10+
using Gridap
11+
12+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

src/t003_hyperelasticity.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# # Tutorial 3: Hyperelasticity
2+
#
3+
#md # [![](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/notebooks/t003_hyperelasticity.ipynb)
4+
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/notebooks/t003_hyperelasticity.ipynb)
5+
#
6+
# ## Problem statement
7+
8+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
9+
10+
using Gridap
11+
12+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

test/runtests.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
using Tutorials
22

3+
# We need a macro here...
4+
35
module t001_poisson
46
using Test
57
@testset "t001_poisson" begin include("../src/t001_poisson.jl") end
68
end # module
9+
10+
module t002_elasticity
11+
using Test
12+
@testset "t002_elasticity" begin include("../src/t002_elasticity.jl") end
13+
end # module
14+
15+
module t003_hyperelasticity
16+
using Test
17+
@testset "t003_hyperelasticity" begin include("../src/t003_hyperelasticity.jl") end
18+
end # module

0 commit comments

Comments
 (0)