You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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!
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.
The text was updated successfully, but these errors were encountered: