Closed joglekara closed 4 years ago
Hey there! You are totally right. The term flat
is ill-chosen at this point. What is meant, is the packed version of the matrix containing only the 5 diagonals defining the given penta-diagonal matrix. So this packed matrix has the shape (5, N)
.
This is described in detail in the documentation, along with the answer of your question:
https://geostat-framework.readthedocs.io/projects/pentapy/en/stable/core.html#pentapy.core.solve
But the issue with the term flat
would have been a good one during the review for the paper ;-)
Very nice work, this is super useful!
I have a quick question, more of a clarification. The documentation says
Here, I interpret
M_flat
to represent each of the 5 diagonals of a pentadiagonal matrix. I believe this is similar to a banded structure.I see that pentapy supports the matrix being input as
Full
andFlat
. TheFull
portion makes sense to me, this numpy array has shape(N_col, M_row)
. I'm a bit confused aboutFlat
becauseflat
typically refers to an(N, N) -> (N^2, 1)
transformation (see https://numpy.org/doc/stable/reference/generated/numpy.ndarray.flatten.html). However, the above leads me to believe thatFlat
is actually just the 5 diagonals, i.e. a numpy array of shape (5, N).So, this is a long winded way of asking, is it safe to assume that
pentapy
supports solving pentadiagonal systems represented in a sparse format using just the 5 diagonals to represent the operator (and the right hand side)?