Skip to content

Commit

Permalink
fix check for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Dec 17, 2024
1 parent 7a3f346 commit 55b3ec5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mpisppy/cylinders/xhatbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def xhat_prep(self):

### begin iter0 stuff
xhatter.pre_iter0()
if self.opt.extobject is not None:
if self.opt.extensions is not None:
self.opt.extobject.pre_iter0() # for an extension
self.opt._save_original_nonants()

Expand All @@ -46,7 +46,7 @@ def xhat_prep(self):
### end iter0 stuff (but note: no need for iter 0 solves in an xhatter)

xhatter.post_iter0()
if self.opt.extobject is not None:
if self.opt.extensions is not None:
self.opt.extobject.post_iter0() # for an extension

self.opt._save_nonants() # make the cache
Expand Down
6 changes: 4 additions & 2 deletions mpisppy/utils/xhat_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def __init__(
mpicomm=None,
scenario_creator_kwargs=None,
variable_probability=None,
ph_extensions=None,
extensions=None,
extension_kwargs=None,
):

super().__init__(
Expand All @@ -52,7 +53,8 @@ def __init__(
scenario_creator,
scenario_denouement=scenario_denouement,
all_nodenames=all_nodenames,
extensions=ph_extensions,
extensions=extensions,
extension_kwargs=extension_kwargs,
mpicomm=mpicomm,
scenario_creator_kwargs=scenario_creator_kwargs,
variable_probability=variable_probability,
Expand Down

0 comments on commit 55b3ec5

Please sign in to comment.