Hello
I attach a patch of one bug that I have found in parallel. I attach
also one example which does not work properly in parallel with the
current version (it does after applying the patch).
To reproduce it:
mkdir results
mpirun -np 2 gerris2D drop.gfs
gfsjoin drop2.gfs results sim-- 2 -0.gfs > bug.gfs
gfsview2D bug.gfs
The problem appears when you initialize the fraction with a function
which is not inside some of the processors. The new code is still not
properly working for some cases when some processors have
non-contiguous domains (see comment number 3 below)
Some comments:
1) The patch works, but I guess the programming-style can be
significantly improved. Stephane, it could be nice if you could have a
quick look into that, there are not so much new lines
2) What I have done is to count the number of mixed cells that we have
in the domain. I do that inside set_solid_fractions_from_surface
Then, if there is not mix cells but there are surfaces, it implies
that the surfaces are somewhere outside of the domain
In where_is_solid I check if the solid is outside or inside of the
domain, and according to that, I fill out variable status with the
correct value in paint_mixed_leaf_outside
For the domain that contains mixed cells, I keep the same
algorithm that was implemented
3) I think it could be better to do something similar to what is
already done, but instead of applying the algorithm for each domain
(which can contains unconnected boxes), I would apply it to every box
independently
I understand that this is just to replace some
gfs_domain_cell_traverse (domain ... for some other functions
which traverse just the cells of a box (and then, repeat the operation
for every box)
is that difficult?
has it largest implications?
I think that is all, any comment will be welcome.
best
Daniel
|