Skip to content

Commit

Permalink
boundary_tags -> boundary_names kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Feb 29, 2024
1 parent 29300df commit c323d86
Show file tree
Hide file tree
Showing 46 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion benchmarks/3d/se_kernels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function initialize_mwe(device, ::Type{FT}) where {FT}
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
z_mesh = Meshes.IntervalMesh(z_domain, nelems = z_elem)
z_topology = Topologies.IntervalTopology(context, z_mesh)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/3d/vector_laplacian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ hspace = Spaces.SpectralElementSpace2D(htopology, Quadratures.GLL{4}())
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(0.0),
Geometry.ZPoint(10e3);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain; nelems = 45)
vtopology = Topologies.IntervalTopology(
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/introduction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using ClimaComms,

column_domain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.ZPoint(0.0) .. ClimaCore.Geometry.ZPoint(10.0),
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
#----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/common_spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function make_hybrid_spaces(h_space, z_max, z_elem; z_stretch)
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
z_mesh = Meshes.IntervalMesh(z_domain, z_stretch; nelems = z_elem)
z_topology = Topologies.IntervalTopology(z_mesh)
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/box/bubble_3d_invariant_rhoe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function hvspace_3D(
vertdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zlim[1]),
Geometry.ZPoint{FT}(zlim[2]);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = Meshes.IntervalMesh(vertdomain, nelems = zelem)
verttopo = Topologies.IntervalTopology(
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function sphere_3D(
vertdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zlim[1]),
Geometry.ZPoint{FT}(zlim[2]);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = Meshes.IntervalMesh(vertdomain, nelems = zelem)
vert_center_space = Spaces.CenterFiniteDifferenceSpace(vertmesh)
Expand Down
2 changes: 1 addition & 1 deletion lib/ClimaCoreMakie/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ end
vert_domain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.ZPoint(0.0),
ClimaCore.Geometry.ZPoint(1000.0);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vert_mesh = ClimaCore.Meshes.IntervalMesh(vert_domain, nelems = 36)
vert_center_space = ClimaCore.Spaces.CenterFiniteDifferenceSpace(vert_mesh)
Expand Down
8 changes: 4 additions & 4 deletions lib/ClimaCorePlots/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OUTPUT_DIR = mkpath(get(ENV, "CI_OUTPUT_DIR", tempname()))
@testset "spectral element 1D" begin
domain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.XPoint(0.0) .. ClimaCore.Geometry.XPoint(π),
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = ClimaCore.Meshes.IntervalMesh(domain; nelems = 5)
grid_topology = ClimaCore.Topologies.IntervalTopology(mesh)
Expand Down Expand Up @@ -109,7 +109,7 @@ end
vertdomain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.ZPoint{FT}(0),
ClimaCore.Geometry.ZPoint{FT}(1000);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = ClimaCore.Meshes.IntervalMesh(vertdomain, nelems = velem)
vert_center_space = ClimaCore.Spaces.CenterFiniteDifferenceSpace(vertmesh)
Expand Down Expand Up @@ -197,7 +197,7 @@ end
vertdomain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.ZPoint{FT}(0),
ClimaCore.Geometry.ZPoint{FT}(1000);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = ClimaCore.Meshes.IntervalMesh(vertdomain, nelems = velem)
vert_center_space = ClimaCore.Spaces.CenterFiniteDifferenceSpace(vertmesh)
Expand Down Expand Up @@ -246,7 +246,7 @@ end
vertdomain = ClimaCore.Domains.IntervalDomain(
ClimaCore.Geometry.ZPoint{FT}(0),
ClimaCore.Geometry.ZPoint{FT}(1000);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = ClimaCore.Meshes.IntervalMesh(vertdomain, nelems = velem)
vert_center_space = ClimaCore.Spaces.CenterFiniteDifferenceSpace(vertmesh)
Expand Down
8 changes: 4 additions & 4 deletions lib/ClimaCoreTempestRemap/test/netcdf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ end
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(0.0),
Geometry.ZPoint(50.0);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = nlevels)
vspace = Spaces.CenterFiniteDifferenceSpace(vmesh)
Expand Down Expand Up @@ -181,7 +181,7 @@ end
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(0.0),
Geometry.ZPoint(50.0);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = nlevels)
vspace = Spaces.CenterFiniteDifferenceSpace(vmesh)
Expand Down Expand Up @@ -316,7 +316,7 @@ end
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(0.0),
Geometry.ZPoint(50.0);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = nlevels)
vfspace = Spaces.FaceFiniteDifferenceSpace(vmesh)
Expand Down Expand Up @@ -425,7 +425,7 @@ end
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(0.0),
Geometry.ZPoint(50.0);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = nlevels)
vspace = Spaces.CenterFiniteDifferenceSpace(vmesh)
Expand Down
2 changes: 1 addition & 1 deletion test/Fields/field_opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ end
vdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zero(FT)),
Geometry.ZPoint{FT}(FT(1e4));
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = 4)
vspace = Spaces.CenterFiniteDifferenceSpace(vmesh)
Expand Down
4 changes: 2 additions & 2 deletions test/Fields/reduction_cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ end
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
z_mesh = Meshes.IntervalMesh(z_domain, nelems = z_elem)
z_topology = Topologies.IntervalTopology(context, z_mesh)
Expand Down Expand Up @@ -205,7 +205,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(z0),
Geometry.ZPoint{FT}(z_max);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)

