Skip to content

Commit 0c430ee

Browse files
committed
properly read the functions file
1 parent 9b9b383 commit 0c430ee

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

vcell-core/src/main/java/cbit/vcell/simdata/DataSetControllerImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,13 +2406,11 @@ public LangevinBatchResultSet getLangevinBatchResultSet(VCDataIdentifier vcdID)
24062406
ODEDataInfo odeDataInfo = new ODEDataInfo(vcdID.getOwner(), vcdID.getID(),
24072407
simData.getDataBlockTimeStamp(ODE_DATA, 0));
24082408
int keepAtMost = 10000;
2409-
File functionsFile = null;
2409+
File functionsFile = simData.getJobFunctionsFile();
24102410
LangevinBatchResultSet lbrs = new LangevinBatchResultSet(odeDataInfo);
24112411

24122412
File avg_file = simData.getLangevinFile(LangevinBatchResultSet.LangevinFileType.Avg);
24132413
if (avg_file != null && avg_file.exists()) {
2414-
// want to keep all results, so pass 0 for keepAtMost
2415-
// don't care about functions, so pass null for functionsFile
24162414
ODESimData odeSimData_avg = ODESimData.readIDADataFile(vcdID, avg_file, keepAtMost, functionsFile);
24172415
lbrs.setOdeSimDataAvg(odeSimData_avg);
24182416
}

vcell-core/src/main/java/cbit/vcell/simdata/MergedData.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,5 +1160,10 @@ public ComsolSimFiles getComsolSimFiles() throws FileNotFoundException, DataAcce
11601160
throw new RuntimeException("MergedData.getComsolSimFiles() not yet implemented");
11611161
}
11621162

1163+
@Override
1164+
public File getJobFunctionsFile() throws FileNotFoundException {
1165+
throw new RuntimeException("MergedData.getJobFunctionsFile() not yet implemented");
1166+
}
1167+
11631168

11641169
}

vcell-core/src/main/java/cbit/vcell/simdata/SimulationData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,8 @@ private synchronized File getFirstJobFunctionsFile() throws FileNotFoundExceptio
626626
}
627627
}
628628

629-
630-
private synchronized File getJobFunctionsFile() throws FileNotFoundException {
629+
@Override
630+
public synchronized File getJobFunctionsFile() throws FileNotFoundException {
631631
File functionsFile = null;
632632
functionsFile = amplistorHelper.getFunctionsFile(false);
633633
if (functionsFile.exists()){

vcell-core/src/main/java/cbit/vcell/simdata/VCData.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,6 @@ public final double[][][] getSimDataTimeSeries(
226226

227227
public abstract boolean isComsol() throws DataAccessException, IOException;
228228

229+
public abstract File getJobFunctionsFile() throws FileNotFoundException;
230+
229231
}

vcell-core/src/main/java/cbit/vcell/solver/ode/ODESimData.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -512,16 +512,6 @@ public static ODESimData readIDADataFile(VCDataIdentifier vcdId, File dataFile,
512512
}
513513

514514
// read functions file
515-
if(functionsFile == null) {
516-
// functionFile is being initialized in SimulationData.getJobFunctionsFile() which already
517-
// throws is the file doesn't exist, so we call explicitly with null here to skip functions loading
518-
// for langevin batch simulation results (where functionFile is meaningless)
519-
if (keepMost > 0) {
520-
odeSimData.trimRows(keepMost);
521-
}
522-
return odeSimData;
523-
}
524-
525515
if (!odeSimData.getColumnDescriptions(0).getName().equals(SimDataConstants.HISTOGRAM_INDEX_NAME)) {
526516
Vector<AnnotatedFunction> funcList;
527517
try {

0 commit comments

Comments
 (0)