Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename_inames: replace old inames that appear as params in other domains #727

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

isuruf
Copy link
Collaborator

@isuruf isuruf commented Jan 10, 2023

Fixes #726

@isuruf isuruf force-pushed the rename_inames branch 3 times, most recently from 31a21ac to 19dc291 Compare January 12, 2023 05:39
Comment on lines +2409 to +2416
new_domains = []
for dom in kernel.domains:
for old_iname in orig_old_inames:
d = dom.get_var_dict()
if old_iname in d and new_iname not in d:
var_type, var_num = d[old_iname]
dom = dom.set_dim_name(var_type, var_num, new_iname)
new_domains.append(dom)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it stands, this is not quite correct. The old iname may survive, and it may remain in use (if within is given). In that case, I suggest we raise an (not-implemented) error if the iname occurs as a parameter to another domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rename_inames does not map domains
2 participants