-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Boundary conditions should always use solution object #208
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: ErikQQY <2283984853@qq.com>
Signed-off-by: ErikQQY <2283984853@qq.com>
Signed-off-by: ErikQQY <2283984853@qq.com>
It's not optimal. Each tableau has an associated interpolation we should add to the solution. |
Signed-off-by: ErikQQY <2283984853@qq.com>
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
recursive_flatten_twopoint!(resid, resids, cache.resid_size) | ||
return nothing | ||
end | ||
|
||
@views function __mirk_loss(u, p, y, pt::StandardBVProblem, bc::BC, mesh, cache) where {BC} | ||
y_ = recursive_unflatten!(y, u) | ||
soly_ = MIRKSol(y_, mesh, cache) | ||
resid_bc = eval_bc_residual(pt, bc, soly_, p, mesh) | ||
soly_ = SciMLBase.build_solution(cache.prob, cache.alg, mesh, y_, interp = MIRKInterpolation(cache.mesh, y_, cache)) |
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 should be able to build the solution type once and just keep updating its values?
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.
Yeah, that's better
This was done in a different PR right? |
The changing of boundary condition definitions from |
Fix #107
Fix #185
We should always pass a solution type to boundary conditions, and with this PR, the definition of boundary conditions for MIRK methods and Shooting Methods is consistent. I used linear interpolation to interpolate the solution, not sure it is optimal, but it is working fine. Now there is only one way to define our boundary condition: