geom_fromAng.py crashed when found empty line (eg. at the end of the file), now fixed
This commit is contained in:
parent
a1956436be
commit
92a67e1a9d
|
@ -317,7 +317,6 @@ class MPIEspectral_result: # mimic py_post result object
|
||||||
|
|
||||||
return [elemental_scalar(node,value) for node in self.element(e).items]
|
return [elemental_scalar(node,value) for node in self.element(e).items]
|
||||||
|
|
||||||
|
|
||||||
def element_scalar_label(elem,idx):
|
def element_scalar_label(elem,idx):
|
||||||
return 'User Defined Variable %i'%(idx+1)
|
return 'User Defined Variable %i'%(idx+1)
|
||||||
|
|
||||||
|
@ -566,7 +565,6 @@ def ParsePostfile(p,filename, outputFormat):
|
||||||
# needs "outputFormat" for mapping of output names to postfile output indices
|
# needs "outputFormat" for mapping of output names to postfile output indices
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|
||||||
|
|
||||||
# --- build statistics
|
# --- build statistics
|
||||||
|
|
||||||
stat = { \
|
stat = { \
|
||||||
|
|
|
@ -85,6 +85,7 @@ for file in files:
|
||||||
point = 0
|
point = 0
|
||||||
for line in file['input']:
|
for line in file['input']:
|
||||||
words = line.split()
|
words = line.split()
|
||||||
|
if len(words) == 0: continue # ignore empty lines
|
||||||
if words[0] == '#': # process initial comments block
|
if words[0] == '#': # process initial comments block
|
||||||
if len(words) > 2:
|
if len(words) > 2:
|
||||||
if words[2].lower() == 'hexgrid':
|
if words[2].lower() == 'hexgrid':
|
||||||
|
|
Loading…
Reference in New Issue