EcoliSimulator  2.0.1a
simulation_interacting.cpp File Reference
#include <iostream>
#include <vector>
#include <fstream>
#include <cmath>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <ctime>
#include <thread>
#include "GlobalRandomVariables.h"
#include "GlobalVariables.h"
#include "Funz_C.h"
#include "Funz_C_Par.h"
#include "Funz_C_Inter.h"
#include "E_Coli.h"
#include "ParameterEstimation_E_Coli.h"
#include "CV_rExp_tExp.h"
#include "LoadBar.hpp"
#include "Manipulation_Matrix.h"
#include "constants.h"

Macros

#define max(a, b)   ( ((a) > (b)) ? (a) : (b) )
 
#define min(a, b)   ( ((a) < (b)) ? (a) : (b) )
 

Functions

int SolveHeat2D_Neumann2 (double **U, double **Q, double n_t, double r, int n_x, int n_y, double dt, double kd_, double &f_max)
 
void timestamp ()
 
int Stima_tempo (int n_c, int n_val_termine, int &j_cel_finale, int &j_cel_inizio, time_t timer1)
 
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)
 
void funz_clear ()
 
void funz_clearAll ()
 
void loadbar (unsigned int x, unsigned int n, unsigned int w)
 
int simulation_interacting (vector< E_coli * > batterio, double T_f, Funz_C *f, double *x_0, double dt, int n_c, double Raggio, int delta_dist, int num_dist, int const_salv, string *names_files_Ecoli_mod, string names_indice_mod, string *names_files_tau_mod, string names_file_dyn_mod, string *names_info_mod, int cont_gen_sim, double &f_max)
 

Macro Definition Documentation

#define max (   a,
 
)    ( ((a) > (b)) ? (a) : (b) )
#define min (   a,
 
)    ( ((a) < (b)) ? (a) : (b) )

Function Documentation

void funz_clear ( )

This function clear the terminal (different command according to the system)

void funz_clearAll ( )
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.
void loadbar ( unsigned int  x,
unsigned int  n,
unsigned int  w 
)
int simulation_interacting ( vector< E_coli * >  batterio,
double  T_f,
Funz_C f,
double *  x_0,
double  dt,
int  n_c,
double  Raggio,
int  delta_dist,
int  num_dist,
int  const_salv,
string *  names_files_Ecoli_mod,
string  names_indice_mod,
string *  names_files_tau_mod,
string  names_file_dyn_mod,
string *  names_info_mod,
int  cont_gen_sim,
double &  f_max 
)

Function that performs the actual simulation of population interacting with the ligand

(double)n_t;

int SolveHeat2D_Neumann2 ( double **  U,
double **  Q,
double  n_t,
double  r,
int  n_x,
int  n_y,
double  dt,
double  kd_,
double &  f_max 
)

This function solve the 2D Heat Equation with Neumann boundary using the he Alternating Direction Implicit (ADI) method.

Parameters
Upointer to the matrix of solution
Qpointer to the matrix of source/sink of Equation
n_tnumber of iteration of the solver
n_x,n_ynumber grid points (in x and y)
dttime step
kd_,rparameters of the finite laplacian
int Stima_tempo ( int  n_c,
int  n_val_termine,
int &  j_cel_finale,
int &  j_cel_inizio,
time_t  timer1 
)

This function extimate the time to finish the simulation

void timestamp ( )