underworldcode / underworld3

https://underworldcode.github.io/underworld3/
Other
20 stars 10 forks source link

"Particle escape" handling for DMSwarm #37

Open julesghub opened 3 years ago

julesghub commented 3 years ago

This hasn't been tried or tested. What happens when a particle advects beyonds the mesh, or beyond the shadow space.

lmoresi commented 1 year ago

Tricky one !

Can we create an actual issue here. We know there are problems in dmplex when trying to find particles without good hints about process / element but we need to give examples that the PETSc team can raise as issues themselves.

knepley commented 1 year ago

The original design did not support particles hopping across nearest neighbors. Is that what you are seeing? We are fixing this now. Also, there was a bug in quadrilateral location that I just fixed.

lmoresi commented 1 year ago

Exactly what we are seeing and we have a kd-tree hack that we are currently using. We'd really like to have this disappear into dmplex and not our bespoke (crappy) code.

julesghub commented 1 year ago

Sounds great! Keep us posted with this @knepley

lmoresi commented 2 months ago

@knepley - this still seems to be affecting us. Is there a different change we need to make. Our use-case is the snap-back of transported "nodal points" in the semi-Lagrange advection scheme (aka particle teleportation in other issues). Do we need to activate some secret DMPLEX flag ?

knepley commented 2 months ago

Let's make a small test that shows this. I can give it to Joe and get it integrated into the PETSc test suite.

lmoresi commented 2 months ago

It's a common use case - e.g. the cavity flow model that is in every textbook. The boundary conditions are inconsistent at the corner and flow paths can escape.

We want to be able to have those particles flagged for additional work rather than discarded.

Not a big deal for passive swarms but problematic if we really need to account for every particle.