Mercurial > repos > public > sbplib_julia
changeset 1203:254934aac3f8 feature/dissipation_operators
Change name and clarify docs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 03 Feb 2023 10:05:52 +0100 |
parents | 62aaed9cf76b |
children | 0d9653171587 |
files | src/SbpOperators/SbpOperators.jl src/SbpOperators/volumeops/derivatives/dissipation.jl test/SbpOperators/volumeops/derivatives/dissipation_test.jl |
diffstat | 3 files changed, 12 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/SbpOperators.jl Tue Nov 29 22:43:57 2022 +0100 +++ b/src/SbpOperators/SbpOperators.jl Fri Feb 03 10:05:52 2023 +0100 @@ -19,7 +19,7 @@ export normal_derivative export first_derivative export second_derivative -export undivided_dissipation +export undivided_skewed04 using Sbplib.RegionIndices using Sbplib.LazyTensors
--- a/src/SbpOperators/volumeops/derivatives/dissipation.jl Tue Nov 29 22:43:57 2022 +0100 +++ b/src/SbpOperators/volumeops/derivatives/dissipation.jl Fri Feb 03 10:05:52 2023 +0100 @@ -1,17 +1,13 @@ -# REVIEW: Would it be more correct to -# call these undivided_differences instead of dissipation? -# If I understand it correctly, this method simply provides -# the operators required in order to compose a dissipation operator -# and the dissipation operator are formed by a linear combination -# of the products of Dᵀ and D for different orders. """ - undivided_dissipation(g::EquidistantGrid, p, direction) + undivided_skewed04(g::EquidistantGrid, p, direction) -Create undivided difference operators approximating the `p`th derivative for -building artificial dissipation. The operators and how they are used to create accurate artifical dissipation is described in +Create undivided difference operators approximating the `p`th derivative. The operator do not satisfy any SBP-property and are meant to be used for +building artificial dissipation terms. + +The operators and how they are used to create accurate artifical dissipation is described in "K. Mattsson, M. Svärd, and J. Nordström, “Stable and Accurate Artificial Dissipation,” Journal of Scientific Computing, vol. 21, no. 1, pp. 57–79, Aug. 2004" """ -function undivided_dissipation(g::EquidistantGrid, p, direction) +function undivided_skewed04(g::EquidistantGrid, p, direction) T = eltype(g) interior_weights = T.(dissipation_interior_weights(p)) @@ -33,7 +29,7 @@ return D, Dᵀ end -undivided_dissipation(g::EquidistantGrid{1}, p) = undivided_dissipation(g, p, 1) +undivided_skewed04(g::EquidistantGrid{1}, p) = undivided_skewed04(g, p, 1) function dissipation_interior_weights(p) if p == 0
--- a/test/SbpOperators/volumeops/derivatives/dissipation_test.jl Tue Nov 29 22:43:57 2022 +0100 +++ b/test/SbpOperators/volumeops/derivatives/dissipation_test.jl Fri Feb 03 10:05:52 2023 +0100 @@ -26,9 +26,9 @@ x^k/factorial(k) end -@testset "undivided_dissipation" begin +@testset "undivided_skewed04" begin g = EquidistantGrid(20, 0., 11.) - D,Dᵀ = undivided_dissipation(g, 1) + D,Dᵀ = undivided_skewed04(g, 1) @test D isa LazyTensor{Float64,1,1} where T @test Dᵀ isa LazyTensor{Float64,1,1} where T @@ -38,7 +38,7 @@ g = EquidistantGrid(N, 0//1,2//1) h = only(spacing(g)) @testset "D_$p" for p ∈ [1,2,3,4] - D,Dᵀ = undivided_dissipation(g, p) + D,Dᵀ = undivided_skewed04(g, p) @testset "x^$k" for k ∈ 0:p v = evalOn(g, x->monomial(x,k)) @@ -69,7 +69,7 @@ g = EquidistantGrid(11, 0., 1.) @testset "D_$p" for p ∈ [1,2,3,4] - D,Dᵀ = undivided_dissipation(g, p) + D,Dᵀ = undivided_skewed04(g, p) D̄ = get_matrix(D) D̄ᵀ = get_matrix(Dᵀ)