Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/volumeops/laplace/laplace.jl @ 754:dc38e57ebd1b feature/laplace_opset
Add convenience functions for returning multiple boundary operators from Laplace
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 21 Mar 2021 13:44:29 +0100 |
parents | fc83d672be36 |
children | 36adc15d3935 |
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/laplace/laplace.jl Fri Mar 19 17:13:04 2021 +0100 +++ b/src/SbpOperators/volumeops/laplace/laplace.jl Sun Mar 21 13:44:29 2021 +0100 @@ -58,12 +58,18 @@ export inner_product inverse_inner_product(L::Laplace) = L.H_inv export inverse_inner_product -boundary_restriction(L::Laplace,bid::BoundaryIdentifier) = L.e[bid] +boundary_restriction(L::Laplace,id::BoundaryIdentifier) = L.e[id] +boundary_restriction(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.e[ids[i]],N) +boundary_restriction(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.e[ids[i]],N) export boundary_restriction -normal_derivative(L::Laplace,bid::BoundaryIdentifier) = L.d[bid] +normal_derivative(L::Laplace,id::BoundaryIdentifier) = L.d[id] +normal_derivative(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.d[ids[i]],N) +normal_derivative(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.d[ids[i]],N) export normal_derivative # TODO: boundary_inner_product? -boundary_quadrature(L::Laplace,bid::BoundaryIdentifier) = L.H_boundary[bid] +boundary_quadrature(L::Laplace,id::BoundaryIdentifier) = L.H_boundary[id] +boundary_quadrature(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.H_boundary[ids[i]],N) +boundary_quadrature(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.H_boundary[ids[i]],N) export boundary_quadrature """