/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 */ #include #include #include #include "LuxHeader.h" using namespace std; int main() { // Initilaizes dy array which stores values for change in concentration of each chemical, each increment. double dy[var]; for (int i= 0; i < var; i++) { dy[i] = 0.0; } // Creates data file to export data results to. ofstream datfile; datfile.open ("LuxRData21.dat"); // Initializes initial values for all chemicals. double y [var + 2] = {0.0, // HSLout 0.0, // HSLin 0.0, // HSL-LuxR 0.0, // LuxI mRNA 0.0, // LuxR mRNA 0.0, // GFP mRNA 10.0, // LuxI 10.0, // LuxR 0.0, // GFP 0.0, //VolumeInside 0.0} // VolumeOutside // Main loop for cell growth. for (int j = 0; j < N; j++) { RungeKutta(y, dy); // Passes chemical current values to ODEsolver to find values for next increment. CellGrowth(y) ; // Passes y[] array to add more cells to y[9] datfile << " " << y[1] << " " << y[2] << " " << y[3] << " " << y[4] << " " << y[5] << " " << y[6] << " " << y[7] << " " << y[8] << " " << y[9] << endl; //Print values to data file. } // Main loop for cell death. for (int j = 0; j < N; j++) { RungeKutta(y, dy); CellDeath(y) ; datfile << " " << y[1] << " " << y[2] << " " << y[3] << " " << y[4] << " " << y[5] << " " << y[6] << " " << y[7] << " " << y[8] << " " << y[9] << endl; } datfile.close(); return 0; }