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

Non-central periodic operators? #136

Closed
jlchan opened this issue Apr 5, 2022 · 7 comments · Fixed by #137
Closed

Non-central periodic operators? #136

jlchan opened this issue Apr 5, 2022 · 7 comments · Fixed by #137

Comments

@jlchan
Copy link
Contributor

jlchan commented Apr 5, 2022

Would it be possible to support upwind/downwind stencils for periodic operators? For example, I am hoping to use the interior stencil of Mattsson2017(:minus/:plus) but for a periodic domain. I would very much like to take advantage of the specialized mul! if possible.

Thanks!

@ranocha
Copy link
Owner

ranocha commented Apr 6, 2022

That's already possible by specifying a left_offset, see https://ranocha.de/SummationByPartsOperators.jl/stable/api_reference/#SummationByPartsOperators.periodic_derivative_operator

@ranocha
Copy link
Owner

ranocha commented Apr 6, 2022

I'm on my phone right now so I can't check whether these give you exactly the same coefficients Ken Mattsson used in the interior but I think they should

@jlchan
Copy link
Contributor Author

jlchan commented Apr 6, 2022

Thanks! Will try it out this afternoon.

@ranocha
Copy link
Owner

ranocha commented Apr 6, 2022

Please come back to me if there are any questions or problems. I should probably mention this feature a bit more prominently in the docs, too...

@ranocha ranocha mentioned this issue Apr 8, 2022
@jlchan
Copy link
Contributor Author

jlchan commented Apr 11, 2022

The Q matrix entries indeed appear to be the same! The (non-boundary) mass matrix entries differ slightly between the operators, but I think that is to be expected. Thanks for the tip!

@ranocha
Copy link
Owner

ranocha commented Apr 11, 2022

Do you use the same number of nodes? To get equivalent results, you need to use one node less for periodic operators since the right boundary node is set by periodicity. Then, you should get the same D and M in the interior.

@jlchan
Copy link
Contributor Author

jlchan commented Apr 11, 2022

That completely explains it. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants