Mercurial > repos > public > sbplib_julia
changeset 833:454ba1efa644 operator_storage_array_of_table
Review: Accept changes
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 12 Jan 2022 16:03:48 +0100 |
parents | 00f6bbdcd73a |
children | a8d64785f51b |
files | src/SbpOperators/operators/standard_diagonal.toml src/SbpOperators/volumeops/constant_interior_scaling_operator.jl src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl |
diffstat | 3 files changed, 19 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/operators/standard_diagonal.toml Wed Jan 12 15:54:21 2022 +0100 +++ b/src/SbpOperators/operators/standard_diagonal.toml Wed Jan 12 16:03:48 2022 +0100 @@ -2,21 +2,16 @@ authors = "Ken Mattson" description = "Standard operators for equidistant grids" type = "equidistant" -cite = "A paper a long time ago in a galaxy far far away." -# Review: -# Suggested change: -# "A paper a long time ago in a galaxy far far away." --> -# " -# Ken Mattsson, Jan Nordström, -# Summation by parts operators for finite difference approximations of second derivatives, -# Journal of Computational Physics, -# Volume 199, Issue 2, -# 2004, -# Pages 503-540, -# ISSN 0021-9991, -# https://doi.org/10.1016/j.jcp.2004.03.001. -# " -# or perhaps a shorter version. +cite = """ + Ken Mattsson, Jan Nordström, + Summation by parts operators for finite difference approximations of second derivatives, + Journal of Computational Physics, + Volume 199, Issue 2, + 2004, + Pages 503-540, + ISSN 0021-9991, + https://doi.org/10.1016/j.jcp.2004.03.001. +""" [[stencil_set]] @@ -44,15 +39,13 @@ H.inner = "1" H.closure = ["17/48", "59/48", "43/48", "49/48"] -# Review: -# Add missing 4th order accurate D1 operator -# D1.inner_stencil = ["1/12","-2/3","0","2/3","-1/12"] -# D1.closure_stencils = [ -# {s = [ "-24/17", "59/34", "-4/17", "-3/34", "0", "0"], c = 1}, -# {s = [ "-1/2", "0", "1/2", "0", "0", "0"], c = 2}, -# {s = [ "4/43", "-59/86", "0", "59/86", "-4/43", "0"], c = 3}, -# {s = [ "3/98", "0", "-59/98", "0", "32/49", "-4/49"], c = 4}, -# ] +D1.inner_stencil = ["1/12","-2/3","0","2/3","-1/12"] +D1.closure_stencils = [ + {s = [ "-24/17", "59/34", "-4/17", "-3/34", "0", "0"], c = 1}, + {s = [ "-1/2", "0", "1/2", "0", "0", "0"], c = 2}, + {s = [ "4/43", "-59/86", "0", "59/86", "-4/43", "0"], c = 3}, + {s = [ "3/98", "0", "-59/98", "0", "32/49", "-4/49"], c = 4}, +] D2.inner_stencil = ["-1/12","4/3","-5/2","4/3","-1/12"] D2.closure_stencils = [
--- a/src/SbpOperators/volumeops/constant_interior_scaling_operator.jl Wed Jan 12 15:54:21 2022 +0100 +++ b/src/SbpOperators/volumeops/constant_interior_scaling_operator.jl Wed Jan 12 16:03:48 2022 +0100 @@ -10,10 +10,7 @@ size::Int function ConstantInteriorScalingOperator(interior_weight::T, closure_weights::NTuple{N,T}, size::Int) where {T,N} - # Review: Suggested change - # 2length(closure_weights) --> 2*length(closure_weights) - # Excluding the multiplication makes in look like a typo. - if size < 2length(closure_weights) + if size < 2*length(closure_weights) throw(DomainError(size, "size must be larger that two times the closure size.")) end
--- a/src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl Wed Jan 12 15:54:21 2022 +0100 +++ b/src/SbpOperators/volumeops/inner_products/inverse_inner_product.jl Wed Jan 12 16:03:48 2022 +0100 @@ -3,15 +3,13 @@ Constructs the inverse inner product operator `H⁻¹` as a `TensorMapping` using the weights of `H`, `interior_weight`, `closure_weights`. `H⁻¹` is inverse of -the inner product operator `H`. The weights are the +the inner product operator `H`. On a 1-dimensional grid, `H⁻¹` is a `ConstantInteriorScalingOperator`. On an N-dimensional grid, `H⁻¹` is the outer product of the 1-dimensional inverse inner product operators for each coordinate direction. On a 0-dimensional `grid`, `H⁻¹` is a 0-dimensional `IdentityMapping`. """ -# Review: -# Incomplete sentence in first section of the docs. "The weights are the". function inverse_inner_product(grid::EquidistantGrid, interior_weight, closure_weights) H⁻¹s = ()