Skip to content

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

@brownbaerchen

Description

@brownbaerchen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issueIf you want to start developping pySDC, this is a good place to start

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions