Skip to content

Commit

Permalink
run Black
Browse files Browse the repository at this point in the history
  • Loading branch information
dallan-keylogic committed Aug 3, 2023
1 parent d4619f5 commit 888c67e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions idaes/core/solvers/petsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ def petsc_dae_by_time_element(

solve_log = idaeslog.getSolveLogger("petsc-dae")
regular_vars, time_vars = flatten_dae_components(m, time, pyo.Var, active=True)
regular_cons, time_cons = flatten_dae_components(m, time, pyo.Constraint, active=True)
regular_cons, time_cons = flatten_dae_components(
m, time, pyo.Constraint, active=True
)
tdisc = find_discretization_equations(m, time)

solver_dae = pyo.SolverFactory("petsc_ts", options=ts_options)
Expand All @@ -520,7 +522,9 @@ def petsc_dae_by_time_element(

if not skip_initial:
# Nonlinear equation solver for initial conditions
initial_solver_obj = pyo.SolverFactory(initial_solver, options=initial_solver_options)
initial_solver_obj = pyo.SolverFactory(
initial_solver, options=initial_solver_options
)
# list of constraints to add to the initial condition problem
if initial_constraints is None:
initial_constraints = []
Expand All @@ -547,7 +551,11 @@ def petsc_dae_by_time_element(
# set up the scaling factor suffix
_sub_problem_scaling_suffix(m, t_block)
with idaeslog.solver_log(solve_log, idaeslog.INFO) as slc:
res = initial_solver_obj.solve(t_block, tee=slc.tee, symbolic_solver_labels=symbolic_solver_labels)
res = initial_solver_obj.solve(
t_block,
tee=slc.tee,
symbolic_solver_labels=symbolic_solver_labels,
)
res_list.append(res)

tprev = t0
Expand Down

0 comments on commit 888c67e

Please sign in to comment.