Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 1619:1937be9502a7 feature/boundary_conditions
REVIEW: Minor fixes to doc strings in laplace.jl
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 11 Jun 2024 00:19:09 +0200 |
| parents | e41eddc640f3 |
| children | 707fc9761c2b f28c92ec843c 84aed3abab94 |
comparison
equal
deleted
inserted
replaced
| 1618:77f192b05b1d | 1619:1937be9502a7 |
|---|---|
| 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 """ | 56 """ |
| 57 sat_tensors(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) | 57 sat_tensors(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) |
| 58 | 58 |
| 59 The operators required to construct the SAT for imposing a Dirichlet condition. | 59 The operators required to construct the SAT for imposing a Dirichlet |
| 60 `H_tuning` and `R_tuning` are used to specify the strength of the penalty. | 60 condition. `H_tuning` and `R_tuning` are used to specify the strength of the |
| 61 penalty. | |
| 61 | 62 |
| 62 See also: [`sat`](@ref),[`DirichletCondition`](@ref),[`positivity_decomposition`](@ref). | 63 See also: [`sat`](@ref),[`DirichletCondition`](@ref), [`positivity_decomposition`](@ref). |
| 63 """ | 64 """ |
| 64 function sat_tensors(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning = 1., R_tuning = 1.) | 65 function sat_tensors(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning = 1., R_tuning = 1.) |
| 65 id = boundary(bc) | 66 id = boundary(bc) |
| 66 set = Δ.stencil_set | 67 set = Δ.stencil_set |
| 67 H⁻¹ = inverse_inner_product(g,set) | 68 H⁻¹ = inverse_inner_product(g,set) |
| 74 end | 75 end |
| 75 | 76 |
| 76 """ | 77 """ |
| 77 sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) | 78 sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) |
| 78 | 79 |
| 79 The operators required to construct the SAT for imposing a Neumann condition | 80 The operators required to construct the SAT for imposing a Neumann condition. |
| 80 | 81 |
| 81 See also: [`sat`](@ref),[`NeumannCondition`](@ref). | 82 See also: [`sat`](@ref), [`NeumannCondition`](@ref). |
| 82 """ | 83 """ |
| 83 function sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) | 84 function sat_tensors(Δ::Laplace, g::Grid, bc::NeumannCondition) |
| 84 id = boundary(bc) | 85 id = boundary(bc) |
| 85 set = Δ.stencil_set | 86 set = Δ.stencil_set |
| 86 H⁻¹ = inverse_inner_product(g,set) | 87 H⁻¹ = inverse_inner_product(g,set) |
| 93 end | 94 end |
| 94 | 95 |
| 95 """ | 96 """ |
| 96 positivity_decomposition(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) | 97 positivity_decomposition(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) |
| 97 | 98 |
| 98 Constructs the scalar `B` such that `d' - 1/2*B*e'` is symmetric positive definite with respect to | 99 Constructs the scalar `B` such that `d' - 1/2*B*e'` is symmetric positive |
| 99 the boundary quadrature. Here `d` is the normal derivative and `e` is the boundary restriction operator. | 100 definite with respect to the boundary quadrature. Here `d` is the normal |
| 100 `B` can then be used to form a symmetric and energy stable penalty for a Dirichlet condition. | 101 derivative and `e` is the boundary restriction operator. `B` can then be used |
| 101 The parameters `H_tuning` and `R_tuning` are used to specify the strength of the penalty and | 102 to form a symmetric and energy stable penalty for a Dirichlet condition. The |
| 102 must be greater than 1. For details we refer to https://doi.org/10.1016/j.jcp.2020.109294 | 103 parameters `H_tuning` and `R_tuning` are used to specify the strength of the |
| 104 penalty and must be greater than 1. For details we refer to | |
| 105 https://doi.org/10.1016/j.jcp.2020.109294 | |
| 103 """ | 106 """ |
| 104 function positivity_decomposition(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) | 107 function positivity_decomposition(Δ::Laplace, g::Grid, bc::DirichletCondition; H_tuning, R_tuning) |
| 105 @assert(H_tuning ≥ 1.) | 108 @assert(H_tuning ≥ 1.) |
| 106 @assert(R_tuning ≥ 1.) | 109 @assert(R_tuning ≥ 1.) |
| 107 Nτ_H, τ_R = positivity_limits(Δ,g,bc) | 110 Nτ_H, τ_R = positivity_limits(Δ,g,bc) |
