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

Add laplacian operator #5

Open
mavenlin opened this issue Dec 7, 2023 · 1 comment
Open

Add laplacian operator #5

mavenlin opened this issue Dec 7, 2023 · 1 comment

Comments

@mavenlin
Copy link
Member

mavenlin commented Dec 7, 2023

Immediate solution

Laplace operator is important for computing the kinetic energy, currently we have to use two nabla operators together with the trace. For example

  1. in the transpose rule of nabla,
    https://github.com/sail-sg/autofd/blob/main/autofd/operators/operators.py#L773

  2. in mgga functional of jax_xc,
    https://github.com/sail-sg/jax_xc/blob/main/gen_repo/experimental.jinja#L66

While we can do better with the jet rules.

In the long term

In the long term, I believe we need to have a jaxpr level graph rewriting tool, we can then introduce algebraic relationships that works more generally for any nested nabla operations.

@mavenlin mavenlin changed the title Add laplace operator Add laplacian operator Dec 7, 2023
@mavenlin
Copy link
Member Author

According to https://github.com/y1xiaoc/fwdlap/, jet is not the most efficient option for laplace calculation, a more efficient way would be to reduce at every op.

We can use fwdlap if y1xiaoc/fwdlap#2 is resolved.

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

1 participant