From a535e9f4cf8b4b85878c73a3cf8ad50a78691bf3 Mon Sep 17 00:00:00 2001
From: Laura Pfeiffer <laura.pfeiffer@kit.edu>
Date: Sun, 21 Jul 2024 12:39:53 +0200
Subject: [PATCH] =?UTF-8?q?=20Index=20f=C3=BCr=20Auswertungspunkte=20an=20?=
 =?UTF-8?q?richtige=20Stelle=20geschoben?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 tools/evaluation/thesisBiventricle.py   |  8 ++++----
 tools/evaluation/thesisCoupled.py       | 21 ++++++++++++---------
 tools/evaluation/utility/latexTables.py | 22 +++++++++++-----------
 tools/evaluation/utility/plotting.py    |  3 +++
 4 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/tools/evaluation/thesisBiventricle.py b/tools/evaluation/thesisBiventricle.py
index bb6adecf6..d06ecfc43 100644
--- a/tools/evaluation/thesisBiventricle.py
+++ b/tools/evaluation/thesisBiventricle.py
@@ -216,9 +216,9 @@ def WorkPrecisonDiagram(case):
     filename='../../../thesis-lindner/thesis/images/erstmal/'+'WPMono'+case+'FigP'+str(point)
     caption=''
     if case=='tact'or case=='tactGrob':
-        caption='Aufwand-Genauigkeit-Diagramm der Aktivierungszeit $\\tact$für \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errortact$ bestimmt '
+        caption='Aufwand-Genauigkeit-Diagramm der Aktivierungszeit $\\tact$ für \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errortact$ bestimmt '
     else:
-        caption='Aufwand-Genauigkeits-Diagramm des Verlaufs der Transmembranspannung $\\V$für \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errorVact$ bestimmt '
+        caption='Aufwand-Genauigkeit-Diagramm des Verlaufs der Transmembranspannung $\\V$ für \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errorVact$ bestimmt '
     label='\\label{fig:WPMono'+case+'P'+str(point)+'}'
     with open(filename+'.tex', 'w') as output_file:
         output_file.write('\\begin{figure}[h]\n')
@@ -244,9 +244,9 @@ if __name__=="__main__":
     #WriteDurationPerTimeStepTab()
     #WorkPrecisonDiagram('')
     #WorkPrecisonDiagram('Grob')
-    #WorkPrecisonDiagram('tact')
+    WorkPrecisonDiagram('tact')
     #WorkPrecisonDiagram('tactGrob')
     #plotSchwinger()
-    plotExtraError()
+    #plotExtraError()
     #plotSchwinger()
     
diff --git a/tools/evaluation/thesisCoupled.py b/tools/evaluation/thesisCoupled.py
index 51b7fb80f..58a8de5e9 100644
--- a/tools/evaluation/thesisCoupled.py
+++ b/tools/evaluation/thesisCoupled.py
@@ -205,14 +205,17 @@ def WorkPrecisonDiagram(case):
     (nameS,minprocS)=plot.workPrecisionInSpaceExtra(fSIOC,j,fL,nL,savePath,point,ydescription,case)
     (nameT,minprocT)=plot.workPrecisionInTimeExtra(fSIOC,l,fL,nL,savePath,point,ydescription,case,minprocS)
     print(minprocS,minprocT)
-    filename='../../../thesis-lindner/thesis/images/erstmal/'+'WPCoupledFigP'+str(point)
-    caption='Aufwand-Genauigkeit-Diagramm für \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errorVact$ bestimmt. '
-    label='\\label{fig:WPCoupledP'+str(point)+'}'
+    filename='../../../thesis-lindner/thesis/images/erstmal/'+'WPCoupled'+case+'FigP'+str(point)
+    if case=='tact'or case=='tactGrob':
+        caption='Aufwand-Genauigkeit-Diagramm der Aktivierungszeit $\\tact$ des \\emm~berechnet mit \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errortact$ bestimmt '
+    else:
+        caption='Aufwand-Genauigkeit-Diagramm des Verlaufs der Transmembranspannung $\\V$ des \\emm~berechnet mit \\SISVI, \\SIOC~und \GPDE~mit festem Zeitlevel $j='+str(j)+'$ (links) und festem Ortslevel $\ell='+str(l)+'$ (rechts). Der Aufwand wird anhand der auf $\\#$procs$='+str(minprocS)+'$ (links) und $\\#$procs$='+str(minprocT)+'$ (rechts) skalierten Rechenzeiten und die Genauigkeit wird durch den Fehler $\\errorVact$ bestimmt '
+    label='\\label{fig:WPCoupled'+case+'P'+str(point)+'}'
     with open(filename+'.tex', 'w') as output_file:
         output_file.write('\\begin{figure}[h]\n')
         output_file.write('\\centering\n')
