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

Merge generic problem helper and the one from acoustic helper #233

Open
brownbaerchen opened this issue Dec 23, 2022 · 1 comment
Open
Labels
enhancement good first issue If you want to start developping pySDC, this is a good place to start

Comments

@brownbaerchen
Copy link
Contributor

The files problem_helper.py and buildFDMatrix.py have the same purpose, only that the problem helper is more generic, tested and supposed to replace hardcoded finite difference stencils like in the file that is hidden in the folder acoustic_helpers.
There is also a PR to implement the upwind stencils that are hardcoded in the generic framework.

However, there are some implementations for Neumann and Dirichlet boundary conditions in the acoustic helper, which are not in the generic problem helper and I think they look quite useful. The problem is I don't know anything about boundary conditions that aren't periodic.
If someone could supply me with some references for that, then I could maybe implement a generic version in the problem helper.

My first approach for Dirichlet would be to set the row in the matrix to zero and only a one at the boundary and then put the desired value on the right hand side, but I can already see that this is wrong for higher order when comparing to the acoustic helper. And I haven't quite figured out how to do this.

For Neumann, I suppose you use one-sided stencils, but also I couldn't figure out how the values come about.

If you think it's not worth bothering to implement the boundary conditions in a generic way, then I would suggest to at least replace the hardcoded stencils in the acoustic helper with the generic ones, since the test coverage of the hardcoded stuff is really bad.

@brownbaerchen brownbaerchen added the good first issue If you want to start developping pySDC, this is a good place to start label Jan 10, 2024
@brownbaerchen
Copy link
Contributor Author

I guess we actually implemented the generic Dirichlet and Neumann boundary conditions that we need at the TIME-X hackathon in Darmstadt.

The only thing left to solve this issue is to replace the generation of finite difference matrices in the acoustic helper with the generic implementation. It's not a lot of effort and would significantly increase code coverage. This is a nice thing to do if anyone finds themselves bored on a train at any point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue If you want to start developping pySDC, this is a good place to start
Projects
None yet
Development

No branches or pull requests

2 participants