From 52e85862ada0aace42e528668867f9f4409d2d9b Mon Sep 17 00:00:00 2001 From: Ivan Utkin Date: Sat, 25 Nov 2023 16:07:10 +0100 Subject: [PATCH] Add greeting --- scripts_future_API/tm_stokes_mpi_wip.jl | 16 +--------------- src/FastIce.jl | 13 +++++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/scripts_future_API/tm_stokes_mpi_wip.jl b/scripts_future_API/tm_stokes_mpi_wip.jl index b2cda295..76c0e395 100644 --- a/scripts_future_API/tm_stokes_mpi_wip.jl +++ b/scripts_future_API/tm_stokes_mpi_wip.jl @@ -32,20 +32,6 @@ max_abs_g(A) = (max_l = maximum(abs.(interior(A))); MPI.Allreduce(max_l, MPI.MAX @views av_xz(A) = 0.25 .* (A[1:end-1, :, 1:end-1] .+ A[2:end, :, 1:end-1, :] .+ A[2:end, :, 2:end, :] .+ A[1:end-1, :, 2:end]) @views av_yz(A) = 0.25 .* (A[:, 1:end-1, 1:end-1] .+ A[:, 2:end, 1:end-1] .+ A[:, 2:end, 2:end] .+ A[:, 1:end-1, 2:end]) -function fastice_intro(; kwargs...) - intro = raw""" - ┌──────────────────────────────────────────────────────────┐ - │ ______ __ ____ _ __ │ - │ / ____/____ _ _____ / /_ / _/_____ ___ (_)/ / │ - │ / /_ / __ `// ___// __/ / / / ___// _ \ / // / │ - │ / __/ / /_/ /(__ )/ /_ _/ / / /__ / __/_ / // / │ - │ /_/ \__,_//____/ \__//___/ \___/ \___/(_)__/ //_/ │ - │ /___/ │ - └──────────────────────────────────────────────────────────┘ - """ - printstyled(intro; kwargs...) -end - function main(; do_visu=false, do_save=false) MPI.Init() @@ -72,7 +58,7 @@ function main(; do_visu=false, do_save=false) grid_l = local_grid(grid_g, topo) if me == 0 - fastice_intro(bold=true, color=:blue) + FastIce.greet(bold=true, color=:blue) printstyled("Running FastIce.jl 🧊 \n"; bold=true, color=:blue) printstyled(grid_g; bold=true) end diff --git a/src/FastIce.jl b/src/FastIce.jl index e1491a03..33b89817 100644 --- a/src/FastIce.jl +++ b/src/FastIce.jl @@ -1,5 +1,18 @@ module FastIce +const GREETING = raw""" +┌──────────────────────────────────────────────────────────┐ +│ ______ __ ____ _ __ │ +│ / ____/____ _ _____ / /_ / _/_____ ___ (_)/ / │ +│ / /_ / __ `// ___// __/ / / / ___// _ \ / // / │ +│ / __/ / /_/ /(__ )/ /_ _/ / / /__ / __/_ / // / │ +│ /_/ \__,_//____/ \__//___/ \___/ \___/(_)__/ //_/ │ +│ /___/ │ +└──────────────────────────────────────────────────────────┘ +""" + +greet(; kwargs...) = printstyled(GREETING; kwargs...) + # core modules include("Grids/Grids.jl") include("GridOperators.jl")