-
Notifications
You must be signed in to change notification settings - Fork 0
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
work in progress #6
base: main
Are you sure you want to change the base?
Conversation
Change DiscSimulations.jl/src/burgers/trixi.jl Lines 10 to 12 in bacf049
to using ..DiscSimulations: DiscSolution, OneDimension |
|
||
##need to add functype constructors?? | ||
using TruncatedStacktraces | ||
TruncatedStacktraces.VERBOSE[] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
DiscSimulations.jl/src/DiscSimulations.jl Line 25 in aade215
Need to forward parameters here. |
Python Burgers example/__pycache__/benchmarkedBurgers.cpython-310.pyc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good! The new plot looks very good too 👍
examples/burger-chef.jl
Outdated
simple_sol = | ||
@time solve(simple_problem, Rodas5(autodiff = false); reltol = 1e-7, abstol = 1e-7) | ||
|
||
spectral_x, _, T, Ti, spectral_problem = BurgerSpectral.setup(N, xmax) | ||
spectral_x, _, T, Ti, spectral_problem = BurgerSpectral.setup(N, xmax, initial_condition_burgers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to create a wrapper function that makes the initial condition function formats compatible. BurgerSimple
and BurgerSpectral
both expect functions in the form of:
f(::AbstractArray)::AbstractArray
whereas your function is of the form
f(::AbstractArray)::Number
To fix, define something like
function _wrap_init_conditions(f::Function)
function _wrapper(x)
map(x) do i
f(SVector(i))
end
end
end
You can then use this as
... = BurgerSpectral.setup(N, xmax, _wrap_init_conditions(initial_condition_burgers))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to commit *.pyc
files :~)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn I thought I'd added that to the git ignore I don't know why it didn't work
No description provided.