Skip to content

Commit cd7aed5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8c014b1 commit cd7aed5

File tree

19 files changed

+6
-51
lines changed

19 files changed

+6
-51
lines changed

examples/backward_facing_step_2d/postprocessor_2d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ def sort_nicely(my_list):
6666

6767
###################################################################
6868

69+
6970
# Reattachment length:
7071
def reattachment_length(filelist):
71-
7272
print("Calculating reattachment point locations using change of x-velocity sign\n")
7373

7474
results = []
@@ -140,9 +140,9 @@ def reattachment_length(filelist):
140140

141141
#########################################################################
142142

143+
143144
# Velocity profiles:
144145
def meanvelo(file, x, y):
145-
146146
print("\nRunning velocity profile script on files at times...\n")
147147

148148
# create array of points. Correct for origin not at step.

examples/backward_facing_step_3d/extract_data.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def restresseslemoin(off):
8383

8484

8585
def velocityprofileslemoin():
86-
8786
Le = open(str(mydir) + "/Le-profiles/Le-profile1-U-x4.dat").readlines()
8887
Le_u4 = [float(line.split()[0]) for line in Le]
8988
Le_y4 = [float(line.split()[1]) for line in Le]
@@ -130,7 +129,6 @@ def velocityprofileslemoin():
130129

131130

132131
def ercoftacvelocityprofiles():
133-
134132
y4 = []
135133
U4 = []
136134
y6 = []
@@ -168,7 +166,6 @@ def ercoftacvelocityprofiles():
168166

169167

170168
def ercoftacrestressprofiles():
171-
172169
datafile = open(str(mydir) + "/Ercoftac-test31-BFS/BFS-SEM-ERCOFTAC181-table.dat")
173170
print("reading in data from file: BFS-SEM-ERCOFTAC181-table.dat")
174171
# ignore header line
@@ -191,7 +188,6 @@ def ercoftacrestressprofiles():
191188

192189

193190
def panjwaniprofiles(variable):
194-
195191
off = 0.05 if variable == "uu" else 0.0
196192
inv = -1.0 if variable == "uv" else 1.0
197193
# get data from relevant files

examples/backward_facing_step_3d/postprocessor_3d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def sort_nicely(my_list):
6969

7070
###################################################################
7171

72+
7273
# Reattachment length:
7374
def reatt_length(filelist, zarray):
7475
print("Calculating reattachment point locations using change of x-velocity sign\n")
@@ -155,6 +156,7 @@ def reatt_length(filelist, zarray):
155156

156157
#########################################################################
157158

159+
158160
# Velocity profiles:
159161
def velo(filelist, xarray, zarray, yarray):
160162
print("\nRunning mean velocity profile script on files at times...\n")

examples/lock_exchange/plot_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def Froudenumber(flmlname):
182182

183183

184184
def mixing(flmlname):
185-
186185
print("\n********** Calculating the mixing diagnostics\n")
187186
# warn user about assumptions
188187
print(

python/elementtree/ElementPath.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class xpath_descendant_or_self:
6262

6363

6464
class Path:
65-
6665
##
6766
# Create an Path instance from an XPath expression.
6867

python/fluidity_ufl/ufl_fortran.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def __init__(self, integral, dim="dim"):
4040
self.map_sum_indices()
4141

4242
def fortran(self):
43-
4443
dim_indices = ["dim" + str(i) + "_i" for i in range(self.integral.rank)]
4544

4645
name, declaration, lhs = self.function_spec(dim_indices)
@@ -149,7 +148,6 @@ def iterfunctions(self):
149148
yield self.integral.trial
150149

151150
def function_spec(self, dim_indices):
152-
153151
name = "integral"
154152
declaration = "real, dimension("
155153
lhs_args = dim_indices + ["test_i"]
@@ -160,11 +158,9 @@ def function_spec(self, dim_indices):
160158
for i in f.indices:
161159
# Slices are free indices.
162160
if isinstance(i, slice):
163-
164161
declaration = declaration + str(self.dim) + ", "
165162

166163
else:
167-
168164
name = name + "_i" + str(self.sum_index_map[i.id])
169165

170166
name = name + "_" + self.integral.measure.name
@@ -201,7 +197,6 @@ def set_arguments(self):
201197
self.actual_arguments = []
202198

203199
for f in self.iterfunctions():
204-
205200
args = function_to_arguments(f)
206201
self.dummy_arguments.append(args[0])
207202
self.actual_arguments.append(args[1])
@@ -238,12 +233,10 @@ def function_to_arguments(function):
238233

239234

240235
def indent(code):
241-
242236
return [" " + line for line in code]
243237

244238

245239
def do_loop(var, size, body):
246-
247240
code = ["do " + var + " = 1, " + str(size)] + indent(body) + ["end do"]
248241

249242
return code

tests/biology_conservation/values_per_node.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
def values_per_node(file):
5-
65
u = vtktools.vtu(file)
76
zoo = u.GetScalarField("Zooplankton")
87
phyto = u.GetScalarField("Phytoplankton")

tests/netcdf_read_errors/createnetcdf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def create(
1616
incorrectdimension=False,
1717
incorrectvariable=False,
1818
):
19-
2019
if missingdata:
2120
filename = "missingdata.nc"
2221
description = ", with missing data."

tests/turbine_flux_dg_2d/mesh/scripts/triangle.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ def pnode(fnode):
137137
nbnodes = 0
138138

139139
for line in fnode:
140-
141140
if line[0] == "#":
142141
continue
143142
else:
@@ -220,7 +219,6 @@ def peles(fele):
220219
count = 0
221220
nbeles = 0
222221
for line in fele:
223-
224222
if line[0] == "#":
225223
continue
226224
else:

tests/turbine_flux_dg_2plus1/mesh/scripts/triangle.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ def pnode(fnode):
137137
nbnodes = 0
138138

139139
for line in fnode:
140-
141140
if line[0] == "#":
142141
continue
143142
else:
@@ -220,7 +219,6 @@ def peles(fele):
220219
count = 0
221220
nbeles = 0
222221
for line in fele:
223-
224222
if line[0] == "#":
225223
continue
226224
else:

0 commit comments

Comments
 (0)