GeometricKernels
GeometricKernels copied to clipboard
Manifold laplacian for general manifolds
I've tried to run code that checks heat solution on SO, but there is a problem with laplace_operator. Code sample:
from geomstats.geometry.special_orthogonal import _SpecialOrthogonalMatrices
so = _SpecialOrthogonalMatrices(5)
x = so.rand()
dfdt, _, _ = torch.autograd.grad(heat_kernel(t, x[None], y[None]), (t, x, y), allow_unused=True)
egrad = lambda u: torch.autograd.grad(heat_kernel(t, u[None], y[None]), (t, u, y))[1]
fx = lambda u: heat_kernel(t, u[None], y[None])
ehess = lambda u, h: torch.autograd.functional.hvp(fx, u, h)[1]
lapf = manifold_laplacian(x, space, egrad, ehess)
I suspect that the problem is in function tangent_onb in manifold_utils.py. Such approach should work only for $M^n $ embedded in $\mathbb{R}^{n+1}$.