Add unit tests for normalisation - #3476
Conversation
That might drop the parallel slices
| if (jacobian_cache != nullptr) { | ||
| if (not jacobian_cache->isFci()) { | ||
| jacobian_cache.reset(); |
There was a problem hiding this comment.
Please could you add a comment explaining why we don't want to reset the jacobian in this case? I guess this is something to do with not wanting to recalculate the slices? But if we're calling this, then we've changed the metric, so how do we ensure the jacobian is in sync with the metric?
Also we can collapse the if statements into one :)
There was a problem hiding this comment.
Please could you add a comment explaining why we don't want to reset the jacobian in this case? I guess this is something to do with not wanting to recalculate the slices?
Exactly. We could do this, but it is rather bothersome.
But if we're calling this, then we've changed the metric, so how do we ensure the jacobian is in sync with the metric?
We hope the user knows what they are doing. We also have no check that co and contra variant tensor are aligned. We could add a CHECK > 2 check to ensure J is somewhat consistent (and maybe co and contravariant tensors, too)
J needs to be preserved to ensure that parallel slices are preserved.
That can cause to NaNs for tokamaks and deletes parallel slices for FCI
|
Oh, is the actual problem just the ordering of calls? BOUT-dev/src/mesh/coordinates.cxx Lines 1284 to 1286 in 61ca9f1 BOUT-dev/src/mesh/coordinates.cxx Lines 1314 to 1337 in 61ca9f1 Should we just move the call to |
No description provided.