Skip to content

Commit

Permalink
Merge #161
Browse files Browse the repository at this point in the history
161: Add Deformational Flow Example r=dennisYatunin a=dennisYatunin



Co-authored-by: Dennis Yatunin <dyatun@gmail.com>
  • Loading branch information
bors[bot] and dennisYatunin authored Jan 21, 2023
2 parents 2a68a76 + 57bf01e commit d87d6dc
Show file tree
Hide file tree
Showing 8 changed files with 555 additions and 72 deletions.
2 changes: 0 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ env:
OPENMPI_VERSION: "4.1.1"
OPENBLAS_NUM_THREADS: 1
CLIMATEMACHINE_SETTINGS_FIX_RNG_SEED: "true"
JULIA_DEPOT_PATH: "${BUILDKITE_BUILD_PATH}/${BUILDKITE_PIPELINE_SLUG}/depot/cpu"

steps:
- label: "init cpu env"
key: "init_cpu_env"
command:
- "echo $$JULIA_DEPOT_PATH"
- echo "--- Configure MPI"
- julia -e 'using Pkg; Pkg.add("MPIPreferences"); using MPIPreferences; use_system_binary()'

Expand Down
115 changes: 86 additions & 29 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.8.5"
manifest_format = "2.0"
project_hash = "b41a2b6962844aa850e2210be1742cc1868a096b"
project_hash = "0445f0b63f403d783217e170583dfd95f7a70fe5"

[[deps.AMD]]
deps = ["Libdl", "LinearAlgebra", "SparseArrays", "Test"]
Expand Down Expand Up @@ -173,9 +173,9 @@ version = "0.5.1"

