Commit e86cd6e9 authored by Patrick Buchfink's avatar Patrick Buchfink Committed by Stephan Rave
Browse files

Update src/pymor/models/symplectic.py



Cleverer query for specifying nt or time_stepper
Co-authored-by: default avatarStephan Rave <stephanrave@uni-muenster.de>
parent 0eb48408
......@@ -77,11 +77,8 @@ class QuadraticHamiltonianModel(InstationaryModel):
and H_op.range.dim % 2 == 0
# interface to use ImplicitMidpointTimeStepper via parameter nt
if time_stepper is None:
if nt is not None:
time_stepper = ImplicitMidpointTimeStepper(nt)
else:
raise NotImplementedError('Either specify time_stepper or nt')
if (time_stepper is None) != (nt is None):
raise ValueError('Either specify time_stepper or nt (not both)')
if isinstance(H_op.range, NumpyVectorSpace):
# make H_op compatible with blocked phase_space
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment