You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ufunc is a function that returns the correct discretization indexed at Itap, it is designed this way to allow for central differences of arbitrary expressions which may be needed in some schemes
@@ -38,9 +38,9 @@ function central_difference(D, II, s, jx, u, ufunc)
38
38
weights = D.low_boundary_coefs[II[j]]
39
39
offset = D.boundary_point_count - II[j] +1
40
40
Itap = [II + (i+offset)*I1 for i inhalf_range(D.boundary_stencil_length)]
Base.size(s::DiscreteSpace) =Tuple(length(s.grid[z]) for z in s.nottime)
38
+
39
+
params(s::DiscreteSpace{N,M}) where {N,M}= s.params
40
+
36
41
grid_idxs(s::DiscreteSpace) =CartesianIndices(((axes(g)[1] for g in s.grid)...,))
37
42
edge_idxs(s::DiscreteSpace{N}) where {N} =reduce(vcat, [[vcat([Colon() for j =1:i-1], 1, [Colon() for j = i+1:N]), vcat([Colon() for j =1:i-1], length(s.axies[i]), [Colon() for j = i+1:N])] for i =1:N])
38
43
@@ -106,7 +111,7 @@ function DiscreteSpace(domain, depvars, indvars, nottime, discretization)
rs = [(Differential(x)^d)(u) =>central_difference(derivweights.map[Differential(x)^d], II, s, (j,x), u, central_ufunc) for d in derivweights.orders[x], u in s.vars]
158
+
159
+
central_deriv_rules_cartesian =reduce(vcat, [[(Differential(x)^d)(u) =>central_difference(derivweights.map[Differential(x)^d], II, s, (j,x), u, central_ufunc) for d in derivweights.orders[x], u in s.vars] for (j,x) inenumerate(s.nottime)])
0 commit comments