From eb1350050029fdf407e38be91cc084429f565c91 Mon Sep 17 00:00:00 2001 From: Qingyu Qu <2283984853@qq.com> Date: Thu, 19 Dec 2024 17:57:51 +0800 Subject: [PATCH] Also support array indexing in bc --- lib/BoundaryValueDiffEqCore/src/misc_utils.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/BoundaryValueDiffEqCore/src/misc_utils.jl b/lib/BoundaryValueDiffEqCore/src/misc_utils.jl index c6187f07..820e381d 100644 --- a/lib/BoundaryValueDiffEqCore/src/misc_utils.jl +++ b/lib/BoundaryValueDiffEqCore/src/misc_utils.jl @@ -4,3 +4,11 @@ t cache::C end + +Base.size(e::EvalSol) = (size(e.u[1])..., length(e.u)) +Base.size(e::EvalSol, i) = size(e)[i] + +Base.axes(e::EvalSol) = Base.OneTo.(size(e)) +Base.axes(e::EvalSol, i) = Base.OneTo.(size(e)[d]) + +Base.getindex(e::EvalSol, args...) = Base.getindex(VectorOfArray(e.u), args...)