Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 1396:35840a0681d1 feature/boundary_conditions
Start drafting new implemenentation of boundary conditions
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Wed, 26 Jul 2023 23:11:02 +0200 |
| parents | bdcdbd4ea9cd |
| children | 8d60d045c2a2 |
comparison
equal
deleted
inserted
replaced
| 1395:bdcdbd4ea9cd | 1396:35840a0681d1 |
|---|---|
| 55 | 55 |
| 56 | 56 |
| 57 """ | 57 """ |
| 58 sat_tensors(Δ::Laplace, g::TensorGrid, bc::NeumannCondition) | 58 sat_tensors(Δ::Laplace, g::TensorGrid, bc::NeumannCondition) |
| 59 | 59 |
| 60 Returns anonymous functions for construction the `LazyTensorApplication`s | 60 Returns the LazyTensors required to impose a Neumann condition |
| 61 recuired in order to impose a Neumann boundary condition. | 61 SAT = sat_op(d*u - g) |
| 62 | 62 |
| 63 See also: [`sat`,`NeumannCondition`](@ref). | 63 See also: [`sat`,`NeumannCondition`](@ref). |
| 64 """ | 64 """ |
| 65 function BoundaryConditions.sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) | 65 function BoundaryConditions.sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) |
| 66 id = bc.id | 66 id = bc.id |
| 68 H⁻¹ = inverse_inner_product(g,set) | 68 H⁻¹ = inverse_inner_product(g,set) |
| 69 Hᵧ = inner_product(boundary_grid(g, id), set) | 69 Hᵧ = inner_product(boundary_grid(g, id), set) |
| 70 e = boundary_restriction(g, set, id) | 70 e = boundary_restriction(g, set, id) |
| 71 d = normal_derivative(g, set, id) | 71 d = normal_derivative(g, set, id) |
| 72 | 72 |
| 73 closure(u) = H⁻¹*e'*Hᵧ*d*u | 73 sat_tensor = H⁻¹∘e'∘Hᵧ |
| 74 penalty(g) = -H⁻¹*e'*Hᵧ*g | 74 return sat_tensor, d |
| 75 return closure, penalty | |
| 76 end | 75 end |
