EcoliSimulator
2.0.1a
|
#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) |
#define max | ( | a, | |
b | |||
) | ( ((a) > (b)) ? (a) : (b) ) |
#define min | ( | a, | |
b | |||
) | ( ((a) < (b)) ? (a) : (b) ) |
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).
x[] | position of pacterium (to be set) |
x0[] | initial position, set in the menu |
R | radius distribution |
type | of distribution, see menu |
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.
U | pointer to the matrix of solution |
Q | pointer to the matrix of source/sink of Equation |
n_t | number of iteration of the solver |
n_x,n_y | number grid points (in x and y) |
dt | time step |
kd_,r | parameters 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 | ( | ) |