EcoliSimulator  2.0.1a
initial_distribution.cpp File Reference
#include <iostream>

Functions

int dist_iniz (double x[], double x0[], double R, unsigned int num_dist)
 
int initial_position (int j, double *x, double *x0, double Raggio, int num_dist, int &cont_dist_5, int delta_dist_cont, double Delta_delta_dist)
 

Function Documentation

int dist_iniz ( double  x[],
double  x0[],
double  R,
unsigned int  num_dist 
)

This function set the initial position.

Parameters
x[]position of pacterium (to be set)
x0[]initial position, set in the menu
Rradius distribution
typeof distribution, see menu
Returns
if the initial position change return 1, otherwise 0. If the position didn't change the initial condition for this bacterium are the same as the previous one, so we don't have to perform initial-condition calculation.
int initial_position ( int  j,
double *  x,
double *  x0,
double  Raggio,
int  num_dist,
int &  cont_dist_5,
int  delta_dist_cont,
double  Delta_delta_dist 
)

This function set the initial position. What it does is: if the distribution is the n. 5, then update the new center, otherwise it calls dist_iniz(x,x0,Raggio,num_dist).

Parameters
x[]position of pacterium (to be set)
x0[]initial position, set in the menu
Rradius distribution
typeof distribution, see menu
Returns
if the initial position change return 1, otherwise 0. If the position didn't change the initial condition for this bacterium are the same as the previous one, so we don't have to perform initial-condition calculation.