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
Return the ranges representing the discretization of the partial independent
138
140
variables for this domain, based on the discretization intervals given in `Δs`.
139
141
"""
140
-
functiongrid(d::DomainInfo{T}) whereT
142
+
functiongrid(d::DomainInfo{T}) where{T}
141
143
if!((d.grid_spacing isa Base.AbstractVecOrTuple) &&
142
-
(length(pvars(d)) ==length(d.grid_spacing)))
144
+
(length(pvars(d)) ==length(d.grid_spacing)))
143
145
throw(ArgumentError("The number of partial independent variables ($(length(pvars(d)))) must equal the number of grid spacings provided ($(d.grid_spacing))."))
144
146
end
145
147
endpts =endpoints(d)
146
148
[s:d:e for ((s, e), d) inzip(endpts, d.grid_spacing)]
147
149
end
150
+
functiongrid(d::DomainInfo{T}, staggering) where {T}
151
+
if!((d.grid_spacing isa Base.AbstractVecOrTuple) &&
152
+
(length(pvars(d)) ==length(d.grid_spacing)))
153
+
throw(ArgumentError("The number of partial independent variables ($(length(pvars(d)))) must equal the number of grid spacings provided ($(d.grid_spacing))."))
154
+
end
155
+
endpts =endpoints(d)
156
+
@assertlength(staggering) ==length(endpts) "The number of staggering values $(length(staggering)) must match the number of partial independent variables $(length(endpts))."
157
+
@assertall(isa.(staggering, (Bool,))) "Staggering must be a vector of booleans."
158
+
g_nostagger = [s:d:e for ((s, e), d) inzip(endpts, d.grid_spacing)]
0 commit comments