Skip to content

Commit

Permalink
Fixed number of transport steps bug in 3D. v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dukovski committed Aug 19, 2014
1 parent a3864db commit a10092a
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions comets_simplified/src/edu/bu/segrelab/comets/fba/FBAWorld3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -1979,19 +1979,19 @@ public int run()
int ret = PARAMS_OK;
if (pParams.getNumRunThreads() > 1)
{
try
{
PrintWriter out1 = new PrintWriter(new FileWriter("fbatime_multithread.txt",true));
long t = System.currentTimeMillis();
//try
//{
// PrintWriter out1 = new PrintWriter(new FileWriter("fbatime_multithread.txt",true));
// long t = System.currentTimeMillis();
ret = runThreaded();
//System.out.println("total mt fba time = "+(System.currentTimeMillis()-t));
//out1.println((System.currentTimeMillis()-t));
out1.close();
}
catch (IOException e)
{
System.out.println("File fbatime_mutithread.dat not found");
}
// out1.close();
//}
//catch (IOException e)
//{
// System.out.println("File fbatime_mutithread.dat not found");
//}
}
else
{
Expand All @@ -2008,10 +2008,10 @@ public int run()

// 2. tell all the cells to run
List<Cell> deadCells = new ArrayList<Cell>();
try
{
PrintWriter out1 = new PrintWriter(new FileWriter("fbatime_singlethread.txt",true));
long t = System.currentTimeMillis();
//try
//{
// PrintWriter out1 = new PrintWriter(new FileWriter("fbatime_singlethread.txt",true));
// long t = System.currentTimeMillis();
for (int i = 0; i < c.getCells().size(); i++)
{
// print("running cell " + i + "...");
Expand All @@ -2023,12 +2023,12 @@ public int run()
}
//System.out.println("total st fba time = " + (System.currentTimeMillis() - t));
//out1.println((System.currentTimeMillis() - t));
out1.close();
}
catch(IOException e)
{
System.out.println("File fbatime_singlethread.txt not found.");
}
// out1.close();
//}
//catch(IOException e)
//{
// System.out.println("File fbatime_singlethread.txt not found.");
//}
// remove dead cells.
switch(pParams.getBiomassMotionStyle())
{
Expand All @@ -2049,11 +2049,11 @@ public int run()
deadCells.clear();
}

try
{
long t = System.currentTimeMillis();
//try
//{
// long t = System.currentTimeMillis();
// 3. diffuse media and biomass
PrintWriter out1 = new PrintWriter(new FileWriter("difftime.txt",true));
// PrintWriter out1 = new PrintWriter(new FileWriter("difftime.txt",true));
//System.out.println("ok"+cParams.getDiffusionsPerStep());
//System.out.println("OK"+pParams.getNumDiffusionsPerStep());
//System.out.println("flow"+pParams.getFlowDiffRate());
Expand All @@ -2062,8 +2062,8 @@ public int run()
//System.out.println("style "+pParams.getExchangeStyle());
//System.out.println("numDiff "+pParams.getNumDiffusionsPerStep());
//for (int i = 0; i < cParams.getDiffusionsPerStep(); i++)
for (int i = 0; i < pParams.getNumDiffusionsPerStep(); i++)
{
//for (int i = 0; i < pParams.getNumDiffusionsPerStep(); i++)
//{
diffuseMediaFick();
//diffuseBiomass(pParams.getBiomassMotionStyle());
switch (pParams.getBiomassMotionStyle())
Expand All @@ -2084,14 +2084,14 @@ public int run()
// break;
}

}
//}
//out1.println((System.currentTimeMillis() - t));
out1.close();
}
catch(IOException e)
{
System.out.println("File difftime.txt not found.");
}
// out1.close();
//}
//catch(IOException e)
//{
// System.out.println("File difftime.txt not found.");
//}
//System.out.println("total st diffusion time = " + (System.currentTimeMillis() - t));

//t = System.currentTimeMillis();
Expand Down

0 comments on commit a10092a

Please sign in to comment.