precice generates output like this
---[precice] Mapping distance min:'value1' max:'value2' avg: 'value3' var: 'value4' cnt: 'value5'
and I would like to ask what the meaning of the different values is. Is there an explanation or examples anywhere? What is a ‘good’ mapping distance? What is the values unit?
Thanks in Advance!
For a nearest neighbor mapping, for example, we search (for a consistent mapping from mesh A to mesh B), the closest vertex v_A of mesh A for each vertex v_B of mesh B. This gives an array of distances \|v_B-v_A\|_2, where v_A = (x,y,z) etc.
min
, max
, avg
, var
, cnt
are the min, the max, the average, the variance, and the count of this array. So, cnt
is the number of vertices in mesh B.
Parallel computation
All values are local to each rank. cnt
is the local mesh partition size then.
Good distance?
All values are absolute values, so it highly depends on your case. I would even say that these values are most helpful for debugging. Meaning, if you see strange values, this can be an indicator that sth is wrong, e.g. the geometry of both sides do not match. Otherwise, if your geometry has a size of 1m, and avg is 0.001, you could assess whether a mapping distance of 1mm is tolerable for your application.
Units:
preCICE does not use units. You have to be sure that both your participants define the mesh coordinates in the same untis.