z_mesh = Meshes.IntervalMesh(domain; nelems = z_nelems)
Expand Down
2 changes: 1 addition & 1 deletion test/Fields/reduction_cuda_distributed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ end
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
z_mesh = Meshes.IntervalMesh(z_domain, nelems = z_elem)
z_topology = Topologies.IntervalTopology(vcontext, z_mesh)
Expand Down
2 changes: 1 addition & 1 deletion test/InputOutput/hybrid3dbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function hvspace_3D(
vertdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zlim[1]),
Geometry.ZPoint{FT}(zlim[2]);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vertmesh = Meshes.IntervalMesh(vertdomain, nelems = zelem)
vert_center_space = Spaces.CenterFiniteDifferenceSpace(vertmesh)
Expand Down
2 changes: 1 addition & 1 deletion test/InputOutput/hybrid3dcubedsphere.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ end
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
z_mesh = Meshes.IntervalMesh(z_domain, nelems = z_elem)
z_topology = Topologies.IntervalTopology(z_mesh)
Expand Down
2 changes: 1 addition & 1 deletion test/InputOutput/hybrid3dcubedsphere_topography.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ end
z_domain = Domains.IntervalDomain(
Geometry.ZPoint(zero(z_max)),
Geometry.ZPoint(z_max);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)


Expand Down
2 changes: 1 addition & 1 deletion test/MatrixFields/field2arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ClimaCore: Geometry, Domains, Meshes, Spaces, Fields, MatrixFields
domain = Domains.IntervalDomain(
Geometry.ZPoint(FT(1)),
Geometry.ZPoint(FT(4));
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain, nelems = 3)
center_space = Spaces.CenterFiniteDifferenceSpace(mesh)
Expand Down
2 changes: 1 addition & 1 deletion test/MatrixFields/matrix_field_test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function test_spaces(::Type{FT}) where {FT}
vdomain = Domains.IntervalDomain(
Geometry.ZPoint(FT(0)),
Geometry.ZPoint(FT(10));
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = velem)
vtopology = Topologies.IntervalTopology(comms_ctx, vmesh)
Expand Down
4 changes: 2 additions & 2 deletions test/Meshes/interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ end
parent_domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(z_bottom),
Geometry.ZPoint{FT}(z_top_parent),
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
parent_mesh = Meshes.IntervalMesh(parent_domain, stretch, nelems = nz)
trunc_domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(z_bottom),
Geometry.ZPoint{FT}(z_top),
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
trunc_mesh = Meshes.truncate_mesh(parent_mesh, trunc_domain)

Expand Down
28 changes: 14 additions & 14 deletions test/Operators/finitedifference/column.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ device = ClimaComms.device()
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
@test eltype(domain) === Geometry.ZPoint{FT}

Expand Down Expand Up @@ -129,7 +129,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
@test eltype(domain) === Geometry.ZPoint{FT}

Expand Down Expand Up @@ -215,7 +215,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)

@test eltype(domain) === Geometry.ZPoint{FT}
Expand Down Expand Up @@ -269,7 +269,7 @@ convergence_rate(err, Δh) =
interval = Geometry.ZPoint(a) .. Geometry.ZPoint(b)
domain = Domains.IntervalDomain(
interval;
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn, nelems = n)

Expand Down Expand Up @@ -317,7 +317,7 @@ end
interval = Geometry.ZPoint(a) .. Geometry.ZPoint(b)
domain = Domains.IntervalDomain(
interval;
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn, nelems = n)

Expand Down Expand Up @@ -368,7 +368,7 @@ end
interval = Geometry.ZPoint(a) .. Geometry.ZPoint(b)
domain = Domains.IntervalDomain(
interval;
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn, nelems = n)

Expand Down Expand Up @@ -419,7 +419,7 @@ end
interval = Geometry.ZPoint(a) .. Geometry.ZPoint(b)
domain = Domains.IntervalDomain(
interval;
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn, nelems = n)

Expand Down Expand Up @@ -474,7 +474,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain; nelems = n)

Expand Down Expand Up @@ -743,7 +743,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(-pi),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn; nelems = n)

Expand Down Expand Up @@ -804,7 +804,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(-pi),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain; nelems = n)

Expand Down Expand Up @@ -915,7 +915,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(-pi),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain, stretch_fn; nelems = n)

Expand Down Expand Up @@ -985,7 +985,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(-pi),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain; nelems = n)

Expand Down Expand Up @@ -1044,7 +1044,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain; nelems = n_elems)

Expand Down Expand Up @@ -1112,7 +1112,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(4π);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain; nelems = n)

Expand Down
2 changes: 1 addition & 1 deletion test/Operators/finitedifference/implicit_stencils_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function get_space(::Type{FT}) where {FT}
vdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zero(FT)),
Geometry.ZPoint{FT}(zmax);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = velem)
vtopology =
Expand Down
2 changes: 1 addition & 1 deletion test/Operators/finitedifference/linsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ hspace = Spaces.SpectralElementSpace2D(htopology, quad)
vdomain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(zero(FT)),
Geometry.ZPoint{FT}(zmax);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
vmesh = Meshes.IntervalMesh(vdomain, nelems = velem)
center_space = Spaces.CenterFiniteDifferenceSpace(vmesh)
Expand Down
2 changes: 1 addition & 1 deletion test/Operators/finitedifference/opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:left, :right),
boundary_names = (:left, :right),
)
mesh = Meshes.IntervalMesh(domain; nelems = 16)

Expand Down
2 changes: 1 addition & 1 deletion test/Operators/finitedifference/opt_examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ end
domain = Domains.IntervalDomain(
Geometry.ZPoint{FT}(0.0),
Geometry.ZPoint{FT}(pi);
boundary_tags = (:bottom, :top),
boundary_names = (:bottom, :top),
)
mesh = Meshes.IntervalMesh(domain; nelems = n_elems)
cs = Spaces.CenterFiniteDifferenceSpace(mesh)
Expand Down
Loading

0 comments on commit c323d86

Please sign in to comment.