Skip to content

Commit

Permalink
updates compats, added missing docstrings to doc, rasterpoints in exa…
Browse files Browse the repository at this point in the history
…mple vectorplots
  • Loading branch information
chmerdon committed Aug 30, 2024
1 parent e15ae28 commit 4d82121
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
CommonSolve = "0.2"
DiffResults = "1"
DocStringExtensions = "0.8,0.9"
ExtendableFEMBase = "^0.6"
ExtendableGrids = "1.8"
ExtendableSparse = "1.4"
ForwardDiff = "^0.10.35"
GridVisualize = "1.5"
ExtendableFEMBase = "0.6"
ExtendableGrids = "1.9.2"
ExtendableSparse = "1.5.1"
ForwardDiff = "0.10.35"
GridVisualize = "1.7"
LinearSolve = "2"
LinearAlgebra = "1.9"
Printf = "1.9"
SparseArrays = "1.9"
Requires = "1.3"
SparseDiffTools = "^1.19,2"
SciMLBase = "2.6"
Symbolics = "^4.2,5"
Symbolics = "4.2,5"
julia = "1.9"
2 changes: 1 addition & 1 deletion docs/src/pdesolvers_dt.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ reassembly can be skipped if constant_matrix = true is used in the SolverConfigu

```@autodocs
Modules = [ExtendableFEM]
Pages = ["solvers_diffeq.jl"]
Pages = ["solvers_diffeq.jl", "diffeq_interface.jl"]
Order = [:type, :function]
```

Expand Down
4 changes: 2 additions & 2 deletions examples/Example230_NonlinearElasticity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function main(;
end
scalarplot!(plt[1, 1], xgrid, view(strain_nodevals, 1, :), levels = 3, colorbarticks = 7, xlimits = [-scale[2] / 2 - 10, scale[2] / 2 + 10], ylimits = [-30, scale[1] + 20], title = "ϵ(u)_xx + displacement")
scalarplot!(plt[2, 1], xgrid, view(strain_nodevals, 2, :), levels = 1, colorbarticks = 7, xlimits = [-scale[2] / 2 - 10, scale[2] / 2 + 10], ylimits = [-30, scale[1] + 20], title = "ϵ(u)_yy + displacement")
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), spacing = [50, 25], clear = false)
vectorplot!(plt[2, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), spacing = [50, 25], clear = false)
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), rasterpoints = 20, clear = false)
vectorplot!(plt[2, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), rasterpoints = 20, clear = false)
displace_mesh!(xgrid, sol[u])
gridplot!(plt[3, 1], xgrid, linewidth = 1, title = "displaced mesh")
println(stdout, unicode_gridplot(xgrid))
Expand Down
2 changes: 1 addition & 1 deletion examples/Example245_NSEFlowAroundCylinder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function main(; Plotter = nothing, μ = 1e-3, maxvol = 1e-3, reconstruct = true,
gridplot!(plt[1, 1], xgrid, linewidth = 1)
gridplot!(plt[2, 1], xgrid, linewidth = 1, xlimits = [0, 0.3], ylimits = [0.1, 0.3])
scalarplot!(plt[3, 1], xgrid, nodevalues(sol[u]; abs = true)[1, :])
vectorplot!(plt[3, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), spacing = (0.2, 0.05), vscale = 0.5, clear = false)
vectorplot!(plt[3, 1], xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), rasterpoints = 20, clear = false)
scalarplot!(plt[4, 1], xgrid, view(nodevalues(sol[p]), 1, :), levels = 11, title = "p_h")

return [draglift[1], draglift[2], pdiff[1]], plt
Expand Down
8 changes: 4 additions & 4 deletions examples/Example250_NSELidDrivenCavity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function main(; μ_final = 0.0005, order = 2, nrefs = 5, Plotter = nothing, kwar
initialize!(PE, sol)
end
scalarplot!(plt[1, 1], xgrid, nodevalues(sol[1]; abs = true)[1, :]; title = "velocity (μ = $(extra_params[1]))", Plotter = Plotter)
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PE), spacing = 0.05, clear = false)
streamplot!(plt[1, 2], xgrid, eval_func_bary(PE), spacing = 0.01, density = 2, title = "streamlines")
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PE), rasterpoints = 20, clear = false)
streamplot!(plt[1, 2], xgrid, eval_func_bary(PE), rasterpoints = 50, density = 2, title = "streamlines")

if extra_params[1] <= μ_final
break
Expand All @@ -108,8 +108,8 @@ function main(; μ_final = 0.0005, order = 2, nrefs = 5, Plotter = nothing, kwar
end

scalarplot!(plt[1, 1], xgrid, nodevalues(sol[1]; abs = true)[1, :]; title = "velocity (μ = $(extra_params[1]))", Plotter = Plotter)
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PE), spacing = 0.05, clear = false)
streamplot!(plt[1, 2], xgrid, eval_func_bary(PE), spacing = 0.01, density = 2, title = "streamlines")
vectorplot!(plt[1, 1], xgrid, eval_func_bary(PE), rasterpoints = 20, clear = false)
streamplot!(plt[1, 2], xgrid, eval_func_bary(PE), rasterpoints = 50, density = 2, title = "streamlines")

return sol, plt
end
Expand Down
2 changes: 1 addition & 1 deletion examples/Example265_FlowTransport.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function main(; nrefs = 4, Plotter = nothing, reconstruct = true, FVtransport =
println("\n[min(c),max(c)] = [$(minimum(view(sol[T]))),$(maximum(view(sol[T])))]")

## plot
plt = plot([id(u), id(T)], sol; Plotter = Plotter, ncols = 1, spacing = 0.25, width = 800, height = 800)
plt = plot([id(u), id(T)], sol; Plotter = Plotter, ncols = 1, rasterpoints = 40, width = 800, height = 800)

return sol, plt
end
Expand Down
2 changes: 1 addition & 1 deletion examples/Example280_CompressibleStokes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function main(;
## plot
plt = GridVisualizer(; Plotter = Plotter, layout = (2,2), clear = true, size = (1000,1000))
scalarplot!(plt[1,1],xgrid, view(nodevalues(sol[u]; abs = true),1,:), levels = 0, colorbarticks = 7)
vectorplot!(plt[1,1],xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), spacing = 0.1, clear = false, title = "u_h (abs + quiver)")
vectorplot!(plt[1,1],xgrid, eval_func_bary(PointEvaluator([id(u)], sol)), rasterpoints = 10, clear = false, title = "u_h (abs + quiver)")
scalarplot!(plt[2,1],xgrid, view(nodevalues(sol[ϱ]),1,:), levels = 11, title = "ϱ_h")
plot_convergencehistory!(plt[1,2], NDofs, Results[:,1:4]; add_h_powers = [order,order+1], X_to_h = X -> 0.2*X.^(-1/2), legend = :best, ylabels = ["|| u - u_h ||", "|| ∇(u - u_h) ||", "|| ϱ - ϱ_h ||", "|| ϱu - ϱu_h ||","#its"])
gridplot!(plt[2,2],xgrid)
Expand Down

2 comments on commit 4d82121

@chmerdon
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/114163

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.0 -m "<description of version>" 4d82121bde0b00b74e6aa105004cbd02913b54b6
git push origin v0.6.0

Please sign in to comment.