diff --git a/tools/evaluation/FiguresAndTablesForPaper.py b/tools/evaluation/FiguresAndTablesForPaper.py index a547fee36dbb0a7c538e37f59ba978eb1a8bdcea..6ec815b83898ccf63da3134a27fa8edae48f50ef 100644 --- a/tools/evaluation/FiguresAndTablesForPaper.py +++ b/tools/evaluation/FiguresAndTablesForPaper.py @@ -142,7 +142,7 @@ def table8(): J=4 savePath='images/' tabWriter = TableWriter(lL,tL,sdt,endTime,1,[SI],listEvaluationPoints) - tabWriter.writeMeanTactTable(SI,l0Path,savePath,L,J,backupArray) + tabWriter.writeMeanTactTable(SI,l0Path,savePath,L,J,SI,backupArray) if __name__=="__main__": #table2() #x diff --git a/tools/evaluation/PaperEvaluation.py b/tools/evaluation/PaperEvaluation.py index 95586668ad3755ce5f068a7f712118e75b27646d..f44ead888ffe48ec3b885f75e131049439384d24 100644 --- a/tools/evaluation/PaperEvaluation.py +++ b/tools/evaluation/PaperEvaluation.py @@ -1366,6 +1366,29 @@ def ActivationErrorPlot(path,leftPlot,rightPlot): output_file.write('\\caption{'+caption+'.}\n') output_file.write(label+'\n') output_file.write('\\end{figure}\n') + +def EvaluationGSTab8(): + lL=[0,1,2,3] + tL=[0,1,2,3,4] + SI='../../../datafiles/BiVentricle/'+'SI0004/' + GS='../../../datafiles/BiVentricle/'+'GS0004/' + sdt=0.0004 + endTime=0.16 + listEvaluationPoints=[] + l0Path='../../../datafiles/BiVentricle/'+'GS0004/vtu/AT_l0j0.vtu' + + #plotTact: + plot=Plot(lL,tL,sdt,endTime,1,listEvaluationPoints) + + #ValueArray=plot.MeanTactSpace(GS,l0Path) + #print('len value array: ', len(ValueArray)) + print('Plot finished') + #tables tact + L=4 + J=4 + savePath='images/' + tabWriter = TableWriter(lL,tL,sdt,endTime,1,[SI],listEvaluationPoints) + tabWriter.writeMeanTactTable(GS,l0Path,savePath,L,J,SI,[]) if __name__=="__main__": #DurationAndProcs('IE-LI-SI-GPDE') #possible: 'all', 'SVI-ICI','IE-LI-SI','IE-LI-SI-GPDE' #comparisonOfQuadrature() @@ -1419,4 +1442,5 @@ if __name__=="__main__": #CVTableSI() #ActvationRMSError() #ActvationRMSErrorGS() - MiddledActivatationTimeTable() + #MiddledActivatationTimeTable() + EvaluationGSTab8() diff --git a/tools/evaluation/utility/latexTables.py b/tools/evaluation/utility/latexTables.py index c8d63b2f7fbbe1cc04168a667d0d425e2be34efc..2093b96b74f8ea0b9400be8635fbb61daff91e6d 100644 --- a/tools/evaluation/utility/latexTables.py +++ b/tools/evaluation/utility/latexTables.py @@ -1302,9 +1302,9 @@ class Table: block+='\\\\\n' return block - def writeRMSRefErrorTabular(self,L,J,eP,l0Path): - print('started RMSRefError') - refPath=eP+'vtu/AT_l'+str(L)+'j'+str(J)+'.vtu' + def writeRMSRefErrorTabular(self,L,J,eP,l0Path,refP): + print('started RMSRefError with ref in ', refP) + refPath=refP+'vtu/AT_l'+str(L)+'j'+str(J)+'.vtu' refPoints,atRef=read.readVTU(refPath) refDict={} for index in range(len(refPoints)): @@ -1819,7 +1819,7 @@ class TableWriter: output_file.write(self.tab.EndTabular()) output_file.write(self.tab.writeEndTable()) - def writeMeanTactTable(self,fn,l0Path,sP,L,J, vArr): + def writeMeanTactTable(self,fn,l0Path,sP,L,J,refPath, vArr): cap='The activation time $\\tact(\V)$ and the difference with respect to the reference solution on different levels in space and time for the semi-implicit (\\SISVI) scheme (the numbers are displayed in ms)' label='tab:ActiAndError' filename=fn+'tex/'+'ActivationVentricles' @@ -1834,7 +1834,7 @@ class TableWriter: output_file.write(self.tab.writeMeanTactTabular(fn,l0Path,vArr)) output_file.write('\\\\[1.9cm]\n') output_file.write('&\n') - output_file.write(self.tab.writeRMSRefErrorTabular(L,J,fn,l0Path)) + output_file.write(self.tab.writeRMSRefErrorTabular(L,J,fn,l0Path,refPath)) output_file.write(self.tab.EndTabular()) output_file.write(self.tab.writeEndTable()) diff --git a/tools/solving/StartTest.py b/tools/solving/StartTest.py new file mode 100644 index 0000000000000000000000000000000000000000..8e48201a843a0bf99cae3a91c4f27a4277f6ec5e --- /dev/null +++ b/tools/solving/StartTest.py @@ -0,0 +1,43 @@ +import sys +sys.path.append('../../') +import os + +import mpp.python.mppy as mppy + +lList = [2] +tList = [3,4,5,6,7,8] +start_dt=0.0001 + +#path ='../../datafiles/TestMpp/' +path='../../data/' +pathToMakeFolders='../'+path +#pathExperiment='' + +def startExperiment(procs,startconf,fL,aL): + for file in fL: + checkIfFolderExists(file) + mpp = mppy.Mpp(project_name='CardMech',executable='Elphy-M++',kernels=4,mute=False) + + for l in lList: + for j in tList: + for index in range(len(fL)): + file = path+fL[index]+'log_l'+str(l)+'j'+str(j)+'m1' + kwargs={"ElphyLevel": l,"DeltaTime":start_dt*2**(-j),"logfile":file} + kwargs.update(aL[index]) + mpp.run(procs, config=startconf, kwargs=kwargs) + + +def checkIfFolderExists(path): + folderPath =pathToMakeFolders+path + if not os.path.exists(folderPath): + os.makedirs(folderPath) + +if __name__=="__main__": + procs=64 + filelist =["AsymptoticTest/SI0001SAT/","AsymptoticTest/LI0001SAT/","AsymptoticTest/IE0001SAT/"] + argumentlist =[{"ElphyModel":"SemiImplicit"},{"ElphyModel":"LinearImplicit"},{"ElphyModel":"ImplictEuler"}] + startconf="TetraTest/start" + startExperiment(procs,startconf,filelist,argumentlist) + + +