From d6e96ccda2dde664fe1c2516ce8ac76ee03aa431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sun, 29 Sep 2024 00:18:16 +0200 Subject: [PATCH 1/5] allow plotting of grids without boundary info --- .github/workflows/ci.yml | 2 +- Project.toml | 2 +- examples/plutovista.jl | 809 ++++++++++++++++++++++++++++++++++++++- src/plutovista.jl | 36 +- 4 files changed, 842 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9050b7d..2cd8b5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: julia-actions/cache@v2 env: cache-name: cache-artifacts with: diff --git a/Project.toml b/Project.toml index b7f255d..040cf81 100644 --- a/Project.toml +++ b/Project.toml @@ -26,7 +26,7 @@ ColorSchemes = "3" Colors = "0.12,1" DocStringExtensions = "0.8,0.9" ElasticArrays = "1" -ExtendableGrids = "1.7" +ExtendableGrids = "1.10" GLMakie = "0.9, 0.10" GeometryBasics = "0.4.1" GridVisualizeTools = "1.1" diff --git a/examples/plutovista.jl b/examples/plutovista.jl index 8aea82f..c7d05ca 100644 --- a/examples/plutovista.jl +++ b/examples/plutovista.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.19.35 +# v0.19.43 using Markdown using InteractiveUtils @@ -431,9 +431,811 @@ gridplot(simplexgrid(XX, YY); aspect = 0.1) # ╔═╡ ba5111b8-0dca-42d2-970f-1e88f5392324 html"""
""" +# ╔═╡ e548f966-4c45-4aa6-8423-6c143d9d259d + + +# ╔═╡ 00000000-0000-0000-0000-000000000001 +PLUTO_PROJECT_TOML_CONTENTS = """ +[deps] +ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8" +GridVisualize = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8" +HypertextLiteral = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +PlutoVista = "646e1f28-b900-46d7-9d87-d554eb38a413" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" + +[compat] +ExtendableGrids = "~1.9.0" +GridVisualize = "~1.7.0" +HypertextLiteral = "~0.9.5" +PlutoUI = "~0.7.59" +PlutoVista = "~1.0.1" +Revise = "~3.5.15" +""" + +# ╔═╡ 00000000-0000-0000-0000-000000000002 +PLUTO_MANIFEST_TOML_CONTENTS = """ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.11.0-rc1" +manifest_format = "2.0" +project_hash = "dd437dd1f472762b345639a1e2ee94a2022f6d3c" + +[[deps.AbstractPlutoDingetjes]] +deps = ["Pkg"] +git-tree-sha1 = "6e1d2a35f2f90a4bc7c2ed98079b2ba09c35b83a" +uuid = "6e696c72-6542-2067-7265-42206c756150" +version = "1.3.2" + +[[deps.AbstractTrees]] +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.5" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.0.4" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.2" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.4.0" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "01b8ccb13d68535d73d2b0c23e39bd23155fb712" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.1.0" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.Bijections]] +git-tree-sha1 = "95f5c7e2d177b7ba1a240b0518038b975d72a8c0" +uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" +version = "0.1.7" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "71acdbf594aab5bbb2cec89b208c41b4c411e49f" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.24.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CodeTracking]] +deps = ["InteractiveUtils", "UUIDs"] +git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386" +uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" +version = "1.3.5" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.5" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] +git-tree-sha1 = "4b270d6465eb21ae89b732182c20dc165f8bf9f2" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.25.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.5" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] +git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.10.0" + + [deps.ColorVectorSpace.extensions] + SpecialFunctionsExt = "SpecialFunctions" + + [deps.ColorVectorSpace.weakdeps] + SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.11" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.15.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.5" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.20" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.EarCut_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e3290f2d49e661fbd94046d7e3726ffcb2d41053" +uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" +version = "2.2.4+0" + +[[deps.ElasticArrays]] +deps = ["Adapt"] +git-tree-sha1 = "75e5697f521c9ab89816d3abeea806dfc5afb967" +uuid = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4" +version = "1.2.12" + +[[deps.ExtendableGrids]] +deps = ["AbstractTrees", "Bijections", "Compat", "Dates", "DocStringExtensions", "ElasticArrays", "Graphs", "InteractiveUtils", "LinearAlgebra", "Printf", "Random", "SparseArrays", "StaticArrays", "StatsBase", "UUIDs", "WriteVTK"] +git-tree-sha1 = "8364e6bf99f811173cbe7fa71bbb74a678135929" +uuid = "cfc395e8-590f-11e8-1f13-43a2532b2fa8" +version = "1.9.0" + + [deps.ExtendableGrids.extensions] + ExtendableGridsGmshExt = "Gmsh" + ExtendableGridsMetisExt = "Metis" + ExtendableGridsTetGenExt = "TetGen" + ExtendableGridsTriangulateExt = "Triangulate" + + [deps.ExtendableGrids.weakdeps] + Gmsh = "705231aa-382f-11e9-3f0c-b7cb4346fdeb" + Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b" + TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea" + Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344" + +[[deps.Extents]] +git-tree-sha1 = "94997910aca72897524d2237c41eb852153b0f65" +uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910" +version = "0.1.3" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "0653c0a2396a6da5bc4766c43041ef5fd3efbe57" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.11.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.5" + +[[deps.GeoInterface]] +deps = ["Extents"] +git-tree-sha1 = "9fff8990361d5127b770e3454488360443019bb3" +uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" +version = "1.3.5" + +[[deps.GeometryBasics]] +deps = ["EarCut_jll", "Extents", "GeoInterface", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"] +git-tree-sha1 = "b62f2b2d76cee0d61a2ef2b3118cd2a3215d3134" +uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326" +version = "0.4.11" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.11.2" + +[[deps.GridVisualize]] +deps = ["ColorSchemes", "Colors", "DocStringExtensions", "ElasticArrays", "ExtendableGrids", "GeometryBasics", "GridVisualizeTools", "HypertextLiteral", "Interpolations", "IntervalSets", "LinearAlgebra", "Observables", "OrderedCollections", "Printf", "StaticArrays"] +git-tree-sha1 = "60d696d768962220c24934b7e63e4770a08aac8b" +uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8" +version = "1.7.0" + + [deps.GridVisualize.weakdeps] + CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" + GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" + Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" + PlutoVista = "646e1f28-b900-46d7-9d87-d554eb38a413" + PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" + +[[deps.GridVisualizeTools]] +deps = ["ColorSchemes", "Colors", "DocStringExtensions", "StaticArraysCore"] +git-tree-sha1 = "e111f256aa000c4e4662d1119281b751aa66dc37" +uuid = "5573ae12-3b76-41d9-b48c-81d0b6e61cc5" +version = "1.1.0" + +[[deps.Hyperscript]] +deps = ["Test"] +git-tree-sha1 = "179267cfa5e712760cd43dcae385d7ea90cc25a4" +uuid = "47d2ed2b-36de-50cf-bf87-49c2cf4b8b91" +version = "0.0.5" + +[[deps.HypertextLiteral]] +deps = ["Tricks"] +git-tree-sha1 = "7134810b1afce04bbc1045ca1985fbe81ce17653" +uuid = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2" +version = "0.9.5" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.5" + +[[deps.Inflate]] +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.5" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "88a101217d7cb38a7b481ccd50d21876e1d1b0e0" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.15.1" + + [deps.Interpolations.extensions] + InterpolationsUnitfulExt = "Unitful" + + [deps.Interpolations.weakdeps] + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.IntervalSets]] +git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.10" + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" + + [deps.IntervalSets.weakdeps] + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IterTools]] +git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.10.0" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.5.0" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JuliaInterpreter]] +deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] +git-tree-sha1 = "a6adc2dcfe4187c40dc7c2c9d2128e326360e90a" +uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" +version = "0.9.32" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.6.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.7.2+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.17.0+0" + +[[deps.LightXML]] +deps = ["Libdl", "XML2_jll"] +git-tree-sha1 = "3a994404d3f6709610701c7dabfc03fed87a81f8" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.9.1" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.28" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoweredCodeUtils]] +deps = ["JuliaInterpreter"] +git-tree-sha1 = "eeaedcf337f33c039f9f3a209a8db992deefd7e9" +uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" +version = "2.4.8" + +[[deps.MIMEs]] +git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" +uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" +version = "0.1.4" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.13" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.6+0" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.2.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.12.12" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Observables]] +git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.5" + +[[deps.OffsetArrays]] +git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.14.1" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.27+1" + +[[deps.OrderedCollections]] +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.8.1" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.11.0" +weakdeps = ["REPL"] + + [deps.Pkg.extensions] + REPLExt = "REPL" + +[[deps.PlutoUI]] +deps = ["AbstractPlutoDingetjes", "Base64", "ColorTypes", "Dates", "FixedPointNumbers", "Hyperscript", "HypertextLiteral", "IOCapture", "InteractiveUtils", "JSON", "Logging", "MIMEs", "Markdown", "Random", "Reexport", "URIs", "UUIDs"] +git-tree-sha1 = "ab55ee1510ad2af0ff674dbcced5e94921f867a9" +uuid = "7f904dfe-b85e-4ff6-b463-dae2292396a8" +version = "0.7.59" + +[[deps.PlutoVista]] +deps = ["AbstractPlutoDingetjes", "ColorSchemes", "Colors", "DocStringExtensions", "GridVisualizeTools", "HypertextLiteral", "UUIDs"] +git-tree-sha1 = "5be7548065d668761814809e2c7ee33310a3d82f" +uuid = "646e1f28-b900-46d7-9d87-d554eb38a413" +version = "1.0.1" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.5" +weakdeps = ["FixedPointNumbers"] + + [deps.Ratios.extensions] + RatiosFixedPointNumbersExt = "FixedPointNumbers" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Revise]] +deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "85ddd93ea15dcd8493400600e09104a9e94bb18d" +uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" +version = "3.5.15" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.1" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.11.0" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.7" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.7.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.34.3" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "f4dc295e983502292c4c3f951dbb4e985e35b3be" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.18" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = "GPUArraysCore" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.StyledStrings]] +uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" +version = "1.11.0" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.6.0+0" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.11.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" + +[[deps.TranscodingStreams]] +git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.0" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] + +[[deps.Tricks]] +git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.8" + +[[deps.URIs]] +git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.5.1" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.VTKBase]] +git-tree-sha1 = "c2d0db3ef09f1942d08ea455a9e252594be5f3b6" +uuid = "4004b06d-e244-455f-a6ce-a5f9919cc534" +version = "1.0.1" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "c1a7aa6219628fcd757dede0ca95e245c5cd9511" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "1.0.0" + +[[deps.WriteVTK]] +deps = ["Base64", "CodecZlib", "FillArrays", "LightXML", "TranscodingStreams", "VTKBase"] +git-tree-sha1 = "46664bb833f24e4fe561192e3753c9168c3b71b2" +uuid = "64499a7a-5c06-52f2-abe2-ccb03c286192" +version = "1.19.2" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.13.1+0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.8.0+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.59.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" +""" + # ╔═╡ Cell order: # ╠═9701cbe0-d048-11eb-151b-67dda7b72b71 -# ╠═68e2c958-b417-4ba1-9577-697304fe140a +# ╟─68e2c958-b417-4ba1-9577-697304fe140a # ╟─b35d982d-1fa9-413d-b008-892b4f241097 # ╟─00b04f6b-34a6-4e30-9864-d273305281d4 # ╠═a20d74c9-16da-408a-b247-0c17321888f9 @@ -499,3 +1301,6 @@ html"""
""" # ╠═3efbeb11-eaa4-4fc5-bd5f-b3bdb63e7772 # ╠═ccd274d2-68c0-40e0-8ba7-b8421f5ec9d3 # ╟─ba5111b8-0dca-42d2-970f-1e88f5392324 +# ╠═e548f966-4c45-4aa6-8423-6c143d9d259d +# ╟─00000000-0000-0000-0000-000000000001 +# ╟─00000000-0000-0000-0000-000000000002 diff --git a/src/plutovista.jl b/src/plutovista.jl index bc6062f..258e9fd 100644 --- a/src/plutovista.jl +++ b/src/plutovista.jl @@ -234,6 +234,14 @@ function gridplot!(ctx, TP::Type{PlutoVistaType}, ::Type{Val{2}}, grid) edges = grid[BFaceNodes] edgemarkers = grid[BFaceRegions] + if size(edges,2) ==0 + edges=nothing + end + if size(edgemarkers,1) == 0 + edgemarkers=nothing + edgecolormap=nothing + end + PlutoVista.backend!(ctx[:figure]; backend = ctx[:backend], datadim = 2) PlutoVista.trimesh!(ctx[:figure], pts, @@ -327,6 +335,15 @@ function gridplot!(ctx, TP::Type{PlutoVistaType}, ::Type{Val{3}}, grid) markers = cellcolors(grid, ctx[:cellcoloring]) facemarkers = grid[BFaceRegions] + if size(faces,2) ==0 + faces=nothing + end + if size(facemarkers,1) == 0 + facemarkers=nothing + facecolormap=nothing + end + + PlutoVista.backend!(ctx[:figure]; backend = ctx[:backend], datadim = 3) PlutoVista.tetmesh!(ctx[:figure], pts, @@ -357,6 +374,19 @@ function scalarplot!(ctx, PlutoVista = ctx[:Plotter] nbregions = num_bfaceregions(parentgrid) bcmap = bregion_cmap(nbregions) + + faces = parentgrid[BFaceNodes] + facemarkers = parentgrid[BFaceRegions] + facecolormap = bcmap + + if size(faces,2) ==0 + faces=nothing + end + if size(facemarkers,1) == 0 + facemarkers=nothing + facecolormap=nothing + end + PlutoVista.backend!(ctx[:figure]; backend = ctx[:backend], datadim = 3) PlutoVista.tetcontour!(ctx[:figure], [grid[Coordinates] for grid in grids], @@ -369,9 +399,9 @@ function scalarplot!(ctx, yplanes = ctx[:yplanes], zplanes = ctx[:zplanes], limits = ctx[:limits], - faces = parentgrid[BFaceNodes], - facemarkers = parentgrid[BFaceRegions], - facecolormap = bcmap, + faces = faces, + facemarkers = facemarkers, + facecolormap = facecolormap, outlinealpha = ctx[:outlinealpha], levelalpha = ctx[:levelalpha], zoom = ctx[:zoom], From b2bada905c3f31825295c4ca13e573c1e492036d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sun, 29 Sep 2024 00:31:59 +0200 Subject: [PATCH 2/5] add dispatches for (coord, cellnodes) pairs --- src/dispatch.jl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/dispatch.jl b/src/dispatch.jl index 3ab3727..4224fe7 100644 --- a/src/dispatch.jl +++ b/src/dispatch.jl @@ -475,6 +475,15 @@ function scalarplot!(ctx::SubVisualizer, X::AbstractVector, func; kwargs...) scalarplot!(ctx, simplexgrid(X), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function scalarplot!(ctx::SubVisualizer, + coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + scalarplot!(ctx,simplexgrid(coord,cellnodes), func; kwargs...) +end + "$(TYPEDSIGNATURES)" function scalarplot!(ctx::GridVisualizer, X::AbstractVector, func; kwargs...) scalarplot!(ctx, simplexgrid(X), func; kwargs...) @@ -499,6 +508,16 @@ function scalarplot!(ctx::GridVisualizer, scalarplot!(ctx, simplexgrid(X, Y, Z), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function scalarplot!(ctx::GridVisualizer, + coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + scalarplot!(ctx,simplexgrid(coord,cellnodes), func; kwargs...) +end + + """ $(TYPEDSIGNATURES) @@ -546,6 +565,14 @@ function scalarplot(X::AbstractVector, scalarplot(simplexgrid(X, Y, Z), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function scalarplot(coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + scalarplot(simplexgrid(coord,cellnodes), func; kwargs...) +end + ################################################################################### """ From 930b6b87ca52d26f9fe8871faf415abf4303957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sun, 29 Sep 2024 10:43:13 +0200 Subject: [PATCH 3/5] add changelog --- CHANGELOG.md | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e9525fb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,135 @@ +# Changelog + + +## [1.9.0] 2024-09-29 + +- Allow plotting of grids without boundary info + +- Add dispatches for scalarplot(coord, cellnodes, func; kwargs...) + + +## [1.7.0] - 2024-06-18 + +- Add :cellcoloring keyword for handling partitioned grids + +- Upgrade project.toml, dependencies + +- Fix cellcolor numbering + +- Remove nightly from ci due to pluto problem + +- Merge pull request #27 from j-fu/handle-partitioning + +Handle partitioning + +## [1.6.0] - 2024-05-24 + +* require Julia >= 1.9 + +* allow for Makie 0.21; + +See also https://blog.makie.org/blogposts/v0.21/ + + + +## [1.5.0] - 2023-12-09 + +- Gridscale etc (#20) + +Some updates, fixes: + +* gridscale for plutovista, pyplot, makie,plots + +* Export vectorsample and quiverdata + +* Fix streamplot handling for Makie + +* spacing -> rasterpoints for quiver, streamplot + +* Ensure that colorbarticks are always shown and contain the function limits + +* Add customplot + + + +## [1.4.0] - 2023-12-05 + +- Prevent PyPlot from normalizing quiver vectors + +- Pin CairoMakie vesion due to https://github.com/MakieOrg/Makie.jl/issues/3440 + +- Add warnings for functionality not implemented in Plots + +- Bump CairoMakie dependency + +- Add streamplot for Makie + +- Remove another .px_area + +- Update multiscene plot for makie + + + +## [1.3.0] - 2023-11-15 + +- Update Makie, GridVisualizeTools versions + +## [1.2.0] - 2023-11-11 + +- Fix notebook html generation + +- Bgcolor->backgroundcolor in makie.jl + +- Add compat for stdlibs, bump minor version + + +## [1.1.7] - 2023-10-12 + +- Sets default value false for kwarg vconstant introduced in 1.15 (#18) + +Co-authored-by: Christian Merdon +- Fix Documenter v1 issues + + +## [1.1.5] - 2023-09-11 + +- Allow for PlutVista 1.0 + +- Improved PyPlot backend: (#17) + +* better fontsize recognition + +* correct fig sizes + +* tight_layout() also for SubVisualizer reveal + +* fixed rare clipping of last colorlevel in scalarplot + +* coordinate limits (xlimits etc.) are used in vectorsample (such that scaling only is applied to vectors in the clipped area) + +* new vector scaling method vconstant that scales all arrows equally + +* repaired streamplot (U and V arguments needed transposition) + +* added density argument to streamplot + + + +## [1.1.0] - 2023-06-02 + +- Add weakdeps + compat for Makie & co to Project.toml + +- Enable levelalpha/planealpha for makie +fix colorbarticks + +- Try to fix isoline rendering in makie 2d + + + +## [1.0.0] - 2023-02-05 + +- Subgridplots (#16) + +Handle plots of discontinuous functions in Makie,Pyplot, PlutoVista + + From 98e13d12ae8d1b7f2fd4c57e0f8ac8f46178dce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sun, 29 Sep 2024 14:46:54 +0200 Subject: [PATCH 4/5] Add more dispatches --- src/dispatch.jl | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/src/dispatch.jl b/src/dispatch.jl index 4224fe7..cacfc94 100644 --- a/src/dispatch.jl +++ b/src/dispatch.jl @@ -392,6 +392,37 @@ function gridplot!(p::GridVisualizer, grid::ExtendableGrid; kwargs...) gridplot!(p[1, 1], grid; kwargs...) end +"$(TYPEDSIGNATURES)" +function gridplot!(vis::Union{SubVisualizer,GridVisualizer}, X::AbstractVector; kwargs...) + gridplot!(vis,simplexgrid(X); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot!(vis::Union{SubVisualizer,GridVisualizer}, + X::AbstractVector, + Y::AbstractVector; kwargs...) + + gridplot!(vis,simplexgrid(X,Y); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot!(vis::Union{SubVisualizer,GridVisualizer}, + X::AbstractVector, + Y::AbstractVector, + Z::AbstractVector; kwargs...) + + gridplot!(vis,simplexgrid(X,Y,Z); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot!(vis::Union{SubVisualizer,GridVisualizer}, + coord::AbstractMatrix, + cellnodes::AbstractMatrix, + kwargs...) + gridplot!(vis,simplexgrid(coord,cellnodes); kwargs...) +end + + """ $(TYPEDSIGNATURES) @@ -403,6 +434,33 @@ function gridplot(grid::ExtendableGrid; Plotter = default_plotter(), kwargs...) gridplot!(GridVisualizer(; Plotter = Plotter, show = true, kwargs...), grid) end + +"$(TYPEDSIGNATURES)" +function gridplot(X::AbstractVector; kwargs...) + gridplot(simplexgrid(X); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot( X::AbstractVector, + Y::AbstractVector; kwargs...) + gridplot(simplexgrid(X,Y); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot(X::AbstractVector, + Y::AbstractVector, + Z::AbstractVector; kwargs...) + + gridplot(simplexgrid(X,Y,Z); kwargs...) +end + +"$(TYPEDSIGNATURES)" +function gridplot(coord::AbstractMatrix, + cellnodes::AbstractMatrix; + kwargs...) + gridplot(simplexgrid(coord,cellnodes); kwargs...) +end + ################################################################################### """ $(TYPEDSIGNATURES) @@ -617,6 +675,15 @@ function vectorplot!(ctx::GridVisualizer, kwargs...,) vectorplot!(ctx, simplexgrid(X, Y, Z), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function vectorplot!(ctx::GridVisualizer, + coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + vectorplot!(ctx, simplexgrid(coord,cellnodes), func; kwargs...) +end + """ $(TYPEDSIGNATURES) @@ -638,6 +705,13 @@ function vectorplot(X::AbstractVector, kwargs...,) vectorplot(simplexgrid(X, Y, Z), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function vectorplot(coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + vectorplot(simplexgrid(coord,cellnodes), func; kwargs...) +end ################################################################################### @@ -668,6 +742,7 @@ function streamplot!(ctx::GridVisualizer, kwargs...,) streamplot!(ctx, simplexgrid(X, Y), func; kwargs...) end + "$(TYPEDSIGNATURES)" function streamplot!(ctx::GridVisualizer, X::AbstractVector, @@ -678,6 +753,17 @@ function streamplot!(ctx::GridVisualizer, streamplot!(ctx, simplexgrid(X, Y, Z), func; kwargs...) end +"$(TYPEDSIGNATURES)" +function streamplot!(ctx::GridVisualizer, + coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + streamplot!(ctx, simplexgrid(coord,cellnodes), func; kwargs...) +end + + + """ $(TYPEDSIGNATURES) @@ -691,6 +777,7 @@ end function streamplot(X::AbstractVector, Y::AbstractVector, func; kwargs...) streamplot(simplexgrid(X, Y), func; kwargs...) end + "$(TYPEDSIGNATURES)" function streamplot(X::AbstractVector, Y::AbstractVector, @@ -699,6 +786,15 @@ function streamplot(X::AbstractVector, kwargs...,) streamplot(simplexgrid(X, Y, Z), func; kwargs...) end + +"$(TYPEDSIGNATURES)" +function streamplot( coord::AbstractMatrix, + cellnodes::AbstractMatrix, + func; + kwargs...,) + streamplot(simplexgrid(coord,cellnodes), func; kwargs...) +end + ################################################################################### "$(TYPEDSIGNATURES)" function customplot!(ctx::SubVisualizer, func; kwargs...) From 9349ff670273c042f22774b510d4bd0506063cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Sun, 29 Sep 2024 14:47:06 +0200 Subject: [PATCH 5/5] update readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 100610c..a246fd4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,15 @@ This works for 1/2/3D grids and either a function represented by its values on the nodes of the grid, or a scalar function of 1, 2 or 3 variables, respectively. Vector and stream plots are currenly available for 2D only. - +The `grid` argument should be an `ExtendableGrid` as defined by the [ExtendableGrids.jl](https://github.com/j-fu/ExtendableGrids.jl) package. +Instead of `grid`, the following arguments can be passed in order to describe a grid (which then is internally created on-the-fly): +- An `AbstractVector` `X` specifying an 1D grid +- `AbstractVector`s `X,Y` specifying a 2D grid +- `AbstractVector`s `X,Y,Z` specifying a 3D grid +- `coord, cellnodes`, where `coord` is a `dim x nn` matrix of point coordinates and + `cellnodes` is as `dim+1 x nc` connectivity matrix of simplex node indices, describing + a `dim`-dimensional simplex grid with `nn` nodes and `nc` simplices. + Plot appearance can be tweaked by a number of [keyword arguments](https://j-fu.github.io/GridVisualize.jl/dev/api/#GridVisualize.available_kwargs).