Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 1484:8d60d045c2a2 feature/boundary_conditions
Add todo and minor edits to variable naming and docstring
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Mon, 25 Dec 2023 19:25:10 +0100 |
| parents | 35840a0681d1 |
| children | 19cdec9c21cb |
comparison
equal
deleted
inserted
replaced
| 1483:abc5cc0aec94 | 1484:8d60d045c2a2 |
|---|---|
| 51 end | 51 end |
| 52 return Δ | 52 return Δ |
| 53 end | 53 end |
| 54 laplace(g::EquidistantGrid, stencil_set) = second_derivative(g, stencil_set) | 54 laplace(g::EquidistantGrid, stencil_set) = second_derivative(g, stencil_set) |
| 55 | 55 |
| 56 # TODO: Add sat_tensor for Diirichlet condition | |
| 56 | 57 |
| 57 """ | 58 """ |
| 58 sat_tensors(Δ::Laplace, g::TensorGrid, bc::NeumannCondition) | 59 sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) |
| 59 | 60 |
| 60 Returns the LazyTensors required to impose a Neumann condition | 61 The operators required to construct the SAT for imposing Neumann condition |
| 61 SAT = sat_op(d*u - g) | 62 |
| 62 | 63 |
| 63 See also: [`sat`,`NeumannCondition`](@ref). | 64 See also: [`sat`,`NeumannCondition`](@ref). |
| 64 """ | 65 """ |
| 65 function BoundaryConditions.sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) | 66 function BoundaryConditions.sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) |
| 66 id = bc.id | 67 id = bc.id |
| 68 H⁻¹ = inverse_inner_product(g,set) | 69 H⁻¹ = inverse_inner_product(g,set) |
| 69 Hᵧ = inner_product(boundary_grid(g, id), set) | 70 Hᵧ = inner_product(boundary_grid(g, id), set) |
| 70 e = boundary_restriction(g, set, id) | 71 e = boundary_restriction(g, set, id) |
| 71 d = normal_derivative(g, set, id) | 72 d = normal_derivative(g, set, id) |
| 72 | 73 |
| 73 sat_tensor = H⁻¹∘e'∘Hᵧ | 74 sat_op = H⁻¹∘e'∘Hᵧ |
| 74 return sat_tensor, d | 75 return sat_op, d |
| 75 end | 76 end |
