Commit a30d44ec authored by Cassio Kirch's avatar Cassio Kirch

-> replaced by .

parent 25df48c2
......@@ -20,6 +20,17 @@
#endif
#endif
double
getAverageNeighborsNo(const struct Boid* const boid)
{
unsigned int boidCount;
double averageNeighborsNo = 0.0;
for (boidCount = 0; boidCount < N; ++boidCount)
averageNeighborsNo += (double)(boid[boidCount].endoNeighbors + \
boid[boidCount].ectoNeighbors) / N;
return averageNeighborsNo;
}
double
getGamma (const struct Boid* const boids)
{
......@@ -34,7 +45,7 @@ getGamma (const struct Boid* const boids)
#endif
#ifdef ECTO_GAMMA
for (boidCount = endoBoids + 1; boidCount <= N; ++boidCount)
for (boidCount = endoBoids + 1; boidCount < N; ++boidCount)
gamma += boids[boidCount].gamma;
#endif
......@@ -137,6 +148,11 @@ one_system ()
if (step%EXIT_INTERVAL == 0)
{
printf("Step: %llu\n", step);
#ifdef COUNT_NEIGHBORS
printf("Average neighbors: %lf\n", getAverageNeighborsNo(boid));
#endif
#ifdef PLOT_EXIT_FILES
endoFile = initializeStepAndTypeFile (continuousStep, ENDODERM);
ectoFile = initializeStepAndTypeFile (continuousStep, ECTODERM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment