Building the matrix associated with pointwise evaluation of basis functions #4045
-
I am in need of the sparse matrix associated with the evaluation of a firedrake function at a collection of arbitrary coordinates. In principle, I can build the matrix that I'm looking for column-wise with the following:
Obviously, this is horribly inefficient, and doesn't respect the sparsity of the problem. I also recognize that I can get the product of this matrix with a vector via the .at() or VertexOnlyMesh functionality - however I need the matrix itself (and its transpose) in order to solve a regularized least-squares problem for the function coefficients given some pointwise observations. Is there a clever way to achieve this? Thanks very much in advance to everyone for their insight. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi Doug, There is no way to do this at present. Leo Collins is currently working on this but he's just spinning up as a PhD student, so I don't expect immediate results. Could you possibly use a matrix-free solver to solve the problem you are trying to solve? |
Beta Was this translation helpful? Give feedback.
Your request has been heard! Here are the PRs firedrakeproject/fiat#144 and #4213. It might take a few days before they make it into the master branch, but you can test the branches.