Mercurial > repos > public > sbplib_julia
changeset 55:c62ea0112d4d
Add abstract types for Closure and Penalty
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Tue, 15 Jan 2019 10:25:56 +0100 |
parents | 4300a3fbd818 |
children | 27a8d3021a1c 60d575e4a2d8 |
files | diffOp.jl |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/diffOp.jl Mon Jan 14 16:30:52 2019 +0100 +++ b/diffOp.jl Tue Jan 15 10:25:56 2019 +0100 @@ -12,7 +12,7 @@ error("not implemented") end -function boundaryCondition(D::DiffOp) +function boundaryCondition(D::DiffOp,b::Grid.BoundaryId,type)::(Closure, Penalty) error("not implemented") end @@ -20,6 +20,17 @@ error("not implemented") end +abstract type Closure end + +function apply(c::Closure, v::AbstractVector, i::Int) + error("not implemented") +end + +abstract type Penalty end + +function apply(c::Penalty, g, i::Int) + error("not implemented") +end # Differential operator for a*d^2/dx^2 struct Laplace1D <: DiffOp