Ask Your Question
0

How to set a metric tensor inverse?

asked 2019-08-28 03:29:09 +0100

Richard_L gravatar image

I have a complicated metric tensor. In order to compute the Laplacian in this metric, I need the metric tensor inverse. But this exceeds my memory capacity after ~36 hours of computing.

I would like instead to set the inverse with what I believe to be the correct entries. Is that possible? Reviewing the documentation and the source code, I see no indication of such an operation.

I wonder if g.inverse().comp(XI.frame())[:] = Ginv[:] would work, where g denotes the metric tensor, and Ginv the matrix of expressions which should be correct.

BTW, I have the metric and its inverse in one frame. It is after mapping into a second frame [XI] that the problem arises.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-28 13:24:23 +0100

eric_g gravatar image

g._inverse.set_comp(XI.frame())[:] = Ginv[:] should work (notice that it starts with g._inverse, not g.inverse(), and that set_comp must be used instead of comp).

Probably we should implement a method set_inverse() to allow easily for this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-28 03:29:09 +0100

Seen: 415 times

Last updated: Aug 28 '19