Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating weight matrices for different derivatives simultaneously #34

Open
apt-get-nat opened this issue Sep 12, 2023 · 1 comment
Open

Comments

@apt-get-nat
Copy link

Is there a way to get fd.weight_matrix to produce matrices for, say, [1,0] and [0,1] at the same time? Not as a sum, but as two different operations. Under the hood, it would just be different right hand sides for the same core RBF matrix-vector system for each stencil. Solving against multiple right hand sides as a tall, skinny matrix should be much faster than re-inverting the system in multiple fd.weight_matrix calls.

See e.g. Appendix B of Flyer, Barnett & Wicker 2016 https://doi.org/10.1016/j.jcp.2016.02.078 where they do it this way in their MATLAB implementation.

@treverhines
Copy link
Owner

There is not a way to do that, but I like the idea. I am trying to think of what the usage should look like. It seems like this should be implemented in a new function called weight_matrices, where specifying diffs=[[1, 0], [0, 1], [[2, 0], [0, 2]]] would be interpreted as requesting the matrices for d/dx, d/dy, and the Laplacian.

I am pretty immersed in another project right now, so I dont know when I will get around to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants