Re: variable particle number
>> Is there elegant solution to make a storage with variable number of
>> particles?
> if by "elegant" you mean "already built-in", the answer is "no", to my
> knowledge.
> > It's possible to mark 'dead' or `nonexisting' particles as particles
> > with Type < 0 for example droping them out from all loops, and when
> > particle becomes 'alive' we need to place it into the gravitational
> > tree.
> on the other hand, assigning a negative P.Type will automatically drop
> out particles from all hydro loops.
> anyway, loops doing gravity are generally written as
> for(i = 0; i < NumPart; i++)
> {
> }
> with no check on the Type. You should eventually put it.
I already did it. Moreover, only live particles are stored in
PTimeTree. The most hard work in this task is inserting and removing
particles to/from the tree and updating tree after...
>> Is it enough or some problems are possible in this way?
> simply hiding a particle should end in some problem about conservation
> of momentum, angular momentum, energy etc.. probably i don't understand
> exactly your plan.
Of course I'll take care about conservation laws.
Received on 2005-05-16 15:49:35
This archive was generated by hypermail 2.3.0
: 2023-01-10 10:01:30 CET