Fix FreeSlip boundary condition
There is an issue with the proxy field substitution and the FreeSlip boundary condition. This is true in particular if the normal vector is not pre-determined as implemented in walberla/walberla!520 (merged).
Currently, with the pull pattern the following substitutions are performed:
f_in[0,0](invdir[dir]) ← f_in[{indexField}_{0}^{wnx},{indexField}_{0}^{wny}](indexField[0](ref_dir))
->
pdfs[{f_{in inv offsets x}}_{dir},{f_{in inv offsets y}}_{dir},{f_{in inv offsets z}}_{dir}](f_in_inv_dir_idx[dir]) ← pdfs[{indexVector}_{0}^{wnx} + {f_{in offsets x}}_{{indexVector}_{0}^{ref_dir}},{indexVector}_{0}^{wny} + {f_{in offsets y}}_{{indexVector}_{0}^{ref_dir}},{indexVector}_{0}^{wnz} + {f_{in offsets z}}_{{indexVector}_{0}^{ref_dir}}](indexVector[0](ref_dir))
Whereas the correct substitutions are:
f_in[0,0](invdir[dir]) ← f_in[{indexField}_{0}^{wnx},{indexField}_{0}^{wny}](indexField[0](ref_dir))
->
pdfs[{f_{in inv offsets x}}_{dir},{f_{in inv offsets y}}_{dir},{f_{in inv offsets z}}_{dir}](f_in_inv_dir_idx[dir]) ← pdfs[{indexVector}_{0}^{wnx} + {f_{in inv offsets x}}_{dir},{indexVector}_{0}^{wny} + {f_{in inv offsets y}}_{dir},{indexVector}_{0}^{wnz} + {f_{in inv offsets z}}_{dir}](indexVector[0](ref_dir))
The problem is that the population index (ref_dir) is used to determine a spatial offset. This MR in its current form fixes this issue for the particular case of the FreeSlip condition and the pull pattern. Other configurations break.
Edited by Markus Holzer