diff --git a/Project.toml b/Project.toml index 6c43e97f1..2f7c7636e 100644 --- a/Project.toml +++ b/Project.toml @@ -6,579 +6,68 @@ version = "0.1.0" AMRVW = "233ec0c9-6b8d-4766-b9a2-a16e389fc38a" ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -Atomix = "a9b6321e-bd34-4604-b9c9-b65b8de01458" -AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f" -Automa = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b" -AxisAlgorithms = "13072b0f-2c55-5437-9ae7-d433b7a33950" -AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9" -BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" -BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" -BandedMatrices = "aae01518-5342-5314-be14-df237901396f" Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -BitFlags = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -BitTwiddlingConvenienceFunctions = "62783981-4cbd-42fc-bca8-16325de8dc4b" -BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -Blosc = "a74b3585-a348-5f62-a45c-50e91977d574" -Blosc_jll = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9" -BoundaryValueDiffEq = "764a87c0-6b3e-53db-9096-fe964310641d" -BoundaryValueDiffEqAscher = "7227322d-7511-4e07-9247-ad6ff830280e" -BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a" -BoundaryValueDiffEqFIRK = "85d9eb09-370e-4000-bb32-543851f73618" -BoundaryValueDiffEqMIRK = "1a22d4ce-7765-49ea-b6f2-13c8438986a6" -BoundaryValueDiffEqMIRKN = "9255f1d6-53bf-473e-b6bd-23f1ff009da4" -BoundaryValueDiffEqShooting = "ed55bfe0-3725-4db6-871e-a1dc9f42a757" -BracketingNonlinearSolve = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -BufferedStreams = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" -Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" -CFTime = "179af706-886a-5703-950a-314cd64e0468" -CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" -CRlibm_jll = "4e9b3aee-d8a1-5a3d-ad8b-7d824db253f0" -CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" -CUDA_Driver_jll = "4ee394cb-3365-5eb0-8335-949819d2adfc" -CUDA_Runtime_Discovery = "1af6417a-86b4-443c-805f-a4643ffb695f" -CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2" -Cairo = "159f3aea-2a34-519c-b102-8c37f9878175" -Cairo_jll = "83423d85-b0ee-5818-9007-b63ccbeb887a" -ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -CircularArrays = "7a955b69-7140-5f4e-a0ed-f168c5e2e749" +CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c" -CloseOpenIntervals = "fb6a15b2-703c-40df-9091-08a04967cfa9" -CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" -CodecBzip2 = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" -CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" -ColorBrewer = "a2cac450-b92f-5266-8821-25eda20663c8" ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4" -Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" -Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -CommonDataModel = "1fbeeb36-5f17-413c-809b-666fb144f157" -CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" -CommonSubexpressions = "bbf7d656-a473-5ed7-a52c-81e309532950" -CommonWorldInvalidations = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" -Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" -CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae" -CompositionsBase = "a33af91c-f02d-484b-be07-31d278c5ca2b" -ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -ConcurrentUtilities = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -Contour = "d38c429a-6771-53c6-b99e-75d170b6e991" -CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298" -CpuId = "adafc99b-e345-5852-983c-f28acb93d879" Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" -DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -DataValueInterfaces = "e2d170a0-9d28-54be-80f0-106bbe20a464" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -Dbus_jll = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -DelaunayTriangulation = "927a84f5-c5f4-47a5-9785-b46e178433df" -DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" Dierckx = "39dd38d3-220a-591b-8e3c-4c3a8c710a94" -Dierckx_jll = "cd4c43a9-7502-52ba-aa6d-59fb2a88580b" DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" -DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" -DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b" -DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" -DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" -Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" -Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -EarCut_jll = "5ae413db-bbd1-5e63-b57d-d24a61df00f5" ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4" -EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" -EpollShim_jll = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -ExactPredicates = "429591f6-91af-11e9-00e2-59fbe8cec110" -ExceptionUnwrapping = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -Expat_jll = "2e619515-83b5-522b-bb60-26c02a35a201" -ExponentialUtilities = "d4d017d3-3776-5f7e-afef-a10c40355c18" -ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -Expronicon = "6b7a57c9-7cc1-4fdf-b7f5-e857abae3636" -Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910" -FFMPEG = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -FFMPEG_jll = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -FFTW_jll = "f5851436-0d7a-5f13-b9de-f02708fd171a" -FLINT_jll = "e134572f-a0d5-539d-bddf-3cad8db41a82" -FLTK_jll = "4fce6fc7-ba6a-5f4c-898f-77e99806d6f8" -FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" -FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" -FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838" -FastPower = "a4df4552-cc26-4903-aec0-212e50a0e84b" -FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -FilePaths = "8fc22ac5-c921-52a6-82fd-178b2807b824" -FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f" -FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" -FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" -FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" -Fontconfig_jll = "a3f928ae-7b40-5064-980b-68af3947d34b" -Format = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43" -FreeType2_jll = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -FreeTypeAbstraction = "663a7486-cb36-511b-a19d-713bb74d65c9" -FriBidi_jll = "559328eb-81f9-559d-9380-de523a88c83c" -FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" -FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" -Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -Future = "9fa8497b-333b-5362-9e8d-4d0656e87820" -GLFW_jll = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -GLU_jll = "bd17208b-e95e-5925-bf81-e2f59b3e5c61" -GMP_jll = "781609d7-10c4-51f6-84f2-b8444358ff6d" -GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" -GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55" -GPUToolbox = "096a3bc2-3ced-46d0-87f4-dd12716f4bfc" -GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -GR_jll = "d2c73de3-f751-5644-a686-071e5b155ba9" -GenericSchur = "c145ed77-6b09-5dd9-b285-bf645a82121e" -GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f" -GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f" Geodesy = "0ef565a4-170c-5f04-8de2-149903a85f3d" -GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" -Gettext_jll = "78b55507-aeef-58d4-861c-77aaff3498b1" -Giflib_jll = "59f7168a-df46-5410-90c8-f2779963d0ec" -Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -Git_jll = "f8c6e375-362e-5223-8a59-34ff63f689eb" -Glib_jll = "7746bdde-850d-59dc-9ae8-88ece973131d" -Gmsh = "705231aa-382f-11e9-3f0c-b7cb4346fdeb" -Graphics = "a2bd30eb-e257-5431-a919-1863eab51364" -Graphite2_jll = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" -Graphviz_jll = "3c863552-8265-54e4-a6dc-903eb78fde85" -GridLayoutBase = "3955a311-db13-416c-9275-1d80ed98e5e9" Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e" GridapDistributed = "f9701e48-63b3-45aa-9a63-9bc6c271f355" GridapGmsh = "3025c34a-b394-11e9-2a55-3fee550c04c8" GridapP4est = "c2c8e14b-f5fd-423d-9666-1dd9ad120af9" -Grisu = "42e2da0e-8278-4e71-bc24-59509adca0fe" -H5Zblosc = "c8ec2601-a99c-407f-b158-e79c03c2f5f7" HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -HDF5_jll = "0234f1f7-429e-5d53-9886-15a909be8d59" -HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" -HarfBuzz_jll = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -HashArrayMappedTries = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" -HostCPUFeatures = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -Hwloc_jll = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -HypergeometricFunctions = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -IOCapture = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -ImageAxes = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" -ImageBase = "c817782e-172a-44cc-b673-b171935fbb9e" -ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" -ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19" -ImageMetadata = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" -Imath_jll = "905a6f67-0a94-5f89-b386-d35d92009cd1" -IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959" Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b" -Inflate = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -InlineStrings = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -IntelOpenMP_jll = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" InternedStrings = "7d512f48-7fb1-5a58-b986-67e6dc259f01" -Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" -IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" -IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" -InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" -InvertedIndices = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6" -Isoband = "f1662d9f-8043-43de-a69a-05efc1cc6ff4" -IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" -IteratorInterfaceExtensions = "82899510-4779-5014-852e-03e436cf321d" -JLD = "4138dd39-2aa7-5051-a626-17a0bb65d9c8" -JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -JLFzf = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -Jansson_jll = "83cbd138-b029-500a-bd82-26ec0fbaa0df" -JpegTurbo = "b835a17e-a41a-41e7-81f0-2f016b05efe0" -JpegTurbo_jll = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -JuliaNVTXCallbacks_jll = "9c1d0b0a-7046-5b2e-a33f-ea22f176ac7e" -JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -KLU = "ef3ab10e-7fda-4108-b977-705223b18434" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -KernelDensity = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" -Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -LAME_jll = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -LERC_jll = "88015f11-f218-50d7-93a8-a6af411a945d" -LLVM = "929cbde3-209d-540e-8aea-75f648917ca0" -LLVMDowngrader_jll = "f52de702-fb25-5922-94ba-81dd59b07444" -LLVMExtra_jll = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -LLVMLoopInfo = "8b046642-f1f6-4319-8d3c-209ddc03c586" -LLVMOpenMP_jll = "1d63c593-3942-5779-bab2-d838dc0a180e" -LRUCache = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637" -LZO_jll = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -LayoutPointers = "10f19ff3-798f-405d-979b-55457f8fc047" -LazilyInitializedFields = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02" -LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -LazyModules = "8cdb02fc-e678-4876-92c5-9defec4f444e" -LeftChildRightSiblingTrees = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" -LevyArea = "2d8b4e74-eb68-11e8-0fb9-d5eb67b50637" -LibCURL = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -LibCURL_jll = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" -LibGit2_jll = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -LibSSH2_jll = "29816b5a-b9ab-546f-933c-edad1886dfa8" -Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -Libffi_jll = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -Libgcrypt_jll = "d4300ac3-e22c-5743-9152-c294e39db1e4" -Libglvnd_jll = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -Libgpg_error_jll = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -Libiconv_jll = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -Libmount_jll = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -Libtiff_jll = "89763e89-9b03-5906-acba-b20f662cd828" -Libuuid_jll = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d" -LightXML = "9c8b4983-aa76-5018-a973-4c85ecc9e179" -LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" -LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -LinearElasticity_jll = "18c40d15-f7cd-5a6d-bc92-87468d86c5db" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" -LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36" LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890" -LoweredCodeUtils = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -Lz4_jll = "5ced341a-0733-55b8-9ab6-a4889d929147" -METIS_jll = "d00139f3-1899-568f-a2f0-47f597d42d70" -MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" -MMG_jll = "86086c02-e288-5929-a127-40944b0018b7" -MPFR_jll = "3a97d323-0669-5f0c-9066-3539efd106a3" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" -MPICH_jll = "7cb0a576-ebde-5e09-9194-50597f1243b4" -MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" -MPItrampoline_jll = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -ManualMemory = "d125e4d3-2237-4719-b19c-fa641b8a4667" -MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" -MarchingCubes = "299715c1-40a9-479a-aaf9-4a633d36f717" -Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" -MarkdownAST = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" -MathTeXEngine = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" -MatrixFactorizations = "a3b82374-2e81-5b9e-98ce-41277c0e4c87" -MaybeInplace = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" -MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d" -MbedTLS_jll = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -Metal = "dde4c033-4e86-420c-a63e-0dd931031962" -Metis = "2679e427-3c69-5b7f-982b-ece356f1e94b" -MicrosoftMPI_jll = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" -Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -Mmap = "a63ad114-7e13-5084-954f-fe012c677804" -MosaicViews = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" -MozillaCACerts_jll = "14a3606d-f60d-562e-9121-12d972cd8159" -MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -NLSolversBase = "d41bc354-129a-5804-8e4c-c37616107c6c" -NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" -NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f" -NVTX_jll = "e98f9f5b-d649-5603-91fd-7774390e6439" -NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce" -Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" -NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9" -NetCDF_jll = "7243133f-43d8-5620-bbf4-c2c921802cf3" -Netpbm = "f09324ee-3d7c-5217-9330-fc30815ba969" -NetworkOptions = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -NonlinearSolveBase = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -NonlinearSolveFirstOrder = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" -NonlinearSolveQuasiNewton = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" -NonlinearSolveSpectralMethods = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" -OCCT_jll = "baad4e97-8daa-5946-aac2-2edac59d34e1" -ObjectiveC = "e86c9b32-1129-44ac-8ea0-90d5bb39ded9" -Observables = "510215fc-4207-5dde-b226-833fc4488ee2" -OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -Ogg_jll = "e7412a2a-1a6e-54c0-be00-318e2571c051" -OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2" -OpenBLAS_jll = "4536629a-c528-5b80-bd46-f80d51c5b363" -OpenEXR = "52e1d378-f018-4a11-a4be-720524705ac7" -OpenEXR_jll = "18a262bb-aa17-5467-a713-aee519bc75cb" -OpenLibm_jll = "05823500-19ac-5b8b-9628-191a04bc5112" -OpenMPI_jll = "fe0851c0-eecd-5654-98d4-656369965a5c" -OpenSSL = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -OpenSSL_jll = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -OpenSpecFun_jll = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -Optim = "429524aa-4258-5aef-a3af-852621145aeb" -Opus_jll = "91d4177d-7536-5919-b921-800302f37372" -OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a" -OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8" -OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" -OrdinaryDiffEqDifferentiation = "4302a76b-040a-498a-8c04-15b101fed76b" -OrdinaryDiffEqExplicitRK = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" -OrdinaryDiffEqExponentialRK = "e0540318-69ee-4070-8777-9e2de6de23de" -OrdinaryDiffEqExtrapolation = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" -OrdinaryDiffEqFIRK = "5960d6e9-dd7a-4743-88e7-cf307b64f125" -OrdinaryDiffEqFeagin = "101fe9f7-ebb6-4678-b671-3a81e7194747" -OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" -OrdinaryDiffEqHighOrderRK = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" -OrdinaryDiffEqIMEXMultistep = "9f002381-b378-40b7-97a6-27a27c83f129" -OrdinaryDiffEqLinear = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" -OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" -OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d" -OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" -OrdinaryDiffEqNordsieck = "c9986a66-5c92-4813-8696-a7ec84c806c8" -OrdinaryDiffEqPDIRK = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" -OrdinaryDiffEqPRK = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" -OrdinaryDiffEqQPRK = "04162be5-8125-4266-98ed-640baecc6514" -OrdinaryDiffEqRKN = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" -OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" -OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" -OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388" -OrdinaryDiffEqStabilizedIRK = "e3e12d00-db14-5390-b879-ac3dd2ef6296" -OrdinaryDiffEqStabilizedRK = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" -OrdinaryDiffEqSymplecticRK = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" -OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" -OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2" -P4est_jll = "6b5a15aa-cf52-5330-8376-5e5d90283449" P4est_wrapper = "3743d7c0-8adf-11ea-380b-7d33b0ecc1da" -PCRE2_jll = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" -PNGFiles = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" -PProf = "e4faabce-9ead-11e9-39d9-4379958e3056" -PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930" -Packing = "19eb6ba3-879d-56ad-ad62-d5c202156566" -PaddedViews = "5432bcbf-9aad-5242-b902-cca2824c8663" -Pango_jll = "36c8627f-9965-5494-a995-c6b170f724f3" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" -Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" -Pipe = "b98c9c47-44ae-5843-9183-064241ee97a0" -Pixman_jll = "30392449-352a-5448-841d-b1acce4e97dc" -Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -PkgVersion = "eebad327-c553-4316-9ea0-9fa01ccd7688" -PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043" -PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5" -Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -PoissonRandom = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" -PolyesterWeave = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -PolygonOps = "647866c9-e3ac-4575-94e7-e3d426903924" -PolynomialBases = "c74db56a-226d-5e98-8bb0-a6049094aeea" Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" -PositiveFactorizations = "85a6dd25-e78a-55b7-8502-1745935b8125" -PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -Preferences = "21216c6a-2e73-6563-6e65-726566657250" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" -ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" -ProtoBuf = "3349acd9-ac6a-5e09-bcdb-63829b23a429" -PtrArrays = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -QOI = "4b34888f-f399-49d4-9bb3-47ed5cae4e65" -Qt6Base_jll = "c0090381-4147-56d7-9ebc-da0b1113ec56" -QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Quadmath = "be4d8f0f-7fa4-5f49-b795-2f01399ab2dd" -REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" RRTMGP = "a01a1ee8-cea4-48fc-987c-fc7878d79da1" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -Random123 = "74087812-796a-5b5d-8853-05524746bad3" -RandomExtensions = "fb686558-2515-59ef-acaa-46db3789a887" -RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143" -RangeArrays = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" -Ratios = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" -RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c" -RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" -RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -Reexport = "189a3867-3050-52da-a836-e630ba90ab69" -RegistryInstances = "2792f1a3-b283-48e8-9a74-f99dce5104f3" -RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00" -Requires = "ae029012-a4dd-5104-9daa-d747884805df" -ResettableStacks = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" -Rmath = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -Rmath_jll = "f50d1b31-88e8-58de-be2c-1cc44531875f" -RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74" -RootedTrees = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c" -Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" -RoundingEmulator = "5eaf0fd0-dfba-4ccb-bf02-d820a40db705" -RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -SCOTCH_jll = "a8d0f55d-b80e-548d-aff6-1a04c175f0f9" -SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" -SIMD = "fdea26ae-647d-5447-a871-4b548cad5224" -SIMDTypes = "94e857df-77ce-4151-89e5-788b33177be4" -SLEEFPirates = "476501e8-09a2-5ece-8869-fb82de89a1fa" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -SciMLJacobianOperators = "19f34311-ddf3-4b8b-af20-060888a46c0e" -SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226" -ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63" -Scratch = "6c6a2e73-6563-6170-7368-637461726353" -SentinelArrays = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46" -ShaderAbstractions = "65257c39-d410-5151-9873-9b3e5be5013e" -SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383" -Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" -SignedDistanceFields = "73760f76-fbc4-59ce-8f25-708e95d2df96" -SimpleBufferStream = "777ac1f9-54b0-4bf8-805c-2214025038e7" -SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7" -SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a" -Sixel = "45858cf5-a6b0-47a3-bbea-62219f50df47" SnoopCompile = "aa65fe97-06da-5843-b5b1-d5d13cad87d2" -SnoopCompileCore = "e2b509da-e806-4183-be48-004708413034" -Sockets = "6462fe0b-24de-5631-8697-dd941f90decc" -SortingAlgorithms = "a2af1166-a08f-5f64-846c-94a0d3cef48c" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" -SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" -Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" -StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" -StackViews = "cae243ae-269e-4f55-b966-ac2d0dc13c15" -Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" -StrideArraysCore = "7792a7ef-975c-4747-a70f-980b88e8d1da" -StringEncodings = "69024149-9ee7-55f6-a4c4-859efe599b68" -StringManipulation = "892a3eda-7b42-436c-8928-eab12a02cf0e" -StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" -SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" -Sundials_jll = "fb77eaff-e24c-56d4-86b1-d163f2edb164" -SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -TableTraits = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -TensorCore = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -TestingUtilities = "40452611-1178-4e48-bdfc-3af4bebad9c9" -TextWrap = "b718987f-49a8-5099-9789-dcd902bef87d" Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -ThreadingUtilities = "8290d209-cae3-49c0-8002-c8c24d57dab5" -TiffImages = "731e570b-9d59-4bfa-96dc-6df516fadf69" TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -TriangularSolve = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -TriplotBase = "981d1d27-644d-49a2-9326-4793e63143c3" -TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77" -URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1" UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" -UnsafeAtomics = "013be700-e6cd-48c3-b4a1-df204f14c38f" -Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" -VTKBase = "4004b06d-e244-455f-a6ce-a5f9919cc534" -VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -VertexSafeGraphs = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -Vulkan_Loader_jll = "a44049a8-05dd-5a78-86c9-5fde0876e88c" -Wayland_jll = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -Wayland_protocols_jll = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -WebP = "e3aaa7dc-3e4b-44e0-be63-ffb868ccd7c1" -WoodburyMatrices = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192" -XML2_jll = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -XSLT_jll = "aed1982a-8fda-507f-9586-7b0439959a61" -XZ_jll = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -Xorg_libICE_jll = "f67eecfb-183a-506d-b269-f58e52b52d7c" -Xorg_libSM_jll = "c834827a-8449-5923-a945-d239c165b7dd" -Xorg_libX11_jll = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -Xorg_libXau_jll = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -Xorg_libXcursor_jll = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -Xorg_libXdmcp_jll = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -Xorg_libXext_jll = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -Xorg_libXfixes_jll = "d091e8ba-531a-589c-9de9-94069b037ed8" -Xorg_libXft_jll = "2c808117-e144-5220-80d1-69d4eaa9352c" -Xorg_libXi_jll = "a51aa0fd-4e3c-5386-b890-e753decda492" -Xorg_libXinerama_jll = "d1454406-59df-5ea1-beac-c340f2130bc3" -Xorg_libXrandr_jll = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -Xorg_libXrender_jll = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -Xorg_libpthread_stubs_jll = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -Xorg_libxcb_jll = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -Xorg_libxkbfile_jll = "cc61e674-0454-545c-8b26-ed2c68acab7a" -Xorg_xcb_util_cursor_jll = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -Xorg_xcb_util_image_jll = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -Xorg_xcb_util_jll = "2def613f-5ad1-5310-b15b-b15d46f528f5" -Xorg_xcb_util_keysyms_jll = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -Xorg_xcb_util_renderutil_jll = "0d47668e-0667-5a69-a72c-f761630bfb7e" -Xorg_xcb_util_wm_jll = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -Xorg_xkbcomp_jll = "35661453-b289-5fab-8a00-3d9160c6a3a4" -Xorg_xkeyboard_config_jll = "33bec58e-1273-512f-9401-5d533626f822" -Xorg_xtrans_jll = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -Zlib_jll = "83775a58-1f1d-513f-b197-d71354ab007a" -Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4" -demumble_jll = "1e29f10c-031c-5a83-9565-69cddfc27673" -eudev_jll = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -fzf_jll = "214eeab7-80f7-51ab-84ad-2988db7cef09" -gmsh_jll = "630162c2-fc9b-58b3-9910-8442a8a132e6" -gperf_jll = "1a1c6b14-54f6-533d-8383-74cd7377aa70" -isoband_jll = "9a68df92-36a6-505f-a73e-abb412b6bfb4" -libaom_jll = "a4ae2306-e953-59d6-aa16-d00cac43593b" -libass_jll = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -libblastrampoline_jll = "8e850b90-86db-534c-a0d3-1478176c7d93" -libdecor_jll = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" -libevdev_jll = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -libfdk_aac_jll = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -libinput_jll = "36db933b-70db-51c0-b978-0f229ee0e533" -libpng_jll = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -libsixel_jll = "075b6546-f08a-558a-be8f-8157d0f608a5" -libvorbis_jll = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -libwebp_jll = "c5f90fcd-3b7e-5836-afba-fc50a0988cb2" -mtdev_jll = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -nghttp2_jll = "8e850ede-7688-5339-a07c-302acd2aaf8d" -oneTBB_jll = "1317d2d5-d96f-522e-a858-c73665f53c3e" -p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -pprof_jll = "cf2c5f97-e748-59fa-a03f-dda3c62118cb" -x264_jll = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -x265_jll = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -xkbcommon_jll = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" [compat] -CSV = "0.10.15" -Crayons = "=4.1.1" -Gridap = "=0.18.12" -GridapDistributed = "=0.4.7" -GridapGmsh = "=0.7.2" -GridapP4est = "=0.3.11" -MPI = "=0.20.22" -MPIPreferences = "=0.1.11" -PackageCompiler = "=2.2.1" -PrettyTables = "=2.4.0" -Roots = "2.2.10" -Thermodynamics = "=0.12.7" -UnicodePlots = "=3.7.2" +MPI = "0.20.22" +Thermodynamics = "0.12.7" +PrettyTables = "2.4.0" +Crayons = "4.1.1" +UnicodePlots = "3.7.2" +Gridap = "0.18.12" +GridapDistributed = "0.4.7" +GridapGmsh = "0.7.2" +GridapP4est = "0.3.11" diff --git a/problems/AdvDiff/2D_Wave_Train/user_source.jl b/problems/AdvDiff/2D_Wave_Train/user_source.jl index 2d1f190a2..a2c1e476a 100644 --- a/problems/AdvDiff/2D_Wave_Train/user_source.jl +++ b/problems/AdvDiff/2D_Wave_Train/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/AdvDiff/3d_double_periodic/initialize.jl b/problems/AdvDiff/3d_double_periodic/initialize.jl index 2812d090d..55bf59afb 100644 --- a/problems/AdvDiff/3d_double_periodic/initialize.jl +++ b/problems/AdvDiff/3d_double_periodic/initialize.jl @@ -16,13 +16,13 @@ function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/AdvDiff/3d_double_periodic/user_flux.jl b/problems/AdvDiff/3d_double_periodic/user_flux.jl index 8785d6a27..8d767c2e1 100644 --- a/problems/AdvDiff/3d_double_periodic/user_flux.jl +++ b/problems/AdvDiff/3d_double_periodic/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.2*q[1] @@ -21,7 +21,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] diff --git a/problems/AdvDiff/3d_double_periodic/user_source.jl b/problems/AdvDiff/3d_double_periodic/user_source.jl index c5fa53ae8..77f8237a6 100644 --- a/problems/AdvDiff/3d_double_periodic/user_source.jl +++ b/problems/AdvDiff/3d_double_periodic/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -22,7 +22,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/AdvDiff/3d_periodic/initialize.jl b/problems/AdvDiff/3d_periodic/initialize.jl index bd78b1926..5542f0ccf 100644 --- a/problems/AdvDiff/3d_periodic/initialize.jl +++ b/problems/AdvDiff/3d_periodic/initialize.jl @@ -16,13 +16,13 @@ function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/AdvDiff/3d_periodic/user_flux.jl b/problems/AdvDiff/3d_periodic/user_flux.jl index 8785d6a27..8d767c2e1 100644 --- a/problems/AdvDiff/3d_periodic/user_flux.jl +++ b/problems/AdvDiff/3d_periodic/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.2*q[1] @@ -21,7 +21,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] diff --git a/problems/AdvDiff/3d_periodic/user_source.jl b/problems/AdvDiff/3d_periodic/user_source.jl index 78fc12a3c..6bb35f989 100644 --- a/problems/AdvDiff/3d_periodic/user_source.jl +++ b/problems/AdvDiff/3d_periodic/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,karg...) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -22,7 +22,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1, karg...) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/AdvDiff/Simple_Wave/user_source.jl b/problems/AdvDiff/Simple_Wave/user_source.jl index dcd76766e..68b111698 100644 --- a/problems/AdvDiff/Simple_Wave/user_source.jl +++ b/problems/AdvDiff/Simple_Wave/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl b/problems/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl index e00611bfa..d2e3dce1c 100644 --- a/problems/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl +++ b/problems/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/AdvDiff/case1/initialize.jl b/problems/AdvDiff/case1/initialize.jl index 4c97371ed..312779e7a 100644 --- a/problems/AdvDiff/case1/initialize.jl +++ b/problems/AdvDiff/case1/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- - σ = Float64(64.0) + σ = TFloat(64.0) for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/problems/AdvDiff/fd1d/initialize.jl b/problems/AdvDiff/fd1d/initialize.jl index bedc0eb3b..85cbe06e2 100644 --- a/problems/AdvDiff/fd1d/initialize.jl +++ b/problems/AdvDiff/fd1d/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat; neqs=length(qvars)) #--------------------------------------------------------------------------------- - σ = Float64(64.0) + σ = TFloat(64.0) for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/problems/CompEuler/2d/initialize.jl b/problems/CompEuler/2d/initialize.jl index 518bf3d11..9f3230080 100644 --- a/problems/CompEuler/2d/initialize.jl +++ b/problems/CompEuler/2d/initialize.jl @@ -6,7 +6,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP """ @info " Initialize fields for 2D CompEuler with θ equation ........................ " - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, TFloat; neqs=4) diff --git a/problems/CompEuler/2d/user_flux.jl b/problems/CompEuler/2d/user_flux.jl index 9f8d1b0d9..3081ab2d1 100644 --- a/problems/CompEuler/2d/user_flux.jl +++ b/problems/CompEuler/2d/user_flux.jl @@ -1,6 +1,6 @@ AAfunction user_flux!(F, G, SD::NSD_2D, q, mesh::St_mesh; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] diff --git a/problems/CompEuler/2d/user_source.jl b/problems/CompEuler/2d/user_source.jl index 738a522da..9e77fe086 100644 --- a/problems/CompEuler/2d/user_source.jl +++ b/problems/CompEuler/2d/user_source.jl @@ -1,6 +1,6 @@ function user_source!(S, q, npoin::Int64; neqs=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -16,8 +16,8 @@ end function user_source(q::Array, npoin::Int64; neqs=1) - PhysConst = PhysicalConst{Float64}() - S = zeros(Float64, neqs) + PhysConst = PhysicalConst{TFloat}() + S = zeros(TFloat, neqs) # # S(q(x)) = -ρg diff --git a/problems/CompEuler/2d_squall_line_experiment/initialize.jl b/problems/CompEuler/2d_squall_line_experiment/initialize.jl index 92cb01882..560559fb5 100644 --- a/problems/CompEuler/2d_squall_line_experiment/initialize.jl +++ b/problems/CompEuler/2d_squall_line_experiment/initialize.jl @@ -16,13 +16,13 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/CompEuler/2d_squall_line_experiment/user_flux.jl b/problems/CompEuler/2d_squall_line_experiment/user_flux.jl index 84bf97c5e..0182a6e9a 100644 --- a/problems/CompEuler/2d_squall_line_experiment/user_flux.jl +++ b/problems/CompEuler/2d_squall_line_experiment/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -42,7 +42,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] diff --git a/problems/CompEuler/2d_squall_line_experiment/user_primitives.jl b/problems/CompEuler/2d_squall_line_experiment/user_primitives.jl index 79882fc6b..c107bc777 100644 --- a/problems/CompEuler/2d_squall_line_experiment/user_primitives.jl +++ b/problems/CompEuler/2d_squall_line_experiment/user_primitives.jl @@ -1,5 +1,5 @@ function user_primitives!(u, qe, uprimitive, ::TOTAL) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() uprimitive[1] = u[1] uprimitive[2] = u[2]/u[1] uprimitive[3] = u[3]/u[1] diff --git a/problems/CompEuler/2d_squall_line_experiment/user_source.jl b/problems/CompEuler/2d_squall_line_experiment/user_source.jl index a903c5724..2df988f72 100644 --- a/problems/CompEuler/2d_squall_line_experiment/user_source.jl +++ b/problems/CompEuler/2d_squall_line_experiment/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, z=0.0, ymin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -55,7 +55,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, z, zmin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/3d/user_flux.jl b/problems/CompEuler/3d/user_flux.jl index 3c7d052ad..d0d374b3a 100644 --- a/problems/CompEuler/3d/user_flux.jl +++ b/problems/CompEuler/3d/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -44,7 +44,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] diff --git a/problems/CompEuler/3d/user_source.jl b/problems/CompEuler/3d/user_source.jl index cd65812a0..bcd978223 100644 --- a/problems/CompEuler/3d/user_source.jl +++ b/problems/CompEuler/3d/user_source.jl @@ -11,7 +11,7 @@ function user_source!(S, ymin=0.0,ymax=0.0, zmin=0.0,zmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -39,7 +39,7 @@ function user_source!(S, ymin=0.0, ymax=0.0, zmin=0.0, zmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/3d_amr/user_flux.jl b/problems/CompEuler/3d_amr/user_flux.jl index 3c7d052ad..d0d374b3a 100644 --- a/problems/CompEuler/3d_amr/user_flux.jl +++ b/problems/CompEuler/3d_amr/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -44,7 +44,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] diff --git a/problems/CompEuler/3d_bomex/user_flux.jl b/problems/CompEuler/3d_bomex/user_flux.jl index 9eeecdece..3969516fe 100644 --- a/problems/CompEuler/3d_bomex/user_flux.jl +++ b/problems/CompEuler/3d_bomex/user_flux.jl @@ -5,7 +5,7 @@ function user_flux!(F, G, H, ::CL, ::TOTAL; neqs=4, ip=1, x=0.0, y=0.0, z=0.0) - # PhysConst = PhysicalConst{Float64}() + # PhysConst = PhysicalConst{TFloat}() T = eltype(q) ρ = q[1] ρu = q[2] diff --git a/problems/CompEuler/3d_bomex/user_source.jl b/problems/CompEuler/3d_bomex/user_source.jl index a1ddad41d..88ae01724 100644 --- a/problems/CompEuler/3d_bomex/user_source.jl +++ b/problems/CompEuler/3d_bomex/user_source.jl @@ -11,7 +11,7 @@ function user_source!(S, ymin=0.0,ymax=0.0, zmin=0.0,zmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # T = eltype(q) # # S(q(x)) = -ρg @@ -60,7 +60,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/HSmount/initialize.jl b/problems/CompEuler/HSmount/initialize.jl index 1ea524703..eae2a70c9 100644 --- a/problems/CompEuler/HSmount/initialize.jl +++ b/problems/CompEuler/HSmount/initialize.jl @@ -7,7 +7,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP @info " Initialize fields for 2D CompEuler with θ equation ........................ " - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() qvars = ("dρ", "dρu", "dρv", "dρθ") q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat; neqs=length(qvars)) diff --git a/problems/CompEuler/HSmount/user_source.jl b/problems/CompEuler/HSmount/user_source.jl index 26b67bd74..5c4f0cf74 100644 --- a/problems/CompEuler/HSmount/user_source.jl +++ b/problems/CompEuler/HSmount/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/HSmount_Lag/initialize.jl b/problems/CompEuler/HSmount_Lag/initialize.jl index c02d6f5c6..f22de8044 100644 --- a/problems/CompEuler/HSmount_Lag/initialize.jl +++ b/problems/CompEuler/HSmount_Lag/initialize.jl @@ -13,7 +13,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 250.0 #K θ0 = 250.0 T0 = θ0 diff --git a/problems/CompEuler/HSmount_Lag/user_source.jl b/problems/CompEuler/HSmount_Lag/user_source.jl index 92e12e666..f890c0b3c 100644 --- a/problems/CompEuler/HSmount_Lag/user_source.jl +++ b/problems/CompEuler/HSmount_Lag/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/HSmount_standard/initialize.jl b/problems/CompEuler/HSmount_standard/initialize.jl index 863fc6981..e6a959ded 100644 --- a/problems/CompEuler/HSmount_standard/initialize.jl +++ b/problems/CompEuler/HSmount_standard/initialize.jl @@ -13,7 +13,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 250.0 #K θ0 = 250.0 T0 = θ0 diff --git a/problems/CompEuler/HSmount_standard/user_source.jl b/problems/CompEuler/HSmount_standard/user_source.jl index 5f7409c81..7a3dc89b6 100644 --- a/problems/CompEuler/HSmount_standard/user_source.jl +++ b/problems/CompEuler/HSmount_standard/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/LESWM/user_flux.jl b/problems/CompEuler/LESWM/user_flux.jl index 9b1d358bb..063ccd158 100644 --- a/problems/CompEuler/LESWM/user_flux.jl +++ b/problems/CompEuler/LESWM/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() T = eltype(q) ρ = q[1] diff --git a/problems/CompEuler/NHSmount_Lag/initialize.jl b/problems/CompEuler/NHSmount_Lag/initialize.jl index 52e0ea4ca..f9fd63fd7 100644 --- a/problems/CompEuler/NHSmount_Lag/initialize.jl +++ b/problems/CompEuler/NHSmount_Lag/initialize.jl @@ -11,7 +11,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP qvars = ("dρ", "dρu", "dρv", "dρθ") q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 280.0 #K θ0 = 280.0 T0 = θ0 diff --git a/problems/CompEuler/NHSmount_Lag/user_flux.jl b/problems/CompEuler/NHSmount_Lag/user_flux.jl index 37f0de8e0..0e61942aa 100644 --- a/problems/CompEuler/NHSmount_Lag/user_flux.jl +++ b/problems/CompEuler/NHSmount_Lag/user_flux.jl @@ -3,7 +3,7 @@ function user_flux!(F, G, SD::NSD_2D, qe, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -12,7 +12,7 @@ function user_flux!(F, G, SD::NSD_2D, θ = ρθ/ρ u = ρu/ρ v = ρv/ρ - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) @@ -34,7 +34,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] @@ -44,7 +44,7 @@ function user_flux!(F, G, SD::NSD_2D, u = ρu/ρ v = ρv/ρ - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) @@ -63,11 +63,11 @@ end function user_flux!(F, G, SD::NSD_2D, q, - pref::Float64, + pref::TFloat, mesh::St_mesh, ::NCL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/NHSmount_Lag/user_source.jl b/problems/CompEuler/NHSmount_Lag/user_source.jl index 1b9775c20..80b8a7641 100644 --- a/problems/CompEuler/NHSmount_Lag/user_source.jl +++ b/problems/CompEuler/NHSmount_Lag/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/NHSmount_standard/initialize.jl b/problems/CompEuler/NHSmount_standard/initialize.jl index 52e0ea4ca..f9fd63fd7 100644 --- a/problems/CompEuler/NHSmount_standard/initialize.jl +++ b/problems/CompEuler/NHSmount_standard/initialize.jl @@ -11,7 +11,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP qvars = ("dρ", "dρu", "dρv", "dρθ") q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 280.0 #K θ0 = 280.0 T0 = θ0 diff --git a/problems/CompEuler/NHSmount_standard/user_flux.jl b/problems/CompEuler/NHSmount_standard/user_flux.jl index 37f0de8e0..0e61942aa 100644 --- a/problems/CompEuler/NHSmount_standard/user_flux.jl +++ b/problems/CompEuler/NHSmount_standard/user_flux.jl @@ -3,7 +3,7 @@ function user_flux!(F, G, SD::NSD_2D, qe, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -12,7 +12,7 @@ function user_flux!(F, G, SD::NSD_2D, θ = ρθ/ρ u = ρu/ρ v = ρv/ρ - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) @@ -34,7 +34,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] @@ -44,7 +44,7 @@ function user_flux!(F, G, SD::NSD_2D, u = ρu/ρ v = ρv/ρ - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) @@ -63,11 +63,11 @@ end function user_flux!(F, G, SD::NSD_2D, q, - pref::Float64, + pref::TFloat, mesh::St_mesh, ::NCL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/NHSmount_standard/user_source.jl b/problems/CompEuler/NHSmount_standard/user_source.jl index b06f5a5d1..7d061f986 100644 --- a/problems/CompEuler/NHSmount_standard/user_source.jl +++ b/problems/CompEuler/NHSmount_standard/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/NLHSmount/initialize.jl b/problems/CompEuler/NLHSmount/initialize.jl index b6bb49383..653dd4ba1 100644 --- a/problems/CompEuler/NLHSmount/initialize.jl +++ b/problems/CompEuler/NLHSmount/initialize.jl @@ -7,7 +7,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP @info " Initialize fields for 2D CompEuler with θ equation ........................ " - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() qvars = ("dρ", "dρu", "dρv", "dρθ") q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat; neqs=length(qvars)) diff --git a/problems/CompEuler/NLHSmount/user_source.jl b/problems/CompEuler/NLHSmount/user_source.jl index 1f397bb39..9a39758ef 100644 --- a/problems/CompEuler/NLHSmount/user_source.jl +++ b/problems/CompEuler/NLHSmount/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/Rayleigh_Benard/initialize.jl b/problems/CompEuler/Rayleigh_Benard/initialize.jl index 00310b125..cb037cbc3 100644 --- a/problems/CompEuler/Rayleigh_Benard/initialize.jl +++ b/problems/CompEuler/Rayleigh_Benard/initialize.jl @@ -21,13 +21,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars), qoutvars=qoutvars) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars), qoutvars=qoutvars) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] ρθ = q.qn[ip,4] diff --git a/problems/CompEuler/Rayleigh_Benard/user_flux.jl b/problems/CompEuler/Rayleigh_Benard/user_flux.jl index b61e6a77b..46862d6aa 100644 --- a/problems/CompEuler/Rayleigh_Benard/user_flux.jl +++ b/problems/CompEuler/Rayleigh_Benard/user_flux.jl @@ -1,7 +1,7 @@ function user_flux!(F, G, SD::NSD_2D, q, qe, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -26,7 +26,7 @@ end function user_flux!(F, G, SD::NSD_2D, q, qe, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -57,7 +57,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/Rayleigh_Benard/user_source.jl b/problems/CompEuler/Rayleigh_Benard/user_source.jl index 361ca3ef6..9ad62d74e 100644 --- a/problems/CompEuler/Rayleigh_Benard/user_source.jl +++ b/problems/CompEuler/Rayleigh_Benard/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -50,7 +50,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/Rayleigh_Benard_moist/initialize.jl b/problems/CompEuler/Rayleigh_Benard_moist/initialize.jl index 62c6c1d83..634f98a19 100644 --- a/problems/CompEuler/Rayleigh_Benard_moist/initialize.jl +++ b/problems/CompEuler/Rayleigh_Benard_moist/initialize.jl @@ -21,13 +21,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars), qoutvars=qoutvars) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars), qoutvars=qoutvars) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] ρθ = q.qn[ip,4] diff --git a/problems/CompEuler/Rayleigh_Benard_moist/user_flux.jl b/problems/CompEuler/Rayleigh_Benard_moist/user_flux.jl index 7e7a4aa2b..7677fc3c0 100644 --- a/problems/CompEuler/Rayleigh_Benard_moist/user_flux.jl +++ b/problems/CompEuler/Rayleigh_Benard_moist/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -42,7 +42,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] diff --git a/problems/CompEuler/Rayleigh_Benard_moist/user_primitives.jl b/problems/CompEuler/Rayleigh_Benard_moist/user_primitives.jl index 75c4d4b40..e0969af9a 100644 --- a/problems/CompEuler/Rayleigh_Benard_moist/user_primitives.jl +++ b/problems/CompEuler/Rayleigh_Benard_moist/user_primitives.jl @@ -1,5 +1,5 @@ function user_primitives!(u, qe, uprimitive, ::TOTAL) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() uprimitive[1] = u[1] uprimitive[2] = u[2]/u[1] uprimitive[3] = u[3]/u[1] diff --git a/problems/CompEuler/Rayleigh_Benard_moist/user_source.jl b/problems/CompEuler/Rayleigh_Benard_moist/user_source.jl index 80e5479a8..5df3136ba 100644 --- a/problems/CompEuler/Rayleigh_Benard_moist/user_source.jl +++ b/problems/CompEuler/Rayleigh_Benard_moist/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -67,7 +67,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/ScharMount/initialize.jl b/problems/CompEuler/ScharMount/initialize.jl index aa25a0b6d..e8ab4d0cd 100644 --- a/problems/CompEuler/ScharMount/initialize.jl +++ b/problems/CompEuler/ScharMount/initialize.jl @@ -12,7 +12,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 280.0 #K θ0 = 280.0 T0 = θ0 diff --git a/problems/CompEuler/ScharMount/user_source.jl b/problems/CompEuler/ScharMount/user_source.jl index fe7304eda..6c1f29da1 100644 --- a/problems/CompEuler/ScharMount/user_source.jl +++ b/problems/CompEuler/ScharMount/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/ScharMount_Lag/initialize.jl b/problems/CompEuler/ScharMount_Lag/initialize.jl index 6b6c14175..24270c291 100644 --- a/problems/CompEuler/ScharMount_Lag/initialize.jl +++ b/problems/CompEuler/ScharMount_Lag/initialize.jl @@ -12,7 +12,7 @@ function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTP q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() θref = 280.0 #K θ0 = 280.0 T0 = θ0 diff --git a/problems/CompEuler/ScharMount_Lag/user_source.jl b/problems/CompEuler/ScharMount_Lag/user_source.jl index 1b2bbafad..c4f54bfff 100644 --- a/problems/CompEuler/ScharMount_Lag/user_source.jl +++ b/problems/CompEuler/ScharMount_Lag/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -65,7 +65,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/giga_les/initialize.jl b/problems/CompEuler/giga_les/initialize.jl index 8f03aec77..26bdccdd0 100644 --- a/problems/CompEuler/giga_les/initialize.jl +++ b/problems/CompEuler/giga_les/initialize.jl @@ -17,13 +17,13 @@ function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/CompEuler/giga_les/user_flux.jl b/problems/CompEuler/giga_les/user_flux.jl index c84c98a77..285145c69 100644 --- a/problems/CompEuler/giga_les/user_flux.jl +++ b/problems/CompEuler/giga_les/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -53,7 +53,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] diff --git a/problems/CompEuler/giga_les/user_primitives.jl b/problems/CompEuler/giga_les/user_primitives.jl index f3433c426..1c326f4aa 100644 --- a/problems/CompEuler/giga_les/user_primitives.jl +++ b/problems/CompEuler/giga_les/user_primitives.jl @@ -1,5 +1,5 @@ function user_primitives!(u, qe, uprimitive, ::TOTAL) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() uprimitive[1] = u[1] uprimitive[2] = u[2]/u[1] uprimitive[3] = u[3]/u[1] diff --git a/problems/CompEuler/giga_les/user_source.jl b/problems/CompEuler/giga_les/user_source.jl index a8b0fe8c2..08be6853a 100644 --- a/problems/CompEuler/giga_les/user_source.jl +++ b/problems/CompEuler/giga_les/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, z=0.0, ymin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -57,7 +57,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, z, zmin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/squall_line_2D/initialize.jl b/problems/CompEuler/squall_line_2D/initialize.jl index 7cc3bb0cb..ce0549031 100644 --- a/problems/CompEuler/squall_line_2D/initialize.jl +++ b/problems/CompEuler/squall_line_2D/initialize.jl @@ -17,13 +17,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/CompEuler/squall_line_2D/user_flux.jl b/problems/CompEuler/squall_line_2D/user_flux.jl index 3ea8264eb..c53f0fb2d 100644 --- a/problems/CompEuler/squall_line_2D/user_flux.jl +++ b/problems/CompEuler/squall_line_2D/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -41,7 +41,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] diff --git a/problems/CompEuler/squall_line_2D/user_primitives.jl b/problems/CompEuler/squall_line_2D/user_primitives.jl index 94a9072f3..2e79a85ee 100644 --- a/problems/CompEuler/squall_line_2D/user_primitives.jl +++ b/problems/CompEuler/squall_line_2D/user_primitives.jl @@ -1,5 +1,5 @@ function user_primitives!(u, qe, uprimitive, ::TOTAL) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() uprimitive[1] = u[1] uprimitive[2] = u[2]/u[1] uprimitive[3] = u[3]/u[1] diff --git a/problems/CompEuler/squall_line_experiment/initialize.jl b/problems/CompEuler/squall_line_experiment/initialize.jl index db7a19c05..61f7e9225 100644 --- a/problems/CompEuler/squall_line_experiment/initialize.jl +++ b/problems/CompEuler/squall_line_experiment/initialize.jl @@ -17,13 +17,13 @@ function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] diff --git a/problems/CompEuler/squall_line_experiment/user_flux.jl b/problems/CompEuler/squall_line_experiment/user_flux.jl index c84c98a77..285145c69 100644 --- a/problems/CompEuler/squall_line_experiment/user_flux.jl +++ b/problems/CompEuler/squall_line_experiment/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -53,7 +53,7 @@ function user_flux!(F, G, H, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] + qe[2] diff --git a/problems/CompEuler/squall_line_experiment/user_primitives.jl b/problems/CompEuler/squall_line_experiment/user_primitives.jl index 41a30f926..7e66c6286 100644 --- a/problems/CompEuler/squall_line_experiment/user_primitives.jl +++ b/problems/CompEuler/squall_line_experiment/user_primitives.jl @@ -1,5 +1,5 @@ function user_primitives!(u, qe, uprimitive, ::TOTAL) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() uprimitive[1] = u[1] uprimitive[2] = u[2]/u[1] uprimitive[3] = u[3]/u[1] diff --git a/problems/CompEuler/squall_line_experiment/user_source.jl b/problems/CompEuler/squall_line_experiment/user_source.jl index cfba2ce3f..e91b5ad16 100644 --- a/problems/CompEuler/squall_line_experiment/user_source.jl +++ b/problems/CompEuler/squall_line_experiment/user_source.jl @@ -1,7 +1,7 @@ function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, z=0.0, ymin=0.0, zmin =0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() #-------------- # S(q(x)) = -ρg @@ -58,7 +58,7 @@ end function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, z, zmin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/theta/user_flux.jl b/problems/CompEuler/theta/user_flux.jl index b61e6a77b..46862d6aa 100644 --- a/problems/CompEuler/theta/user_flux.jl +++ b/problems/CompEuler/theta/user_flux.jl @@ -1,7 +1,7 @@ function user_flux!(F, G, SD::NSD_2D, q, qe, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -26,7 +26,7 @@ end function user_flux!(F, G, SD::NSD_2D, q, qe, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -57,7 +57,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/theta/user_source.jl b/problems/CompEuler/theta/user_source.jl index 361ca3ef6..9ad62d74e 100644 --- a/problems/CompEuler/theta/user_source.jl +++ b/problems/CompEuler/theta/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -50,7 +50,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/thetaHole/initialize.jl b/problems/CompEuler/thetaHole/initialize.jl index 84511bc6c..0de1afa49 100644 --- a/problems/CompEuler/thetaHole/initialize.jl +++ b/problems/CompEuler/thetaHole/initialize.jl @@ -16,13 +16,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] ρθ = q.qn[ip,4] diff --git a/problems/CompEuler/thetaHole/user_flux.jl b/problems/CompEuler/thetaHole/user_flux.jl index e3bca6941..90a776c91 100644 --- a/problems/CompEuler/thetaHole/user_flux.jl +++ b/problems/CompEuler/thetaHole/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/thetaHole/user_source.jl b/problems/CompEuler/thetaHole/user_source.jl index 361ca3ef6..9ad62d74e 100644 --- a/problems/CompEuler/thetaHole/user_source.jl +++ b/problems/CompEuler/thetaHole/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -50,7 +50,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/thetaNablaP/initialize.jl b/problems/CompEuler/thetaNablaP/initialize.jl index 50772ecb4..2aecc76d9 100644 --- a/problems/CompEuler/thetaNablaP/initialize.jl +++ b/problems/CompEuler/thetaNablaP/initialize.jl @@ -20,13 +20,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] ρθ = q.qn[ip,4] diff --git a/problems/CompEuler/thetaNablaP/user_flux.jl b/problems/CompEuler/thetaNablaP/user_flux.jl index 98d9810d1..8ce6066a9 100644 --- a/problems/CompEuler/thetaNablaP/user_flux.jl +++ b/problems/CompEuler/thetaNablaP/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/thetaNablaP/user_source.jl b/problems/CompEuler/thetaNablaP/user_source.jl index 361ca3ef6..9ad62d74e 100644 --- a/problems/CompEuler/thetaNablaP/user_source.jl +++ b/problems/CompEuler/thetaNablaP/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -50,7 +50,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/thetaTracers/initialize.jl b/problems/CompEuler/thetaTracers/initialize.jl index 95cdad53c..be013e203 100644 --- a/problems/CompEuler/thetaTracers/initialize.jl +++ b/problems/CompEuler/thetaTracers/initialize.jl @@ -16,7 +16,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars), qoutvars=qoutvars) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if (inputs[:case] === "rtb") comm = MPI.COMM_WORLD max_x = MPI.Allreduce(maximum(mesh.x), MPI.MAX, comm) diff --git a/problems/CompEuler/thetaTracers/user_flux.jl b/problems/CompEuler/thetaTracers/user_flux.jl index f304faf2c..eb0c7c24e 100644 --- a/problems/CompEuler/thetaTracers/user_flux.jl +++ b/problems/CompEuler/thetaTracers/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=6, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -37,7 +37,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=5, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -75,7 +75,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=5, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/thetaTracers/user_source.jl b/problems/CompEuler/thetaTracers/user_source.jl index 7c0eb06c5..1f6f0c4d4 100644 --- a/problems/CompEuler/thetaTracers/user_source.jl +++ b/problems/CompEuler/thetaTracers/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/CompEuler/theta_laguerre/initialize.jl b/problems/CompEuler/theta_laguerre/initialize.jl index f5bfe5456..2e2a8e374 100644 --- a/problems/CompEuler/theta_laguerre/initialize.jl +++ b/problems/CompEuler/theta_laguerre/initialize.jl @@ -18,7 +18,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if (inputs[:case] === "rtb") diff --git a/problems/CompEuler/theta_laguerre/user_flux.jl b/problems/CompEuler/theta_laguerre/user_flux.jl index 2bb06d570..94af200c8 100644 --- a/problems/CompEuler/theta_laguerre/user_flux.jl +++ b/problems/CompEuler/theta_laguerre/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/theta_laguerre/user_source.jl b/problems/CompEuler/theta_laguerre/user_source.jl index 1cd905c41..8fbd614c6 100644 --- a/problems/CompEuler/theta_laguerre/user_source.jl +++ b/problems/CompEuler/theta_laguerre/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -72,7 +72,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/theta_pert/initialize.jl b/problems/CompEuler/theta_pert/initialize.jl index cf1fe3677..7bbba0ff0 100644 --- a/problems/CompEuler/theta_pert/initialize.jl +++ b/problems/CompEuler/theta_pert/initialize.jl @@ -16,7 +16,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if (inputs[:case] === "rtb") xc = (maximum(mesh.x) + minimum(mesh.x))/2 diff --git a/problems/CompEuler/theta_pert/user_flux.jl b/problems/CompEuler/theta_pert/user_flux.jl index 2c0f18c16..ffded6109 100644 --- a/problems/CompEuler/theta_pert/user_flux.jl +++ b/problems/CompEuler/theta_pert/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/CompEuler/theta_pert/user_source.jl b/problems/CompEuler/theta_pert/user_source.jl index faa3ef7b9..8f3103392 100644 --- a/problems/CompEuler/theta_pert/user_source.jl +++ b/problems/CompEuler/theta_pert/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -26,7 +26,7 @@ function user_source!(S, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -50,7 +50,7 @@ function user_source!(S, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/problems/CompEuler/wave1d-fd/initialize.jl b/problems/CompEuler/wave1d-fd/initialize.jl index d7427e5e7..8c531bf43 100644 --- a/problems/CompEuler/wave1d-fd/initialize.jl +++ b/problems/CompEuler/wave1d-fd/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat; neqs=length(qvars)) #--------------------------------------------------------------------------------- - σ = Float64(0.15) + σ = TFloat(0.15) σ2= σ*σ for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/problems/CompEuler/wave1d/initialize.jl b/problems/CompEuler/wave1d/initialize.jl index f0896f0df..3f5d77f9a 100644 --- a/problems/CompEuler/wave1d/initialize.jl +++ b/problems/CompEuler/wave1d/initialize.jl @@ -19,7 +19,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - σ = Float64(0.15) + σ = TFloat(0.15) σ2= σ*σ for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/problems/CompEuler/wave1d_lag/initialize.jl b/problems/CompEuler/wave1d_lag/initialize.jl index 180a70578..1e8577d67 100644 --- a/problems/CompEuler/wave1d_lag/initialize.jl +++ b/problems/CompEuler/wave1d_lag/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - σ = Float64(0.15) + σ = TFloat(0.15) σ2= σ*σ for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/problems/CompEuler/wave1d_lag/user_source.jl b/problems/CompEuler/wave1d_lag/user_source.jl index f7ea3d0a7..8ccf21077 100644 --- a/problems/CompEuler/wave1d_lag/user_source.jl +++ b/problems/CompEuler/wave1d_lag/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S, ::CL, ::TOTAL; neqs=1, x=0.0, y=0.0, xmin=0.0, xmax=1.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/Elliptic/2dlaplace/user_flux.jl b/problems/Elliptic/2dlaplace/user_flux.jl index 4ec1b6473..2799deaba 100644 --- a/problems/Elliptic/2dlaplace/user_flux.jl +++ b/problems/Elliptic/2dlaplace/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 F[2] = 0.0 @@ -43,7 +43,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 @@ -64,7 +64,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 F[2] = 0.0 diff --git a/problems/Elliptic/elementLearning/user_flux.jl b/problems/Elliptic/elementLearning/user_flux.jl index 4ec1b6473..2799deaba 100644 --- a/problems/Elliptic/elementLearning/user_flux.jl +++ b/problems/Elliptic/elementLearning/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 F[2] = 0.0 @@ -43,7 +43,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 @@ -64,7 +64,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() F[1] = 0.0 F[2] = 0.0 diff --git a/problems/Helmholtz/case1/user_flux.jl b/problems/Helmholtz/case1/user_flux.jl index 2c0f18c16..ffded6109 100644 --- a/problems/Helmholtz/case1/user_flux.jl +++ b/problems/Helmholtz/case1/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/Helmholtz/case1_laguerre/user_flux.jl b/problems/Helmholtz/case1_laguerre/user_flux.jl index 2c0f18c16..ffded6109 100644 --- a/problems/Helmholtz/case1_laguerre/user_flux.jl +++ b/problems/Helmholtz/case1_laguerre/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/problems/Helmholtz/case1_laguerre/user_source.jl b/problems/Helmholtz/case1_laguerre/user_source.jl index b140827a6..40ebe4f4a 100644 --- a/problems/Helmholtz/case1_laguerre/user_source.jl +++ b/problems/Helmholtz/case1_laguerre/user_source.jl @@ -8,7 +8,7 @@ function user_source!(S, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/problems/equations/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl b/problems/equations/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl new file mode 100644 index 000000000..d2e3dce1c --- /dev/null +++ b/problems/equations/AdvDiff/Wave_Train_Overlapping_Plot/user_source.jl @@ -0,0 +1,110 @@ + +function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] -qe[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = -ρ*PhysConst.g + #S[3] = -PhysConst.g + S[4] = 0.0 + + #### SPONGE + + # + # clateral + nsponge_points = 8 + + # distance from the boundary. xs in Restelli's thesis + dsy = (ymax - ymin)/(nely*(ngl - 1))# equivalent grid spacing + dbl = ymax - y + zs = 14500.0#ymax - 16000.0 + dsx = (xmax - xmin)/(nely*(ngl - 1))# equivalent grid spacing + dbx = min(xmax - x,x-xmin) + xr = 120000.0 + xl = -120000.0 + if (y > zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(y-zs)/(ymax-zs))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = 0.0 + end + ctop= 0.1*betay_coe + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 1.0*betaxr_coe + cxl = 1.0*betaxl_coe + #@info x,y,cxr,cxl,ctop + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + if (x >= xmin && x <= xmax) + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]-qe[1]) + S[2] -= (cs)*(q[2]-qe[1]*20.0) + S[3] -= (cs)*q[3] + S[4] -= (cs)*(q[4]-qe[4]) + end + + return S +end + +function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + + if (x >= 5000.0)#nsponge_points * dsy) #&& dbl >= 0.0) + sponge_coe = 2.0/(1+exp((0.3*(xmax-5000)-x+5000)/(xmax/18))) + else + sponge_coe = 0.0 + end + zt = xmax + zd = 5000.0 + z = max(x-zd,0.0) + dgamma =0.00005 + alpha = 0.85 + sigma = zt/18.0 + fac1 = (alpha*zt-x)/sigma + #=if (x >=60.0) + cs = dgamma/(1+exp(fac1)) + else + cs = 0.0 + end=# + #cs = 1.0*sinpi(0.5*z/(zt-zd))^2 + cs = min(sponge_coe,1) + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] = -(cs)*(q[1]) + S[2] = -(cs)*(q[2]) + return S +end + +function user_source_gpu(q,qe,x,PhysConst, xmax, xmin,lpert) + + T = eltype(q) + if (x >= T(5000.0))#nsponge_points * dsy) #&& dbl >= 0.0) + sponge_coe = T(2.0)/(1+exp((T(0.3)*(xmax-5000)-x+5000)/(xmax/18))) + else + sponge_coe = T(0.0) + end + cs = min(sponge_coe,1) + + return T(-cs*q[1]), T(-cs*q[2]) +end diff --git a/problems/equations/CompEuler/3d_dry_bomex/initialize.jl b/problems/equations/CompEuler/3d_dry_bomex/initialize.jl new file mode 100644 index 000000000..4ebe3df78 --- /dev/null +++ b/problems/equations/CompEuler/3d_dry_bomex/initialize.jl @@ -0,0 +1,280 @@ +using Random + + + +function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 3D CompEuler with θ equation ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ρ", "ρu", "ρv", "ρw", "ρθ") + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) + #--------------------------------------------------------------------------------- + + if (inputs[:backend] == CPU()) + PhysConst = PhysicalConst{TFloat}() + if inputs[:lrestart] == true + # + # READ RESTART HDF5: + # + q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) + PhysConst = PhysicalConst{TFloat}() + + for ip=1:mesh.npoin + ρ = q.qn[ip,1] + ρθ = q.qn[ip,5] + θ = ρθ/ρ + P = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + q.qn[ip,end] = P + + ρe = q.qe[ip,1] + ρθe = q.qe[ip,5] + θe = ρθe/ρ + Pe = perfectGasLaw_ρθtoP(PhysConst, ρ=ρe, θ=θe) + q.qe[ip,end] = Pe + end + + else + # + # INITIAL STATE from scratch: + # + new_param_set = create_updated_TD_Parameters(FT(101325.0)) + for ip = 1:mesh.npoin + + x, y, z = mesh.x[ip], mesh.y[ip], mesh.z[ip] + + + # @info param_set + Δθ = 0.0 #K + + θ = 0.0 + θref = 0.0 + p = 0.0 + pref = 0.0 + ρ = 0.0 + ρref = 0.0 + + u = 0.0 + v = 0.0 + w = 0.0 + ρref, u, v, w, θref, Δθ, pref = initialize_bomex!(z, new_param_set) + # @info ρref, u, v, w, θref, Δθ, pref + # ρref = params.ρ + # u = params.u + # v = params.v + # w = params.w + # θref = params.θ + # Δθ = params.Δθ #K + # pref = params.P + ρ = ρref + θ = θref + Δθ + p = pref + + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[ip,1] = ρ - ρref + q.qn[ip,2] = ρ*u - ρref*u + q.qn[ip,3] = ρ*v - ρref*v + q.qn[ip,4] = ρ*w - ρref*w + q.qn[ip,5] = ρ*θ - ρref*θref + q.qn[ip,end] = p + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = u + q.qe[ip,3] = v + q.qe[ip,4] = w + q.qe[ip,5] = ρref*θref + q.qe[ip,end] = pref + else + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*w + q.qn[ip,5] = ρ*θ + q.qn[ip,end] = p + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = ρref*u + q.qe[ip,3] = ρref*v + q.qe[ip,4] = ρref*w + q.qe[ip,5] = ρref*θref + q.qe[ip,end] = pref + end + #end + end + end + + if inputs[:CL] == NCL() + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[:,2] .= q.qn[:,2]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,3] .= q.qn[:,3]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,4] .= q.qn[:,4]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,5] .= q.qn[:,5]./(q.qn[:,1] + q.qe[:,1]) + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + else + q.qn[:,2] .= q.qn[:,2]./q.qn[:,1] + q.qn[:,3] .= q.qn[:,3]./q.qn[:,1] + q.qn[:,4] .= q.qn[:,4]./q.qn[:,1] + q.qn[:,5] .= q.qn[:,5]./q.qn[:,1] + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + end + end + + else + + if (inputs[:SOL_VARS_TYPE] == PERT()) + lpert = true + else + lpert = false + end + PhysConst = PhysicalConst{TFloat}() + FT = TFloat + new_param_set = create_updated_TD_Parameters(FT(101325.0)) + + k = initialize_gpu!(inputs[:backend]) + k(q.qn, q.qe, mesh.x, mesh.y, mesh.z, PhysConst, new_param_set, lpert; ndrange = (mesh.npoin)) + end + @info " Initialize fields for 3D CompEuler with θ equation ........................ DONE " + + return q +end + +@kernel function initialize_gpu!(qn, qe, x, y, z, PhysConst, param_set, lpert) + ip = @index(Global, Linear) + + T = eltype(x) + x = x[ip] + y = y[ip] + z = z[ip] + + + Δθ = T(0.0) #K + + θ = T(0.0) + θref = T(0.0) + p = T(0.0) + pref = T(0.0) + ρ = T(0.0) + ρref = T(0.0) + + u = T(0.0) + v = T(0.0) + w = T(0.0) + ρref, u, v, w, θref, Δθ, pref = initialize_bomex!(z, param_set) + + # u = 0 + ρ = ρref + θ = θref + Δθ + p = pref + + if (lpert) + qn[ip,1] = ρ - ρref + qn[ip,2] = ρ*u - ρref*u + qn[ip,3] = ρ*v - ρref*v + qn[ip,4] = ρ*w - ρref*w + qn[ip,5] = ρ*θ - ρref*θref + qn[ip,end] = p + else + qn[ip,1] = ρ + qn[ip,2] = ρ*u + qn[ip,3] = ρ*v + qn[ip,4] = ρ*w + qn[ip,5] = ρ*θ + qn[ip,end] = p + end + + #Store initial background state for plotting and analysis of pertuebations + qe[ip,1] = ρref + qe[ip,2] = ρref*u + qe[ip,3] = ρref*v + qe[ip,4] = ρref*w + qe[ip,5] = ρref*θref + qe[ip,end] = pref + +end + +function initialize_bomex!(z, param_set) + FT = eltype(z) + @inbounds begin + P_sfc::FT = 1.015e5 # Surface air pressure + qg::FT = 22.45e-3 # Total moisture at surface + q_pt_sfc = TD.PhasePartition(qg) # Surface moisture partitioning + Rm_sfc = TD.gas_constant_air(param_set, q_pt_sfc) # Moist gas constant + T_sfc = FT(300.4) # Surface temperature + _grav = FT(TP.grav(param_set)) + H = Rm_sfc * T_sfc / _grav + # z = FT(500.0) + P = P_sfc * exp(-z / H) + + zlv::FT = 700 + zl1::FT = 520 + zl2::FT = 1480 + zl3::FT = 2000 + zl4::FT = 3000 + u = FT(0.0) + # if z <= zlv + # u = -8.75 + # else + # u = -8.75 + (z - zlv) * (-4.61 + 8.75) / (zl4 - zlv) + # end + v = FT(0.0) + w = FT(0.0) + + # Assign piecewise quantities to θ_liq and q_tot + θ_liq::FT = 0 + q_tot::FT = 0 + + # Piecewise functions for potential temperature and total moisture + if FT(0) <= z <= zl1 + # Well mixed layer + θ_liq = 298.7 + q_tot = 17.0 + (z / zl1) * (16.3 - 17.0) + elseif z > zl1 && z <= zl2 + # Conditionally unstable layer + θ_liq = 298.7 + (z - zl1) * (302.4 - 298.7) / (zl2 - zl1) + q_tot = 16.3 + (z - zl1) * (10.7 - 16.3) / (zl2 - zl1) + elseif z > zl2 && z <= zl3 + # Absolutely stable inversion + θ_liq = 302.4 + (z - zl2) * (308.2 - 302.4) / (zl3 - zl2) + q_tot = 10.7 + (z - zl2) * (4.2 - 10.7) / (zl3 - zl2) + else + θ_liq = 308.2 + (z - zl3) * (311.85 - 308.2) / (zl4 - zl3) + q_tot = 4.2 + (z - zl3) * (3.0 - 4.2) / (zl4 - zl3) + end + + # Convert total specific humidity to kg/kg + q_tot /= 1000 + + + # Establish thermodynamic state and moist phase partitioning + TS = TD.PhaseEquil_pθq(param_set, P, θ_liq, q_tot) + T = TD.air_temperature(param_set, TS) + ρ = TD.air_density(param_set, TS) + q_pt = TD.PhasePartition(param_set, TS) + θ = TD.virtual_pottemp(param_set, TS) + bhasCondense = TD.has_condensate(param_set, TS) + # @info TS + Δθ = FT(0.0) + if z < FT(400) + Δθ = FT((rand()-0.5) * 1.0) + end + end + return ρ, u, v, w, θ, Δθ, P + # if bhasCondense + # @info z, ρ, u, T, θ_liq, θ, q_tot, q_pt.liq, P, bhasCondense + # end +end + diff --git a/problems/equations/CompEuler/3d_dry_bomex/user_source.jl b/problems/equations/CompEuler/3d_dry_bomex/user_source.jl new file mode 100644 index 000000000..c9f969212 --- /dev/null +++ b/problems/equations/CompEuler/3d_dry_bomex/user_source.jl @@ -0,0 +1,107 @@ +function user_source!(S, + q, + qe, + npoin::Int64, + ::CL, ::TOTAL; + neqs=1) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = 0.0 #Y is the vertical direction in 3D + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + +end + +function user_source!(S, + q, + qe, + npoin::Int64, + ::CL, ::PERT; + neqs=1) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + # Coriolis + u_geostrophic::T = -10.0 + u_slope::T = 1.8e-3 + u_geo = u_geostrophic + u_slope * z + + f0 = T(0.376e-4) + ρu = q[2] - u_geo * q[1] + ρv = q[3] + ρw = q[4] + buc::T= -f0*ρv + bvc::T= f0*ρu + bwc::T= 0.0 + + # sponge layer + z_sponge::T = 2400 + z_max::T = 3000 + α_max::T = 0.75 + γ::T = 2 + β_sponge::T = 0.0 + if z >= z_sponge + r = (z - z_sponge) / (z_max - z_sponge) + β_sponge = α_max * sinpi(r / 2)^γ + end + ρu_sponge::T = - β_sponge * (ρu) + + S[1] = 0.0 + S[2] = buc + ρu_sponge + S[3] = bvc #Y is the vertical direction in 3D + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + +end + +function user_source_gpu(q,qe,x,y,z,PhysConst, xmax, xmin, ymax, ymin, zmax, zmin, lpert) + + T = eltype(q) + # + # S(q(x)) = -ρg + # + ρ = q[1] + + # Coriolis + # u_geostrophic::T = -10.0 + # u_slope::T = 1.8e-3 + # u_geo = u_geostrophic + u_slope * z + u_geo::T = 0.0 + f0 = T(0.376e-4) + ρu = q[2] - u_geo * q[1] + ρv = q[3] + ρw = q[4] + buc::T= -f0*ρv + bvc::T= f0*ρu + bwc::T= 0.0 + + # sponge layer + z_sponge::T = 2400 + z_max::T = 3000 + α_max::T = 0.75 + γ::T = 2 + β_sponge::T = 0.0 + if z >= z_sponge + r = (z - z_sponge) / (z_max - z_sponge) + β_sponge = α_max * sinpi(r / 2)^γ + end + ρu_sponge::T = - β_sponge * (ρu) + ρv_sponge::T = - β_sponge * (ρv) + ρw_sponge::T = - β_sponge * (ρw) + + + return T(0.0), T(-buc + ρu_sponge), T(-bvc + ρv_sponge), T(-ρ*PhysConst.g + ρw_sponge), T(0.0) +end diff --git a/problems/equations/CompEuler/giga_les/user_flux.jl b/problems/equations/CompEuler/giga_les/user_flux.jl new file mode 100644 index 000000000..79e91d575 --- /dev/null +++ b/problems/equations/CompEuler/giga_les/user_flux.jl @@ -0,0 +1,141 @@ +function user_flux!(F, G, H, + q, + qe, + mesh::St_mesh, + ::CL, ::TOTAL; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρw = q[4] + ρhl = q[5] + ρqt = q[6] + ρqp = q[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + Pressure = q[end] - qe[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt = qt, qp = qp) + F[1] = ρu + F[2] = ρu*u .+ Pressure + F[3] = ρu*v + F[4] = ρu*w + F[5] = ρhl*u + F[6] = ρqt*u + F[7] = ρqp*u + + G[1] = ρv + G[2] = ρv*u + G[3] = ρv*v .+ Pressure + G[4] = ρv*w + G[5] = ρhl*v + G[6] = ρqt*v + G[7] = ρqp*v + + H[1] = ρw + H[2] = ρw*u + H[3] = ρw*v + H[4] = ρw*w .+ Pressure + H[5] = ρhl*w + H[6] = ρqt*w + H[7] = ρqp*w + +end + +function user_flux!(F, G, H, + q, + qe, + mesh::St_mesh, + ::CL, ::PERT; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + qe[1] + ρu = q[2] + qe[2] + ρv = q[3] + qe[3] + ρw = q[4] + qe[4] + ρhl = q[5] + qe[5] + ρqt = q[6] + qe[6] + ρqp = q[7] + qe[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + ρqt = ρqt/ρ + ρqp = ρqp/ρ + + Pressure = q[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) + Pressure = Pressure - qe[end] + + F[1] = ρu + F[2] = ρu*u .+ Pressure + F[3] = ρv*u + F[4] = ρw*u + F[5] = ρhl*u + F[6] = ρqt*u + F[7] = ρqp*u + + G[1] = ρv + G[2] = ρu*v + G[3] = ρv*v .+ Pressure + G[4] = ρw*v + G[5] = ρhl*v + G[6] = ρqt*v + G[7] = ρqp*v + + H[1] = ρw + H[2] = ρu*w + H[3] = ρv*w + H[4] = ρw*w .+ Pressure + H[5] = ρhl*w + H[6] = ρqt*w + H[7] = ρqp*w + +end + +function user_flux_gpu(q,qe,PhysConst,lpert) + T = eltype(q) + if (lpert) + ρ = q[1]+qe[1] + ρu = q[2]+qe[2] + ρv = q[3]+qe[3] + ρw = q[4]+qe[4] + ρhl = q[5]+qe[5] + ρqt = q[6]+qe[6] + ρqp = q[7]+qe[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + + Pressure = q[end]-qe[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) - qe[6] + return T(ρu), T(ρu*u + Pressure), T(ρv*u), T(ρw*u), T(ρhl*u), T(ρqt*u), T(ρqp*u), T(ρv), T(ρu*v), T(ρv*v + Pressure), T(ρw*v), T(ρhl*v), T(ρqt*v), T(ρqp*v), T(ρw), T(ρu*w), T(ρv*w), T(ρw*w + Pressure), T(ρhl*w), T(ρqt*w), T(ρqp*w) + else + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρw = q[4] + ρhl = q[5] + ρqt = q[6] + ρqp = q[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + + Pressure = q[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) + return T(ρu), T(ρu*u + Pressure), T(ρv*u), T(ρw*u), T(ρhl*u), T(ρqt*u), T(ρqp*u), T(ρv), T(ρu*v), T(ρv*v + Pressure), T(ρw*v), T(ρhl*v), T(ρqt*v), T(ρqp*v), T(ρw), T(ρu*w), T(ρv*w), T(ρw*w + Pressure), T(ρhl*w), T(ρqt*w), T(ρqp*w) + end +end diff --git a/problems/equations/CompEuler/squall_line_2D/user_source.jl b/problems/equations/CompEuler/squall_line_2D/user_source.jl new file mode 100644 index 000000000..0bca3b05d --- /dev/null +++ b/problems/equations/CompEuler/squall_line_2D/user_source.jl @@ -0,0 +1,176 @@ + +function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] -qe[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = -ρ*PhysConst.g + #S[3] = -PhysConst.g + S[4] = 0.0 + + #### SPONGE + + # + # clateral + nsponge_points = 8 + + # distance from the boundary. xs in Restelli's thesis + dsy = (ymax - ymin)/(nely*(ngl - 1))# equivalent grid spacing + dbl = ymax - y + zs = 14500.0#ymax - 16000.0 + dsx = (xmax - xmin)/(nely*(ngl - 1))# equivalent grid spacing + dbx = min(xmax - x,x-xmin) + xr = 120000.0 + xl = -120000.0 + if (y > zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(y-zs)/(ymax-zs))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = 0.0 + end + ctop= 0.1*betay_coe + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 0.0*betaxr_coe + cxl = 0.0*betaxl_coe + #@info x,y,cxr,cxl,ctop + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + if (x >= xmin && x <= xmax) + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]-qe[1]) + S[2] -= (cs)*(q[2]-qe[1]*20.0) + S[3] -= (cs)*q[3] + S[4] -= (cs)*(q[4]-qe[4]) + end + + return S +end + +function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = -ρ*PhysConst.g + S[4] = 0.0 + S[5] = 0.0 + S[6] = 0.0 + #### SPONGE + + # + # clateral + nsponge_points = 8 + + # distance from the boundary. xs in Restelli's thesis + dsy = (ymax - ymin)/(nely*(ngl - 1))# equivalent grid spacing + dbl = ymax - y + zs = 16000.0#ymax - 20000.0 + dsx = (xmax - xmin)/(nely*(ngl - 1))# equivalent grid spacing + dbx = min(xmax - x,x-xmin) + xr = 40000.0 + xl = -40000.0 + + if (y >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(y-zs)/(24000.0-zs))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = 0.0 + end + #if (abs(x) <=xmin) + ctop= betay_coe#0.5*betay_coe + #else + # ctop = 0.0 + #end + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 0.0*betaxr_coe#0.25*betaxr_coe + cxl = 0.0*betaxl_coe#0.25*betaxl_coe + ctop = 0.25*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]) + S[2] -= (cs)*(q[2]) + S[3] -= (cs)*(q[3]) + S[4] -= (cs)*(q[4]) + S[5] -= (cs)*(q[5]) + S[6] -= (cs)*(q[6]) + return S +end + +function user_source_gpu(q,qe,x,y,PhysConst,xmax,xmin,ymax,ymin,lpert) + + T = eltype(x) + # distance from the boundary. xs in Restelli's thesis + zs = T(15000.0)#ymax - 20000.0 + xr = T(90000.0) + xl = T(-90000.0) + + if (y >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = T(sinpi(T(0.5)*(y-zs)/(ymax-zs))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = T(0.0) + end + ctop= betay_coe#0.5*betay_coe + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = T(sinpi(T(0.5)*(x-xr)/(xmax-xr))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = T(0.0) + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = T(sinpi(T(0.5)*(xl-x)/(xl-xmin))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = T(0.0) + end + + cxr = T(0.01)*betaxr_coe#0.25*betaxr_coe + cxl = T(0.01)*betaxl_coe#0.25*betaxl_coe + ctop = T(0.1)*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = T(1.0) - (T(1.0) -ctop)*(T(1.0)-cxr)*(T(1.0) - cxl) + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + return T(-cs*q[1]), T(-cs*q[2]), T(-cs*q[3]-ρ*PhysConst.g), T(-cs*q[4]) +end diff --git a/problems/equations/CompEuler/squall_line_Lin/initialize.jl b/problems/equations/CompEuler/squall_line_Lin/initialize.jl new file mode 100644 index 000000000..c659fe63d --- /dev/null +++ b/problems/equations/CompEuler/squall_line_Lin/initialize.jl @@ -0,0 +1,253 @@ +function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 3D CompEuler with θ equation ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ρ", "ρu", "ρv", "ρw", "hl", "ρqt", "ρqp") + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) + #--------------------------------------------------------------------------------- + + if (inputs[:backend] == CPU()) + PhysConst = PhysicalConst{TFloat}() + if inputs[:lrestart] == true + # + # READ RESTART HDF5: + # + q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) + PhysConst = PhysicalConst{TFloat}() + + for ip=1:mesh.npoin + ρ = q.qn[ip,1] + ρθ = q.qn[ip,5] + θ = ρθ/ρ + P = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + q.qn[ip,end] = P + + ρe = q.qe[ip,1] + ρθe = q.qe[ip,5] + θe = ρθe/ρ + Pe = perfectGasLaw_ρθtoP(PhysConst, ρ=ρe, θ=θe) + q.qe[ip,end] = Pe + end + + else + # + # INITIAL STATE from scratch: + # + xc = (maximum(mesh.x) + minimum(mesh.x))/2 + zc = 2000.0 #m + + θc = 3.0 #K + qvc = 2e-3 + rx = 2400.0 + rz = 1500.0 + data = read_sounding(inputs[:sounding_file]) + background = interpolate_sounding(inputs[:backend],mesh.npoin,mesh.z,data) + balanced = zeros(mesh.npoin,1) + @info minimum(background[:,3]), maximum(background[:,3]) + for ip = 1:mesh.npoin + + x, y, z = mesh.x[ip], mesh.y[ip], mesh.z[ip] + + r = sqrt( (x - xc)^2/(rx)^2 ) + + ΔT = 0.0 #K + Δqv = 0.0 + if (r <= 1) && (z <= 1199.0) && (z>= 350.0) + ΔT = θc*sinpi((r+1)/2)/((z-200)/200) + Δqv = qvc*sinpi((r+1)/2)/((z-200)/200) + end + T_ref = background[ip,1] + qv_ref = background[ip,2]/1000 + u_ref = background[ip,3] + v_ref = background[ip,4] + pref = background[ip,5] + T = T_ref + ΔT + qv = qv_ref + Δqv + #=θ_ref = T_ref * (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp) + θ = T * (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp) + θv_ref = θ_ref*(1 + 0.61*qv_ref) + θv = θ*(1 + 0.61*qv)=# + Tv = T*(1 + 0.61*qv) + Tv_ref = T_ref*(1 + 0.61*qv_ref) + ρ = perfectGasLaw_TPtoρ(PhysConst; Temp=Tv, Press=pref) #kg/m³ + ρref = perfectGasLaw_TPtoρ(PhysConst; Temp=Tv_ref, Press=pref) #kg/m³ + hl = PhysConst.cp*T + PhysConst.g*z + hl_ref = PhysConst.cp*T_ref + PhysConst.g*z + u = u_ref + v = v_ref + w = 0.0 + pref_m = ρref*Tv_ref*PhysConst.Rair#ρref*PhysConst.Rair*T_ref + ρref*qv_ref*PhysConst.Rvap*T_ref + p_m = ρ*PhysConst.Rair*T + ρ*qv_ref*PhysConst.Rvap*T + ##attempt to assure balance + #=for iter=1:10 + θ_ref = T_ref * (PhysConst.pref/p_m)^(PhysConst.Rair/PhysConst.cp) + θ = T * (PhysConst.pref/pref_m)^(PhysConst.Rair/PhysConst.cp) + θv_ref = θ_ref*(1 + 0.61*qv_ref) + θv = θ*(1 + 0.61*qv) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θv, Press=p_m) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θv_ref, Press=pref_m) + pref_m = ρref*PhysConst.Rair*T_ref + ρref*qv_ref*PhysConst.Rvap*T_ref + p_m = ρ*PhysConst.Rair*T + ρ*qv_ref*PhysConst.Rvap*T + #@info θ_ref, θv_ref, ρref, pref_m + end=# + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[ip,1] = ρ - ρref + q.qn[ip,2] = ρ*u - ρref*u + q.qn[ip,3] = ρ*v - ρref*v + q.qn[ip,4] = ρ*w - ρref*w + q.qn[ip,5] = ρ*hl - ρref*hl_ref#ρ*θ - ρref*θref + q.qn[ip,6] = ρ*qv-ρref*qv_ref + q.qn[ip,7] = 0.0 + q.qn[ip,end] = pref_m #+ ρ*qv_ref*PhysConst.Rvap*T + + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = ρref*u_ref + q.qe[ip,3] = ρref*v_ref + q.qe[ip,4] = ρref*w + q.qe[ip,5] = ρref*hl_ref + q.qe[ip,6] = ρref*qv_ref + q.qe[ip,7] = 0.0 + q.qe[ip,end] = pref_m #+ ρref*qv*PhysConst.Rvap*Tref + else + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*w + q.qn[ip,5] = ρ*hl + q.qn[ip,6] = ρ*qv_ref#0.0 + q.qn[ip,7] = 0.0 + q.qn[ip,end] = pref_m #+ ρ*qv*PhysConst.Rvap*T + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = ρref*u_ref + q.qe[ip,3] = ρref*v_ref + q.qe[ip,4] = ρref*w + q.qe[ip,5] = ρref*hl_ref + q.qe[ip,6] = ρref*qv_ref + q.qe[ip,7] = 0.0 + q.qe[ip,end] = pref_m #+ ρref*qv*PhysConst.Rvap*Tref + end + #end + end + end + @info maximum(q.qn[:,end]), minimum(q.qn[:,end]), maximum(q.qn[:,2]), minimum(q.qn[:,2]), maximum(q.qn[:,6]), minimum(q.qn[:,6]), maximum(q.qn[:,1]), minimum(q.qn[:,1]) + if inputs[:CL] == NCL() + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[:,2] .= q.qn[:,2]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,3] .= q.qn[:,3]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,4] .= q.qn[:,4]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,5] .= q.qn[:,5]./(q.qn[:,1] + q.qe[:,1]) + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + else + q.qn[:,2] .= q.qn[:,2]./q.qn[:,1] + q.qn[:,3] .= q.qn[:,3]./q.qn[:,1] + q.qn[:,4] .= q.qn[:,4]./q.qn[:,1] + q.qn[:,5] .= q.qn[:,5]./q.qn[:,1] + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + end + end + + else + if (inputs[:SOL_VARS_TYPE] == PERT()) + lpert = true + else + lpert = false + end + data = read_sounding(inputs[:sounding_file]) + background = interpolate_sounding(inputs[:backend],mesh.npoin,mesh.z,data) + PhysConst = PhysicalConst{TFloat}() + xc = TFloat((maximum(mesh.x) + minimum(mesh.x))/2) + zc = TFloat(2000.0) #m + rz = TFloat(1500.0) #m + rx = TFloat(10000.0) + θref = TFloat(300.0) #K + θc = TFloat(2.0) #K + k = initialize_gpu!(inputs[:backend]) + k(q.qn, q.qe, background, mesh.x, mesh.y, mesh.z, xc, rx, rz, zc, θc, PhysConst, lpert; ndrange = (mesh.npoin)) + end + @info maximum(q.qe[:,end]), minimum(q.qe[:,end]) + @info " Initialize fields for 3D CompEuler with θ equation ........................ DONE " + return q +end + +@kernel function initialize_gpu!(qn, qe, background, x, y, z, xc, rx, rz, zc, θc, PhysConst, lpert) + ip = @index(Global, Linear) + + T = eltype(x) + x1 = x[ip] + y1 = y[ip] + z1 = z[ip] + + r = T(sqrt( (x1 - xc)^2/(rx^2) + (z1 - zc)^2/(rz^2) )) + + Δθ = T(0.0) #K + if r <= 1 + Δθ = T(θc*cospi(r/2)^2) + end + θ_ref = background[ip,1] + qv_ref = T(background[ip,2]/T(1000)) + u_ref = background[ip,3] + v_ref = background[ip,4] + pref = background[ip,5] + θv_ref = θ_ref*(T(1) + T(0.608)*qv_ref) + θ = θ_ref + Δθ + θv = θv_ref + Δθ + p = PhysConst.pref*(T(1.0) - PhysConst.g*T(z1/(PhysConst.cp*θv)))^(PhysConst.cpoverR) #Pa + Tref = T(θ_ref / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp)) + Tabs = T(θ / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp)) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θv, Press=pref) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θv_ref, Press=pref) #kg/m³ + hl = PhysConst.cp*Tabs + PhysConst.g*z1 + hl_ref = PhysConst.cp*Tref + PhysConst.g*z1 + u = u_ref + v = v_ref + w = T(0.0) + pref_m = ρref*PhysConst.Rair*Tref + ρref*qv_ref*PhysConst.Rvap*Tref + + if (lpert) + qn[ip,1] = T(ρ - ρref) + qn[ip,2] = ρ*u - ρref*u + qn[ip,3] = ρ*v - ρref*v + qn[ip,4] = ρ*w - ρref*w + qn[ip,5] = ρ*hl - ρref*hl_ref + qn[ip,6] = ρ*qv_ref - ρref*qv_ref + qn[ip,7] = T(0.0) + qn[ip,end] = pref_m + else + qn[ip,1] = ρ + qn[ip,2] = ρ*u + qn[ip,3] = ρ*v + qn[ip,4] = ρ*w + qn[ip,5] = ρ*hl + qn[ip,6] = ρ*qv_ref + qn[ip,7] = T(0.0) + qn[ip,end] = pref_m + end + + #Store initial background state for plotting and analysis of pertuebations + qe[ip,1] = ρref + qe[ip,2] = ρref*u + qe[ip,3] = ρref*v + qe[ip,4] = ρref*w + qe[ip,5] = ρref*hl_ref + qe[ip,6] = ρref*qv_ref + qe[ip,7] = 0.0 + qe[ip,end] = pref_m + +end diff --git a/problems/equations/CompEuler/squall_line_Lin/user_source.jl b/problems/equations/CompEuler/squall_line_Lin/user_source.jl new file mode 100644 index 000000000..93fc49db7 --- /dev/null +++ b/problems/equations/CompEuler/squall_line_Lin/user_source.jl @@ -0,0 +1,168 @@ + +function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, z=0.0, ymin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] -qe[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = 0.0 + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + S[6] = 0.0 + S[7] = 0.0 + #### SPONGE + + # + # clateral + zs = 13000.0#ymax - 16000.0 + xr = 25000.0 + xl = -25000.0 + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(z-zs)/(zmax-zs))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = 0.0 + end + ctop= 1.0*betay_coe + + if (x >= xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x <= xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 0.0*betaxr_coe + cxl = 0.0*betaxl_coe + #@info x,y,cxr,cxl,ctop + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]-qe[1]) + S[2] -= (cs)*(q[2]-qe[2]) + S[3] -= (cs)*(q[3]-qe[3]) + S[4] -= (cs)*(q[4]-qe[4]) + S[5] -= (cs)*(q[5]-qe[5]) + return S +end + +function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, z, zmin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = 0.0 + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + S[6] = 0.0 + S[7] = 0.0 + #### SPONGE + + # + # clateral + nsponge_points = 8 + + zs = 14000.0#ymax - 20000.0 + xr = 8000.0 + xl = -8000.0 + + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(z-zs)/(zmax-zs))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + #betay_coe = 0.9/(1+exp((0.4*ymax-y)/(ymax/18))) + #betay_coe = 25.0/(1+exp((0.9*ymax-y)/(ymax/15))) ### damps too far down + #betay_coe = 2.0/(1+exp((0.3*(ymax-15000)-y+15000)/((ymax-15000)/18))) + else + betay_coe = 0.0 + end + #if (abs(x) <=xmin) + ctop= betay_coe#0.5*betay_coe + #else + # ctop = 0.0 + #end + + if (x >= xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x <= xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 0.0*betaxr_coe#0.25*betaxr_coe + cxl = 0.0*betaxl_coe#0.25*betaxl_coe + ctop = 0.5*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]) + S[2] -= (cs)*(q[2]) + S[3] -= (cs)*q[3] + S[4] -= (cs)*(q[4]) + S[5] -= (cs)*(q[5]) + S[6] -= (cs)*(q[6]) + S[7] -= (cs)*(q[7]) + return S +end + +function user_source_gpu(q,qe,x,y,z,PhysConst,xmax,xmin,ymax,ymin,zmax,zmin,lpert) + + T = eltype(x) + # distance from the boundary. xs in Restelli's thesis + zs = T(18000.0)#ymax - 20000.0 + xr = T(30000.0) + xl = T(-30000.0) + + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betaz_coe = T(sinpi(T(0.5)*(z-zs)/(zmax-zs))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaz_coe = T(0.0) + end + ctop= betaz_coe#0.5*betay_coe + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = T(sinpi(T(0.5)*(x-xr)/(xmax-xr))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = T(0.0) + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = T(sinpi(T(0.5)*(xl-x)/(xl-xmin))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = T(0.0) + end + + cxr = T(1.0)*betaxr_coe#0.25*betaxr_coe + cxl = T(1.0)*betaxl_coe#0.25*betaxl_coe + ctop = T(1.0)*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = T(1.0) - (T(1.0) -ctop)*(T(1.0)-cxr)*(T(1.0) - cxl) + + # + # S(q(x)) = -ρg + # + ρ = q[1] + #return T(0.0), T(0.0), T(0.0), T(-ρ*PhysConst.g), T(0.0), T(0.0), T(0.0) + return T(-cs*q[1]), T(-cs*q[2]), T(-cs*q[3]), T(-cs*q[4]-ρ*PhysConst.g), T(-cs*q[5]), T(-cs*q[6]), T(-cs*q[7]) +end diff --git a/problems/equations/CompEuler/squall_line_experiment/user_flux.jl b/problems/equations/CompEuler/squall_line_experiment/user_flux.jl new file mode 100644 index 000000000..79e91d575 --- /dev/null +++ b/problems/equations/CompEuler/squall_line_experiment/user_flux.jl @@ -0,0 +1,141 @@ +function user_flux!(F, G, H, + q, + qe, + mesh::St_mesh, + ::CL, ::TOTAL; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρw = q[4] + ρhl = q[5] + ρqt = q[6] + ρqp = q[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + Pressure = q[end] - qe[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt = qt, qp = qp) + F[1] = ρu + F[2] = ρu*u .+ Pressure + F[3] = ρu*v + F[4] = ρu*w + F[5] = ρhl*u + F[6] = ρqt*u + F[7] = ρqp*u + + G[1] = ρv + G[2] = ρv*u + G[3] = ρv*v .+ Pressure + G[4] = ρv*w + G[5] = ρhl*v + G[6] = ρqt*v + G[7] = ρqp*v + + H[1] = ρw + H[2] = ρw*u + H[3] = ρw*v + H[4] = ρw*w .+ Pressure + H[5] = ρhl*w + H[6] = ρqt*w + H[7] = ρqp*w + +end + +function user_flux!(F, G, H, + q, + qe, + mesh::St_mesh, + ::CL, ::PERT; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + qe[1] + ρu = q[2] + qe[2] + ρv = q[3] + qe[3] + ρw = q[4] + qe[4] + ρhl = q[5] + qe[5] + ρqt = q[6] + qe[6] + ρqp = q[7] + qe[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + ρqt = ρqt/ρ + ρqp = ρqp/ρ + + Pressure = q[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) + Pressure = Pressure - qe[end] + + F[1] = ρu + F[2] = ρu*u .+ Pressure + F[3] = ρv*u + F[4] = ρw*u + F[5] = ρhl*u + F[6] = ρqt*u + F[7] = ρqp*u + + G[1] = ρv + G[2] = ρu*v + G[3] = ρv*v .+ Pressure + G[4] = ρw*v + G[5] = ρhl*v + G[6] = ρqt*v + G[7] = ρqp*v + + H[1] = ρw + H[2] = ρu*w + H[3] = ρv*w + H[4] = ρw*w .+ Pressure + H[5] = ρhl*w + H[6] = ρqt*w + H[7] = ρqp*w + +end + +function user_flux_gpu(q,qe,PhysConst,lpert) + T = eltype(q) + if (lpert) + ρ = q[1]+qe[1] + ρu = q[2]+qe[2] + ρv = q[3]+qe[3] + ρw = q[4]+qe[4] + ρhl = q[5]+qe[5] + ρqt = q[6]+qe[6] + ρqp = q[7]+qe[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + + Pressure = q[end]-qe[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) - qe[6] + return T(ρu), T(ρu*u + Pressure), T(ρv*u), T(ρw*u), T(ρhl*u), T(ρqt*u), T(ρqp*u), T(ρv), T(ρu*v), T(ρv*v + Pressure), T(ρw*v), T(ρhl*v), T(ρqt*v), T(ρqp*v), T(ρw), T(ρu*w), T(ρv*w), T(ρw*w + Pressure), T(ρhl*w), T(ρqt*w), T(ρqp*w) + else + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρw = q[4] + ρhl = q[5] + ρqt = q[6] + ρqp = q[7] + + hl = ρhl/ρ + u = ρu/ρ + v = ρv/ρ + w = ρw/ρ + qt = ρqt/ρ + qp = ρqp/ρ + + Pressure = q[end]#perfectGasLaw_ρhltoP(PhysConst, ρ=ρ, hl=hl, qt=qt, qp=qp) + return T(ρu), T(ρu*u + Pressure), T(ρv*u), T(ρw*u), T(ρhl*u), T(ρqt*u), T(ρqp*u), T(ρv), T(ρu*v), T(ρv*v + Pressure), T(ρw*v), T(ρhl*v), T(ρqt*v), T(ρqp*v), T(ρw), T(ρu*w), T(ρv*w), T(ρw*w + Pressure), T(ρhl*w), T(ρqt*w), T(ρqp*w) + end +end diff --git a/problems/equations/CompEuler/squall_line_experiment_LinEtAl/initialize.jl b/problems/equations/CompEuler/squall_line_experiment_LinEtAl/initialize.jl new file mode 100644 index 000000000..051946181 --- /dev/null +++ b/problems/equations/CompEuler/squall_line_experiment_LinEtAl/initialize.jl @@ -0,0 +1,239 @@ +function initialize(SD::NSD_3D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 3D CompEuler with θ equation ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ρ", "ρu", "ρv", "ρw", "hl", "ρqt", "ρqp") + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) + #--------------------------------------------------------------------------------- + + if (inputs[:backend] == CPU()) + PhysConst = PhysicalConst{TFloat}() + if inputs[:lrestart] == true + # + # READ RESTART HDF5: + # + q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) + PhysConst = PhysicalConst{TFloat}() + + for ip=1:mesh.npoin + ρ = q.qn[ip,1] + ρθ = q.qn[ip,5] + θ = ρθ/ρ + P = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + q.qn[ip,end] = P + + ρe = q.qe[ip,1] + ρθe = q.qe[ip,5] + θe = ρθe/ρ + Pe = perfectGasLaw_ρθtoP(PhysConst, ρ=ρe, θ=θe) + q.qe[ip,end] = Pe + end + + else + # + # INITIAL STATE from scratch: + # + xc = (maximum(mesh.x) + minimum(mesh.x))/2 + zc = 2000.0 #m + + θc = 3.0 #K + rx = 10000.0 + rz = 1500.0 + data = read_sounding(inputs[:sounding_file]) + background = interpolate_sounding(inputs[:backend],mesh.npoin,mesh.z,data) + balanced = zeros(mesh.npoin,1) + #rebalance hydrostatic state + diff = 100000.0 + niter = 0 + + for ip = 1:mesh.npoin + + x, y, z = mesh.x[ip], mesh.y[ip], mesh.z[ip] + + r = sqrt( (x - xc)^2/(rx^2) + (z - zc)^2/(rz^2) ) + + Δθ = 0.0 #K + if r <= 1 + Δθ = θc*cospi(r/2)^2 + end + θ_ref = background[ip,1] + qv_ref = background[ip,2]/1000 + u_ref = background[ip,3] + v_ref = background[ip,4] + pref = background[ip,5] + θv_ref = θ_ref*(1 + 0.608*qv_ref) + θ = θ_ref + Δθ + θv = θv_ref + Δθ + p = PhysConst.pref*(1.0 - PhysConst.g*z/(PhysConst.cp*θv))^(PhysConst.cpoverR) #Pa + Tref = θ_ref / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp) + T = θ / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θv, Press=pref) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θv_ref, Press=pref) #kg/m³ + hl = PhysConst.cp*T + PhysConst.g*z + hl_ref = PhysConst.cp*Tref + PhysConst.g*z + u = u_ref + v = v_ref + w = 0.0 + pref_m = ρref*PhysConst.Rair*Tref + ρref*qv_ref*PhysConst.Rvap*Tref + + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[ip,1] = ρ - ρref + q.qn[ip,2] = ρ*u - ρref*u + q.qn[ip,3] = ρ*v - ρref*v + q.qn[ip,4] = ρ*w - ρref*w + q.qn[ip,5] = ρ*hl - ρref*hl_ref#ρ*θ - ρref*θref + q.qn[ip,6] = ρ*qv_ref-ρref*qv_ref + q.qn[ip,7] = 0.0 + q.qn[ip,end] = pref_m #+ ρ*qv_ref*PhysConst.Rvap*T + + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = ρref*u_ref + q.qe[ip,3] = ρref*v_ref + q.qe[ip,4] = ρref*w + q.qe[ip,5] = ρref*hl_ref + q.qe[ip,6] = ρref*qv_ref + q.qe[ip,7] = 0.0 + q.qe[ip,end] = pref_m #+ ρref*qv*PhysConst.Rvap*Tref + else + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*w + q.qn[ip,5] = ρ*hl + q.qn[ip,6] = ρ*qv_ref#0.0 + q.qn[ip,7] = 0.0 + q.qn[ip,end] = pref_m #+ ρ*qv*PhysConst.Rvap*T + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = ρref*u_ref + q.qe[ip,3] = ρref*v_ref + q.qe[ip,4] = ρref*w + q.qe[ip,5] = ρref*hl_ref + q.qe[ip,6] = ρref*qv_ref + q.qe[ip,7] = 0.0 + q.qe[ip,end] = pref_m #+ ρref*qv*PhysConst.Rvap*Tref + end + #end + end + end + + if inputs[:CL] == NCL() + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[:,2] .= q.qn[:,2]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,3] .= q.qn[:,3]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,4] .= q.qn[:,4]./(q.qn[:,1] + q.qe[:,1]) + q.qn[:,5] .= q.qn[:,5]./(q.qn[:,1] + q.qe[:,1]) + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + else + q.qn[:,2] .= q.qn[:,2]./q.qn[:,1] + q.qn[:,3] .= q.qn[:,3]./q.qn[:,1] + q.qn[:,4] .= q.qn[:,4]./q.qn[:,1] + q.qn[:,5] .= q.qn[:,5]./q.qn[:,1] + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,5] .= q.qe[:,5]./q.qe[:,1] + end + end + + else + if (inputs[:SOL_VARS_TYPE] == PERT()) + lpert = true + else + lpert = false + end + data = read_sounding(inputs[:sounding_file]) + background = interpolate_sounding(inputs[:backend],mesh.npoin,mesh.z,data) + PhysConst = PhysicalConst{TFloat}() + xc = TFloat((maximum(mesh.x) + minimum(mesh.x))/2) + zc = TFloat(2000.0) #m + rz = TFloat(1500.0) #m + rx = TFloat(10000.0) + θref = TFloat(300.0) #K + θc = TFloat(2.0) #K + k = initialize_gpu!(inputs[:backend]) + k(q.qn, q.qe, background, mesh.x, mesh.y, mesh.z, xc, rx, rz, zc, θc, PhysConst, lpert; ndrange = (mesh.npoin)) + end + @info maximum(q.qe[:,end]), minimum(q.qe[:,end]) + @info " Initialize fields for 3D CompEuler with θ equation ........................ DONE " + return q +end + +@kernel function initialize_gpu!(qn, qe, background, x, y, z, xc, rx, rz, zc, θc, PhysConst, lpert) + ip = @index(Global, Linear) + + T = eltype(x) + x1 = x[ip] + y1 = y[ip] + z1 = z[ip] + + r = T(sqrt( (x1 - xc)^2/(rx^2) + (z1 - zc)^2/(rz^2) )) + + Δθ = T(0.0) #K + if r <= 1 + Δθ = T(θc*cospi(r/2)^2) + end + θ_ref = background[ip,1] + qv_ref = T(background[ip,2]/T(1000)) + u_ref = background[ip,3] + v_ref = background[ip,4] + pref = background[ip,5] + θv_ref = θ_ref*(T(1) + T(0.608)*qv_ref) + θ = θ_ref + Δθ + θv = θv_ref + Δθ + p = PhysConst.pref*(T(1.0) - PhysConst.g*T(z1/(PhysConst.cp*θv)))^(PhysConst.cpoverR) #Pa + Tref = T(θ_ref / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp)) + Tabs = T(θ / (PhysConst.pref/pref)^(PhysConst.Rair/PhysConst.cp)) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θv, Press=pref) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θv_ref, Press=pref) #kg/m³ + hl = PhysConst.cp*Tabs + PhysConst.g*z1 + hl_ref = PhysConst.cp*Tref + PhysConst.g*z1 + u = u_ref + v = v_ref + w = T(0.0) + pref_m = ρref*PhysConst.Rair*Tref + ρref*qv_ref*PhysConst.Rvap*Tref + + if (lpert) + qn[ip,1] = T(ρ - ρref) + qn[ip,2] = ρ*u - ρref*u + qn[ip,3] = ρ*v - ρref*v + qn[ip,4] = ρ*w - ρref*w + qn[ip,5] = ρ*hl - ρref*hl_ref + qn[ip,6] = ρ*qv_ref - ρref*qv_ref + qn[ip,7] = T(0.0) + qn[ip,end] = pref_m + else + qn[ip,1] = ρ + qn[ip,2] = ρ*u + qn[ip,3] = ρ*v + qn[ip,4] = ρ*w + qn[ip,5] = ρ*hl + qn[ip,6] = ρ*qv_ref + qn[ip,7] = T(0.0) + qn[ip,end] = pref_m + end + + #Store initial background state for plotting and analysis of pertuebations + qe[ip,1] = ρref + qe[ip,2] = ρref*u + qe[ip,3] = ρref*v + qe[ip,4] = ρref*w + qe[ip,5] = ρref*hl_ref + qe[ip,6] = ρref*qv_ref + qe[ip,7] = 0.0 + qe[ip,end] = pref_m + +end diff --git a/problems/equations/CompEuler/squall_line_experiment_LinEtAl/user_source.jl b/problems/equations/CompEuler/squall_line_experiment_LinEtAl/user_source.jl new file mode 100644 index 000000000..f354b60b3 --- /dev/null +++ b/problems/equations/CompEuler/squall_line_experiment_LinEtAl/user_source.jl @@ -0,0 +1,168 @@ + +function user_source!(S, q, qe, npoin, ::CL,::TOTAL; neqs=1,x=0.0, y=0.0, z=0.0, ymin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] -qe[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = 0.0 + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + S[6] = 0.0 + S[7] = 0.0 + #### SPONGE + + # + # clateral + zs= 15000.0 #ymax - 16000.0 + xr= 23000.0 #12500.0 + xl=-23000.0 #-12500.0 + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(z-zs)/(zmax-zs))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betay_coe = 0.0 + end + ctop= 1.0*betay_coe + + if (x >= xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x <= xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 0.0*betaxr_coe + cxl = 0.0*betaxl_coe + #@info x,y,cxr,cxl,ctop + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]-qe[1]) + S[2] -= (cs)*(q[2]-qe[2]) + S[3] -= (cs)*(q[3]-qe[3]) + S[4] -= (cs)*(q[4]-qe[4]) + S[5] -= (cs)*(q[5]-qe[5]) + return S +end + +function user_source!(S, q, qe, npoin, ::CL,::PERT; neqs=1,x=0.0, y=0.0, z, zmin=0.0, zmax=30000.0, ngl=5, nely=10,xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + # + # S(q(x)) = -ρg + # + ρ = q[1] + + S[1] = 0.0 + S[2] = 0.0 + S[3] = 0.0 + S[4] = -ρ*PhysConst.g + S[5] = 0.0 + S[6] = 0.0 + S[7] = 0.0 + #### SPONGE + + # + # clateral + nsponge_points = 8 + + zs = 15000.0#ymax - 20000.0 + xr = 12500.0 + xl = -12500.0 + + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betay_coe = sinpi(0.5*(z-zs)/(zmax-zs))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + #betay_coe = 0.9/(1+exp((0.4*ymax-y)/(ymax/18))) + #betay_coe = 25.0/(1+exp((0.9*ymax-y)/(ymax/15))) ### damps too far down + #betay_coe = 2.0/(1+exp((0.3*(ymax-15000)-y+15000)/((ymax-15000)/18))) + else + betay_coe = 0.0 + end + #if (abs(x) <=xmin) + ctop= betay_coe#0.5*betay_coe + #else + # ctop = 0.0 + #end + + if (x >= xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = sinpi(0.5*(x-xr)/(xmax-xr))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = 0.0 + end + + if (x <= xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = sinpi(0.5*(xl-x)/(xl-xmin))^2#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = 0.0 + end + + cxr = 1.0*betaxr_coe#0.25*betaxr_coe + cxl = 1.0*betaxl_coe#0.25*betaxl_coe + ctop = 1.0*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = 1.0 - (1.0 -ctop)*(1.0-cxr)*(1.0 - cxl) + + #@info "β x: " ctop,cxr,cxl,cs, zs, y, x, ymin, ymax, dsy, dbl + S[1] -= (cs)*(q[1]) + S[2] -= (cs)*(q[2]) + S[3] -= (cs)*q[3] + S[4] -= (cs)*(q[4]) + S[5] -= (cs)*(q[5]) + #S[6] -= (cs)*(q[6]) + #S[7] -= (cs)*(q[7]) + return S +end + +function user_source_gpu(q,qe,x,y,z,PhysConst,xmax,xmin,ymax,ymin,zmax,zmin,lpert) + + T = eltype(x) + # distance from the boundary. xs in Restelli's thesis + zs = T(18000.0)#ymax - 20000.0 + xr = T(30000.0) + xl = T(-30000.0) + + if (z >= zs)#nsponge_points * dsy) #&& dbl >= 0.0) + betaz_coe = T(sinpi(T(0.5)*(z-zs)/(zmax-zs))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaz_coe = T(0.0) + end + ctop= betaz_coe#0.5*betay_coe + + if (x > xr)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxr_coe = T(sinpi(T(0.5)*(x-xr)/(xmax-xr))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxr_coe = T(0.0) + end + + if (x < xl)#nsponge_points * dsy) #&& dbl >= 0.0) + betaxl_coe = T(sinpi(T(0.5)*(xl-x)/(xl-xmin))^2)#1.0 - tanh(dbl/5000.0)#(nsponge_points * dsy)) + else + betaxl_coe = T(0.0) + end + + cxr = T(1.0)*betaxr_coe#0.25*betaxr_coe + cxl = T(1.0)*betaxl_coe#0.25*betaxl_coe + ctop = T(1.0)*min(ctop,1) + cxr = min(cxr,1) + cxl = min(cxl,1) + cs = T(1.0) - (T(1.0) -ctop)*(T(1.0)-cxr)*(T(1.0) - cxl) + + # + # S(q(x)) = -ρg + # + ρ = q[1] + #return T(0.0), T(0.0), T(0.0), T(-ρ*PhysConst.g), T(0.0), T(0.0), T(0.0) + return T(-cs*q[1]), T(-cs*q[2]), T(-cs*q[3]), T(-cs*q[4]-ρ*PhysConst.g), T(-cs*q[5]), T(-cs*q[6]), T(-cs*q[7]) +end diff --git a/problems/equations/CompEuler/thetaNC/initialize.jl b/problems/equations/CompEuler/thetaNC/initialize.jl new file mode 100644 index 000000000..7e22fdfa5 --- /dev/null +++ b/problems/equations/CompEuler/thetaNC/initialize.jl @@ -0,0 +1,69 @@ +function initialize(SD::NSD_2D, PT::CompEuler, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 2D CompEuler with θ equation ........................ " + + PhysConst = PhysicalConst{TFloat}() + + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, TFloat; neqs=4) + + if (inputs[:case] === "rtb") + + xc = (maximum(mesh.x) + minimum(mesh.x))/2 + yc = 2500.0 #m + r0 = 2000.0 #m + + θref = 300.0 #K + θc = 2.0 #K + for iel_g = 1:mesh.nelem + for j=1:mesh.ngl, i=1:mesh.ngl + + ip = mesh.connijk[iel_g,i,j] + x, y = mesh.x[ip], mesh.y[ip] + r = sqrt( (x - xc)^2 + (y - yc)^2 ) + + Δθ = 0.0 #K + if r < r0 + Δθ = θc*(1.0 - r/r0) + end + θ = θref + Δθ + p = PhysConst.pref*(1.0 - PhysConst.g*y/(PhysConst.cp*θ))^(PhysConst.cpoverR) #Pa + pref = PhysConst.pref*(1.0 - PhysConst.g*y/(PhysConst.cp*θref))^(PhysConst.cpoverR) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θ, Press=p) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θref, Press=pref) #kg/m³ + + u = 0.0 + v = 0.0 + + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*θ + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = u + q.qe[ip,3] = v + q.qe[ip,4] = ρref*θref + end + end + + else + error(" ERROR: CompEuler: initialize.jl:\n assign value to inputs[:case]") + end + + if inputs[:CL] == NCL() + q.qn[:,2] .= q.qn[:,2]./q.qn[:,1] + q.qn[:,3] .= q.qn[:,3]./q.qn[:,1] + q.qn[:,4] .= q.qn[:,4]./q.qn[:,1] + + #Store initial background state for plotting and analysis of pertuebations + q.qe[:,4] .= q.qe[:,4]./q.qe[:,1] + end + + + @info "Initialize fields for system of 2D CompEuler with θ equation ........................ DONE" + + return q +end diff --git a/problems/equations/CompEuler/thetaNC/user_bc.jl b/problems/equations/CompEuler/thetaNC/user_bc.jl new file mode 100644 index 000000000..17e62ccf9 --- /dev/null +++ b/problems/equations/CompEuler/thetaNC/user_bc.jl @@ -0,0 +1,25 @@ +function user_bc_dirichlet!(qbdy, x, y, t, tag::String, inputs) + + #fill!(flags, zero(TFloat)) + if ( x <= -4990.0 || x >= 4990.0) + qbdy[2] = 0.0 + end + if (y <= 10.0 || y >= 9990.0) + qbdy[3] = 0.0 + end + if ((x >= 4990.0 || x <= -4990.0) && (y >= 9990.0 || y <= 10.0)) + qbdy[2] = 0.0 + qbdy[3] = 0.0 + end + +end + +function user_bc_neumann(q::AbstractArray, gradq::AbstractArray, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, inputs::Dict) + fill!(flux, zero(TFloat)) + return flux +end + +function user_bc_neumann(q::AbstractArray, gradq::AbstractArray, x::AbstractFloat, t::AbstractFloat, inputs::Dict) + fill!(flux, zero(TFloat)) + return flux +end diff --git a/problems/equations/CompEuler/thetaNC/user_flux.jl b/problems/equations/CompEuler/thetaNC/user_flux.jl new file mode 100644 index 000000000..d558780a6 --- /dev/null +++ b/problems/equations/CompEuler/thetaNC/user_flux.jl @@ -0,0 +1,84 @@ +function user_flux!(F, G, SD::NSD_2D, + q, + qe, + mesh::St_mesh, + ::CL, ::TOTAL; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρθ = q[4] + θ = ρθ/ρ + u = ρu/ρ + v = ρv/ρ + + Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + F[1] = ρu + F[2] = ρu*u + Press + F[3] = ρv*u + F[4] = ρθ*u + + G[1] = ρv + G[2] = ρu*v + G[3] = ρv*v + Press + G[4] = ρθ*v +end + +function user_flux!(F, G, SD::NSD_2D, + q, + qe, + mesh::St_mesh, + ::CL, ::PERT; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + qe[1] + ρu = q[2] + ρv = q[3] + ρθ = q[4] + qe[4] + + θ = ρθ/ρ + u = ρu/ρ + v = ρv/ρ + + Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + Press = Press - qe[end] + + F[1] = ρu + F[2] = ρu*u + Press + F[3] = ρv*u + F[4] = ρθ*u + + G[1] = ρv + G[2] = ρu*v + G[3] = ρv*v + Press + G[4] = ρθ*v +end + + +function user_flux!(F, G, SD::NSD_2D, + q, + qe, + mesh::St_mesh, + ::NCL, ::AbstractPert; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + u = q[2] + v = q[3] + θ = q[4] + + Press = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + F[1] = ρ*u + F[2] = u + F[3] = v + F[4] = θ + + G[1] = ρ*v + G[2] = u + G[3] = v + G[4] = θ +end diff --git a/problems/equations/CompEuler/vortex/initialize.jl b/problems/equations/CompEuler/vortex/initialize.jl new file mode 100644 index 000000000..ddc377c62 --- /dev/null +++ b/problems/equations/CompEuler/vortex/initialize.jl @@ -0,0 +1,185 @@ +function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 2D CompEuler with θ equation ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ρ", "ρu", "ρv", "ρe") + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) + #--------------------------------------------------------------------------------- + PhysConst = PhysicalConst{TFloat}() + + + mycase = "vor" + Rair = PhysConst.Rair + cv = PhysConst.cv + γ = PhysConst.γ + γinv = 1.0/γ + γm1 = γ - 1.0 + γm1inv = 1.0/γm1 + γstar = γ*γm1inv + + if inputs[:lrestart] == true + # + # READ RESTART HDF5: + # + q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) + PhysConst = PhysicalConst{TFloat}() + for ip=1:mesh.npoin + ρ = q.qn[ip,1] + ρθ = q.qn[ip,4] + θ = ρθ/ρ + P = perfectGasLaw_ρθtoP(PhysConst, ρ=ρ, θ=θ) + q.qn[ip,end] = P + + ρe = q.qe[ip,1] + ρθe = q.qe[ip,4] + θe = ρθe/ρ + Pe = perfectGasLaw_ρθtoP(PhysConst, ρ=ρe, θ=θe) + q.qe[ip,end] = Pe + end + + else + if mycase=="vor" + + # base flow + xc = 0.0 + yc = 0.0 + + # + # INITIAL STATE from scratch: + # + if inputs[:case] == "shu" #Shu + + αdeg = 0.0 + Minf = sqrt(2.0/γ) + ρinf = 1.0 + pinf = 1.0 + Tinf = 1.0 + R = 1.0 + σ = 1.0 + β = Minf*5.0*sqrt(2.0)/(4π)*exp(0.5) + + elseif inputs[:case] == "vincent" #vincent + + αdeg = 90.0 + Minf = 0.4 + ρinf = 1.0 + pinf = 1.0/(γ*Minf*Minf) + Tinf = 1.0 + R = 1.5 + σ = 1.0 + β = Minf*27.0/(4π)*exp(2.0/9.0) + + elseif inputs[:case] == "hw" #Hesthaven and Warburton + + αdeg = 0.0 + Minf = sqrt(1.0/γ) + ρinf = 1.0 + pinf = 1.0 + Tinf = 1.0 + R = 0.7071067811865476 + σ = 1.0 + β = Minf*5.0/(2π)*exp(1.0) + + end + + α = αdeg*π/180.0 + MinfCos = Minf*cos(α) + MinfSin = Minf*sin(α) + R2 = R*R + σ2 = σ*σ + oneOverR = 1.0/R + Const = -0.5/(σ2*R2) + g = 1.0/(γ - 1.0) + Tc = 5.0 + + for ip = 1:mesh.npoin + + x = mesh.x[ip] + y = mesh.y[ip] + + f = Const*( (x - xc)^2 + (y - yc)^2 ) + Ω = β*exp(f) + + du = -y*Ω*oneOverR + dv = x*Ω*oneOverR + dT = -0.5*γm1*Ω^2 + + ρ = (1.0 + dT)^γm1inv + u = MinfCos + du + v = MinfSin + dv + p = γinv*(1.0 + dT)^γstar + + T = p/(ρ*Rair) + e = p/(γ - 1.0) + 0.5*ρ*(u^2 + v^2); + + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*e + q.qn[ip,end] = p + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = 0.0 + q.qe[ip,2] = 0.0 + q.qe[ip,3] = 0.0 + q.qe[ip,4] = 0.0 + q.qe[ip,end] = 0.0 + end + + elseif mycase=="the" + + xc = (maximum(mesh.x) + minimum(mesh.x))/2 + yc = 0.0 #m + r0 = 2.0 #m + + θref = 1.0 #K + θc = θref*0.01 #K + ## + for ip = 1:mesh.npoin + + x, y = mesh.x[ip], mesh.y[ip] + r = sqrt( (x - xc)^2 + (y - yc)^2 ) + + Δθ = 0.0 #K + if r < r0 + Δθ = θc*(1.0 - r/r0) + end + θ = θref + Δθ + p = 1.0 #PhysConst.pref*(1.0 - PhysConst.g*y/(PhysConst.cp*θ))^(PhysConst.cpoverR) #Pa + pref = 1.0 #PhysConst.pref*(1.0 - PhysConst.g*y/(PhysConst.cp*θref))^(PhysConst.cpoverR) + ρ = 1.0 #perfectGasLaw_θPtoρ(PhysConst; θ=θ, Press=p) #kg/m³ + ρref = 1.0 #perfectGasLaw_θPtoρ(PhysConst; θ=θref, Press=pref) #kg/m³ + + u = 2.0 + v = 0.0 + + q.qn[ip,1] = ρ + q.qn[ip,2] = ρ*u + q.qn[ip,3] = ρ*v + q.qn[ip,4] = ρ*θ + q.qn[ip,end] = p + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip,1] = ρref + q.qe[ip,2] = u + q.qe[ip,3] = v + q.qe[ip,4] = ρref*θref + q.qe[ip,end] = pref + end + ## + end + end + + @info " Initialize fields for 2D CompEuler with θ equation ........................ DONE " + + return q +end diff --git a/problems/equations/CompEuler/vortex/user_flux.jl b/problems/equations/CompEuler/vortex/user_flux.jl new file mode 100644 index 000000000..93f8fcbf3 --- /dev/null +++ b/problems/equations/CompEuler/vortex/user_flux.jl @@ -0,0 +1,32 @@ +function user_flux!(F, G, SD::NSD_2D, + q, + qe, + mesh::St_mesh, + ::CL, ::TOTAL; neqs=4, ip=1, kwargs...) + + PhysConst = PhysicalConst{TFloat}() + + ρ = q[1] + ρu = q[2] + ρv = q[3] + ρe = q[4] + + u = ρu/ρ + v = ρv/ρ + + T = (ρe/ρ - 0.5*sqrt(u*u + v*v))/PhysConst.cv + + gm1 = PhysConst.γ - 1.0 + #Pressure = gm1*(ρe - 0.5*ρ*(u*u + v*v)) + Pressure = perfectGasLaw_ρTtoP(PhysConst, ρ=ρ, Temp=T) + + F[1] = ρu + F[2] = ρu*u .+ Pressure + F[3] = ρv*u + F[4] = u*(ρe .+ Pressure) + + G[1] = ρv + G[2] = ρu*v + G[3] = ρv*v .+ Pressure + G[4] = v*(ρe .+ Pressure) +end diff --git a/problems/equations/CompEuler/vortex/user_source.jl b/problems/equations/CompEuler/vortex/user_source.jl new file mode 100644 index 000000000..3e961073f --- /dev/null +++ b/problems/equations/CompEuler/vortex/user_source.jl @@ -0,0 +1,13 @@ +function user_source!(S, + q, + qe, + npoin::TInt, + ::CL, ::TOTAL; + neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) + + PhysConst = PhysicalConst{TFloat}() + + S = 0.0 + +end + diff --git a/problems/equations/IncompNS/incompressible_2D_free_slip/initialize.jl b/problems/equations/IncompNS/incompressible_2D_free_slip/initialize.jl new file mode 100644 index 000000000..842630b47 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_free_slip/initialize.jl @@ -0,0 +1,124 @@ +function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 2D incompressible NS of vorticity-stream function form ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ω") + qoutvars = ("ω") + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars), qoutvars = qoutvars) + #--------------------------------------------------------------------------------- + if (inputs[:backend] == CPU()) + PhysConst = PhysicalConst{TFloat}() + if (inputs[:case] === "rtb") + + for iel_g = 1:mesh.nelem + for j=1:mesh.ngl, i=1:mesh.ngl + + ip = mesh.connijk[iel_g,i,j] + x, y = mesh.x[ip], mesh.y[ip] + + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[ip] = cos(pi*x/2)*cos(pi*y/2) + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip] = 0 + + else + q.qn[ip] = cos(pi*x/2)*cos(pi*y/2) + + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip] = 0 + end + end + end + + else + error(" ERROR: CompEuler: initialize.jl:\n assign value to inputs[:case]") + end + + # + # Write reference to VTK: + # + + end + @info " Initialize fields for 2D incompressible NS of vorticity-stream function form ........................ DONE " + + return q +end + +#=@kernel function initialize_gpu!(qn, qe, x, y, xc, rθ, yc, θref, θc, PhysConst,lpert) + ip = @index(Global, Linear) + + T = eltype(x) + xc2 = T(-2000.0) + yc2 = T(4000.0) #m + r02 = T(1000.0) #m + qtrc2 = T(1.0) #K + + θref = T(300.0) #K + θc = T(2.0) #K + qtrref = T(0.0) #K + qtrc = T(1.0) #K + + x = x[ip] + y = y[ip] + r = sqrt( (x - xc)^2 + (y - yc)^2 ) + Δθ = T(0.0) #K + Δqtr = T(0.0) + if r < rθ + Δθ = T(θc*(T(1.0) - r/rθ)) + Δqtr = qtrc + end + + r = sqrt( (x - xc2)^2 + (y - yc2)^2 ) + Δqtr2 = T(0.0) #K + if r < r02 + Δqtr2 = qtrc2 + end + qtr = qtrref + Δqtr + qtr2 = qtrref + Δqtr2 + + θ = θref + Δθ + p = PhysConst.pref*(T(1.0) - PhysConst.g*y/(PhysConst.cp*θ))^(PhysConst.cpoverR) #Pa + pref = PhysConst.pref*(T(1.0) - PhysConst.g*y/(PhysConst.cp*θref))^(PhysConst.cpoverR) + ρ = perfectGasLaw_θPtoρ(PhysConst; θ=θ, Press=p) #kg/m³ + ρref = perfectGasLaw_θPtoρ(PhysConst; θ=θref, Press=pref) #kg/m³ + + u = T(0.0) + v = T(0.0) + if (lpert) + qn[ip,1] = ρ - ρref + qn[ip,2] = ρ*u + qn[ip,3] = ρ*v + qn[ip,4] = ρ*θ - ρref*θref + qn[ip,5] = qtr - qtrref + qn[ip,6] = qtr2 - qtrref + qn[ip,end] = p + else + qn[ip,1] = ρ + qn[ip,2] = ρ*u + qn[ip,3] = ρ*v + qn[ip,4] = ρ*θ + qn[ip,5] = qtr + qn[ip,6] = qtr2 + qn[ip,end] = p + end + + #Store initial background state for plotting and analysis of pertuebations + qe[ip,1] = ρref + qe[ip,2] = u + qe[ip,3] = v + qe[ip,4] = ρref*θref + qe[ip,5] = qtrref + qe[ip,6] = qtrref + qe[ip,end] = pref + +end=# diff --git a/problems/equations/IncompNS/incompressible_2D_free_slip/user_bc.jl b/problems/equations/IncompNS/incompressible_2D_free_slip/user_bc.jl new file mode 100644 index 000000000..622c78c69 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_free_slip/user_bc.jl @@ -0,0 +1,12 @@ +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx, ny,qe::SubArray{TFloat},::TOTAL) + + qbdy[1] = 0.0 + +end + +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{TFloat},::PERT) + + qbdy[1] = 0.0 + +end + diff --git a/problems/equations/IncompNS/incompressible_2D_free_slip/user_flux.jl b/problems/equations/IncompNS/incompressible_2D_free_slip/user_flux.jl new file mode 100644 index 000000000..3456d9671 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_free_slip/user_flux.jl @@ -0,0 +1,11 @@ +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q, + qe::SubArray{TFloat}, + mesh::St_mesh, + ::CL, ::TOTAL; + neqs=1, ip=1, ∇ψ = zeros(TFloat,2)) + + F[1] = -q[1]*∇ψ[2] + G[1] = q[1]*∇ψ[1] + +end \ No newline at end of file diff --git a/problems/equations/IncompNS/incompressible_2D_free_slip/user_source.jl b/problems/equations/IncompNS/incompressible_2D_free_slip/user_source.jl new file mode 100644 index 000000000..798874701 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_free_slip/user_source.jl @@ -0,0 +1,36 @@ +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, + npoin::Int64, + ::CL, ::TOTAL; + neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) + + PhysConst = PhysicalConst{TFloat}() + + S[1] = 0.0 + +end + +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, + npoin::Int64, + ::CL, ::PERT; + neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + S[1] = 0.0 + +end + +function user_source_gpu(q,qe,x,y,PhysConst, xmax, xmin, ymax, ymin,lpert) + + T = eltype(q) + # + # S(q(x)) = -ρg + # + ρ = q[1] + + return T(0.0), T(0.0), T(-ρ*PhysConst.g), T(0.0), T(0.0), T(0.0) +end diff --git a/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/initialize.jl b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/initialize.jl new file mode 100644 index 000000000..51996567c --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/initialize.jl @@ -0,0 +1,52 @@ +function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFloat) + """ + + """ + @info " Initialize fields for 2D incompressible NS of vorticity-stream function form ........................ " + + #--------------------------------------------------------------------------------- + # Solution variables: + # + # NOTICE: while these names can be arbitrary, the length of this tuple + # defines neqs, which is the second dimension of q = define_q() + # + #--------------------------------------------------------------------------------- + qvars = ("ω") + qoutvars = ["ω", "u", "v"] + q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars), qoutvars=qoutvars) + #--------------------------------------------------------------------------------- + if (inputs[:backend] == CPU()) + PhysConst = PhysicalConst{TFloat}() + if (inputs[:case] === "rtb") + + for iel_g = 1:mesh.nelem + for j=1:mesh.ngl, i=1:mesh.ngl + + ip = mesh.connijk[iel_g,i,j] + x, y = mesh.x[ip], mesh.y[ip] + + if inputs[:SOL_VARS_TYPE] == PERT() + q.qn[ip] = 0 + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip] = 0 + + else + q.qn[ip] = 0 + #Store initial background state for plotting and analysis of pertuebations + q.qe[ip] = 0 + end + end + end + + else + error(" ERROR: CompEuler: initialize.jl:\n assign value to inputs[:case]") + end + + end + @info " Initialize fields for 2D incompressible NS of vorticity-stream function form ........................ DONE " + + return q +end + + + diff --git a/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_flux.jl b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_flux.jl new file mode 100644 index 000000000..3f83d1820 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_flux.jl @@ -0,0 +1,23 @@ +# function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, +# q,derivative_y,derivative_x, +# qe::SubArray{TFloat}, +# mesh::St_mesh, +# ::CL, ::TOTAL; +# neqs=1, ip=1) + +# F[1] = -q[1]*derivative_y +# G[1] = q[1]*derivative_x + +# end + +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q, + qe::SubArray{TFloat}, + mesh::St_mesh, + ::CL, ::TOTAL; + neqs=1, ip=1, ∇ψ = zeros(TFloat,2)) + + F[1] = -q[1]*∇ψ[2] + G[1] = q[1]*∇ψ[1] + +end diff --git a/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_source.jl b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_source.jl new file mode 100644 index 000000000..798874701 --- /dev/null +++ b/problems/equations/IncompNS/incompressible_2D_lid_driven_cavity_flow/user_source.jl @@ -0,0 +1,36 @@ +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, + npoin::Int64, + ::CL, ::TOTAL; + neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) + + PhysConst = PhysicalConst{TFloat}() + + S[1] = 0.0 + +end + +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, + npoin::Int64, + ::CL, ::PERT; + neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) + + PhysConst = PhysicalConst{TFloat}() + + S[1] = 0.0 + +end + +function user_source_gpu(q,qe,x,y,PhysConst, xmax, xmin, ymax, ymin,lpert) + + T = eltype(q) + # + # S(q(x)) = -ρg + # + ρ = q[1] + + return T(0.0), T(0.0), T(-ρ*PhysConst.g), T(0.0), T(0.0), T(0.0) +end diff --git a/src/fallbacks/flux.jl b/src/fallbacks/flux.jl index 683d10560..622de899d 100644 --- a/src/fallbacks/flux.jl +++ b/src/fallbacks/flux.jl @@ -1,6 +1,6 @@ -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, q::SubArray{Float64}, mesh::St_mesh; neqs=4) +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, q::SubArray{TFloat}, mesh::St_mesh; neqs=4) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] diff --git a/src/fallbacks/source.jl b/src/fallbacks/source.jl index ceed4430d..15602f6b1 100644 --- a/src/fallbacks/source.jl +++ b/src/fallbacks/source.jl @@ -1,6 +1,6 @@ -function user_source!(S::SubArray{Float64}, q::SubArray{Float64}, npoin::Int64; neqs=1) +function user_source!(S::SubArray{TFloat}, q::SubArray{TFloat}, npoin::Int64; neqs=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/src/io/diagnostics.jl b/src/io/diagnostics.jl index c8871b558..fd5802fa7 100644 --- a/src/io/diagnostics.jl +++ b/src/io/diagnostics.jl @@ -118,7 +118,7 @@ end function compute_energy!(uaux, u, uauxe, mesh, metrics, ω,neqs) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() u2uaux!(uaux, u, neqs, mesh.npoin) energy = 0.0 @@ -190,7 +190,7 @@ end function compute_energy!(uaux, u, uauxe, mesh, metrics, ω,neqs,QT::Exact,Q,ψ) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() u2uaux!(uaux, u, neqs, mesh.npoin) energy = 0.0 diff --git a/src/io/mod_inputs.jl b/src/io/mod_inputs.jl index 938506ac4..958631d29 100644 --- a/src/io/mod_inputs.jl +++ b/src/io/mod_inputs.jl @@ -491,11 +491,11 @@ function mod_inputs_user_inputs!(inputs, rank = 0) mod_inputs_check(inputs, :xmin, "e") mod_inputs_check(inputs, :xmax, "e") mod_inputs_check(inputs, :nely, Int8(2), "-") - mod_inputs_check(inputs, :ymin, Float64(-1.0), "-") - mod_inputs_check(inputs, :ymax, Float64(+1.0), "-") + mod_inputs_check(inputs, :ymin, TFloat(-1.0), "-") + mod_inputs_check(inputs, :ymax, TFloat(+1.0), "-") mod_inputs_check(inputs, :nelz, Int8(2), "-") - mod_inputs_check(inputs, :zmin, Float64(-1.0), "-") - mod_inputs_check(inputs, :zmax, Float64(+1.0), "-") + mod_inputs_check(inputs, :zmin, TFloat(-1.0), "-") + mod_inputs_check(inputs, :zmax, TFloat(+1.0), "-") else mod_inputs_check(inputs, :gmsh_filename, "e") @@ -503,14 +503,14 @@ function mod_inputs_user_inputs!(inputs, rank = 0) mod_inputs_check(inputs, :nsd, Int8(3), "-") mod_inputs_check(inputs, :nelx, Int8(2), "-") - mod_inputs_check(inputs, :xmin, Float64(-1.0), "-") - mod_inputs_check(inputs, :xmax, Float64(+1.0), "-") + mod_inputs_check(inputs, :xmin, TFloat(-1.0), "-") + mod_inputs_check(inputs, :xmax, TFloat(+1.0), "-") mod_inputs_check(inputs, :nely, Int8(2), "-") - mod_inputs_check(inputs, :ymin, Float64(-1.0), "-") - mod_inputs_check(inputs, :ymax, Float64(+1.0), "-") + mod_inputs_check(inputs, :ymin, TFloat(-1.0), "-") + mod_inputs_check(inputs, :ymax, TFloat(+1.0), "-") mod_inputs_check(inputs, :nelz, Int8(2), "-") - mod_inputs_check(inputs, :zmin, Float64(-1.0), "-") - mod_inputs_check(inputs, :zmax, Float64(+1.0), "-") + mod_inputs_check(inputs, :zmin, TFloat(-1.0), "-") + mod_inputs_check(inputs, :zmax, TFloat(+1.0), "-") s= string("jexpresso: Some undefined (but unnecessary) user inputs MAY have been given some default values. @@ -537,7 +537,7 @@ function mod_inputs_user_inputs!(inputs, rank = 0) # Some physical constants and parameters: # if(!haskey(inputs, :μ)) - inputs[:μ] = (Float64(0.0)) #default kinematic viscosity + inputs[:μ] = (TFloat(0.0)) #default kinematic viscosity end #if(!haskey(inputs, :ivisc_equations)) @@ -586,7 +586,7 @@ function mod_inputs_user_inputs!(inputs, rank = 0) # Array of user-defined constant with a user-given meaning. For example, this is used in drivers for the elliptic problems # if(!haskey(inputs, :rconst)) - inputs[:rconst] = Float64(0.0) + inputs[:rconst] = TFloat(0.0) end if(!haskey(inputs, :iconst)) inputs[:iconst] = Int32(1) diff --git a/src/kernel/boundaryconditions/BCs.jl b/src/kernel/boundaryconditions/BCs.jl index 9782b8dc9..5cba4f7d2 100644 --- a/src/kernel/boundaryconditions/BCs.jl +++ b/src/kernel/boundaryconditions/BCs.jl @@ -528,7 +528,7 @@ function build_custom_bcs_dirichlet!(::NSD_3D, t, coords, nx, ny, nz, npoin, npo # WARNING: Notice that the b.c. are applied to uaux[:,:] and NOT u[:]! # That #for ip = 1:npoin - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for iface = 1:nfaces_bdy if (bdy_face_type[iface] != "periodicx" && bdy_face_type[iface] != "periodic1" && diff --git a/src/kernel/infrastructure/2D_3D_structures.jl b/src/kernel/infrastructure/2D_3D_structures.jl index 5233d1daf..2d8366d34 100644 --- a/src/kernel/infrastructure/2D_3D_structures.jl +++ b/src/kernel/infrastructure/2D_3D_structures.jl @@ -7,8 +7,8 @@ abstract type Nodal_Solver end mutable struct Nodal1DStorage <:NodalStorage N::Int64 ξ::AbstractIntegrationPointAndWeights - Dξ::Array{Float64} - D2ξ::Array{Float64} + Dξ::Array{TFloat} + D2ξ::Array{TFloat} end mutable struct Nodal2DStorage <:NodalStorage @@ -16,10 +16,10 @@ mutable struct Nodal2DStorage <:NodalStorage M::Int64 ξ::AbstractIntegrationPointAndWeights η::AbstractIntegrationPointAndWeights - Dξ::Array{Float64} - Dη::Array{Float64} - D2ξ::Array{Float64} - D2η::Array{Float64} + Dξ::Array{TFloat} + Dη::Array{TFloat} + D2ξ::Array{TFloat} + D2η::Array{TFloat} end @@ -30,12 +30,12 @@ mutable struct Nodal3DStorage <: NodalStorage ξ::AbstractIntegrationPointAndWeights η::AbstractIntegrationPointAndWeights ζ::AbstractIntegrationPointAndWeights - Dξ::Array{Float64} - Dη::Array{Float64} - Dζ::Array{Float64} - D2ξ::Array{Float64} - D2η::Array{Float64} - D2ζ::Array{Float64} + Dξ::Array{TFloat} + Dη::Array{TFloat} + Dζ::Array{TFloat} + D2ξ::Array{TFloat} + D2η::Array{TFloat} + D2ζ::Array{TFloat} end @@ -56,24 +56,24 @@ mutable struct NodalPotential <: Nodal_Solver dim::Int64 dims::Array{Int64} ND::NodalStorage - Φ::Array{Float64} - s::Array{Float64} + Φ::Array{TFloat} + s::Array{TFloat} mask::Array{Int64} T::Abstract_Method_Type end mutable struct NodalAdvDiff <: Nodal_Solver - u::Float64 - v::Float64 - ν::Float64 + u::TFloat + v::TFloat + ν::TFloat PT::Abstract_Integration_Points dim::Int64 dims::Array{Int64} ND::NodalStorage - Φ::Array{Float64} - transport::Array{Float64} - RHS::Array{Float64} - mask::Array{Float64} + Φ::Array{TFloat} + transport::Array{TFloat} + RHS::Array{TFloat} + mask::Array{TFloat} p::Array{Int64} T::Abstract_Method_Type end @@ -332,13 +332,13 @@ end function build_Nodal_Potential(dim,dims,PT::Abstract_Integration_Points,T::Abstract_Method_Type) if (dim == 2) - Φ=zeros(Float64,dims[1]+1,dims[2]+1) - s=zeros(Float64,dims[1]+1,dims[2]+1) - mask=zeros(Float64,4) + Φ=zeros(TFloat,dims[1]+1,dims[2]+1) + s=zeros(TFloat,dims[1]+1,dims[2]+1) + mask=zeros(TFloat,4) else - Φ=zeros(Float64,dims[1]+1,dims[2]+1,dims[3]+1) - mask =zeros(Float64,8) - s=zeros(Float64,dims[1]+1,dims[2]+1,dims[3]+1) + Φ=zeros(TFloat,dims[1]+1,dims[2]+1,dims[3]+1) + mask =zeros(TFloat,8) + s=zeros(TFloat,dims[1]+1,dims[2]+1,dims[3]+1) end ND = build_nodal_Storage(dims,PT,T) NP = NodalPotential(PT,dim,dims,ND,Φ,s,mask,T) @@ -347,16 +347,16 @@ end function build_Nodal_AdvDiff(u,v,ν,dim,dims,PT::Abstract_Integration_Points,T::Abstract_Method_Type) if (dim == 2) - Φ=zeros(Float64,dims[1]+1,dims[2]+1,3) - transport=zeros(Float64,dims[1]+1,dims[2]+1,3) - RHS = zeros(Float64,dims[1]+1,dims[2]+1) - mask = zeros(Float64,4) + Φ=zeros(TFloat,dims[1]+1,dims[2]+1,3) + transport=zeros(TFloat,dims[1]+1,dims[2]+1,3) + RHS = zeros(TFloat,dims[1]+1,dims[2]+1) + mask = zeros(TFloat,4) p = [1 2 3] else - Φ = zeros(Float64, dims[1]+1, dims[2]+1, dims[3]+1,3) - transport = zeros(Float64, dims[1]+1, dims[2]+1, dims[3]+1,3) - RHS = zeros(Float64, dims[1]+1, dims[2]+1, dims[3]+1) - mask = zeros(Float64,8) + Φ = zeros(TFloat, dims[1]+1, dims[2]+1, dims[3]+1,3) + transport = zeros(TFloat, dims[1]+1, dims[2]+1, dims[3]+1,3) + RHS = zeros(TFloat, dims[1]+1, dims[2]+1, dims[3]+1) + mask = zeros(TFloat,8) p = [1 2 3] end ND = build_nodal_Storage(dims,PT,T) @@ -367,8 +367,8 @@ end function transport!(NAD::NodalAdvDiff,T::Collocation,k) N=NAD.ND.N M=NAD.ND.M - Φx = zeros(Float64,N+1,N+1) - Φy = zeros(Float64,M+1,M+1) + Φx = zeros(TFloat,N+1,N+1) + Φy = zeros(TFloat,M+1,M+1) for j=1:M+1 Φx[:,j] = MxVDerivative(NAD.ND.Dξ,NAD.Φ[:,j]) end @@ -386,8 +386,8 @@ end function transport!(NAD::NodalAdvDiff,T::NodalGalerkin,k) N=NAD.ND.N M=NAD.ND.M - Φx = zeros(Float64,N+1,N+1) - Φy = zeros(Float64,M+1,M+1) + Φx = zeros(TFloat,N+1,N+1) + Φy = zeros(TFloat,M+1,M+1) for j=1:M+1 Φx[:,j] = MxVDerivative(NAD.ND.Dξ,NAD.Φ[:,j]) end @@ -440,15 +440,15 @@ function ComputeLaplacian(U,NP::Nodal_Solver,::Collocation) N=NP.ND.N M=NP.ND.M if (dim ==2) - Uxx=zeros(Float64,N+1,M+1) + Uxx=zeros(TFloat,N+1,M+1) for j=1:M+1 Uxx[:,j] = MxVDerivative(NP.ND.D2ξ,U[:,j]) end - Uyy = zeros(Float64,N+1,M+1) + Uyy = zeros(TFloat,N+1,M+1) for i=1:N+1 Uyy[i,:] = MxVDerivative(NP.ND.D2η,U[i,:]) end - LapU = zeros(Float64,N+1,M+1) + LapU = zeros(TFloat,N+1,M+1) for j=1:M+1 for i=1:N+1 LapU[i,j]=Uxx[i,j]+Uyy[i,j] @@ -457,9 +457,9 @@ function ComputeLaplacian(U,NP::Nodal_Solver,::Collocation) else L=NP.ND.L - Uxx=zeros(Float64,N+1,M+1,L+1) - Uyy=zeros(Float64,N+1,M+1,L+1) - Uzz=zeros(Float64,N+1,M+1,L+1) + Uxx=zeros(TFloat,N+1,M+1,L+1) + Uyy=zeros(TFloat,N+1,M+1,L+1) + Uzz=zeros(TFloat,N+1,M+1,L+1) for j=1:M+1 for l=1:L+1 Uxx[:,j,l] = MxVDerivative(NP.ND.D2ξ,U[:,j,l]) @@ -475,7 +475,7 @@ function ComputeLaplacian(U,NP::Nodal_Solver,::Collocation) Uzz[i,j,:] = MxVDerivative(NP.ND.D2ζ,U[i,j,:]) end end - LapU=zeros(Float64,N+1,M+1,L+1) + LapU=zeros(TFloat,N+1,M+1,L+1) LapU .= Uxx .+ Uyy .+ Uzz end return LapU @@ -535,7 +535,7 @@ function CollocationRHSComputation(NP::NodalPotential) dim=NP.dim if (dim==2) L=(N-1)*(M-1) - rhs=zeros(Float64,L) + rhs=zeros(TFloat,L) for j=1:M-1 for i=1:N-1 n=j+(i-1)*(N-1) @@ -546,7 +546,7 @@ function CollocationRHSComputation(NP::NodalPotential) else Ll=NP.ND.L L = N*M*Ll - rhs=zeros(Float64,L) + rhs=zeros(TFloat,L) for l=1:Ll for j=1:M for i=1:N @@ -570,7 +570,7 @@ function NodalGalerkinRHS(NP::NodalPotential) Gx=NP.ND.D2ξ Gy=NP.ND.D2η Φ=NP.Φ - rhs=zeros(Float64,L) + rhs=zeros(TFloat,L) for j=1:M-1 for i=1:N-1 n=j+(i-1)*(N-1) @@ -586,7 +586,7 @@ function LaplaceCollocationMatrix(NP::NodalPotential) dim=NP.dim if (dim==2) L=(N-1)*(M-1) - A=zeros(Float64,L,L) + A=zeros(TFloat,L,L) for j=1:M-1 for i=1:N-1 n=j+(i-1)*(M-1) @@ -608,7 +608,7 @@ function LaplaceCollocationMatrix(NP::NodalPotential) else Ll=NP.ND.L L=N*M*Ll - A=zeros(Float64,L+1,L+1) + A=zeros(TFloat,L+1,L+1) for l=1:Ll for j=1:M for i=1:N @@ -640,7 +640,7 @@ function NodalGalerkinMatrix(NP::NodalPotential) wx=NP.ND.ξ.ω wy=NP.ND.η.ω L=(N-1)*(M-1) - A=zeros(Float64,L,L) + A=zeros(TFloat,L,L) for j=1:M-1 for i=1:N-1 n=j+(i-1)*(M-1) @@ -686,37 +686,37 @@ end mutable struct FDPreconditioner2D <:FDPreconditioner N::Int64 M::Int64 - a::Array{Float64} - Δx::Array{Float64} - Δy::Array{Float64} - A::Array{Float64} - B::Array{Float64} - C::Array{Float64} - E::Array{Float64} - F::Array{Float64} + a::Array{TFloat} + Δx::Array{TFloat} + Δy::Array{TFloat} + A::Array{TFloat} + B::Array{TFloat} + C::Array{TFloat} + E::Array{TFloat} + F::Array{TFloat} end mutable struct FDPreconditioner3D <:FDPreconditioner N::Int64 M::Int64 L::Int64 - a::Array{Float64} - Δx::Array{Float64} - Δy::Array{Float64} - Δz::Array{Float64} + a::Array{TFloat} + Δx::Array{TFloat} + Δy::Array{TFloat} + Δz::Array{TFloat} end function buildPreconditioner!(FDP::FDPreconditioner) end function initializeFDPrecondtioner2D(N,M) - a=zeros(Float64,N-1,M-1) - Δx=zeros(Float64,N) - Δy=zeros(Float64,M) - A=zeros(Float64,N-1,M-1) - B=zeros(Float64,N-1,M-1) - C=zeros(Float64,N-1,M-1) - E=zeros(Float64,N-1,M-1) - F=zeros(Float64,N-1,M-1) + a=zeros(TFloat,N-1,M-1) + Δx=zeros(TFloat,N) + Δy=zeros(TFloat,M) + A=zeros(TFloat,N-1,M-1) + B=zeros(TFloat,N-1,M-1) + C=zeros(TFloat,N-1,M-1) + E=zeros(TFloat,N-1,M-1) + F=zeros(TFloat,N-1,M-1) FDP = FDPreconditioner2D(N,M,a,Δx,Δy,A,B,C,E,F) return FDP end @@ -756,9 +756,9 @@ end function Solve(FDP::FDPreconditioner2D,R) N=FDP.N M=FDP.M - w=zeros(Float64,N-1,M-1) + w=zeros(TFloat,N-1,M-1) w[1,1] = R[2,2]/FDP.a[1,1] - u=zeros(Float64,N+1,M+1) + u=zeros(TFloat,N+1,M+1) for i=2:N-1 w[i,1] = (R[i+1,1] -FDP.B[i,1]*w[i-1,1])/FDP.a[i,1] end @@ -791,11 +791,11 @@ function BiCGStabSolve(Nit::Int64,Tol,NP::NodalPotential,FDP::FDPreconditioner2D α=1.0 ω=1.0 r= Residual(NP) - r̄=zeros(Float64,N+1,M+1) + r̄=zeros(TFloat,N+1,M+1) r̄=LinearAlgebra.BLAS.blascopy!(L,r,1,r̄,1) - v=zeros(Float64,N+1,M+1) - s=zeros(Float64,N+1,M+1) - p=zeros(Float64,N+1,M+1) + v=zeros(TFloat,N+1,M+1) + s=zeros(TFloat,N+1,M+1) + p=zeros(TFloat,N+1,M+1) for k=1:Nit @info "norm",BLAS.nrm2(L,r,1) ρ̂=ρ @@ -851,7 +851,7 @@ function CGSolve(Nit,Tol,NP,FDP) α=1.0 ω=1.0 r= Residual(NP) - p=zeros(Float64,N+1,M+1) + p=zeros(TFloat,N+1,M+1) p=LinearAlgebra.BLAS.blascopy!(L,r,1,p,1) for j=1:Nit α=BLAS.dot(L,r,1,r,1)/BLAS.dot(L,MatrixAction(Solve(FDP,p),NP),1,p,1) @@ -913,8 +913,8 @@ end function LUSolve(A,p,rhs) N=size(p,1) - w=zeros(Float64,N) - y=zeros(Float64,N) + w=zeros(TFloat,N) + y=zeros(TFloat,N) y[:].=rhs[:] for i=1:N if (p[i] != i) @@ -947,9 +947,9 @@ end function ComputeLaplacian(U,NP::Nodal_Solver,T::NodalGalerkin) N=NP.ND.N M=NP.ND.M - Uxx = zeros(Float64,N+1,M+1) - Uyy = zeros(Float64,N+1,M+1) - Lap = zeros(Float64,N+1,M+1) + Uxx = zeros(TFloat,N+1,M+1) + Uyy = zeros(TFloat,N+1,M+1) + Lap = zeros(TFloat,N+1,M+1) for j=1:M+1 Uxx[:,j] = MxVDerivative(NP.ND.D2ξ,U[:,j]) for i =1:N+1 @@ -988,7 +988,7 @@ function Ψ_Η(k,l,ξ) end function LocalStiffnessMatrix(Δx,Δy) - Ŝ=zeros(Float64,4,4) + Ŝ=zeros(TFloat,4,4) for m=0:1 for n=0:1 q=n+2*m+1 @@ -1010,8 +1010,8 @@ function LocalStiffnessMatrix(Δx,Δy) end function ApproximateFEMStencil(i,j,x,y) - pŜ=zeros(Float64,4,4,4) - C=zeros(Float64,3,3) + pŜ=zeros(TFloat,4,4,4) + C=zeros(TFloat,3,3) for m=0:1 for n=0:1 p=n+m*2+1 @@ -1036,7 +1036,7 @@ end function SSORSweep(r,ω,NP::NodalPotential) N=NP.ND.N M=NP.ND.M - z=zeros(Float64,N+1,M+1) + z=zeros(TFloat,N+1,M+1) for j=1:M-1 for i=1:N-1 s=0.0 @@ -1069,7 +1069,7 @@ function PreconditionedConjugateGradientSolve(Nit,Tol,NP::NodalPotential) N=NP.ND.N M=NP.ND.M L=(N+1)*(M+1) - v=zeros(Float64,N+1,M+1) + v=zeros(TFloat,N+1,M+1) r = Residual(NP,NP.T) z=SSORSweep(r,1.43,NP) LinearAlgebra.BLAS.blascopy!(L,z,1,v,1) @@ -1098,7 +1098,7 @@ function MatrixAction(NAD::NodalAdvDiff,Δt,U,T::Collocation) Lap = ComputeLaplacian(U,NAD,T) M=NAD.ND.M N=NAD.ND.N - action = zeros(Float64,N+1,M+1) + action = zeros(TFloat,N+1,M+1) for j=1:M+1 for i=1:N+1 action[i,j] = U[i,j] - (6*Δt/11) * Lap[i,j] @@ -1112,7 +1112,7 @@ function MatrixAction(NAD::NodalAdvDiff,Δt,U,T::NodalGalerkin) Lap = ComputeLaplacian(U,NAD,T) M=NAD.ND.M N=NAD.ND.N - action = zeros(Float64,N+1,M+1) + action = zeros(TFloat,N+1,M+1) for j=1:M+1 for i=1:N+1 action[i,j] = NAD.ND.ξ.ω[i] * NAD.ND.η.ω[j] * U[i,j] - (6*Δt/11) * Lap[i,j] @@ -1126,7 +1126,7 @@ function Residual(NAD::NodalAdvDiff,Δt,U) action = MatrixAction(NAD,Δt,U,NAD.T) M=NAD.ND.M N=NAD.ND.N - r = zeros(Float64,N+1,M+1) + r = zeros(TFloat,N+1,M+1) for j=1:M+1 for i=1:N+1 r[i,j] = NAD.RHS[i,j] - action[i,j] diff --git a/src/kernel/infrastructure/convert_to_gpu.jl b/src/kernel/infrastructure/convert_to_gpu.jl index b26e48ebd..1b6566f2f 100644 --- a/src/kernel/infrastructure/convert_to_gpu.jl +++ b/src/kernel/infrastructure/convert_to_gpu.jl @@ -106,19 +106,19 @@ end function convert_mesh_arrays_to_cpu!(::NSD_1D, mesh, inputs) - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.x)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.x)) KernelAbstractions.copyto!(CPU(), aux, mesh.x) - mesh.x = KernelAbstractions.allocate(CPU(), Float64, size(mesh.x)) + mesh.x = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.x)) mesh.x .= aux - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.y)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.y)) KernelAbstractions.copyto!(CPU(), aux, mesh.y) - mesh.y = KernelAbstractions.allocate(CPU(), Float64, size(mesh.y)) + mesh.y = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.y)) mesh.y .= aux - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.z)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.z)) KernelAbstractions.copyto!(CPU(), aux, mesh.z) - mesh.z = KernelAbstractions.allocate(CPU(), Float64, size(mesh.z)) + mesh.z = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.z)) mesh.z .= aux aux = KernelAbstractions.allocate(CPU(), TInt, mesh.nelem, mesh.ngl, 1) @@ -137,19 +137,19 @@ end function convert_mesh_arrays_to_cpu!(::NSD_2D, mesh, inputs) - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.x)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.x)) KernelAbstractions.copyto!(CPU(), aux, mesh.x) - mesh.x = KernelAbstractions.allocate(CPU(), Float64, size(mesh.x)) + mesh.x = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.x)) mesh.x .= aux - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.y)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.y)) KernelAbstractions.copyto!(CPU(), aux, mesh.y) - mesh.y = KernelAbstractions.allocate(CPU(), Float64, size(mesh.y)) + mesh.y = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.y)) mesh.y .= aux - aux = KernelAbstractions.allocate(CPU(), Float64, size(mesh.z)) + aux = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.z)) KernelAbstractions.copyto!(CPU(), aux, mesh.z) - mesh.z = KernelAbstractions.allocate(CPU(), Float64, size(mesh.z)) + mesh.z = KernelAbstractions.allocate(CPU(), TFloat, size(mesh.z)) mesh.z .= aux aux = KernelAbstractions.allocate(CPU(), TInt, mesh.nelem, mesh.ngl, mesh.ngl) diff --git a/src/kernel/mesh/phys_grid.jl b/src/kernel/mesh/phys_grid.jl index 2df723502..43ad289e1 100644 --- a/src/kernel/mesh/phys_grid.jl +++ b/src/kernel/mesh/phys_grid.jl @@ -255,7 +255,7 @@ end function interpolate_to_phys_grid!(mesh,phys_grid,uaux,qe,nlay,ncol,P,T,qc,qi,ρ,lpert) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() A = KernelAbstractions.zeros(CPU(), TFloat, mesh.npoin,6) ω = KernelAbstractions.zeros(CPU(), TFloat,mesh.ngl,mesh.ngl,mesh.ngl) B = KernelAbstractions.zeros(CPU(), TFloat, 6) diff --git a/src/kernel/operators/filter.jl b/src/kernel/operators/filter.jl index 5435aca80..35957a8b5 100644 --- a/src/kernel/operators/filter.jl +++ b/src/kernel/operators/filter.jl @@ -591,7 +591,7 @@ function init_filter(nop,xgl,mu_x,mesh,inputs, rank) end f = zeros(TFloat,nop+1,nop+1) - weight = ones(Float64,nop+1) + weight = ones(TFloat,nop+1) exp_alpha = 36 exp_order = 64 quad_alpha = 1.0 @@ -690,7 +690,7 @@ function init_filter(nop,xgl,mu_x,mesh,inputs, rank) @info "exponential filtering on" end for k=1:nop+1 - weight[k] = exp(-exp_alpha*(Float64(k-1)/nop)^exp_order) + weight[k] = exp(-exp_alpha*(TFloat(k-1)/nop)^exp_order) end end @@ -820,7 +820,7 @@ function vandeven_modal(kk,ngl,p) x = 0 return 1 elseif (k > i && k < n) - x = Float64(k-i)/Float64(n - i) + x = TFloat(k-i)/TFloat(n - i) omega = abs(x) - 0.5 xlog = log(1.0-4.0*omega^2) c = 4.0 * omega^2 diff --git a/src/kernel/operators/rhs_laguerre.jl b/src/kernel/operators/rhs_laguerre.jl index 579cdab60..43825c7d2 100644 --- a/src/kernel/operators/rhs_laguerre.jl +++ b/src/kernel/operators/rhs_laguerre.jl @@ -23,7 +23,7 @@ end function _build_rhs_laguerre!(RHS, u, params, time) - T = Float64 + T = params.T SD = params.SD QT = params.QT CL = params.CL diff --git a/src/kernel/physics/large_scale.jl b/src/kernel/physics/large_scale.jl index 01d0c3db3..b70714dd2 100644 --- a/src/kernel/physics/large_scale.jl +++ b/src/kernel/physics/large_scale.jl @@ -17,7 +17,7 @@ function read_large_scale!(backend, flist, LST, mesh) end function large_scale_source!(q, qe, S, Rad_cool, T_adv, q_adv,::PERT) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] S[5] += ρ * (T_adv + Rad_cool) * PhysConst.cp/86400.0 S[6] += ρ * (q_adv/86400.0)/1000 diff --git a/test/CI-runs/CompEuler/theta/initialize.jl b/test/CI-runs/CompEuler/theta/initialize.jl index 92b947caa..e0e5f087a 100644 --- a/test/CI-runs/CompEuler/theta/initialize.jl +++ b/test/CI-runs/CompEuler/theta/initialize.jl @@ -15,13 +15,13 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if inputs[:lrestart] == true # # READ RESTART HDF5: # q.qn, q.qe = read_output(mesh.SD, inputs[:restart_input_file_path], inputs, mesh.npoin, HDF5(); nvar=length(qvars)) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() for ip=1:mesh.npoin ρ = q.qn[ip,1] ρθ = q.qn[ip,4] diff --git a/test/CI-runs/CompEuler/theta/user_bc.jl b/test/CI-runs/CompEuler/theta/user_bc.jl index 7d5eb7df3..66baef423 100644 --- a/test/CI-runs/CompEuler/theta/user_bc.jl +++ b/test/CI-runs/CompEuler/theta/user_bc.jl @@ -24,7 +24,7 @@ function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFl end -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{Float64},::PERT) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{TFloat},::PERT) # if (tag == "free_slip") qnl = nx*(q[2]+qe[2]) + ny*(q[3]+qe[3]) diff --git a/test/CI-runs/CompEuler/theta/user_flux.jl b/test/CI-runs/CompEuler/theta/user_flux.jl index e3bca6941..90a776c91 100644 --- a/test/CI-runs/CompEuler/theta/user_flux.jl +++ b/test/CI-runs/CompEuler/theta/user_flux.jl @@ -4,7 +4,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -32,7 +32,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -63,7 +63,7 @@ function user_flux!(F, G, SD::NSD_2D, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/test/CI-runs/CompEuler/theta/user_source.jl b/test/CI-runs/CompEuler/theta/user_source.jl index 1925ff583..96ca1a10b 100644 --- a/test/CI-runs/CompEuler/theta/user_source.jl +++ b/test/CI-runs/CompEuler/theta/user_source.jl @@ -5,7 +5,7 @@ function user_source!(S::SubArray{TFloat}, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -19,14 +19,14 @@ function user_source!(S::SubArray{TFloat}, end -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -40,9 +40,9 @@ function user_source!(S::SubArray{Float64}, end -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::NCL, ::AbstractPert; #for NCL() there is no differece between PERT() and TOTAL() in the source @@ -50,7 +50,7 @@ function user_source!(S::SubArray{Float64}, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/test/CI-runs/CompEuler/thetaTracers/initialize.jl b/test/CI-runs/CompEuler/thetaTracers/initialize.jl index c42e5a365..27f69621e 100644 --- a/test/CI-runs/CompEuler/thetaTracers/initialize.jl +++ b/test/CI-runs/CompEuler/thetaTracers/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if (inputs[:case] === "rtb") xc = (maximum(mesh.x) + minimum(mesh.x))/2 diff --git a/test/CI-runs/CompEuler/thetaTracers/user_bc.jl b/test/CI-runs/CompEuler/thetaTracers/user_bc.jl index ff909dd2a..8b73091ab 100644 --- a/test/CI-runs/CompEuler/thetaTracers/user_bc.jl +++ b/test/CI-runs/CompEuler/thetaTracers/user_bc.jl @@ -1,11 +1,11 @@ -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx, ny,qe::SubArray{Float64},::TOTAL) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx, ny,qe::SubArray{TFloat},::TOTAL) qnl = nx*q[2] + ny*q[3] qbdy[2] = q[2] - qnl*nx qbdy[3] = q[3] - qnl*ny end -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{Float64},::PERT) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{TFloat},::PERT) qnl = nx*(q[2]+qe[2]) + ny*(q[3]+qe[3]) qbdy[2] = (q[2]+qe[2] - qnl*nx) - qe[2] diff --git a/test/CI-runs/CompEuler/thetaTracers/user_flux.jl b/test/CI-runs/CompEuler/thetaTracers/user_flux.jl index be7f5418b..53f55f895 100644 --- a/test/CI-runs/CompEuler/thetaTracers/user_flux.jl +++ b/test/CI-runs/CompEuler/thetaTracers/user_flux.jl @@ -1,10 +1,10 @@ -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::TOTAL; neqs=6, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -31,13 +31,13 @@ function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, G[6] = q[6]*v end -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::PERT; neqs=5, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -69,13 +69,13 @@ function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, end -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=5, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/test/CI-runs/CompEuler/thetaTracers/user_source.jl b/test/CI-runs/CompEuler/thetaTracers/user_source.jl index c6ba1c3e7..d18d4c112 100644 --- a/test/CI-runs/CompEuler/thetaTracers/user_source.jl +++ b/test/CI-runs/CompEuler/thetaTracers/user_source.jl @@ -1,11 +1,11 @@ -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=0.0, xmin=0.0, xmax=0.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -19,14 +19,14 @@ function user_source!(S::SubArray{Float64}, end -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/test/CI-runs/CompEuler/theta_laguerre/initialize.jl b/test/CI-runs/CompEuler/theta_laguerre/initialize.jl index c05108503..de93e3d73 100644 --- a/test/CI-runs/CompEuler/theta_laguerre/initialize.jl +++ b/test/CI-runs/CompEuler/theta_laguerre/initialize.jl @@ -16,7 +16,7 @@ function initialize(SD::NSD_2D, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::Str #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() if (inputs[:case] === "rtb") diff --git a/test/CI-runs/CompEuler/theta_laguerre/user_bc.jl b/test/CI-runs/CompEuler/theta_laguerre/user_bc.jl index f863e3b3c..df567057a 100644 --- a/test/CI-runs/CompEuler/theta_laguerre/user_bc.jl +++ b/test/CI-runs/CompEuler/theta_laguerre/user_bc.jl @@ -24,7 +24,7 @@ where `qibdy[i=1:nvar]` is the value unknown `i` """ -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx, ny,qe::SubArray{Float64},::TOTAL) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx, ny,qe::SubArray{TFloat},::TOTAL) if (tag == "free_slip") #if ((x == 5000.0 && y == 0.0) || (x == -5000.0 && y == 0.0) || (x == -5000.0 && y == 10000.0) || (x == 5000.0 && y == 10000.0)) # a = 1 @@ -50,7 +50,7 @@ function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractF end -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{Float64},::PERT) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, y::AbstractFloat, t::AbstractFloat, tag::String, qbdy::AbstractArray, nx::AbstractFloat, ny::AbstractFloat,qe::SubArray{TFloat},::PERT) #if (y <4995 || abs(x) > 4995) if (tag == "free_slip") qnl = nx*(q[2]+qe[2]) + ny*(q[3]+qe[3]) diff --git a/test/CI-runs/CompEuler/theta_laguerre/user_flux.jl b/test/CI-runs/CompEuler/theta_laguerre/user_flux.jl index ff251a3bb..5ad8056ab 100644 --- a/test/CI-runs/CompEuler/theta_laguerre/user_flux.jl +++ b/test/CI-runs/CompEuler/theta_laguerre/user_flux.jl @@ -1,10 +1,10 @@ -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] ρu = q[2] @@ -26,13 +26,13 @@ function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, G[4] = ρθ*v end -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::PERT; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] + qe[1] ρu = q[2] @@ -57,13 +57,13 @@ function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, end -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_2D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_2D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::NCL, ::AbstractPert; neqs=4, ip=1) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() ρ = q[1] u = q[2] diff --git a/test/CI-runs/CompEuler/theta_laguerre/user_source.jl b/test/CI-runs/CompEuler/theta_laguerre/user_source.jl index 877c37fc3..04e3247be 100644 --- a/test/CI-runs/CompEuler/theta_laguerre/user_source.jl +++ b/test/CI-runs/CompEuler/theta_laguerre/user_source.jl @@ -1,11 +1,11 @@ -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -19,14 +19,14 @@ function user_source!(S::SubArray{Float64}, end -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::PERT; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg @@ -62,9 +62,9 @@ function user_source!(S::SubArray{Float64}, end -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::NCL, ::AbstractPert; #for NCL() there is no differece between PERT() and TOTAL() in the source @@ -72,7 +72,7 @@ function user_source!(S::SubArray{Float64}, - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -g diff --git a/test/CI-runs/CompEuler/wave1d/initialize.jl b/test/CI-runs/CompEuler/wave1d/initialize.jl index c24cc49e0..a501608a6 100644 --- a/test/CI-runs/CompEuler/wave1d/initialize.jl +++ b/test/CI-runs/CompEuler/wave1d/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat; neqs=length(qvars)) #--------------------------------------------------------------------------------- - σ = Float64(0.15) + σ = TFloat(0.15) σ2= σ*σ for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/test/CI-runs/CompEuler/wave1d/user_flux.jl b/test/CI-runs/CompEuler/wave1d/user_flux.jl index 96c59ac8a..7cca8c187 100644 --- a/test/CI-runs/CompEuler/wave1d/user_flux.jl +++ b/test/CI-runs/CompEuler/wave1d/user_flux.jl @@ -1,6 +1,6 @@ -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_1D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_1D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) diff --git a/test/CI-runs/CompEuler/wave1d/user_source.jl b/test/CI-runs/CompEuler/wave1d/user_source.jl index 90d915ea0..bacc8eb3f 100644 --- a/test/CI-runs/CompEuler/wave1d/user_source.jl +++ b/test/CI-runs/CompEuler/wave1d/user_source.jl @@ -1,6 +1,6 @@ -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::TOTAL; neqs=1,x=0.0, y=0.0, ymin=0.0, ymax=30000.0, xmin = -120000, xmax =120000) diff --git a/test/CI-runs/CompEuler/wave1d_lag/initialize.jl b/test/CI-runs/CompEuler/wave1d_lag/initialize.jl index 790fd763c..9ecf5aece 100644 --- a/test/CI-runs/CompEuler/wave1d_lag/initialize.jl +++ b/test/CI-runs/CompEuler/wave1d_lag/initialize.jl @@ -15,7 +15,7 @@ function initialize(SD, PT, mesh::St_mesh, inputs::Dict, OUTPUT_DIR::String, TFl q = define_q(SD, mesh.nelem, mesh.npoin, mesh.ngl, qvars, TFloat, inputs[:backend]; neqs=length(qvars)) #--------------------------------------------------------------------------------- if (inputs[:backend] == CPU()) - σ = Float64(0.15) + σ = TFloat(0.15) σ2= σ*σ for iel_g = 1:mesh.nelem for i=1:mesh.ngl diff --git a/test/CI-runs/CompEuler/wave1d_lag/user_bc.jl b/test/CI-runs/CompEuler/wave1d_lag/user_bc.jl index e572eb891..83a929251 100644 --- a/test/CI-runs/CompEuler/wave1d_lag/user_bc.jl +++ b/test/CI-runs/CompEuler/wave1d_lag/user_bc.jl @@ -24,12 +24,12 @@ where `qibdy[i=1:nvar]` is the value unknown `i` """ -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, t::AbstractFloat, tag::String,qbdy::AbstractArray,qe::SubArray{Float64},::TOTAL) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, t::AbstractFloat, tag::String,qbdy::AbstractArray,qe::SubArray{TFloat},::TOTAL) nothing end -function user_bc_dirichlet!(q::SubArray{Float64}, x::AbstractFloat, t::AbstractFloat, tag::String,qbdy::AbstractArray,qe::SubArray{Float64},::PERT) +function user_bc_dirichlet!(q::SubArray{TFloat}, x::AbstractFloat, t::AbstractFloat, tag::String,qbdy::AbstractArray,qe::SubArray{TFloat},::PERT) nothing end diff --git a/test/CI-runs/CompEuler/wave1d_lag/user_flux.jl b/test/CI-runs/CompEuler/wave1d_lag/user_flux.jl index d9765ae00..7407e4ba6 100644 --- a/test/CI-runs/CompEuler/wave1d_lag/user_flux.jl +++ b/test/CI-runs/CompEuler/wave1d_lag/user_flux.jl @@ -1,6 +1,6 @@ -function user_flux!(F::SubArray{Float64}, G::SubArray{Float64}, SD::NSD_1D, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_flux!(F::SubArray{TFloat}, G::SubArray{TFloat}, SD::NSD_1D, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, mesh::St_mesh, ::CL, ::TOTAL; neqs=4, ip=1) diff --git a/test/CI-runs/CompEuler/wave1d_lag/user_source.jl b/test/CI-runs/CompEuler/wave1d_lag/user_source.jl index b5c394dce..d2a63651c 100644 --- a/test/CI-runs/CompEuler/wave1d_lag/user_source.jl +++ b/test/CI-runs/CompEuler/wave1d_lag/user_source.jl @@ -1,11 +1,11 @@ -function user_source!(S::SubArray{Float64}, - q::SubArray{Float64}, - qe::SubArray{Float64}, +function user_source!(S::SubArray{TFloat}, + q::SubArray{TFloat}, + qe::SubArray{TFloat}, npoin::Int64, ::CL, ::TOTAL; neqs=1, x=0.0, y=0.0, xmin=0.0, xmax=1.0) - PhysConst = PhysicalConst{Float64}() + PhysConst = PhysicalConst{TFloat}() # # S(q(x)) = -ρg diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 000000000..7c581111d --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,3 @@ +[deps] +HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" + diff --git a/test/solnCompare.jl b/test/solnCompare.jl index 7ade384a2..925f9b198 100644 --- a/test/solnCompare.jl +++ b/test/solnCompare.jl @@ -20,7 +20,7 @@ function compare_results(generated_data, expected_data) is_equal = true for key in keys(generated_data) # Compare floating-point numbers up to 8 significant digits - if typeof(generated_data[key]) == Array{Float64,1} + if typeof(generated_data[key]) <: Array{<:AbstractFloat,1} is_equal = isapprox(generated_data[key], expected_data[key], atol=1e-5) else is_equal = generated_data[key] == expected_data[key]