Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GIF to README #104

Merged
merged 10 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<!-- Title -->
<h1 align="center">
Subzero.jl
</h1>
![Subzero.jl](https://github.com/Caltech-OCTO/Subzero.jl/blob/main/docs/src/assets/title.gif)

<!-- description -->
<p align="center">
Expand All @@ -27,10 +25,10 @@
Subzero.jl is a native [Julia](https://julialang.org/) discrete-element model (DEM) for exploring fine-scale sea ice dynamics,
reimplementing MATLAB model [SubZero by Manucharyan and Montemuro](https://doi.org/10.1029/2022MS003247).

Subzero.jl is **fast** and **flexible**.
**Subzero.jl is fast and flexible**.

- 🚀 Runs over **35 times faster** that original MATLAB model for title simulation!
- 🧩 Modular simulation model makes it easy to customize simulations within a **single_ run file**!
- 🧩 Modular simulation model makes it easy to customize simulations within a **single file**!
- Enable and disable physical processes such as fracturing, ridging, and welding
- Choose algorithms for key processes (or add your own!)

Expand Down
Binary file modified docs/src/assets/title.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions docs/src/assets/title.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Δgrid = 2e3
const hmean = 0.25
const Δh = 0.0
const Δt = 20
const nΔt = 5000
const nΔt = 15000

# Model instantiation
grid = RegRectilinearGrid((0.0, Lx), (0.0, Ly), Δgrid, Δgrid)
Expand Down Expand Up @@ -61,14 +61,12 @@ function plot_logo(floe_fn, Lx, Ly, dir)
time_polys = @lift(sim_polys[$time])

# Set up figure
fig = Figure(; size = (1200, 300))
fig = Figure(; size = (800, 200))

floe_rgb = (165, 222, 242)
floe_rgb = (255, 255, 255)
floe_color = RGBf((floe_rgb ./ 255)...)
ocean_rgb = (4, 31, 74)
ocean_rgb = (0, 157, 196)
ocean_color = RGBf((ocean_rgb ./ 255)...)
text_outline_rgb = (219, 76, 0)
text_outline_color = RGBf((text_outline_rgb ./ 255)...)

ax = Axis(fig[1, 1]; limits = (0.0, Lx, 0.0, Ly), backgroundcolor = ocean_color)
hidedecorations!(ax)
Expand All @@ -80,8 +78,8 @@ function plot_logo(floe_fn, Lx, Ly, dir)
align = (:center, :center),
text = "Subzero.jl",
font = :bold,
fontsize = 175,
strokecolor = text_outline_color,
fontsize = 130,
strokecolor = :white,
strokewidth = 5,
)

Expand Down
2 changes: 1 addition & 1 deletion src/physical_processes/simplification.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function dissolve_floe!(floe, grid::RegRectilinearGrid, domain, dissolved)
yidx = shift_cell_idx(yidx, grid.Ny + 1, domain.north)
# If centroid is within bounds after wrapping, add mass to dissolved
if 0 < xidx <= grid.Nx && 0 < yidx <= grid.Ny
dissolved[xidx, yidx] += floe.mass
dissolved[yidx, xidx] += floe.mass
end
return
end
Expand Down
Loading