Re: modifying the particle list on multiple processors

From: Mark Baumann <markb_at_physics.utexas.edu>
Date: Wed, 9 Mar 2011 13:24:55 -0600 (CST)

Aldo,

Thank you for your response.

>
> So at the end it should be enough to deal with the arrays locally and to
> update the global variables like All.TotN_gas. 
>  

That's good news! Do you think the particle counts are the only global
variables that need to be updated? That's what I'm doing currently but I
wasn't sure if I was overlooking anything.

>
> Would I need to check for "collisions" between a STAR particle
> on the local processor and GAS particles on other processors, or
> is it impossible for such a thing to happen?  And conversely, do
> I need to check for collisions between a GAS particle on the
> local processor and STAR particles on the other processors?
>
>
> Yes, what you're doing right now is to check only collisions or accretion
> within local particles (on the same processor), remember that this doesn't
> necessarily means that these particles are close in distance, so you could
> have particles on other processors that lie within your predefined distance
> for accretion. 
>
> If you want to do it on several processors you should first look for sink
> particles within each processor, and compute the local gas swallowing, then
> you should export the information about these sink particles to other
> processors so each processor can compute the gas accretion of their own gas
> particles on such sink particles. You can figure out how to do this by
> looking at the density_evaluate() function. Hope this helps.

Thank you for this information.

For obvious reasons I was trying to avoid doing N^2 comparisons at every
step (where N = number of particles in the entire simulation) to check for
collisions. I wonder if there's a faster way to do it. For instance, I'm
wondering if I could use ngb_treefind_variable() to get a list of nearby
particles from other processors that might collide with a sink particle on
the current process (this would mirror what is done in density_evaluate()
).. I could pass the sink particle's position as the first parameter to
ngb_treefind_variable() and the "accretion radius" of the sink particle as
the second parameter. One thing I'm unclear on is: what is the purpose of
the third parameter ("startnode") of ngb_treefind_variable()? In
density_evaluate, the third parameter is set to All.MaxPart before being
passed.

Also, using the above method, if I do find a collision then I would need
to export this information to other processes so that they can update
their particle lists accordingly.

On that note, maybe it would be simpler (and/or faster?) to export the
location of each sink particle to all of the other processes, and let them
deal with collisions and deletions locally.

Your thoughts?


Best,

Mark
Received on 2011-03-09 20:25:05

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET