-
Notifications
You must be signed in to change notification settings - Fork 0
/
getData.py
executable file
·51 lines (41 loc) · 1.73 KB
/
getData.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import sys
if sys.version_info < (3, 5):
raise "must use python 3.5 or greater"
import numpy as np
import matplotlib.pyplot as pl
def getName(foldername, casename, numthreads, maxproc):
name="data/"+foldername
name+=casename+"_threads_"+str(numthreads)
return name
def getTotalTime(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res = np.load(name+"_totaltime.npy")
return res
def getNewtonIterations(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_newtoniterations.npy")
return res
def getLinearIterations(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_lineariterations.npy")
return res
def getAssemblyTime(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_assemblytime.npy")
return res
def getLinearSolveTime(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_linearsolvetime.npy")
return res
def getNumOwnedCells(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_numOwnedCells.npy")
return res
def getNumOverlapCells(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_numOverlapCells.npy")
return res
def getNumTotalCells(foldername, casename, numthreads, maxproc):
name=getName(foldername, casename, numthreads, maxproc)
res=np.load(name+"_numTotalCells.npy")
return res