Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
luraess committed Mar 12, 2024
1 parent e043df0 commit 1400897
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions scripts_future_API/test_levelsets_volumefractions_mpi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function main(backend=CPU(); nxyz_l=(126, 126))
# type = :turtle
generate_surf(x, y, gl, lx, ly) = gl * (1.0 - ((1.7 * x / lx + 0.22)^2 + (0.5 * y / ly)^2))
generate_bed(x, y, amp, ω, tanβ, el, lx, ly, lz) = lz * (amp * sin* x / lx) * sin* y /ly) + tanβ * x / lx + el + (1.5 * y / ly)^2)
dem_surf = FunctionField(generate_surf, grid_2d, Vertex(); parameters=(gl=gl, lx=lx, ly=ly))
dem_bed = FunctionField(generate_bed, grid_2d, Vertex(); parameters=(amp=amp, ω=ω, tanβ=tanβ, el=el, lx=lx, ly=ly, lz=lz))
dem_surf = FunctionField(generate_surf, grid_2d, Vertex(); parameters=(; gl, lx, ly))
dem_bed = FunctionField(generate_bed, grid_2d, Vertex(); parameters=(; amp, ω, tanβ, el, lx, ly, lz))
# synthetic topo ###############

# init fields
Expand Down
14 changes: 7 additions & 7 deletions src/LevelSets/compute_volume_fractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,17 @@ function volfrac(rect::Rect3, ϕ::Vec{8})
end

function volfrac_field(backend::Backend, grid::UniformGrid{2}, args...; kwargs...)
(c=Field(backend, grid, Center()),
x=Field(backend, grid, (Vertex(), Center())),
y=Field(backend, grid, (Center(), Vertex())),
(c =Field(backend, grid, Center()),

Check warning on line 121 in src/LevelSets/compute_volume_fractions.jl

View check run for this annotation

Codecov / codecov/patch

src/LevelSets/compute_volume_fractions.jl#L120-L121

Added lines #L120 - L121 were not covered by tests
x =Field(backend, grid, (Vertex(), Center())),
y =Field(backend, grid, (Center(), Vertex())),
xy=Field(backend, grid, Vertex()))
end

function volfrac_field(backend::Backend, grid::UniformGrid{3}, args...; kwargs...)
(c=Field(backend, grid, Center()),
x=Field(backend, grid, (Vertex(), Center(), Center())),
y=Field(backend, grid, (Center(), Vertex(), Center())),
z=Field(backend, grid, (Center(), Center(), Vertex())),
(c =Field(backend, grid, Center()),

Check warning on line 128 in src/LevelSets/compute_volume_fractions.jl

View check run for this annotation

Codecov / codecov/patch

src/LevelSets/compute_volume_fractions.jl#L127-L128

Added lines #L127 - L128 were not covered by tests
x =Field(backend, grid, (Vertex(), Center(), Center())),
y =Field(backend, grid, (Center(), Vertex(), Center())),
z =Field(backend, grid, (Center(), Center(), Vertex())),
xy=Field(backend, grid, (Vertex(), Vertex(), Center())),
xz=Field(backend, grid, (Vertex(), Center(), Vertex())),
yz=Field(backend, grid, (Center(), Vertex(), Vertex())))
Expand Down

0 comments on commit 1400897

Please sign in to comment.