-        output_file.write('\\resizebox{8cm}{!}{\\input{'+sP+nameS+'}}\n')
-        output_file.write('\\resizebox{8cm}{!}{\\input{'+sP+nameT+'}}\n')
+        output_file.write('\\resizebox{7.5cm}{!}{\\input{'+sP+nameS+'}}\n')
+        output_file.write('\\resizebox{7.5cm}{!}{\\input{'+sP+nameT+'}}\n')
         output_file.write('\\caption{'+caption+'.}\n')
         output_file.write(label+'\n')
         output_file.write('\\end{figure}\n')    
@@ -379,7 +382,7 @@ if __name__=="__main__":
     #DifferencePerPointTabs(diffcase)
     #tactValuesAndErrorPerPoint()
     #plotTactErrorPerPoint()
-    
+    WorkPrecisonDiagram('tact')
     #################
     #V
     #################
@@ -387,15 +390,15 @@ if __name__=="__main__":
     diffcase='VDiffInt'
     #DifferencePerPointTabs(diffcase)
     #ErrorExtraVInt('')
-    plotExtraError()
+    #plotExtraError()
     #plotSchwinger()
-    #WorkPrecisonDiagram('')
+    WorkPrecisonDiagram('')
     
     #####################
     #Ca
     #####################
     case='Ca'
-    plotCa()
+    #plotCa()
     #ErrorExtra(case)
     #ErrorExtraVInt(case)
     diffcase='Ca'
diff --git a/tools/evaluation/utility/latexTables.py b/tools/evaluation/utility/latexTables.py
index c341f1329..6d9387d44 100644
--- a/tools/evaluation/utility/latexTables.py
+++ b/tools/evaluation/utility/latexTables.py
@@ -626,11 +626,11 @@ class Table:
         if case=='tact':
             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\tact^{j,\\ell,'+str(p)+'}-\\tact^{j,\\ell-1,'+str(p)+'}$}'
         elif case=='VInt':
-            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell}_'+str(p)+'}_\\LtwonormAct-\\norm{\\V^{j,\\ell-1}_'+str(p)+'}_\\LtwonormAct$}'
+            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell,'+str(p)+'}'+'}_\\LtwonormAct-\\norm{\\V^{j,\\ell-1,'+str(p)+'}'+'}_\\LtwonormAct$}'
         elif case =='VDiffInt':
-             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell}_'+str(p)+'-'+'\\V^{j,\\ell-1}_'+str(p)+'}_\\LtwonormAct$}'
+             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell,'+str(p)+'}'+'-'+'\\V^{j,\\ell-1,'+str(p)+'}'+'}_\\LtwonormAct$}'
         elif case =='Ca':
-            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\Ca^{j,\\ell}_'+str(p)+'-'+'\\Ca^{j,\\ell-1}_'+str(p)+'}_\\LtwonormT$}'
+            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\Ca^{j,\\ell,'+str(p)+'}'+'-'+'\\Ca^{j,\\ell-1,'+str(p)+'}'+'}_\\LtwonormT$}'
         elif case =='Gamma':
             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\gf^{j,\\ell}'+'-'+'\\gf^{j,\\ell-1}'+'}_\\LtwonormT$}'
         elif case=='LV':
@@ -701,11 +701,11 @@ class Table:
         if case=='tact':
             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\tact^{j,\\ell,'+str(p)+'}-\\tact^{j-1,\\ell,'+str(p)+'}$}'
         elif case=='VInt':
-            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell}_'+str(p)+'}_\\LtwonormAct-\\norm{\\V^{j-1,\\ell}_'+str(p)+'}_\\LtwonormAct$}'
+            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell,'+str(p)+'}'+'}_\\LtwonormAct-\\norm{\\V^{j-1,\\ell,'+str(p)+'}'+'}_\\LtwonormAct$}'
         elif case =='VDiffInt':
-             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell}_'+str(p)+'-'+'\\V^{j-1,\\ell}_'+str(p)+'}_\\LtwonormAct$}'
+             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell,'+str(p)+'}'+'-'+'\\V^{j-1,\\ell,'+str(p)+'}'+'}_\\LtwonormAct$}'
         elif case =='Ca':
-            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\Ca^{j,\\ell}_'+str(p)+'-'+'\\Ca^{j-1,\\ell}_'+str(p)+'}_\\LtwonormT$}'
+            block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\Ca^{j,\\ell,'+str(p)+'}'+'-'+'\\Ca^{j-1,\\ell,'+str(p)+'}'+'}_\\LtwonormT$}'
         elif case =='LV':
             block+='&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\LV^{j,\\ell}'+'-'+'\\LV^{j-1,\\ell}'+'}_\\LtwonormT$}'
         elif case =='RV':
