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.
Copy file name to clipboardExpand all lines: src/derivative_operators/BC_operators.jl
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,10 @@ Robin, General, and in general Neumann, Dirichlet and Bridge BCs are all affine
8
8
"""
9
9
abstract type AffineBC{T} <:AtomicBC{T}end
10
10
11
+
struct NeumannBC{N} end
12
+
struct Neumann0BC{N} end
13
+
struct DirichletBC{N} end
14
+
struct Dirichlet0BC{N} end
11
15
"""
12
16
q = PeriodicBC{T}()
13
17
@@ -18,6 +22,7 @@ Creates a periodic boundary condition, where the lower index end of some u is ex
18
22
It is not reccomended to concretize this BC type in to a BandedMatrix, since the vast majority of bands will be all 0s. SpatseMatrix concretization is reccomended.
#Extra constructor to make a set of BC operators that extend an atomic BC Operator to the whole domain
90
94
#Only valid in the uniform grid case!
91
95
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)])
92
96
93
97
# Additional constructors for cases when the BC is the same for all boundarties
98
+
PeriodicBC{dim}(T,s) where dim =MultiDimBC{dim}(PeriodicBC(T), s)
99
+
PeriodicBC(T,s) =MultiDimBC(PeriodicBC(T), s)
94
100
95
-
PeriodicBC{T}(s) where T =MultiDimBC(PeriodicBC{T}(), s)
0 commit comments