changeset 2:43be32298ae2

Add function to get closure size
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 17 Dec 2018 12:45:30 +0100
parents a286be5f8a32
children 19492ab142c3
files diffOp.jl sbpD2.jl
diffstat 2 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/diffOp.jl	Mon Dec 17 12:44:02 2018 +0100
+++ b/diffOp.jl	Mon Dec 17 12:45:30 2018 +0100
@@ -0,0 +1,33 @@
+abstract type DiffOp end
+
+function apply(D::DiffOp, v::AbstractVector) where N
+    error("not implemented")
+end
+
+function innerProduct(D::DiffOp, u::AbstractVector, v::AbstractVector)::Real
+    error("not implemented")
+end
+
+function matrixRepresentation(D::DiffOp)
+    error("not implemented")
+end
+
+function boundaryCondition(D::DiffOp)
+    error("not implemented")
+end
+
+function interface(Du::DiffOp, Dv::DiffOp, b::BoundaryID; type)
+    error("not implemented")
+end
+
+
+# Differential operator for a*d^2/dx^2
+struct Laplace1D <: DiffOp
+    grid
+    a
+    op
+end
+
+function apply(L::Laplace, v::AbstractVector)::AbstractVector
+
+end
--- a/sbpD2.jl	Mon Dec 17 12:44:02 2018 +0100
+++ b/sbpD2.jl	Mon Dec 17 12:45:30 2018 +0100
@@ -6,3 +6,7 @@
     eClosure::Vector{T}
     dClosure::Vector{T}
 end
+
+function closureSize(D::D2)::Int
+    return length(quadratureClosure)
+end