Mercurial > repos > public > sbplib_julia
view diffOp.jl @ 4:ef878a3df87d
Use stencils in D2
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 17 Dec 2018 13:05:16 +0100 |
parents | 43be32298ae2 |
children | cb8e50ca9e15 |
line wrap: on
line source
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