Mercurial > repos > public > sbplib_julia
comparison diffOp.jl @ 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 8a7a537f54e5 d04569696918 |
comparison
equal
deleted
inserted
replaced
54:4300a3fbd818 | 55:c62ea0112d4d |
---|---|
10 | 10 |
11 function matrixRepresentation(D::DiffOp) | 11 function matrixRepresentation(D::DiffOp) |
12 error("not implemented") | 12 error("not implemented") |
13 end | 13 end |
14 | 14 |
15 function boundaryCondition(D::DiffOp) | 15 function boundaryCondition(D::DiffOp,b::Grid.BoundaryId,type)::(Closure, Penalty) |
16 error("not implemented") | 16 error("not implemented") |
17 end | 17 end |
18 | 18 |
19 function interface(Du::DiffOp, Dv::DiffOp, b::Grid.BoundaryId; type) | 19 function interface(Du::DiffOp, Dv::DiffOp, b::Grid.BoundaryId; type) |
20 error("not implemented") | 20 error("not implemented") |
21 end | 21 end |
22 | 22 |
23 abstract type Closure end | |
24 | |
25 function apply(c::Closure, v::AbstractVector, i::Int) | |
26 error("not implemented") | |
27 end | |
28 | |
29 abstract type Penalty end | |
30 | |
31 function apply(c::Penalty, g, i::Int) | |
32 error("not implemented") | |
33 end | |
23 | 34 |
24 # Differential operator for a*d^2/dx^2 | 35 # Differential operator for a*d^2/dx^2 |
25 struct Laplace1D <: DiffOp | 36 struct Laplace1D <: DiffOp |
26 grid | 37 grid |
27 a | 38 a |