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; }
In reply to Re^4: Particle movement question
by koda123
in thread Particle movement question
by koda123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |