in reply to Re^3: Particle movement question
in thread Particle movement question
I am also having trouble making sense of this structure and converting it.
/* Mark cells containing particles as fluid cells (loop over particle +s) */ /*------------------------------------------------------------------- +---*/ for (n=1;n<=N;n++) for(part=Particlelines[n].Particles; part->next != NULL; part=part +->next) { x = part->next->x; y = part->next->y; i = (int)(x/delx)+1; j = (int)(y/dely)+1; if (FLAG[i][j] < C_F) { /* delete particles in obstacle cells */ help = part->next->next; free(part->next); part->next = help; Particlelines[n].length--; } else FLAG[i][j] = FLAG[i][j] & ~C_E; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Particle movement question
by BrowserUk (Patriarch) on Apr 26, 2017 at 01:03 UTC |