@@ -885,7 +885,7 @@ class Table:
         block+='\\toprule\n'
         (t,Ref)=read.getDataFromTXT(self.path,read.createFilename(L,J,self.m),p)
         normRef=comp.L2(Ref,self.sdt,self.T,J,False)
-        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell}_'+str(p)+'-\\V_{'+refname+','+str(p)+'}^{\\Ref}}_\\LtwonormT$}'
+        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\norm{\\V^{j,\\ell,'+str(p)+'}'+'-\\V_{'+refname+','+str(p)+'}^{\\Ref}}_\\LtwonormT$}'
         block+='&\\multicolumn{'+str(len(fL))+'}{c}{Rechenzeit}&'
         block+='\\\\\n'
         block+='\\addlinespace\n'
@@ -2528,7 +2528,7 @@ class Table:
         block = ''
         length=2*len(fL)+3
         block+=self.BeginDifferenceTable(length,'c')
-        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\min(\\V^{j,\ell}_'+str(p)+')$}'+'& &\\multicolumn{'+str(len(fL))+'}{c}{$\\max(\\V^{j,\ell}_'+str(p)+')$}'
+        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\min(\\V^{j,\ell,'+str(p)+'}'+')$}'+'& &\\multicolumn{'+str(len(fL))+'}{c}{$\\max(\\V^{j,\ell,'+str(p)+'}'+')$}'
         block+='\\\\\n'
         block+='\\addlinespace\n'
         block+='\cmidrule(lr){3-'+str(len(fL)+2)+'}\n'
@@ -2582,7 +2582,7 @@ class Table:
         block = ''
         length=len(fL)+2
         block+=self.BeginDifferenceTable(length,'c')
-        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\min(\\V^{j,\ell}_'+str(p)+')$}'
+        block+='\\multicolumn{2}{c}{}'+'&\\multicolumn{'+str(len(fL))+'}{c}{$\\min(\\V^{j,\ell,'+str(p)+'}'+')$}'
         block+='\\\\\n'
         block+='\\addlinespace\n'
         block+='\cmidrule(l){3-'+str(len(fL)+2)+'}\n'
@@ -3213,7 +3213,7 @@ class TableWriter:
             output_file.write(self.tab.writeEndTable())
     def writeSchwingerPerPoint(self,fL,nL,savePath,threshold):
         for p in self.evalP:
-             cap='Minimum und Maximum der Transmembranspannung einer Näherungslösung $\\V^{j,\\ell}_'+str(p)+'$ auf dem biventrikulären Gebiet mit der vereinfachten Anregung für verschiedene Zeitdiskretisierungsverfahren'
+             cap='Minimum und Maximum der Transmembranspannung einer Näherungslösung $\\V^{j,\\ell,'+str(p)+'}'+'$ auf dem biventrikulären Gebiet mit der vereinfachten Anregung für verschiedene Zeitdiskretisierungsverfahren'
              label='tab:SchwingerP'+str(p)
              filename=savePath+'SchwingerP'+str(p)
              with open(filename+'.tex', 'w') as output_file:
@@ -3224,7 +3224,7 @@ class TableWriter:
                  
     def writeUnterschwingerPerPoint(self,fL,nL,savePath,threshold):
         for p in self.evalP:
-             cap='Minimum der Transmembranspannung einer Näherungslösung $\\V^{j,\\ell}_'+str(p)+'$ auf dem biventrikulären Gebiet mit der vereinfachten Anregung für verschiedene Zeitdiskretisierungsverfahren'
+             cap='Minimum der Transmembranspannung einer Näherungslösung $\\V^{j,\\ell,'+str(p)+'}'+'$ auf dem biventrikulären Gebiet mit der vereinfachten Anregung für verschiedene Zeitdiskretisierungsverfahren'
              label='tab:UnterschwingerP'+str(p)
              filename=savePath+'UnterschwingerP'+str(p)
              with open(filename+'.tex', 'w') as output_file:
diff --git a/tools/evaluation/utility/plotting.py b/tools/evaluation/utility/plotting.py
index 13b4a20d7..0a163b4ce 100644
--- a/tools/evaluation/utility/plotting.py
+++ b/tools/evaluation/utility/plotting.py
@@ -966,11 +966,14 @@ class Plot:
                     errorL.append(value)
                     
                     (procs,dur)=read.getProcsAndDur(fL[index],l,j,self.m)
+                    #if index==2:
+                        #print(dur,int(procs),l,j,fL[index])
                     procs=int(procs)
                     procsL.append(procs)
                     if procs<minproc:
                         minproc=procs
                     durL.append(self.stringToTime(dur[:-3],timeunit))
+                    
             errorA.append(errorL)
             durA.append(durL)
             procA.append(procsL)
-- 
GitLab