Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit af86556

Browse files
committed
exports
1 parent 055bec1 commit af86556

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

src/DiffEqOperators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export MatrixFreeOperator
5151
export DiffEqScalar, DiffEqArrayOperator, DiffEqIdentity, JacVecOperator, getops
5252
export AbstractDerivativeOperator, DerivativeOperator,
5353
CenteredDifference, UpwindDifference
54-
export DirichletBC, Dirichlet0BC, NeumannBC, Neumann0BC, RobinBC, GeneralBC, MixedBC, MultiDimBC, PeriodicBC,
54+
export DirichletBC, Dirichlet0BC, NeumannBC, Neumann0BC, RobinBC, GeneralBC, MultiDimBC, PeriodicBC,
5555
MultiDimDirectionalBC, ComposedMultiDimBC,
5656
compose, decompose, perpsize
5757

src/derivative_operators/BC_operators.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,7 @@ struct GeneralBC{T} <:AffineBC{T}
153153
end
154154
end
155155

156-
"""
157-
Quick and dirty way to allow mixed boundary types on each end of an array - may be cleaner and more versatile to split up left and right boundaries going forward
158-
MixedBC(lowerBC, upperBC) is the interface.
159-
"""
160156

161-
struct MixedBC{T, R, S} <: AtomicBC{T}
162-
lower::R
163-
upper::S
164-
function MixedBC(Qlower,Qupper)
165-
@assert Qlower isa AtomicBC
166-
@assert Qupper isa AtomicBC
167-
new{Union{gettype(Qlower), gettype(Qupper)}, typeof(Qlower), typeof(Qupper)}(Qlower, Qupper)
168-
end
169-
end
170157

171158
#implement Neumann and Dirichlet as special cases of RobinBC
172159
NeumannBC::AbstractVector{T}, dx::Union{AbstractVector{T}, T}, order = 1) where T = RobinBC([zero(T), one(T), α[1]], [zero(T), one(T), α[2]], dx, order)
@@ -178,7 +165,6 @@ Neumann0BC(dx::Union{AbstractVector{T}, T}, order = 1) where T = NeumannBC([zero
178165
# other acceptable argument signatures
179166
#RobinBC(al::T, bl::T, cl::T, dx_l::T, ar::T, br::T, cr::T, dx_r::T, order = 1) where T = RobinBC([al,bl, cl], [ar, br, cr], dx_l, order)
180167

181-
Base.:*(Q::MixedBC, u::AbstractVector) = BoundaryPaddedVector((Q.lower*u).l, (Q.upper*u).r, u)
182168
Base.:*(Q::AffineBC, u::AbstractVector) = BoundaryPaddedVector(Q.a_l u[1:length(Q.a_l)] + Q.b_l, Q.a_r u[(end-length(Q.a_r)+1):end] + Q.b_r, u)
183169
Base.:*(Q::PeriodicBC, u::AbstractVector) = BoundaryPaddedVector(u[end], u[1], u)
184170

src/derivative_operators/concretization.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ end
142142
################################################################################
143143
# Boundary Condition Operator concretizations
144144
################################################################################
145-
add_dims(A::AbstractArray, n::int) = cat(ndims(a) + n, a)
145+
add_dims(A::AbstractArray, n::Int) = cat(ndims(a) + n, a)
146146
#Atomic BCs
147147
function LinearAlgebra.Array(Q::AffineBC{T}, N::Int) where {T}
148148
Q_L = [transpose(Q.a_l) transpose(zeros(T, N-length(Q.a_l))); Diagonal(ones(T,N)); transpose(zeros(T, N-length(Q.a_r))) transpose(Q.a_r)]
@@ -205,7 +205,7 @@ filled with the linear operator parts of the respective Atomic BCs.
205205
the second element is a simularly sized array of the affine parts.
206206
"""
207207
function LinearAlgebra.Array(Q::MultiDimDirectionalBC{T, B, D, N, K}, M) where {T, B, D,N,K}
208-
bc_tuples = Array.(Q.BCs, fill(M, size(Q.BCs))
208+
bc_tuples = Array.(Q.BCs, fill(M, size(Q.BCs)))
209209
Q_L = [bc_tuple[1] for bc_tuple in bc_tuples]
210210
inds = Array(1:N)
211211
inds[1], inds[D] = inds[D], inds[1]
@@ -220,7 +220,7 @@ filled with the linear operator parts of the respective Atomic BCs.
220220
the second element is a simularly sized array of the affine parts.
221221
"""
222222
function SparseArrays.SparseMatrixCSC(Q::MultiDimDirectionalBC{T, B, D, N, K}, M) where {T, B, D,N,K}
223-
bc_tuples = sparse.(Q.BCs, fill(M, size(Q.BCs))
223+
bc_tuples = sparse.(Q.BCs, fill(M, size(Q.BCs)))
224224
Q_L = [bc_tuple[1] for bc_tuple in bc_tuples]
225225
inds = Array(1:N)
226226
inds[1], inds[D] = inds[D], inds[1]
@@ -232,7 +232,7 @@ end
232232
SparseArrays.sparse(Q::MultiDimDirectionalBC, N) = SparseMatrixCSC(Q, N)
233233

234234
function BandedMatrices.BandedMatrix(Q::MultiDimDirectionalBC{T, B, D, N, K}, M) where {T, B, D,N,K}
235-
bc_tuples = BandedMatrix.(Q.BCs, fill(M, size(Q.BCs))
235+
bc_tuples = BandedMatrix.(Q.BCs, fill(M, size(Q.BCs)))
236236
Q_L = [bc_tuple[1] for bc_tuple in bc_tuples]
237237
inds = Array(1:N)
238238
inds[1], inds[D] = inds[D], inds[1]

0 commit comments

Comments
 (0)