ludwig-cf / ludwig

A lattice Boltzmann code for complex fluids
https://ludwig.epcc.ed.ac.uk
Other
54 stars 35 forks source link

Colloid initialisation at sub-domain boundary #270

Closed kevinstratford closed 9 months ago

kevinstratford commented 1 year ago

This can cause a SEGV, so needs a better treatment.

kevinstratford commented 9 months ago

The proximate cause can be a colloid at the domain boundary which fails to be added back to the cell list in colloids_info_recreate().

I've replaced the assertion (which is not appropriate) by an attempt to move the initial position by a small epsilon, or fail with a run time message.

The small adjustment assumes that the problem occurs at the lower end of the cell (the epsilon is positive). However, this may not resolve all cases (but will just fail with a message).

Change at #289

kevinstratford commented 9 months ago

Should be less fragile now, at least.