Closed semi-h closed 5 months ago
yes, sure. Feel free to do it. I'll handle the conflict if there is one (though I don't expect it)
To discuss: shall we have a test for transeq calculations (similar to a test for the Poisson solver)? I do not think that we need a test for the divergence and gradient calculations. It might be useful when expending the backend options.
To discuss: shall we have a test for transeq calculations
Actually we already have some, but we should probably look into why they didn't detect this issue.
To discuss: shall we have a test for transeq calculations
Actually we already have some, but we should probably look into why they didn't detect this issue.
There was a minor error in the test as well, all fixed now.
I think the PR is now all ready. Because this PR only refactors a subroutine and doesn't really add or remove a feature, I guess we don't need to wait until Monday to discuss. Its a small PR so I'm looking for one approve, please review if you have time.
The PR Just simplifies the way we carry out the transeq. @Nanoseb implemented exactly in this way on the OpenMP backend which is better and I'm just following it.
The important part for the OpenMP backend is that there is actually a minor bug. I realised this only after running the TGV case on the CUDA backend, its a very subtle bug, and did the fix on the CUDA backend so that TGV works fine now.
Here is the problem. The
transeq_dist_component
simplifies the way we passu
,v
, andw
fields in different orders to correctly evaluate all the derivatives. But just in the line below, the halo components of theu
,v
, andw
fields are not passed down to thetranseq_dist_component
, instead assumed that they're alwaysu
andv
. https://github.com/xcompact3d/x3d2/blob/e916fe8ff835aae420193a2b3b3a1474dafc5038/src/omp/backend.f90#L221-L222So, I'm happy to fix this quickly on the OpenMP backend as well, if you're happy with this @Nanoseb. Or if you anticipate a merge conflict due to the PR you're working on or want to fix this later its completely fine, I'll leave it as is.