Skip to content

Commit

Permalink
energy plot function now correctly handles energy values in first lin…
Browse files Browse the repository at this point in the history
…e of RUR file
  • Loading branch information
Daniel Ruprecht committed Sep 21, 2015
1 parent 7fcd7f8 commit bf04275
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plot_parareal_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def extract_energy(line):

fs = 8
Nsamples = 50
Nsamples = 1
#Nsamples = 1

#Nprocs = numpy.array([2, 4, 6, 8, 12, 24])
Nprocs = numpy.array([24])
Expand Down Expand Up @@ -52,7 +52,10 @@ def extract_energy(line):
f = open(filename,'r')
line1 = f.readline()
line2 = f.readline()
energy[tt,ii,jj] = extract_energy(line2)
if "energy_used" in line1:
energy[tt,ii,jj] = extract_energy(line1)
elif "energy_used" in line2:
energy[tt,ii,jj] = extract_energy(line2)
f.close()
# Compute averages
for jj in range(0,Nsamples):
Expand Down

0 comments on commit bf04275

Please sign in to comment.