#1261: Suspicious logic in NewRad thorn ------------------------------------------+--------------------------------- Reporter: wolfgang.kastaun@… | Owner: Type: defect | Status: review Priority: major | Milestone: ET_2012_11 Component: EinsteinToolkit thorn | Version: ET_2012_11 Resolution: | Keywords: backport ------------------------------------------+---------------------------------
Comment (by eschnett):
The condition (is_physbnd or not is_ipbnd) does not make sense; since physbnd and ipbnd are exclusive, this is equivalent to (not is_ipbnd).
The extrapolation and radiative boundary conditions have special cases for edges and corners. Thus they give incorrect results when applied on and edge or in a corner that is not a physical edge or corner. Thus I think the correct condition should be to remove the condition all_physbnd_or_ghostbnd, and to use the condition (have_bnd and any_physbnd and all_physbnd) in the end.
Given the nature of this boundary condition, this means that symmetries need to be applied after this boundary condition, and one also needs to synchronise after applying this boundary condition. If this is done, errors on symmetry or ghost zones do not matter, which may make the noticed inconsistency in the code un-observable in practice.
For safety, we may want to set all points that are (have_bnd and any_physbnd and not all_physbnd) to nan, because these are the outer boundary points that we did not set, and which thus need to be set by symmetries or synchronisation.