[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "e7ff6cadf743c098e08fca25c91103ee4303c9bb"
git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.15.6"
version = "1.15.7"

[[deps.ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
Expand All @@ -195,6 +195,12 @@ git-tree-sha1 = "ba403ef47480ab31edb6b02d499538574b321c74"
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.10.23"

[[deps.ClimaCorePlots]]
deps = ["ClimaCore", "RecipesBase", "StaticArrays", "TriplotBase"]
git-tree-sha1 = "2fb63d2573c4ba4aff1ed7829a6c91032be5d488"
uuid = "cf7c7e5a-b407-4c48-9047-11a94a308626"
version = "0.2.4"

[[deps.ClimaTimeSteppers]]
deps = ["CUDA", "ClimaComms", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "SciMLBase", "StaticArrays"]
path = ".."
Expand Down Expand Up @@ -276,11 +282,16 @@ git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406"
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
version = "0.3.1"

[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"

[[deps.CubedSphere]]
deps = ["Elliptic", "Printf", "Rotations", "TaylorSeries", "Test"]
git-tree-sha1 = "d5b15ff3bc2073a864f38a09b446a3b735a96125"
deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"]
git-tree-sha1 = "db9c12cb765cc048e158987388287c52baddf57d"
uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb"
version = "0.2.1"
version = "0.2.2"

[[deps.DataAPI]]
git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630"
Expand Down Expand Up @@ -420,6 +431,18 @@ git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+2"

[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.5.0"

[[deps.FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.10+0"

[[deps.FastBroadcast]]
deps = ["ArrayInterface", "ArrayInterfaceCore", "LinearAlgebra", "Polyester", "Static", "StrideArraysCore"]
git-tree-sha1 = "4bef892787c972913d4d84e7255400759bb650e5"
Expand Down Expand Up @@ -517,15 +540,15 @@ version = "3.3.8+0"

[[deps.GPUArrays]]
deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"]
git-tree-sha1 = "45d7deaf05cbb44116ba785d147c518ab46352d7"
git-tree-sha1 = "5ae0f2ab6f6d99d558cb588763f76311106c71b1"
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
version = "8.5.0"
version = "8.6.0"

[[deps.GPUArraysCore]]
deps = ["Adapt"]
git-tree-sha1 = "6872f5ec8fd1a38880f027a26739d42dcda6691f"
git-tree-sha1 = "57f7cde02d7a53c9d1d28443b9f11ac5fbe7ebc9"
uuid = "46192b85-c4d5-4398-a991-12ede77f4527"
version = "0.1.2"
version = "0.1.3"

[[deps.GPUCompiler]]
deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"]
Expand Down Expand Up @@ -605,9 +628,9 @@ version = "1.12.2+2"

[[deps.HTTP]]
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
git-tree-sha1 = "fd9861adba6b9ae4b42582032d0936d456c8602d"
git-tree-sha1 = "eb5aa5e3b500e191763d35198f859e4b40fff4a6"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "1.6.3"
version = "1.7.3"

[[deps.HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
Expand Down Expand Up @@ -648,6 +671,12 @@ git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.1"

[[deps.IntelOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c"
uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
version = "2018.0.3+2"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand Down Expand Up @@ -754,9 +783,9 @@ version = "3.0.0+1"

[[deps.LLVM]]
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"]
git-tree-sha1 = "088dd02b2797f0233d92583562ab669de8517fd1"
git-tree-sha1 = "b8ae281340f0d3e973aae7b96fb7502b0119b376"
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
version = "4.14.1"
version = "4.15.0"

[[deps.LLVMExtra_jll]]
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg", "TOML"]
Expand Down Expand Up @@ -900,9 +929,15 @@ version = "1.0.0"

[[deps.LoopVectorization]]
deps = ["ArrayInterface", "ArrayInterfaceCore", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDDualNumbers", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "SpecialFunctions", "Static", "ThreadingUtilities", "UnPack", "VectorizationBase"]
git-tree-sha1 = "155132d68bc33c826dbdeb452c5d0a79e2d0e586"
git-tree-sha1 = "641ba2dbd7667d1ede0e9135aa3585018581d99b"
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
version = "0.12.146"
version = "0.12.147"

[[deps.MKL_jll]]
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9"
uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7"
version = "2022.2.0+0"

[[deps.MacroTools]]
deps = ["Markdown", "Random"]
Expand Down Expand Up @@ -1005,9 +1040,9 @@ version = "0.8.1+0"

[[deps.OpenSSL]]
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
git-tree-sha1 = "df6830e37943c7aaa10023471ca47fb3065cc3c4"
git-tree-sha1 = "6503b77492fd7fcb9379bf73cd31035670e3c509"
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
version = "1.3.2"
version = "1.3.3"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand Down Expand Up @@ -1057,9 +1092,9 @@ version = "0.12.3"

[[deps.Parsers]]
deps = ["Dates", "SnoopPrecompile"]
git-tree-sha1 = "6466e524967496866901a78fca3f2e9ea445a559"
git-tree-sha1 = "8175fc2b118a3755113c8e68084dc1a9e63c61ee"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.5.2"
version = "2.5.3"

[[deps.Pipe]]
git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d"
Expand All @@ -1079,9 +1114,9 @@ version = "1.8.0"

[[deps.PkgVersion]]
deps = ["Pkg"]
git-tree-sha1 = "f6cf8e7944e50901594838951729a1861e668cb8"
git-tree-sha1 = "192aa02cc47f6566c7a1a8907dee76f6eb0a7c90"
uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688"
version = "0.3.2"
version = "0.2.1"

[[deps.PlotThemes]]
deps = ["PlotUtils", "Statistics"]
Expand Down Expand Up @@ -1125,10 +1160,22 @@ git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.3.0"

[[deps.PrettyTables]]
deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"]
git-tree-sha1 = "96f6db03ab535bdb901300f88335257b0018689d"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "2.2.2"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.ProgressBars]]
deps = ["Printf"]
git-tree-sha1 = "806ebc92e1b4b4f72192369a28dfcaf688566b2b"
uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
version = "1.4.1"

[[deps.Qt5Base_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
Expand All @@ -1137,9 +1184,9 @@ version = "5.15.3+2"

[[deps.QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
git-tree-sha1 = "97aa253e65b784fd13e83774cadc95b38011d734"
git-tree-sha1 = "de191bc385072cc6c7ed3ffdc1caeed3f22c74d4"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.6.0"
version = "2.7.0"

[[deps.Quaternions]]
deps = ["LinearAlgebra", "Random", "RealDot"]
Expand Down Expand Up @@ -1193,9 +1240,9 @@ version = "2.35.0"

[[deps.RecursiveFactorization]]
deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"]
git-tree-sha1 = "9f9d83b485b5f3bfd0f8cb0b8733d573bd4c388f"
git-tree-sha1 = "664aba1c5259821356f2ef771eabc502d67a8f0d"
uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"
version = "0.2.14"
version = "0.2.16"

[[deps.Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
Expand Down Expand Up @@ -1308,10 +1355,10 @@ uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7"
version = "1.1.0"

[[deps.SimpleNonlinearSolve]]
deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "Reexport", "SciMLBase", "SnoopPrecompile", "StaticArraysCore"]
git-tree-sha1 = "fc4b9f81a033cf6879c91bb7f5b3ff59008c7dd2"
deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "Reexport", "SciMLBase", "SnoopPrecompile", "StaticArraysCore"]
git-tree-sha1 = "61b8ffdb22453132e02a10c5638dfb42834c776b"
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
version = "0.1.4"
version = "0.1.5"

[[deps.SimpleTraits]]
deps = ["InteractiveUtils", "MacroTools"]
Expand Down Expand Up @@ -1407,6 +1454,11 @@ git-tree-sha1 = "50ccd5ddb00d19392577902f0079267a72c5ab04"
uuid = "69024149-9ee7-55f6-a4c4-859efe599b68"
version = "0.3.5"

[[deps.StringManipulation]]
git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123"
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
version = "0.3.0"

[[deps.SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
Expand Down Expand Up @@ -1489,6 +1541,11 @@ git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175"
uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"
version = "0.1.6"

[[deps.TriplotBase]]
git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b"
uuid = "981d1d27-644d-49a2-9326-4793e63143c3"
version = "0.1.0"

[[deps.URIs]]
git-tree-sha1 = "ac00576f90d8a259f2c9d823e91d1de3fd44d348"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
Expand Down
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
ClimaCorePlots = "cf7c7e5a-b407-4c48-9047-11a94a308626"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand All @@ -9,5 +10,6 @@ DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
28 changes: 13 additions & 15 deletions docs/src/dev/report_gen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,22 @@ include(joinpath(pkgdir(ClimaTimeSteppers), "test", "problems.jl"))

all_subtypes(::Type{T}) where {T} = isabstracttype(T) ? vcat(all_subtypes.(subtypes(T))...) : [T]

@testset "IMEX Algorithm Convergence" begin
let # IMEX Algorithm convergence
title = "IMEX Algorithms"
algorithm_names = map(T -> T(), all_subtypes(ClimaTimeSteppers.IMEXAlgorithmName))
test_imex_algorithms(title, algorithm_names, ark_analytic_nonlin_test_cts(Float64), 200)
test_imex_algorithms(title, algorithm_names, ark_analytic_sys_test_cts(Float64), 400)
test_imex_algorithms(title, algorithm_names, ark_analytic_test_cts(Float64), 40000; super_convergence = (ARS121(),))
test_imex_algorithms(
title,
algorithm_names,
onewaycouple_mri_test_cts(Float64),
10000;
num_steps_scaling_factor = 5,
)
test_imex_algorithms(
verify_convergence(title, algorithm_names, ark_analytic_nonlin_test_cts(Float64), 200)
verify_convergence(title, algorithm_names, ark_analytic_sys_test_cts(Float64), 400)
verify_convergence(title, algorithm_names, ark_analytic_test_cts(Float64), 40000; super_convergence = (ARS121(),))
verify_convergence(title, algorithm_names, onewaycouple_mri_test_cts(Float64), 10000; num_steps_scaling_factor = 5)
verify_convergence(
title,
algorithm_names,
climacore_1Dheat_test_cts(Float64),
200;
num_steps_scaling_factor = 4,
numerical_reference_algorithm_name = ARS343(),
)
test_imex_algorithms(
verify_convergence(
title,
algorithm_names,
climacore_2Dheat_test_cts(Float64),
Expand All @@ -40,7 +34,7 @@ all_subtypes(::Type{T}) where {T} = isabstracttype(T) ? vcat(all_subtypes.(subty
)
end

@testset "Unconstrained vs SSPConstrained (no limiters)" begin
let # Unconstrained vs SSPConstrained results without limiters
algorithm_names = map(T -> T(), all_subtypes(ClimaTimeSteppers.IMEXSSPRKAlgorithmName))
for (test_case, num_steps) in (
(ark_analytic_nonlin_test_cts(Float64), 200),
Expand All @@ -58,7 +52,11 @@ end
reference_algorithm = IMEXAlgorithm(algorithm_name, newtons_method, Unconstrained())
solution = solve(deepcopy(prob), algorithm; dt).u[end]
reference_solution = solve(deepcopy(prob), reference_algorithm; dt).u[end]
@test norm(solution .- reference_solution) / norm(reference_solution) < 30 * eps(Float64)
if norm(solution .- reference_solution) / norm(reference_solution) > 30 * eps(Float64)
alg_str = string(nameof(typeof(algorithm_name)))
@warn "Unconstrained and SSPConstrained versions of $alg_str \
give different results for $(test_case.test_name)"
end
end
end
end
Loading

0 comments on commit d87d6dc

Please sign in to comment.