Mercurial > repos > public > sbplib_julia
changeset 1087:423a6442efc3 feature/dissipation_operators
REVIEW: Address documentation
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 08 May 2022 12:15:32 +0200 |
parents | 879cca813cc6 |
children | 672610322206 |
files | src/LazyTensors/lazy_tensor_operations.jl src/LazyTensors/tuple_manipulation.jl src/SbpOperators/volumeops/derivatives/dissipation.jl src/SbpOperators/volumeops/stencil_operator_distinct_closures.jl test/SbpOperators/volumeops/derivatives/dissipation_test.jl |
diffstat | 5 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Thu Apr 07 20:29:46 2022 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Sun May 08 12:15:32 2022 +0200 @@ -268,7 +268,7 @@ LazyOuterProduct(tms::Vararg{LazyTensor}) = foldl(LazyOuterProduct, tms) - +# REVIEW: Address TODO below """ inflate(tm, sz, dir)
--- a/src/LazyTensors/tuple_manipulation.jl Thu Apr 07 20:29:46 2022 +0200 +++ b/src/LazyTensors/tuple_manipulation.jl Sun May 08 12:15:32 2022 +0200 @@ -75,7 +75,7 @@ flatten_tuple(t::Tuple) = ((flatten_tuple.(t)...)...,) # simplify? flatten_tuple(ts::Vararg) = flatten_tuple(ts) - +# REVIEW: Add documentation function left_pad_tuple(t, val, N) if N < length(t) throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements")) @@ -85,6 +85,7 @@ return (padding..., t...) end +# REVIEW: Add documentation function right_pad_tuple(t, val, N) if N < length(t) throw(DomainError(N, "Can't pad tuple of length $(length(t)) to $N elements"))
--- a/src/SbpOperators/volumeops/derivatives/dissipation.jl Thu Apr 07 20:29:46 2022 +0200 +++ b/src/SbpOperators/volumeops/derivatives/dissipation.jl Sun May 08 12:15:32 2022 +0200 @@ -1,3 +1,9 @@ +# REVIEW: Add documentation. Also 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. function undivided_dissipation(g::EquidistantGrid, p, direction) T = eltype(g) interior_weights = T.(dissipation_interior_weights(p))
--- a/src/SbpOperators/volumeops/stencil_operator_distinct_closures.jl Thu Apr 07 20:29:46 2022 +0200 +++ b/src/SbpOperators/volumeops/stencil_operator_distinct_closures.jl Sun May 08 12:15:32 2022 +0200 @@ -1,3 +1,4 @@ +# REVIEW: Add documentation function stencil_operator_distinct_closures(grid::EquidistantGrid, inner_stencil, lower_closure, upper_closure, direction) op = StencilOperatorDistinctClosures(restrict(grid, direction), inner_stencil, lower_closure, upper_closure) return LazyTensors.inflate(op, size(grid), direction)
--- a/test/SbpOperators/volumeops/derivatives/dissipation_test.jl Thu Apr 07 20:29:46 2022 +0200 +++ b/test/SbpOperators/volumeops/derivatives/dissipation_test.jl Sun May 08 12:15:32 2022 +0200 @@ -49,7 +49,7 @@ end end - @testset "tanspose equality" begin + @testset "transpose equality" begin function get_matrix(D) N = only(range_size(D)) M = only(domain_size(D))