-
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
Switch to method of lines for FiniteDifference #187
Conversation
src/finite.jl
Outdated
C .= capacity.(prob.eq, u) | ||
odesol = solve(odeprob, ImplicitEuler(), abstol = abstol, verbose = false) | ||
|
||
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && presol.retcode == ReturnCode.Success |
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.
[JuliaFormatter] reported by reviewdog 🐶
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && presol.retcode == ReturnCode.Success | |
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && | |
presol.retcode == ReturnCode.Success |
src/finite.jl
Outdated
function f!(∂u_∂t, u, ::SciMLBase.NullParameters, t) | ||
K = conductivity.(eq, u[(begin + 1):end]) | ||
Kf = (K[begin:(end - 1)] .+ K[(begin + 1):end]) / 2 | ||
|
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.
[JuliaFormatter] reported by reviewdog 🐶
src/finite.jl
Outdated
Kf = (K[begin:(end - 1)] .+ K[(begin + 1):end]) / 2 | ||
|
||
if u[begin] > zero(u[begin]) | ||
∂u_∂t[begin] = -(Kf[begin] / Δr * u[begin + 1] - Kf[begin] / Δr * u[begin + 2]) |
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.
[JuliaFormatter] reported by reviewdog 🐶
∂u_∂t[begin] = -(Kf[begin] / Δr * u[begin + 1] - Kf[begin] / Δr * u[begin + 2]) | |
∂u_∂t[begin] = -(Kf[begin] / Δr * u[begin + 1] - | |
Kf[begin] / Δr * u[begin + 2]) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #187 +/- ##
==========================================
- Coverage 77.21% 76.45% -0.77%
==========================================
Files 22 22
Lines 755 773 +18
==========================================
+ Hits 583 591 +8
- Misses 172 182 +10 ☔ View full report in Codecov by Sentry. |
src/finite.jl
Outdated
(integrator) -> nothing, | ||
save_positions = (false, false)) | ||
|
||
odeprob = ODEProblem(f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) |
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.
[JuliaFormatter] reported by reviewdog 🐶
odeprob = ODEProblem(f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) | |
odeprob = ODEProblem( | |
f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) |
src/finite.jl
Outdated
|
||
odesol = solve(odeprob, ImplicitEuler(), abstol = abstol, verbose = false) | ||
|
||
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && presol.retcode == ReturnCode.Success |
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.
[JuliaFormatter] reported by reviewdog 🐶
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && presol.retcode == ReturnCode.Success | |
if odesol.retcode != ReturnCode.Success && !isnothing(presol) && | |
presol.retcode == ReturnCode.Success |
src/finite.jl
Outdated
u[(begin + 1)] = prob.b | ||
u[(begin + 2):end] .= prob.i | ||
|
||
odeprob = ODEProblem(f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) |
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.
[JuliaFormatter] reported by reviewdog 🐶
odeprob = ODEProblem(f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) | |
odeprob = ODEProblem( | |
f!, u, (t, prob._tstop), callback = CallbackSet(steady_state, exhausted)) |
ae999a2
to
0318d3f
Compare
No description provided.