Skip to content

Commit

Permalink
Support for DXV/DYV/DZV
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Nov 5, 2024
1 parent d41c324 commit f66f05a
Showing 1 changed file with 35 additions and 20 deletions.
55 changes: 35 additions & 20 deletions src/CornerPointGrid/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,47 @@ function mesh_from_dxdydz_and_tops(grid; actnum = get_effective_actnum(grid))
end
return out
end
DX = meshgrid_section("DX")
dx = vec(DX[:, 1, 1])
for i in axes(DX, 1)
for j in axes(DX, 2)
for k in axes(DX, 3)
@assert DX[i, j, k] DX[i, 1, 1]
if haskey(grid, "DX")
DX = meshgrid_section("DX")
dx = vec(DX[:, 1, 1])
for i in axes(DX, 1)
for j in axes(DX, 2)
for k in axes(DX, 3)
@assert DX[i, j, k] DX[i, 1, 1]
end
end
end
end
DY = meshgrid_section("DY")
dy = vec(DY[1, :, 1])
for i in axes(DY, 1)
for j in axes(DY, 2)
for k in axes(DY, 3)
@assert DY[i, j, k] DY[1, j, 1]
else
@assert haskey(grid, "DXV") "Either DX or DXV must be provided in GRID."
dx = vec(grid["DXV"])
end
if haskey(grid, "DY")
DY = meshgrid_section("DY")
dy = vec(DY[1, :, 1])
for i in axes(DY, 1)
for j in axes(DY, 2)
for k in axes(DY, 3)
@assert DY[i, j, k] DY[1, j, 1]
end
end
end
end
DZ = meshgrid_section("DZ")
dz = vec(DZ[1, 1, :])
for i in axes(DZ, 1)
for j in axes(DZ, 2)
for k in axes(DZ, 3)
@assert DZ[i, j, k] DZ[1, 1, k]
else
@assert haskey(grid, "DYV") "Either DY or DYV must be provided in GRID."
dy = vec(grid["DYV"])
end
if haskey(grid, "DZ")
DZ = meshgrid_section("DZ")
dz = vec(DZ[1, 1, :])
for i in axes(DZ, 1)
for j in axes(DZ, 2)
for k in axes(DZ, 3)
@assert DZ[i, j, k] DZ[1, 1, k]
end
end
end
else
@assert haskey(grid, "DZV") "Either DZ or DZV must be provided in GRID."
dz = vec(grid["DZV"])
end
TOPS = meshgrid_section("TOPS")
tops = TOPS[:, :, 1]
Expand Down

0 comments on commit f66f05a

Please sign in to comment.