|
@@ -179,12 +179,14 @@ def main(parFiles,jobDir,startDir='NONE'):
|
|
|
with open(setupOut,'w+') as f:
|
|
|
f.write(json.dumps(setup))
|
|
|
#this is 3D, so new routines
|
|
|
+ print('Written {}'.format(setupOut))
|
|
|
#write model and parameter file
|
|
|
origFiles=[modelFile,parameterFile]
|
|
|
outFiles=["model.json","parameters.json"]
|
|
|
for x in zip(origFiles,outFiles):
|
|
|
xOut=os.path.join(jobDir,x[1])
|
|
|
- shutil.copyfile(x[0],x[1])
|
|
|
+ shutil.copyfile(x[0],xOut)
|
|
|
+ print('Written {}'.format(xOut))
|
|
|
|
|
|
|
|
|
def interpolate(setup,model,t,s1,t0,tmax):
|
|
@@ -312,11 +314,13 @@ def loadSolutionFromRunRef(setup,ref,loadAll=False):
|
|
|
os.mkdir(localDir)
|
|
|
|
|
|
#download setup
|
|
|
- f='setup.json'
|
|
|
- localPath=os.path.join(localDir,f)
|
|
|
- remotePath='/'.join([remoteDir,f])
|
|
|
- fb.readFileToFile(remotePath,localPath)
|
|
|
- setupFile=os.path.join(localDir,f)
|
|
|
+ fs=['setup.json','model.json','parameters.json']
|
|
|
+ for f in fs:
|
|
|
+ localPath=os.path.join(localDir,f)
|
|
|
+ remotePath='/'.join([remoteDir,f])
|
|
|
+ fb.readFileToFile(remotePath,localPath)
|
|
|
+
|
|
|
+ setupFile=os.path.join(localDir,fs[0])
|
|
|
|
|
|
setupOld=parseSetup(setupFile)
|
|
|
inFiles=getFiles(setupOld,loadAll)
|
|
@@ -368,6 +372,8 @@ def loadSolutionFromDir(jobDir,loadAll=False):
|
|
|
data['lut']=lut
|
|
|
data['lutSE']=lutSE
|
|
|
data['setup']=setup
|
|
|
+ data['model']=os.path.join(jobDir,'model.json')
|
|
|
+ data['parameters']=os.path.join(jobDir,'parameters.json')
|
|
|
return data
|
|
|
|
|
|
def getStartPointFromDir(jobDir):
|