Mercurial > repos > public > sbplib_julia
comparison DiffOps/src/DiffOps.jl @ 227:eb8525066f9b boundary_conditions
Express the DiffOp interface in a better way
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Jun 2019 14:40:51 +0200 |
parents | b3506cfbb9d8 |
children | cd60382f392b |
comparison
equal
deleted
inserted
replaced
225:3ab0c61f1367 | 227:eb8525066f9b |
---|---|
4 using SbpOperators | 4 using SbpOperators |
5 using Grids | 5 using Grids |
6 | 6 |
7 export Laplace | 7 export Laplace |
8 | 8 |
9 """ | |
10 DiffOp | |
11 | |
12 Supertype of differential operator discretisations. | |
13 The action of the DiffOp is defined in the method | |
14 apply(D::DiffOp, v::AbstractVector, I...) | |
15 """ | |
9 abstract type DiffOp end | 16 abstract type DiffOp end |
10 | 17 |
11 # TBD: The "error("not implemented")" thing seems to be hiding good error information. How to fix that? Different way of saying that these should be implemented? | 18 function apply end |
12 function apply(D::DiffOp, v::AbstractVector, i::Int) | |
13 error("not implemented") | |
14 end | |
15 | |
16 function innerProduct(D::DiffOp, u::AbstractVector, v::AbstractVector)::Real | |
17 error("not implemented") | |
18 end | |
19 | 19 |
20 function matrixRepresentation(D::DiffOp) | 20 function matrixRepresentation(D::DiffOp) |
21 error("not implemented") | 21 error("not implemented") |
22 end | 22 end |
23 | 23 |