Skip to content

Intermediate matrix form in MOLFiniteDifference #2

@valentinsulzer

Description

@valentinsulzer

The code in MOLFiniteDifference is getting pretty messy as we add more functionality for nonlinear laplacian, upwinding, etc.

One way to simplify the code would be to have an intermediate matrix form - which then gets scalarized by the compiler - instead of directly going to the scalar form by looping over all indices. Ideally this would use DerivativeOperator to stop this package diverging into two almost entirely distinct packages (the two examples in the readme). Can DerivativeOperator be used like this? If so,

  • can it already do nonlinear laplacian?
  • how can this then be scalarized?
  • Should boundary conditions remain as they are or use the *bc convolution?

I realize this is a little bit of a step backwards because that is closer to how it was done before the refactoring of MOLFiniteDifference, so worth discussing the pros and cons of each approach here a little bit before changing anything

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions