Closed francispoulin closed 2 years ago
@simone-silvestri
Makes sense, I'll change the print function to make it consistent with other advection schemes
Thank you @simone-silvestri !
Let's close the issue when #2099 is merged. :)
Yes, very good idea. Thanks for doing just that.
Francis
From: Navid C. Constantinou @.>
Sent: Sunday, December 5, 2021 8:58:49 PM
To: CliMA/Oceananigans.jl @.>
Cc: Francis Poulin @.>; State change @.>
Subject: Re: [CliMA/Oceananigans.jl] WENO5
is very different from other advection schemes (Issue #2098)
Let's close the issue when #2099https://github.com/CliMA/Oceananigans.jl/pull/2099 is merged. :)
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/CliMA/Oceananigans.jl/issues/2098#issuecomment-986369683, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB63PQLDYFOGAU3RT26VFPDUPQKFTANCNFSM5JNBEH2Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@francispoulin is this a better solution?
julia> scheme1 = UpwindBiasedThirdOrder()
UpwindBiasedThirdOrder()
julia> scheme2 = WENO5()
┌ Warning: defaulting to uniform WENO scheme with Float64 precision, use WENO5(grid = grid) if this was not intended
└ @ Oceananigans.Advection ~/Research/Oceananigans.jl/src/Advection/weno_fifth_order.jl:145
WENO5 advection scheme with:
├── X regular
├── Y regular
└── Z regular
julia> string(typeof(scheme1).name.wrapper)
"UpwindBiasedThirdOrder"
julia> string(typeof(scheme2).name.wrapper)
"WENO5"
perhaps we rename the issue to something along the lines of
show()
method for WENO5
is very different from other advection schemes`
?
Closed after the disucssion in #2099
To get the string name of an advection scheme I can do something like the following:
which produces "UpwindBiasedThirdOrder". I am doing this to get titles in figures to compare the results of the different schemes.
However, when I try doing something similar with
WENO5
, it fails because it is designed very differenetly:which instead produces
"WENO5 advection scheme with: \n ├── X regular \n ├── Y regular \n └── Z regular"
I am not suggesting anything is wrong but can someone suggest how I might be able to get string names from these advection schemes more easily?
@simone-silvestri ?