comparison 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
comparison
equal deleted inserted replaced
753:fc83d672be36 754:dc38e57ebd1b
56 56
57 inner_product(L::Laplace) = L.H 57 inner_product(L::Laplace) = L.H
58 export inner_product 58 export inner_product
59 inverse_inner_product(L::Laplace) = L.H_inv 59 inverse_inner_product(L::Laplace) = L.H_inv
60 export inverse_inner_product 60 export inverse_inner_product
61 boundary_restriction(L::Laplace,bid::BoundaryIdentifier) = L.e[bid] 61 boundary_restriction(L::Laplace,id::BoundaryIdentifier) = L.e[id]
62 boundary_restriction(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.e[ids[i]],N)
63 boundary_restriction(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.e[ids[i]],N)
62 export boundary_restriction 64 export boundary_restriction
63 normal_derivative(L::Laplace,bid::BoundaryIdentifier) = L.d[bid] 65 normal_derivative(L::Laplace,id::BoundaryIdentifier) = L.d[id]
66 normal_derivative(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.d[ids[i]],N)
67 normal_derivative(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.d[ids[i]],N)
64 export normal_derivative 68 export normal_derivative
65 # TODO: boundary_inner_product? 69 # TODO: boundary_inner_product?
66 boundary_quadrature(L::Laplace,bid::BoundaryIdentifier) = L.H_boundary[bid] 70 boundary_quadrature(L::Laplace,id::BoundaryIdentifier) = L.H_boundary[id]
71 boundary_quadrature(L::Laplace,ids::NTuple{N,BoundaryIdentifier}) where N = ntuple(i->L.H_boundary[ids[i]],N)
72 boundary_quadrature(L::Laplace,ids::Vararg{BoundaryIdentifier,N}) where N = ntuple(i->L.H_boundary[ids[i]],N)
67 export boundary_quadrature 73 export boundary_quadrature
68 74
69 """ 75 """
70 laplace(grid, inner_stencil, closure_stencils) 76 laplace(grid, inner_stencil, closure_stencils)
71 77