Skip to content

Commit ac56adc

Browse files
Add a warning about the deprecation of linear indexing in AbstractVectorOfArray
1 parent a2141a1 commit ac56adc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/src/basics/solution.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ derivative at each timestep `du` or the spatial discretization `x`, `y`, etc.
1818

1919
## Array Interface
2020

21+
!!! note
22+
23+
In 2023 the linear indexing `sol[i]`` was deprecated. It previously had the behavior that
24+
`sol[i] = sol.u[i]`. However, this is incompatible with standard `AbstractArray` interfaces,
25+
Since if `A = VectorOfArray([[1,2],[3,4]])` and `A` is supposed to act like `[1 3; 2 4]`,
26+
then there is a difference `A[1] = [1,2]` for the VectorOfArray while `A[1] = 1` for the
27+
matrix. This causes many issues if `AbstractVectorOfArray <: AbstractArray`. Thus we
28+
plan in 2026 to complete the deprecation and thus have a breaking update where `sol[i]`
29+
matches the linear indexing of an `AbstractArray`, and then making
30+
`AbstractVectorOfArray <: AbstractArray`. Until then, `AbstractVectorOfArray` due to
31+
this interface break but manaully implements an AbstractArray-like interface for
32+
future compatability.
33+
2134
The general operations are as follows. Use
2235

2336
```julia

0 commit comments

Comments
 (0)