Skip to content
Permalink
Browse files

FEM: code formating, flake8

  • Loading branch information...
berndhahnebach authored and wwmayer committed Jan 4, 2019
1 parent 3f443d2 commit 2e6dac1871c1067980e735cb100caf498abf08ff
@@ -81,6 +81,7 @@ def run(self):
except IOError as e:
self.report.error("Can't access working directory.")
self.fail()
del e # get flake8 quit

def checkHandled(self, w):
handled = w.getHandledConstraints()
@@ -138,12 +138,11 @@ def eval_cell_backend(self, values, x, cell):

# TODO: python classes much slower than JIT compilation


# ***********************************
# * Sub classes due to value_shape method which is not of dynamical return type
# * Also the assignment of values is to be done by reference. Therefore it has to be
# * overloaded.
# ***********************************
# ***********************************
# * Sub classes due to value_shape method which is not of dynamical return type
# * Also the assignment of values is to be done by reference. Therefore it has to be
# * overloaded.
# ***********************************

class ScalarCellExpressionFromXDMF(fenics.Expression, CellExpressionFromXDMF):

@@ -120,10 +120,10 @@ def test_writeAbaqus_precision(self):

read_file = open(inp_file, 'r')
read_node_line = 'line was not found'
for l in read_file:
l = l.strip()
if l.startswith('2, -5'):
read_node_line = l
for ln in read_file:
ln = ln.strip()
if ln.startswith('2, -5'):
read_node_line = ln
read_file.close()

# 1234567 12345678901234567890 12345678901234567890
@@ -154,10 +154,10 @@ def compare_stats(fea, stat_file=None, loc_stat_types=None, res_obj_name=None):

def force_unix_line_ends(line_list):
new_line_list = []
for l in line_list:
if l.endswith("\r\n"):
l = l[:-2] + '\n'
new_line_list.append(l)
for ln in line_list:
if ln.endswith("\r\n"):
ln = ln[:-2] + '\n'
new_line_list.append(ln)
return new_line_list


0 comments on commit 2e6dac1

Please sign in to comment.
You can’t perform that action at this time.