Skip to content

Commit

Permalink
Try #1487:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Oct 25, 2023
2 parents d8bd661 + c48a3e9 commit eb000c6
Show file tree
Hide file tree
Showing 73 changed files with 3,410 additions and 2,627 deletions.
4 changes: 2 additions & 2 deletions .dev/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ version = "0.21.4"

[[deps.JuliaFormatter]]
deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"]
git-tree-sha1 = "80031f6e58b09b0de4553bf63d9a36ec5db57967"
git-tree-sha1 = "0bac3374ff3aa798148669ecb5559ba20c8b0e73"
uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
version = "1.0.39"
version = "1.0.40"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
Expand Down
1 change: 1 addition & 0 deletions .dev/up_deps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dirs = (
joinpath(root, "perf"),
joinpath(root, "docs"),
joinpath(root, "test"),
joinpath(root, "benchmarks", "bickleyjet"),
joinpath(root, "lib", "ClimaCoreMakie"),
joinpath(root, "lib", "ClimaCorePlots"),
joinpath(root, "lib", "ClimaCoreTempestRemap"),
Expand Down
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826"
PkgVersion = "eebad327-c553-4316-9ea0-9fa01ccd7688"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Expand All @@ -28,6 +29,7 @@ Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
WeakValueDicts = "897b6980-f191-5a31-bcb0-bf3c4585e0c1"

[compat]
Adapt = "3"
Expand All @@ -43,13 +45,15 @@ GaussQuadrature = "0.5"
GilbertCurves = "0.1"
HDF5 = "0.16, 0.17"
IntervalSets = "0.5, 0.6, 0.7"
Memoize = "0.4"
PkgVersion = "0.1, 0.2, 0.3"
RecursiveArrayTools = "2"
Requires = "1"
RootSolvers = "0.3, 0.4"
Static = "0.4, 0.5, 0.6, 0.7, 0.8"
StaticArrays = "1"
UnPack = "1"
WeakValueDicts = "0.1"
julia = "1.8"

[extras]
Expand Down
13 changes: 12 additions & 1 deletion benchmarks/bickleyjet/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
version = "0.5.5"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "Memoize", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack", "WeakValueDicts"]
path = "../.."
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.10.55"
Expand Down Expand Up @@ -784,6 +784,12 @@ git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102"
uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
version = "0.3.2"

[[deps.Memoize]]
deps = ["MacroTools"]
git-tree-sha1 = "2b1dfcba103de714d31c033b5dacc2e4a12c7caa"
uuid = "c03570c3-d221-55d1-a50c-7939bbd78826"
version = "0.4.4"

[[deps.MicrosoftMPI_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "a7023883872e52bc29bcaac74f19adf39347d2d5"
Expand Down Expand Up @@ -1272,6 +1278,11 @@ git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da"
uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91"
version = "1.25.0+0"

[[deps.WeakValueDicts]]
git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0"
uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1"
version = "0.1.0"

[[deps.XML2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"]
git-tree-sha1 = "24b81b59bd35b3c42ab84fa589086e19be919916"
Expand Down
17 changes: 14 additions & 3 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
version = "0.5.5"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "Memoize", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack", "WeakValueDicts"]
path = ".."
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.10.55"
Expand Down Expand Up @@ -1310,9 +1310,9 @@ version = "0.1.12"

[[deps.LinearSolve]]
deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"]
git-tree-sha1 = "158e45dd35cec1ecade0e554c0104ee89e772d82"
git-tree-sha1 = "3196f7408f7c6014dc4ed55260e6c5e1e01c58a3"
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
version = "2.11.1"
version = "2.12.0"

[deps.LinearSolve.extensions]
LinearSolveBandedMatricesExt = "BandedMatrices"
Expand Down Expand Up @@ -1477,6 +1477,12 @@ git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102"
uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
version = "0.3.2"

[[deps.Memoize]]
deps = ["MacroTools"]
git-tree-sha1 = "2b1dfcba103de714d31c033b5dacc2e4a12c7caa"
uuid = "c03570c3-d221-55d1-a50c-7939bbd78826"
version = "0.4.4"

[[deps.MicrosoftMPI_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "a7023883872e52bc29bcaac74f19adf39347d2d5"
Expand Down Expand Up @@ -2543,6 +2549,11 @@ git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da"
uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91"
version = "1.25.0+0"

[[deps.WeakValueDicts]]
git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0"
uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1"
version = "0.1.0"

[[deps.WoodburyMatrices]]
deps = ["LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3"
Expand Down
50 changes: 24 additions & 26 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,48 +184,46 @@ Spaces.Δz_metric_component
```@docs
Spaces.SpectralElementSpace1D
Spaces.SpectralElementSpace2D
Spaces.SpectralElementSpace2D(topology, quadrature_style; enable_bubble)
Spaces.SpectralElementSpaceSlab
```

### Quadratures


```@docs
Spaces.Quadratures.QuadratureStyle
Spaces.Quadratures.GLL
Spaces.Quadratures.GL
Spaces.Quadratures.Uniform
Spaces.Quadratures.degrees_of_freedom
Spaces.Quadratures.polynomial_degree
Spaces.Quadratures.quadrature_points
Spaces.Quadratures.barycentric_weights
Spaces.Quadratures.interpolation_matrix
Spaces.Quadratures.differentiation_matrix
Spaces.Quadratures.orthonormal_poly
Quadratures.QuadratureStyle
Quadratures.GLL
Quadratures.GL
Quadratures.Uniform
Quadratures.degrees_of_freedom
Quadratures.polynomial_degree
Quadratures.quadrature_points
Quadratures.barycentric_weights
Quadratures.interpolation_matrix
Quadratures.differentiation_matrix
Quadratures.orthonormal_poly
```

#### Internals

```@docs
Spaces.dss_transform
Spaces.dss_transform!
Spaces.dss_untransform!
Spaces.dss_untransform
Spaces.dss_local_vertices!
Spaces.dss_local!
Spaces.dss_local_ghost!
Spaces.dss_ghost!
Spaces.create_dss_buffer
Spaces.fill_send_buffer!
Spaces.DSSBuffer
Spaces.create_ghost_buffer
Spaces.load_from_recv_buffer!
Topologies.dss_transform
Topologies.dss_transform!
Topologies.dss_untransform!
Topologies.dss_untransform
Topologies.dss_local_vertices!
Topologies.dss_local!
Topologies.dss_local_ghost!
Topologies.dss_ghost!
Topologies.create_dss_buffer
Topologies.fill_send_buffer!
Topologies.DSSBuffer
Topologies.load_from_recv_buffer!
Topologies.dss!
Spaces.weighted_dss_start!
Spaces.weighted_dss_internal!
Spaces.weighted_dss_ghost!
Spaces.weighted_dss!
Spaces.dss!
Spaces.unique_nodes
```

Expand Down
17 changes: 14 additions & 3 deletions examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
version = "0.5.5"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "Memoize", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack", "WeakValueDicts"]
path = ".."
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.10.55"
Expand Down Expand Up @@ -1099,9 +1099,9 @@ version = "2.5.2"

[[deps.LinearSolve]]
deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"]
git-tree-sha1 = "158e45dd35cec1ecade0e554c0104ee89e772d82"
git-tree-sha1 = "3196f7408f7c6014dc4ed55260e6c5e1e01c58a3"
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
version = "2.11.1"
version = "2.12.0"

[deps.LinearSolve.extensions]
LinearSolveBandedMatricesExt = "BandedMatrices"
Expand Down Expand Up @@ -1226,6 +1226,12 @@ git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102"
uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
version = "0.3.2"

[[deps.Memoize]]
deps = ["MacroTools"]
git-tree-sha1 = "2b1dfcba103de714d31c033b5dacc2e4a12c7caa"
uuid = "c03570c3-d221-55d1-a50c-7939bbd78826"
version = "0.4.4"

[[deps.MicroCollections]]
deps = ["BangBang", "InitialValues", "Setfield"]
git-tree-sha1 = "629afd7d10dbc6935ec59b32daeb33bc4460a42e"
Expand Down Expand Up @@ -2082,6 +2088,11 @@ git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da"
uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91"
version = "1.25.0+0"

[[deps.WeakValueDicts]]
git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0"
uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1"
version = "0.1.0"

[[deps.WriteVTK]]
deps = ["Base64", "CodecZlib", "FillArrays", "LightXML", "TranscodingStreams", "VTKBase"]
git-tree-sha1 = "41f0dc2a8f6fd860c266b91fd5cdf4fead65ae69"
Expand Down
2 changes: 1 addition & 1 deletion examples/bickleyjet/bickleyjet_dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function rhs!(dydt, y, (parameters, numflux), t)
dydt_data .= RecursiveApply.rdiv.(dydt_data, space.local_geometry.WJ)
M = Spaces.Quadratures.cutoff_filter_matrix(
Float64,
space.quadrature_style,
Spaces.quadrature_style(space),
3,
)
Operators.tensor_product!(dydt_data, M)
Expand Down
8 changes: 3 additions & 5 deletions examples/hybrid/hybrid3dcs_dss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,16 @@ function hybrid3dcubedsphere_dss_profiler(
c = center_initial_condition(ᶜlocal_geometry),
f = face_initial_condition(ᶠlocal_geometry),
)
ghost_buffer = (
c = Spaces.create_ghost_buffer(Y.c),
f = Spaces.create_ghost_buffer(Y.f),
)
ghost_buffer =
(c = Spaces.create_dss_buffer(Y.c), f = Spaces.create_dss_buffer(Y.f))
dss_buffer_f = Spaces.create_dss_buffer(Y.f)
dss_buffer_c = Spaces.create_dss_buffer(Y.c)
nsamples = 10000
nsamplesprofiling = 100

# precompile relevant functions
space = axes(Y.c)
horizontal_topology = space.horizontal_space.topology
horizontal_topology = Spaces.topology(space)
Spaces.weighted_dss_internal!(Y.c, ghost_buffer.c)
weighted_dss_full!(Y.c, ghost_buffer.c)
Spaces.fill_send_buffer!(
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/sphere/deformation_flow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function run_deformation_flow(use_limiter, fct_op)
Geometry.LatLongZPoint(ϕ_c, λ_c1, FT(0)),
Geometry.LatLongZPoint(ϕ_c, λ_c2, FT(0)),
)
horz_geometry = horz_space.global_geometry
horz_geometry = Spaces.global_geometry(horz_space)
rds = map(centers) do center
Geometry.great_circle_distance(coord, center, horz_geometry)
end
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/sphere/hadley_circulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ end

# write out our cubed sphere mesh
meshfile_cc = remap_tmpdir * "mesh_cubedsphere.g"
write_exodus(meshfile_cc, hv_center_space.horizontal_space.topology)
write_exodus(meshfile_cc, Spaces.topology(hv_center_space))

# write out RLL mesh
nlat = 90
Expand Down
4 changes: 2 additions & 2 deletions examples/hybrid/sphere/remap_pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function remap2latlon(filein, nc_dir, nlat, nlon)
# reconstruct space, obtain Nq from space
cspace = axes(Y.c)
hspace = Spaces.horizontal_space(cspace)
Nq = Spaces.Quadratures.degrees_of_freedom(hspace.quadrature_style)
Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(hspace))

# create a temporary dir for intermediate data
remap_tmpdir = nc_dir * "remaptmp/"
Expand Down Expand Up @@ -97,7 +97,7 @@ function remap2latlon(filein, nc_dir, nlat, nlon)

# write out our cubed sphere mesh
meshfile_cc = remap_tmpdir * "mesh_cubedsphere.g"
write_exodus(meshfile_cc, hspace.topology)
write_exodus(meshfile_cc, Spaces.topology(hspace))

meshfile_rll = remap_tmpdir * "mesh_rll.g"
rll_mesh(meshfile_rll; nlat = nlat, nlon = nlon)
Expand Down
4 changes: 2 additions & 2 deletions examples/sphere/limiters_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ for (k, ne) in enumerate(ne_seq)
Spaces.SpectralElementSpace2D(grid_topology, quad; enable_bubble = true)

# Initialize variables needed for limiters
n_elems = Topologies.nlocalelems(space.topology)
n_elems = Topologies.nlocalelems(Spaces.topology(space))
min_q = zeros(n_elems)
max_q = zeros(n_elems)

coords = Fields.coordinate_field(space)
Δh[k] = 2 * R / ne
global_geom = space.global_geometry
global_geom = Spaces.global_geometry(space)

# Initialize state
y0 = map(coords) do coord
Expand Down
4 changes: 2 additions & 2 deletions examples/sphere/shallow_water_cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ function rhs!(dYdt_fv, y_fv, parameters, t)
wcurl(Geometry.Covariant3Vector(curl(y.u))),
)

NVTX.@range "dss" Spaces.weighted_dss2!(dYdt, ghost_buffer)
NVTX.@range "dss" Spaces.weighted_dss!(dYdt, ghost_buffer)
end

NVTX.@range "tendency" begin
Expand All @@ -489,7 +489,7 @@ function rhs!(dYdt_fv, y_fv, parameters, t)
dYdt.u += -grad(g * (y.h + h_s) + norm(y.u)^2 / 2) #+
dYdt.u += y.u × (f + curl(y.u))
end
NVTX.@range "dss" Spaces.weighted_dss2!(dYdt, ghost_buffer)
NVTX.@range "dss" Spaces.weighted_dss!(dYdt, ghost_buffer)
end
end
return dYdt_fv
Expand Down
2 changes: 1 addition & 1 deletion examples/sphere/solidbody.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ for (k, ne) in enumerate(ne_seq)

Δh[k] = 2 * R / ne

global_geom = space.global_geometry
global_geom = Spaces.global_geometry(space)

h_init = map(coords) do coord
rd = Geometry.great_circle_distance(coord, center, global_geom)
Expand Down
2 changes: 1 addition & 1 deletion lib/ClimaCoreMakie/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function plot_vertices(
space,
ClimaCore.Geometry.Cartesian123Point.(
ClimaCore.Fields.coordinate_field(space),
Ref(space.global_geometry),
Ref(Spaces.global_geometry(space)),
),
)
end
Expand Down
Loading

0 comments on commit eb000c6

Please sign in to comment.