Skip to content

Commit

Permalink
autopep8 formatting of Nutils scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Sep 5, 2023
1 parent 0fbb73f commit f67ae5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions partitioned-heat-conduction-direct/nutils/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ def main(side='Dirichlet', n=10, degree=1, timestep=.1, alpha=3., beta=1.3):
write_sample = domain.locate(ns.x, coords, eps=1e-10, tol=1e-10)

precice_write = functools.partial(participant.write_data, mesh_name_write,
"Heat-Flux" if side == "Dirichlet" else "Temperature", vertex_ids_write)
"Heat-Flux" if side == "Dirichlet" else "Temperature", vertex_ids_write)
precice_read = functools.partial(participant.read_data, mesh_name_read,
"Temperature" if side == "Dirichlet" else "Heat-Flux", vertex_ids_read)


"Temperature" if side == "Dirichlet" else "Heat-Flux", vertex_ids_read)

# helper functions to project heat flux to coupling boundary
if side == 'Dirichlet':
Expand Down
4 changes: 2 additions & 2 deletions perpendicular-flap/fluid-nutils/fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def main(inflow: 'inflow velocity' = 10,
# write forces to participant
F = solver.solve_linear('F', resF, constrain=consF,
arguments=dict(lhs00=lhs00, lhs0=lhs0, lhs=lhs1, dt=dt, meshdofs=meshdofs,
oldmeshdofs=oldmeshdofs, oldoldmeshdofs=oldoldmeshdofs,
oldoldoldmeshdofs=oldoldoldmeshdofs))
oldmeshdofs=oldmeshdofs, oldoldmeshdofs=oldoldmeshdofs,
oldoldoldmeshdofs=oldoldoldmeshdofs))
# writedata = couplingsample.eval(ns.F, F=F) # for stresses
writedata = couplingsample.eval('F_i d:x' @ ns, F=F, meshdofs=meshdofs) * \
numpy.concatenate([p.weights for p in couplingsample.points])[:, numpy.newaxis]
Expand Down

0 comments on commit f67ae5a

Please sign in to comment.