From 2dd8a353bb6f15228565e5576688505a539cce7b Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 19 Aug 2011 10:03:42 +0000 Subject: [PATCH] now also works for single stepped loadcases, too --- processing/post/spectral_iterationCount | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/processing/post/spectral_iterationCount b/processing/post/spectral_iterationCount index f79bd38ae..00c7b5c24 100755 --- a/processing/post/spectral_iterationCount +++ b/processing/post/spectral_iterationCount @@ -57,6 +57,7 @@ else: for file in files: print file['name'] inc = 1 + loadcase = 1 step = 1 iter = 0 @@ -79,10 +80,11 @@ for file in files: items = line.split() if len(items) > 7 and items[0] == 'Loadcase': # 'magic' line? - if int(items[5]) == step: + if int(items[5]) == step and int(items[2]) == loadcase: iter += 1 # next iteration found else: output += '\t'.join(map(str,[inc,iter])) + '\n' + loadcase = int(items[2]) # store current loadcase count step = int(items[5]) # store current step count inc += 1 # is next inc iter = 1 # was first iteration of next step/inc