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
{{ message }}
This repository was archived by the owner on Jul 19, 2023. It is now read-only.
(length(padded_arrays) == N) ||throw("The padded_arrays must cover every dimension - make sure that the number of padded_arrays is equal to ndims(u).")
#Extra constructor to make a set of BC operators that extend an atomic BC Operator to the whole domain
105
82
#Only valid in the uniform grid case!
106
-
MultiDimBC(BC::B, s) where {B} =Tuple([MultiDimDirectionalBC{gettype(BC), B, dim, length(s), length(s)-1}(fill(BC, s[setdiff(1:length(s), dim)])) for dim in1:length(s)])
83
+
MultiDimBC(BC::B, s) where {B<:AtomicBC} =Tuple([MultiDimDirectionalBC{gettype(BC), B, dim, length(s), length(s)-1}(fill(BC, s[setdiff(1:length(s), dim)])) for dim in1:length(s)])
107
84
108
85
# Additional constructors for cases when the BC is the same for all boundarties
109
86
@@ -253,7 +230,7 @@ function compose(BCs...)
253
230
end
254
231
BCs = BCs[sortperm([Ds...])]
255
232
256
-
ComposedMultiDimBC{T, Union{eltype.(BCs)...}, N,N-1}([condition.BCfor condition in BCs])
233
+
ComposedMultiDimBC{T, Union{eltype.(BC.BCs for BC in BCs)...}, N,N-1}([condition.BCsfor condition in BCs])
257
234
end
258
235
259
236
"""
@@ -271,11 +248,11 @@ getboundarytype(Q::MultiDimDirectionalBC{T, B, D, N, K}) where {T, B, D, N, K} =
271
248
Base.ndims(Q::MultiDimensionalBC{T,N}) where {T,N} = N
272
249
273
250
function Base.:*(Q::MultiDimDirectionalBC{T, B, D, N, K}, u::AbstractArray{T, N}) where {T, B, D, N, K}
274
-
lower, upper =slicemul(Q.BCs, u, D)
251
+
lower, upper =slice_rmul(Q.BCs, u, D)
275
252
returnBoundaryPaddedArray{T, D, N, K, typeof(u), typeof(lower)}(lower, upper, u)
276
253
end
277
254
278
255
function Base.:*(Q::ComposedMultiDimBC{T, B, N, K}, u::AbstractArray{T, N}) where {T, B, N, K}
279
-
out =slicemul.(Q.BCs, fill(u, N), 1:N)
256
+
out =slice_rmul.(Q.BCs, fill(u, N), 1:N)
280
257
returnComposedBoundaryPaddedArray{T, N, K, typeof(u), typeof(out[1][1])}([A[1] for A in out], [A[2] for A in out], u)
0 commit comments