Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dissipation Operators for DienerDorbandSchnetterTiglio2007 #251

Open
svretina opened this issue Feb 18, 2024 · 2 comments
Open

Add Dissipation Operators for DienerDorbandSchnetterTiglio2007 #251

svretina opened this issue Feb 18, 2024 · 2 comments

Comments

@svretina
Copy link

svretina commented Feb 18, 2024

  1. Is the only dissipation operator available the one of MattssonSvärdNordström2004?
    I am trying to construct a dissipation operator from DienerDorbandSchnetterTiglio2007 but I get a MethodError.

MWE:

d = derivative_operator(DienerDorbandSchnetterTiglio2007(), 1, 2, -5,5,11)
di = dissipation_operator(d)
# d.coefficients -> Mattsson, Nordström (2004)

dissipation_operator(DienerDorbandSchnetterTiglio2007(), 2, -5,5,11, d.coefficients.left_weights, d.coefficients.right_weights)
ERROR: MethodError: no method matching dissipation_coefficients(::DienerDorbandSchnetterTiglio2007, ::Int64, ::StepRangeLen{…}, ::SVector{…}, ::SVector{…}, ::FastMode)

Closest candidates are:
  dissipation_coefficients(::MattssonSvärdNordström2004, ::Int64, ::Any, ::Any, ::Any, ::Any)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/SBP_coefficients/MattssonSvärdNordström2004.jl:29
  dissipation_coefficients(::MattssonSvärdNordström2004, ::Int64, ::Any, ::Any, ::Any)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/SBP_coefficients/MattssonSvärdNordström2004.jl:29

Stacktrace:
 [1] dissipation_operator(source_of_coefficients::DienerDorbandSchnetterTiglio2007, order::Int64, xmin::Int64, xmax::Int64, N::Int64, left_weights::SVector{…}, right_weights::SVector{…}, strength::Int64, mode::FastMode, parallel::Nothing)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/dissipation_operators.jl:231
 [2] dissipation_operator(source_of_coefficients::DienerDorbandSchnetterTiglio2007, order::Int64, xmin::Int64, xmax::Int64, N::Int64, left_weights::SVector{…}, right_weights::SVector{…})
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/dissipation_operators.jl:224
 [3] top-level scope
   @ REPL[26]:1
 [4] top-level scope
   @ ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1428
Some type information was truncated. Use `show(err)` to see complete types.


## trying a different method:
dissipation_operator(DienerDorbandSchnetterTiglio2007(), d; strength=1.0, order=2,mode=d.coefficients.mode)
ERROR: MethodError: no method matching dissipation_coefficients(::DienerDorbandSchnetterTiglio2007, ::Int64, ::StepRangeLen{…}, ::SVector{…}, ::SVector{…}, ::FastMode)

Closest candidates are:
  dissipation_coefficients(::MattssonSvärdNordström2004, ::Int64, ::Any, ::Any, ::Any, ::Any)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/SBP_coefficients/MattssonSvärdNordström2004.jl:29
  dissipation_coefficients(::MattssonSvärdNordström2004, ::Int64, ::Any, ::Any, ::Any)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/SBP_coefficients/MattssonSvärdNordström2004.jl:29

Stacktrace:
 [1] dissipation_operator(source_of_coefficients::DienerDorbandSchnetterTiglio2007, order::Int64, xmin::Float64, xmax::Float64, N::Int64, left_weights::SVector{…}, right_weights::SVector{…}, strength::Float64, mode::FastMode, parallel::Nothing)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/dissipation_operators.jl:231
 [2] dissipation_operator(source_of_coefficients::DienerDorbandSchnetterTiglio2007, order::Int64, xmin::Float64, xmax::Float64, N::Int64, left_weights::SVector{…}, right_weights::SVector{…}, strength::Float64, mode::FastMode)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/dissipation_operators.jl:224
 [3] dissipation_operator(source_of_coefficients::DienerDorbandSchnetterTiglio2007, D::DerivativeOperator{…}; strength::Float64, order::Int64, mode::FastMode, parallel::Nothing)
   @ SummationByPartsOperators ~/.julia/packages/SummationByPartsOperators/VWtwV/src/dissipation_operators.jl:260
 [4] top-level scope
   @ REPL[24]:1
 [5] top-level scope
   @ ~/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1428
Some type information was truncated. Use `show(err)` to see complete types.

in the paper of Diener et al they provide dissipation coefficients up to 8th order (D_{8-4}), up to now only up to 2nd order dissipation operators are supported?

@ranocha ranocha changed the title Dissipation Operators: MethodError for DienerDorbandSchnetterTiglio2007 source Add Dissipation Operators for DienerDorbandSchnetterTiglio2007 Feb 21, 2024
@ranocha
Copy link
Owner

ranocha commented Feb 21, 2024

Currently, dissipation operators are only implemented for

  • MattssonSvärdNordström2004 (see SummationByPartsOperators.dissipation_coefficients)
  • PeriodicDerivativeOperators (taking basically the interior parts of the operators of MattssonSvärdNordström2004)
  • FourierDerivativeOperators

Adding the dissipation operators of DienerDorbandSchnetterTiglio2007 would be a nice contribution and I would be happy to review a PR. Let me know if you need help with this. (I changed the title of this issue to reflect this)

in the paper of Diener et al they provide dissipation coefficients up to 8th order (D_{8-4}), up to now only up to 2nd order dissipation operators are supported?

I'm not sure I understand this part correctly. Do you refer to the order of accuracy or the order of the derivatives that the dissipation operators approximate? The ones of Mattsson et al. use higher-order undivided difference approximations of a $2p$-th derivative for SBP operators with interior order of accuracy $2p$. That's why they keep the order of accuracy of the SBP operators for which they are designed.

@svretina
Copy link
Author

The operators I am referring to are actually in the dev/DienerDorbandSchnetterTiglio2007. I will have a look how the dissipation operators are implemented and try to add the ones for DienerDorbandSchnetterTiglio2007.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants