Thank you Erik for your last reply and your helpful advice!
In the last days I changed a lot of my code and I noticed another (different?) issue:
I'm calculating spatial derivatives in r-direction for different grid functions by using Llama GlobalDerivative thorn, such as this example:
call globalDiff_gv (cctkGH, 0, PHI, param_dx, J11, J21, J31, & J12, J22, J32, J13, J23, J33, -1_ik) call globalDiff_gv (cctkGH, 1, PHI, param_dy, J11, J21, J31, & J12, J22, J32, J13, J23, J33, -1_ik) call globalDiff_gv (cctkGH, 2, PHI, param_dz, J11, J21, J31, & J12, J22, J32, J13, J23, J33, -1_ik)
param_dr = dxdr * param_dx + dydr * param_dy + dzdr * param_dz
, where dxdr, dydr, dzdr are the specific coordinate transformations and my coordinates are again Thornburg04 multipatch.
I noticed that I receive very odd (and wrong) zero-values on specific grid points in the positive x-sphere. Not only for param_dr, but also for param_dx, param_dy as well as param_dz. I should mention, that I did not change the GlobalDerivative thorn and this problem also appears, when calculating the derivatives of other variables then PHI. Also PHI itself is continuous in this area. I also initiate all "param"-variables with 1 so that the call of GlobalDerivative is actively changing them (to 0).
The same error also appears, when calling GlobalDiff directly with the inverse Jacobians like:
call globalDiff_gv (cctkGH, 2, PHI, param_dr, J11, J21, J31, J12, J22, J32, iJ13, iJ23, iJ33, -1_ik).
Furthermore it makes no difference whether this is scheduled at initial or in MoL_CalcRHS.
I attached plots from PHI, param_dx and param_dr so that you can see where those points are on the x-z plane. These are for an angular resolution of Coordinates::n_angular = 9. If I increase the angular resolution this affects also more grid points along the same radius (for example 8 points in the x-z plane for n_angular = 15).
Since I'm assuming, that the GobalDerivative thorn is working correct I don't know where this issue might come from. Does anyone have an idea for this?
Thank you all a lot!
Best regards, Severin