Skip to content

Commit

Permalink
Merge pull request #155 from robclewley/fix_pp_for_vfinsert
Browse files Browse the repository at this point in the history
Fixing phaseplane re-generation of model to include any code inserts
  • Loading branch information
robclewley authored Aug 1, 2020
2 parents 2c8bd97 + cfd5756 commit 45fc2f1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PyDSTool/Toolbox/phaseplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,14 @@ def yfprime_y(y, x, t):
sysargs_y['inputs'] = gen.inputs.copy()
sysargs_y.pars.update(gen.pars)
sysargs_y.pars.update(filteredDict(vardict, [xname, yname], neg=True))
for extra_par in ['codeinsert_start', 'codeinsert_end', 'ignorespecial']:
if extra_par in gen.funcspec._initargs:
# input param uses 'vfcodeinsert_start' etc.
if extra_par.startswith('code'):
key = 'vf'+extra_par
else:
key = extra_par
sysargs_y[key] = gen.funcspec._initargs[extra_par]
varspecs = {yname: gen.funcspec._initargs['varspecs'][yname]}
if 'fnspecs' in gen.funcspec._initargs:
old_fnspecs = gen.funcspec._initargs['fnspecs']
Expand Down Expand Up @@ -1121,6 +1129,14 @@ def yfprime_y(y, x, t):
sysargs_x['inputs'] = gen.inputs.copy()
sysargs_x.pars.update(gen.pars)
sysargs_x.pars.update(filteredDict(vardict, [xname, yname], neg=True))
for extra_par in ['codeinsert_start', 'codeinsert_end', 'ignorespecial']:
if extra_par in gen.funcspec._initargs:
# input param uses 'vfcodeinsert_start' etc.
if extra_par.startswith('code'):
key = 'vf'+extra_par
else:
key = extra_par
sysargs_x[key] = gen.funcspec._initargs[extra_par]
varspecs = {xname: gen.funcspec._initargs['varspecs'][xname]}
if 'fnspecs' in gen.funcspec._initargs:
old_fnspecs = gen.funcspec._initargs['fnspecs']
Expand Down Expand Up @@ -1165,6 +1181,7 @@ def yfprime_y(y, x, t):
PCargs.MaxCorrIters = 8
#PCargs.verbosity = 100
P_x.newCurve(PCargs)

done = False
num_points = 0
in_subdom = x_init in xinterval and y_init in yinterval
Expand Down

0 comments on commit 45fc2f1

Please sign in to comment.