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

Adding new limiters? #239

Open
donnaaboise opened this issue Apr 4, 2019 · 4 comments
Open

Adding new limiters? #239

donnaaboise opened this issue Apr 4, 2019 · 4 comments

Comments

@donnaaboise
Copy link
Contributor

Are there any thoughts about how to best add a new limiter? I am thinking of a case in which the user adds a new limiter to inline limiter.f90. There doesn't seem to be any way to indicate to the Python routines that they should accept a new limiter number. One idea is to allow a 'user' option + a number, i.e. The number would then indicate the goto location in the limiter file (or at least an offset from limiters known to Clawpack). The user is responsible for making sure this limiter gets called correctly (since they are supplying new limiter file).

@mjberger
Copy link
Contributor

mjberger commented Apr 4, 2019 via email

@mandli
Copy link
Member

mandli commented Apr 4, 2019

If you want to just test a limiter you could use PyClaw which has a number of additional limiters and would be trivial to add a new one. Otherwise in clawutil/src/python/clawutil/data.py starting at line 733 you could add another limiter option along with the associated code for the limiter in Fortran.

@donnaaboise
Copy link
Contributor Author

Yes, I'd like to try out a new limiter. I am comparing results with Basilisk, and they use the generalized minmod limiter. I am not necessarily proposing to add it to Clawpack, though, and so haven't opted to edit data.py (as per suggestion by @mandli). In the same way we include a user option for boundary conditions, I just thought it would be useful to have a user option for limiters. Right now, I have to manually edit claw.data to include a number outside of [0,4].

@mandli
Copy link
Member

mandli commented Apr 6, 2019

It would be pretty easy to add. One thing we did do in PyClaw was add another argument for the courant number as some of the more exotic limiters out there required the courant number. You can see the list if you are interested in https://github.com/clawpack/pyclaw/blob/master/src/pyclaw/limiters/tvd.py.

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

3 participants