Skip to content
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

Indexing in boundary conditions #185

Open
ArnoStrouwen opened this issue May 13, 2024 · 1 comment · May be fixed by #208
Open

Indexing in boundary conditions #185

ArnoStrouwen opened this issue May 13, 2024 · 1 comment · May be fixed by #208
Labels

Comments

@ArnoStrouwen
Copy link
Member

What is the current best way of doing indexing in the boundary conditions?
In the following test, evaluating the bc with a solution gives a deprecation warning,
but if you follow deprecation advice, the same bc function can no longer be used for solving the problem,
since the solver seems to use an Array of Array for evaluation the bc, and not a DiffEqArray.

https://github.com/SciML/BoundaryValueDiffEq.jl/blob/master/test/mirk/nlls_tests.jl#L11-L25

  Test threw exception
  Expression: norm(bc1(sol, nothing, tspan), Inf) < 0.01
  `Base.getindex(A::AbstractDiffEqArray, i::Int)` is deprecated, use `Base.getindex(A, :, i)` instead.
  Stacktrace:
@ChrisRackauckas
Copy link
Member

The item in the boundary condition should always be a solution object. That makes its interpolation well-defined. You don't really want to index it because you don't necessarily know where the time points are due to adaptivity, the interpolation is a more solid definition.

@ErikQQY ErikQQY linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants