diff --git a/.buildkite/Manifest.toml b/.buildkite/Manifest.toml index d957f01662..19f2779958 100644 --- a/.buildkite/Manifest.toml +++ b/.buildkite/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.5" +julia_version = "1.11.0" manifest_format = "2.0" project_hash = "58c4b495a198942d7fe1f15910bfa6451b6fdb53" @@ -90,19 +90,20 @@ version = "1.2.0" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "3640d077b6dafd64ceb8fd5c1ec76f7ca53bcf76" +git-tree-sha1 = "d60a1922358aa203019b7857a2c8c37329b8736c" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.16.0" +version = "7.17.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" ArrayInterfaceReverseDiffExt = "ReverseDiff" @@ -116,6 +117,7 @@ version = "7.16.0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" @@ -134,6 +136,7 @@ weakdeps = ["SparseArrays"] [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.AssociatedLegendrePolynomials]] git-tree-sha1 = "3204d769e06c5678b23cf928d850f2f4ad5ec8a5" @@ -186,6 +189,7 @@ version = "0.4.3" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.Baselet]] git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" @@ -312,7 +316,7 @@ weakdeps = ["CUDA", "MPI"] deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "Unrolled"] path = ".." uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.14.19" +version = "0.14.20" weakdeps = ["CUDA", "Krylov"] [deps.ClimaCore.extensions] @@ -321,19 +325,19 @@ weakdeps = ["CUDA", "Krylov"] [[deps.ClimaCorePlots]] deps = ["ClimaComms", "ClimaCore", "RecipesBase", "StaticArrays", "TriplotBase"] -path = "../lib/ClimaCorePlots" +git-tree-sha1 = "6430644d60158055458075bf32e5ac24741b1ab9" uuid = "cf7c7e5a-b407-4c48-9047-11a94a308626" -version = "0.2.12" +version = "0.2.11" [[deps.ClimaCoreTempestRemap]] deps = ["ClimaComms", "ClimaCore", "CommonDataModel", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll"] -path = "../lib/ClimaCoreTempestRemap" +git-tree-sha1 = "99845c1da7e9f687180c49cf4d53140f21fc8683" uuid = "d934ef94-cdd4-4710-83d6-720549644b70" version = "0.3.18" [[deps.ClimaCoreVTK]] deps = ["ClimaCore", "WriteVTK"] -path = "../lib/ClimaCoreVTK" +git-tree-sha1 = "f23034033a0cca56f151d841a8945a75fcf4be46" uuid = "c8b6d40d-e815-466f-95ae-c48aefa668fa" version = "0.7.6" @@ -367,9 +371,9 @@ version = "0.7.6" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "13951eb68769ad1cd460cdb2e64e5e95f1bf123d" +git-tree-sha1 = "c785dfb1b3bfddd1da557e861b919819b82bbe5b" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.27.0" +version = "3.27.1" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -395,9 +399,9 @@ version = "0.12.11" [[deps.CommonDataModel]] deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf", "Statistics"] -git-tree-sha1 = "d6fb5bf939a2753c74984b11434ea25d6c397a58" +git-tree-sha1 = "98d64d5b9e5263884276656a43c45424b3a645c2" uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" -version = "0.3.6" +version = "0.3.7" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -520,6 +524,7 @@ version = "1.0.0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Dbus_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] @@ -539,10 +544,10 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "TruncatedStacktraces"] -git-tree-sha1 = "f8eefbb7e910f59087c4bb09ce670f235758ee4a" +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "TruncatedStacktraces"] +git-tree-sha1 = "697abdf4af0e38199e9eabff6ccdf65255de855d" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.158.3" +version = "6.159.0" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -592,9 +597,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "ba137efeddd4b6e6a7154f2a92d2922a0057486f" +git-tree-sha1 = "0c99576d0b93df0aff1bed9d9adddef14e4e658f" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.6.21" +version = "0.6.22" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -641,6 +646,7 @@ version = "0.4.6" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -659,9 +665,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.4" [[deps.EnzymeCore]] -git-tree-sha1 = "04c777af6ef65530a96ab68f0a81a4608113aa1d" +git-tree-sha1 = "e333ffd38ecffcf5c6c2dafd10788404ac46fb9f" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.5" +version = "0.8.6" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -742,12 +748,13 @@ version = "1.1.1" [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "62ca0547a14c57e98154423419d8a342dca75ca9" +git-tree-sha1 = "91e0e5c68d02bcdaae76d3c8ceb4361e8f28d2e9" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.16.4" +version = "1.16.5" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] @@ -773,9 +780,9 @@ version = "0.8.5" [[deps.FlameGraphs]] deps = ["AbstractTrees", "Colors", "FileIO", "FixedPointNumbers", "IndirectArrays", "LeftChildRightSiblingTrees", "Profile"] -git-tree-sha1 = "bd1aaf448be998ea427b1c7213b8acf2e278498b" +git-tree-sha1 = "c8bb515422866a684d9e67870fc5791e3292ad01" uuid = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" -version = "1.0.0" +version = "1.0.1" [[deps.FoldingTrees]] deps = ["AbstractTrees", "REPL"] @@ -796,9 +803,9 @@ version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "a9ce73d3c827adab2d70bf168aaece8cce196898" +git-tree-sha1 = "a2df1b776752e3f344e5116c06d75a10436ab853" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.37" +version = "0.10.38" weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] @@ -836,6 +843,7 @@ version = "0.4.12" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +version = "1.11.0" [[deps.GLFW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] @@ -846,7 +854,7 @@ version = "3.4.0+1" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+6" +version = "6.3.0+0" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] @@ -942,9 +950,9 @@ version = "1.14.2+1" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "bc3f416a965ae61968c20d0ad867556367f2817d" +git-tree-sha1 = "1336e07ba2eb75614c99496501a8f4b233e9fafe" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.9" +version = "1.10.10" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] @@ -954,9 +962,9 @@ version = "8.3.1+0" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "dd3b49277ec2bb2c6b94eb1604d4d0616016f7a6" +git-tree-sha1 = "50aedf345a709ab75872f80a2779568dc0bb461b" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.11.2+0" +version = "2.11.2+1" [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" @@ -989,6 +997,7 @@ version = "1.4.2" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" [[deps.IntervalSets]] git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" @@ -1098,10 +1107,10 @@ uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" version = "0.9.8" [[deps.KrylovKit]] -deps = ["GPUArraysCore", "LinearAlgebra", "PackageExtensionCompat", "Printf", "VectorInterface"] -git-tree-sha1 = "3c2a016489c38f35160a246c91a3f3353c47bb68" +deps = ["GPUArraysCore", "LinearAlgebra", "PackageExtensionCompat", "Printf", "Random", "VectorInterface"] +git-tree-sha1 = "3ba86a12066c19a6ed0bc963984bcf89d495133e" uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.8.1" +version = "0.8.2" [deps.KrylovKit.extensions] KrylovKitChainRulesCoreExt = "ChainRulesCore" @@ -1193,6 +1202,7 @@ version = "0.1.17" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" [[deps.LazyBroadcast]] git-tree-sha1 = "54fdcfd900bb7c66876d1f3f608e88cdfa68afc4" @@ -1213,16 +1223,17 @@ 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.4.0+0" +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.6.4+0" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -1231,6 +1242,7 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Libffi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1289,6 +1301,7 @@ version = "0.9.1" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.11.0" [[deps.LinearOperators]] deps = ["FastClosures", "LinearAlgebra", "Printf", "Requires", "SparseArrays", "TimerOutputs"] @@ -1324,6 +1337,7 @@ version = "0.3.28" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] @@ -1394,6 +1408,7 @@ version = "0.1.8" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS]] deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] @@ -1404,7 +1419,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.6+0" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" @@ -1431,10 +1446,11 @@ 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.1.10" +version = "2023.12.12" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1507,14 +1523,14 @@ version = "1.3.5+1" [[deps.OpenBLAS32_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6065c4cff8fee6c6770b277af45d5082baacdba1" +git-tree-sha1 = "dd806c813429ff09878ea3eeb317818f3ca02871" uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.24+0" +version = "0.3.28+3" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+4" +version = "0.3.27+1" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] @@ -1557,10 +1573,10 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.6.3" [[deps.OrdinaryDiffEqCore]] -deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "TruncatedStacktraces"] -git-tree-sha1 = "1175717a62ab21736a8f5d0d2531d2a6ad3b9e74" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "be2c628185fcf94b544fba86b9722be40c3ac305" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -version = "1.9.0" +version = "1.10.1" weakdeps = ["EnzymeCore"] [deps.OrdinaryDiffEqCore.extensions] @@ -1631,9 +1647,13 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.43.4+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +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.10.0" +version = "1.11.0" +weakdeps = ["REPL"] + + [deps.Pkg.extensions] + REPLExt = "REPL" [[deps.PkgVersion]] deps = ["Pkg"] @@ -1655,9 +1675,9 @@ version = "1.4.3" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "45470145863035bb124ca51b320ed35d071cc6c2" +git-tree-sha1 = "dae01f8c2e069a683d3a6e17bbae5070ab94786f" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.8" +version = "1.40.9" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -1724,10 +1744,11 @@ version = "2.4.0" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" [[deps.Profile]] -deps = ["Printf"] uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" +version = "1.11.0" [[deps.ProfileCanvas]] deps = ["Base64", "JSON", "Pkg", "Profile", "REPL"] @@ -1790,12 +1811,14 @@ version = "2.11.1" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +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.Random123]] deps = ["Random", "RandomNumbers"] @@ -1904,9 +1927,9 @@ version = "0.1.0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "Expronicon", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "f102316e5c958b425ef530ee51c7c8a1def55d1f" +git-tree-sha1 = "f9195449e0ae7e8daf9d609c9619ecfc2369f62c" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.58.1" +version = "2.60.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -1958,6 +1981,7 @@ version = "1.4.7" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] @@ -1995,6 +2019,7 @@ version = "2.10.1" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] @@ -2005,7 +2030,7 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" +version = "1.11.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -2068,9 +2093,14 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -2102,16 +2132,20 @@ git-tree-sha1 = "a6b1675a536c5ad1a60e5a5153e1fee12eb146e3" uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" version = "0.4.0" +[[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.2.1+1" +version = "7.7.0+0" [[deps.SymbolicIndexingInterface]] deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "20cf607cafb31f922bce84d60379203e7a126911" +git-tree-sha1 = "6c6761e08bf5a270905cdd065be633abfa1b155b" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.34" +version = "0.3.35" [[deps.TOML]] deps = ["Dates"] @@ -2170,6 +2204,7 @@ version = "0.1.7" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" [[deps.TextWrap]] git-tree-sha1 = "43044b737fa70bc12f6105061d3da38f881a3e3c" @@ -2246,6 +2281,7 @@ version = "1.5.1" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.UnPack]] git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" @@ -2254,6 +2290,7 @@ version = "1.0.2" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.UnicodeFun]] deps = ["REPL"] @@ -2307,9 +2344,9 @@ version = "1.0.1" [[deps.VectorInterface]] deps = ["LinearAlgebra"] -git-tree-sha1 = "7cab92153022a72d4534262cc15a96e21223e3f9" +git-tree-sha1 = "cea8abaa6e43f72f97a09cf95b80c9eb53ff75cf" uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" -version = "0.4.8" +version = "0.4.9" [[deps.Vulkan_Loader_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] @@ -2618,7 +2655,7 @@ version = "1.1.6+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] diff --git a/examples/column/tvd_fct_advection.jl b/examples/column/tvd_fct_advection.jl new file mode 100644 index 0000000000..9e8a10ae35 --- /dev/null +++ b/examples/column/tvd_fct_advection.jl @@ -0,0 +1,151 @@ +using Test +using LinearAlgebra +import ClimaComms +ClimaComms.@import_required_backends +using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33 +using ClimaTimeSteppers + +import ClimaCore: + Fields, + Domains, + Topologies, + Meshes, + DataLayouts, + Operators, + Geometry, + Spaces + + +# Advection Equation, with constant advective velocity (so advection form = flux form) +# ∂_t y + w ∂_z y = 0 +# the solution translates to the right at speed w, +# so at time t, the solution is y(z - w * t) + +# visualization artifacts +ENV["GKSwstype"] = "nul" +using ClimaCorePlots, Plots +Plots.GRBackend() +dir = "tvd_limiters" +path = joinpath(@__DIR__, "output", dir) +mkpath(path) + +function linkfig(figpath, alt = "") + # buildkite-agent upload figpath + # link figure in logs if we are running on CI + if get(ENV, "BUILDKITE", "") == "true" + artifact_url = "artifact://$figpath" + print("\033]1338;url='$(artifact_url)';alt='$(alt)'\a\n") + end +end + +function tendency!(yₜ, y, parameters, t) + (; w, Δt, limiter_method) = parameters + FT = Spaces.undertype(axes(y.q)) + bcvel = pulse(-π, t, z₀, zₕ, z₁) + divf2c = Operators.DivergenceF2C( + bottom = Operators.SetValue(Geometry.WVector(FT(bcvel))), + top = Operators.SetValue(Geometry.WVector(FT(0))), + ) + upwind1 = Operators.UpwindBiasedProductC2F( + bottom = Operators.Extrapolate(), + top = Operators.Extrapolate(), + ) + upwind3 = Operators.Upwind3rdOrderBiasedProductC2F( + bottom = Operators.ThirdOrderOneSided(), + top = Operators.ThirdOrderOneSided(), + ) + LimitedFlux = Operators.TVDSlopeLimitedFlux( + bottom = Operators.FirstOrderOneSided(), + top = Operators.FirstOrderOneSided(), + method = limiter_method, + ) + If = Operators.InterpolateC2F() + @. yₜ.q = + -divf2c( + upwind1(w, y.q) + LimitedFlux( + upwind3(w, y.q) - upwind1(w, y.q), + y.q / Δt, + ), + ) + # @. yₜ.q = + # -divf2c(w * If(y.q)) +end + +# Define a pulse wave or square wave + +FT = Float64 +t₀ = FT(0.0) +Δt = 0.0001 * 25 +t₁ = 200Δt +z₀ = FT(0.0) +zₕ = FT(1.0) +z₁ = FT(1.0) +speed = FT(-1.0) +pulse(z, t, z₀, zₕ, z₁) = abs(z - speed * t) ≤ zₕ ? z₁ : z₀ + +n = 2 .^ 6 + +domain = Domains.IntervalDomain( + Geometry.ZPoint{FT}(-π), + Geometry.ZPoint{FT}(π); + boundary_names = (:bottom, :top), +) + +stretch_fns = (Meshes.Uniform(), Meshes.ExponentialStretching(FT(7.0))) +plot_string = ["uniform", "stretched"] + +for (i, stretch_fn) in enumerate(stretch_fns) + limiter_methods = (Operators.RZeroLimiter(), + Operators.RHalfLimiter(), + Operators.RMaxLimiter(), + Operators.MinModLimiter(), + Operators.KorenLimiter(), + Operators.SuperbeeLimiter(), + Operators.MonotonizedCentralLimiter(), + Operators.VanLeerLimiter(), + ) + for limiter_method in limiter_methods + @info (limiter_method, stretch_fn) + mesh = Meshes.IntervalMesh(domain, stretch_fn; nelems = n) + cent_space = Spaces.CenterFiniteDifferenceSpace(mesh) + face_space = Spaces.FaceFiniteDifferenceSpace(cent_space) + z = Fields.coordinate_field(cent_space).z + O = ones(FT, face_space) + + # Initial condition + q_init = pulse.(z, 0.0, z₀, zₕ, z₁) + y = Fields.FieldVector(q = q_init) + + # Unitary, constant advective velocity + w = Geometry.WVector.(speed .* O) + + # Solve the ODE + parameters = (; w, Δt, limiter_method) + prob = ODEProblem( + ClimaODEFunction(; T_exp! = tendency!), + y, + (t₀, t₁), + parameters, + ) + sol = solve(prob, ExplicitAlgorithm(SSP33ShuOsher()), dt = Δt, saveat = Δt) + + q_final = sol.u[end].q + q_analytic = pulse.(z, t₁, z₀, zₕ, z₁) + err = norm(q_final .- q_analytic) + rel_mass_err = norm((sum(q_final) - sum(q_init)) / sum(q_init)) + + + plot(q_final) + Plots.png( + Plots.plot!(q_analytic, title = "$(typeof(limiter_method))"), + joinpath( + path, + "exact_and_computed_advected_square_wave_TVDSlopeLimitedFlux_"* "$(typeof(limiter_method))_" * + plot_string[i] * + ".png", + ), + ) + @test err ≤ 0.25 + @test rel_mass_err ≤ 10eps() + end +end diff --git a/examples/hybrid/sphere/deformation_flow.jl b/examples/hybrid/sphere/deformation_flow.jl index 9b4ce6e5c8..d4cbd8688c 100644 --- a/examples/hybrid/sphere/deformation_flow.jl +++ b/examples/hybrid/sphere/deformation_flow.jl @@ -83,6 +83,11 @@ const FCTZalesak = Operators.FCTZalesak( bottom = Operators.FirstOrderOneSided(), top = Operators.FirstOrderOneSided(), ) +const SlopeLimitedFlux = Operators.TVDSlopeLimitedFlux( + bottom = Operators.FirstOrderOneSided(), + top = Operators.FirstOrderOneSided(), + method = Operators.MinModLimiter(), +) const FCTBorisBook = Operators.FCTBorisBook( bottom = Operators.FirstOrderOneSided(), top = Operators.FirstOrderOneSided(), @@ -179,6 +184,15 @@ function vertical_tendency!(Yₜ, Y, cache, t) ) ), ) + elseif fct_op == SlopeLimitedFlux + @. ρqₜ_n -= vdivf2c( + ᶠwinterp(ᶜJ, Y.c.ρ) * ( + upwind1(face_uᵥ, q_n) + SlopeLimitedFlux( + upwind3(face_uᵥ, q_n) - upwind1(face_uᵥ, q_n), + Y.c.ρ * q_n, + ) + ), + ) else error("unrecognized FCT operator $fct_op") end @@ -306,6 +320,8 @@ tracer_ranges(sol) = return maximum(q_n) - minimum(q_n) end +tvd_sol = run_deformation_flow(false, TVDSlopeLimitedFlux, _dt) +lim_tvd_sol = run_deformation_flow(true, TVDSlopeLimitedFlux, _dt) third_upwind_sol = run_deformation_flow(false, upwind3, _dt) fct_sol = run_deformation_flow(false, FCTZalesak, _dt) lim_third_upwind_sol = run_deformation_flow(true, upwind3, _dt) @@ -386,8 +402,10 @@ for (sol, suffix) in ( (lim_first_upwind_sol, "_lim_first_upwind"), (third_upwind_sol, "_third_upwind"), (fct_sol, "_fct"), + (tvd_sol, "_tvd"), (lim_third_upwind_sol, "_lim_third_upwind"), (lim_fct_sol, "_lim_fct"), + (lim_tvd_sol, "_lim_tvd"), ) for (sol_index, day) in ((1, 6), (2, 12)) Plots.png( @@ -400,3 +418,24 @@ for (sol, suffix) in ( ) end end + +for (sol, suffix) in ( + (lim_centered_sol, "_lim_centered"), + (lim_first_upwind_sol, "_lim_first_upwind"), + (third_upwind_sol, "_third_upwind"), + (fct_sol, "_fct"), + (tvd_sol, "_tvd"), + (lim_fct_sol, "_lim_fct"), + (lim_tvd_sol, "_lim_tvd"), +) + for (sol_index, day) in ((1, 6), (2, 12)) + Plots.png( + Plots.plot( + (((sol.u[sol_index].c.ρq.:3) ./ sol.u[sol_index].c.ρ) .- (lim_third_upwind_sol[sol_index].c.ρq.:3 ./ lim_third_upwind_sol[sol_index].c.ρ)), + level = 15, + clim = (-1, 1), + ), + joinpath(path, "q3_day_diff_$day$suffix.png"), + ) + end +end diff --git a/src/Operators/finitedifference.jl b/src/Operators/finitedifference.jl index 12740e2b28..1e6da794fd 100644 --- a/src/Operators/finitedifference.jl +++ b/src/Operators/finitedifference.jl @@ -1667,6 +1667,10 @@ function fct_zalesak( stable_zero = zero(eltype(Aⱼ₊₁₂)) stable_one = one(eltype(Aⱼ₊₁₂)) + # 𝒮5.4.2 (1) Durran (5.32) Zalesak's cosmetic correction + # which is usually omitted but used in Durran's textbook + # implementation of the flux corrected transport method. + # (Textbook suggests mixed results in 3 reported scenarios) if ( Aⱼ₊₁₂ * (ϕⱼ₊₁ᵗᵈ - ϕⱼᵗᵈ) < stable_zero && ( Aⱼ₊₁₂ * (ϕⱼ₊₂ᵗᵈ - ϕⱼ₊₁ᵗᵈ) < stable_zero || @@ -1675,15 +1679,19 @@ function fct_zalesak( ) Aⱼ₊₁₂ = stable_zero end + + # 𝒮5.4.2 (2) + # If flow is nondivergent, ϕᵗᵈ are not needed in the formulae below ϕⱼᵐᵃˣ = max(ϕⱼ₋₁, ϕⱼ, ϕⱼ₊₁, ϕⱼ₋₁ᵗᵈ, ϕⱼᵗᵈ, ϕⱼ₊₁ᵗᵈ) ϕⱼᵐⁱⁿ = min(ϕⱼ₋₁, ϕⱼ, ϕⱼ₊₁, ϕⱼ₋₁ᵗᵈ, ϕⱼᵗᵈ, ϕⱼ₊₁ᵗᵈ) Pⱼ⁺ = max(stable_zero, Aⱼ₋₁₂) - min(stable_zero, Aⱼ₊₁₂) + # Zalesak also requires, in equation (5.33) Δx/Δt, which for the + # reference element we may assume Δζ = 1 between interfaces Qⱼ⁺ = (ϕⱼᵐᵃˣ - ϕⱼᵗᵈ) Rⱼ⁺ = (Pⱼ⁺ > stable_zero ? min(stable_one, Qⱼ⁺ / Pⱼ⁺) : stable_zero) Pⱼ⁻ = max(stable_zero, Aⱼ₊₁₂) - min(stable_zero, Aⱼ₋₁₂) Qⱼ⁻ = (ϕⱼᵗᵈ - ϕⱼᵐⁱⁿ) Rⱼ⁻ = (Pⱼ⁻ > stable_zero ? min(stable_one, Qⱼ⁻ / Pⱼ⁻) : stable_zero) - ϕⱼ₊₁ᵐᵃˣ = max(ϕⱼ, ϕⱼ₊₁, ϕⱼ₊₂, ϕⱼᵗᵈ, ϕⱼ₊₁ᵗᵈ, ϕⱼ₊₂ᵗᵈ) ϕⱼ₊₁ᵐⁱⁿ = min(ϕⱼ, ϕⱼ₊₁, ϕⱼ₊₂, ϕⱼᵗᵈ, ϕⱼ₊₁ᵗᵈ, ϕⱼ₊₂ᵗᵈ) Pⱼ₊₁⁺ = max(stable_zero, Aⱼ₊₁₂) - min(stable_zero, Aⱼ₊₃₂) @@ -1696,7 +1704,6 @@ function fct_zalesak( Cⱼ₊₁₂ = (Aⱼ₊₁₂ ≥ stable_zero ? min(Rⱼ₊₁⁺, Rⱼ⁻) : min(Rⱼ⁺, Rⱼ₊₁⁻)) return Cⱼ₊₁₂ * Aⱼ₊₁₂ - end stencil_interior_width(::FCTZalesak, A_space, Φ_space, Φᵗᵈ_space) = @@ -1787,7 +1794,176 @@ Base.@propagate_inbounds function stencil_right_boundary( return Geometry.Contravariant3Vector(zero(eltype(eltype(A_field)))) end +######Limited Flux Methods###### +""" + U = TVDSlopeLimitedFlux(;boundaries) + U.(𝒜, Φ) +𝒜, following the notation of Durran (Numerical Methods for Fluid +Dynamics, 2ⁿᵈ ed.) is the antidiffusive flux given by +𝒜 = ℱʰ - ℱˡ +where h and l superscripts represent the high and lower order (monotone) +fluxes respectively. The effect of the TVD limiters is then to +adjust the flux +F_{j+1/2} = F^{1}_{j+1/2} + C_{j+1/2}(F^{h}_{j+1/2} - F^{l}_{j+1/2}) +where C_{j+1/2} is the multiplicative limiter which is a function of +the ratio of the slope of the solution across a cell interface. +C=1 recovers the high order flux. +C=0 recovers the low order flux. + +Supported limiter types are +(1) RZeroLimiter (returns low order flux) +(2) RHalfLimiter (the flux multiplier == 1/2) +(3) RMaxLimiter (returns high order flux) +(4) MinModLimiter +(5) KorenLimiter +(6) SuperbeeLimiter +(7) MonotonizedCentralLimiter +(8) VanLeerLimiter + +""" +### Here we define abstract types and specific implementations +### TVD limiters (see, for instance, Durran's notes) +abstract type AbstractTVDSlopeLimiter end +struct RZeroLimiter <: AbstractTVDSlopeLimiter end +struct RHalfLimiter <: AbstractTVDSlopeLimiter end +struct RMaxLimiter <: AbstractTVDSlopeLimiter end +struct MinModLimiter <: AbstractTVDSlopeLimiter end +struct KorenLimiter <: AbstractTVDSlopeLimiter end +struct SuperbeeLimiter <: AbstractTVDSlopeLimiter end +struct MonotonizedCentralLimiter <: AbstractTVDSlopeLimiter end +struct VanLeerLimiter <: AbstractTVDSlopeLimiter end + +@inline function compute_limiter_coeff(r, ::RZeroLimiter) + # Returns the low order flux + # Typically first-order upwind in ClimaCore schemes. + return zero(eltype(r)) +end + +@inline function compute_limiter_coeff(r, ::RHalfLimiter) + return one(eltype(r)) * 1 / 2 +end + +@inline function compute_limiter_coeff(r, ::RMaxLimiter) + return one(eltype(r)) +end +@inline function compute_limiter_coeff(r, ::MinModLimiter) + return max(zero(eltype(r)), min(one(eltype(r)), r)) +end + +@inline function compute_limiter_coeff(r, ::KorenLimiter) + return max(zero(eltype(r)), min(2r, min(1/3 + 2r / 3, 2))) +end + +@inline function compute_limiter_coeff(r, ::SuperbeeLimiter) + return max(zero(eltype(r)), min(one(eltype(r)), r), min(2, r)) +end + +@inline function compute_limiter_coeff(r, ::MonotonizedCentralLimiter) + return max(zero(eltype(r)), min(2r, (1 + r) / 2, 2)) +end + +@inline function compute_limiter_coeff(r, ::VanLeerLimiter) + return (r + abs(r)) / (1 + abs(r) + eps(eltype(r))) +end + +# ??? Do we want to allow flux method types to be determined here? +struct TVDSlopeLimitedFlux{BCS} <: AdvectionOperator + bcs::BCS +end + +TVDSlopeLimitedFlux(; kwargs...) = TVDSlopeLimitedFlux(NamedTuple(kwargs)) + +return_eltype(::TVDSlopeLimitedFlux, A, Φ) = + Geometry.Contravariant3Vector{eltype(eltype(A))} + +return_space( + ::TVDSlopeLimitedFlux, + A_space::AllFaceFiniteDifferenceSpace, + Φ_space::AllCenterFiniteDifferenceSpace, +) = A_space + +function tvd_limited_flux(Aⱼ₋₁₂, Aⱼ₊₁₂, ϕⱼ₋₁, ϕⱼ, ϕⱼ₊₁, ϕⱼ₊₂, rⱼ₊₁₂, method) + stable_zero = zero(eltype(Aⱼ₊₁₂)) + stable_one = one(eltype(Aⱼ₊₁₂)) + # Test with various limiter methods + # Aⱼ₊₁₂ is the antidiffusive flux (see Durran textbook for notation) + Cⱼ₊₁₂ = compute_limiter_coeff(rⱼ₊₁₂, method) + # Assert condition for TVD limiter + @assert Cⱼ₊₁₂ <= eltype(Aⱼ₊₁₂)(2) + @assert Cⱼ₊₁₂ >= eltype(Aⱼ₊₁₂)(0) + return Cⱼ₊₁₂ * Aⱼ₊₁₂ +end + +stencil_interior_width(::TVDSlopeLimitedFlux, A_space, Φ_space) = + ((-1, 1), (-half - 1, half + 1)) + +Base.@propagate_inbounds function stencil_interior( + ℱ::TVDSlopeLimitedFlux, + loc, + space, + idx, + hidx, + A_field, + Φ_field, +) + # cell center variables + ϕⱼ₋₁ = getidx(space, Φ_field, loc, idx - half - 1, hidx) + ϕⱼ = getidx(space, Φ_field, loc, idx - half, hidx) + ϕⱼ₊₁ = getidx(space, Φ_field, loc, idx + half, hidx) + ϕⱼ₊₂ = getidx(space, Φ_field, loc, idx + half + 1, hidx) + # cell face variables + Aⱼ₊₁₂ = Geometry.contravariant3( + getidx(space, A_field, loc, idx, hidx), + Geometry.LocalGeometry(space, idx, hidx), + ) + Aⱼ₋₁₂ = Geometry.contravariant3( + getidx(space, A_field, loc, idx - 1, hidx), + Geometry.LocalGeometry(space, idx - 1, hidx), + ) + # See filter options below + rⱼ₊₁₂ = compute_slope_ratio(ϕⱼ, ϕⱼ₋₁, ϕⱼ₊₁) + + return Geometry.Contravariant3Vector( + tvd_limited_flux(Aⱼ₋₁₂, Aⱼ₊₁₂, ϕⱼ₋₁, ϕⱼ, ϕⱼ₊₁, ϕⱼ₊₂, rⱼ₊₁₂, ℱ.bcs.method), + ) +end + +@inline function compute_slope_ratio(ϕⱼ, ϕⱼ₋₁, ϕⱼ₊₁) + return (ϕⱼ - ϕⱼ₋₁) / (ϕⱼ₊₁ - ϕⱼ + eps(eltype(ϕⱼ))) +end + +boundary_width(::TVDSlopeLimitedFlux, ::AbstractBoundaryCondition) = 2 + +Base.@propagate_inbounds function stencil_left_boundary( + ::TVDSlopeLimitedFlux, + bc::FirstOrderOneSided, + loc, + space, + idx, + hidx, + A_field, + Φ_field, +) + @assert idx <= left_face_boundary_idx(space) + 1 + + return Geometry.Contravariant3Vector(zero(eltype(eltype(A_field)))) +end + +Base.@propagate_inbounds function stencil_right_boundary( + ::TVDSlopeLimitedFlux, + bc::FirstOrderOneSided, + loc, + space, + idx, + hidx, + A_field, + Φ_field, +) + @assert idx <= right_face_boundary_idx(space) - 1 + + return Geometry.Contravariant3Vector(zero(eltype(eltype(A_field)))) +end """ A = AdvectionF2F(;boundaries)