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

set colocate=False in output field monitors for backwards compatibility #1144

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

tylerflex
Copy link
Collaborator

No description provided.

if mnt.colocate:
log.warning(
"Output field monitors in the adjoint plugin require "
"explicitly setting 'colocate=False'. Setting 'False' as the default value."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think Setting 'False' as the default value. might be misleading because we're also overriding the value even if it was explicitly set to 'True'. I also feel like giving a bit more hints as in the old warning message would be nice, e.g. something like

Output field monitors in the adjoint plugin require explicitly setting 'colocate=False'. Setting 'colocate=False' in monitor {mnt.name}. Use 'SimulationData.at_boundaries' after the solver run to automatically colocate the fields to the grid boundaries, or 'MonitorData.colocate' if colocating to custom coordinates.

Just to let people know they can still do that with the adjiont data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok. updated the warning message accordingly.

@tylerflex tylerflex force-pushed the tyler/adjoint/fix/colocate_error branch from 2308390 to 09e2f9d Compare September 7, 2023 13:40
@momchil-flex momchil-flex merged commit beb576c into pre/2.4 Sep 8, 2023
16 checks passed
@momchil-flex momchil-flex deleted the tyler/adjoint/fix/colocate_error branch September 8, 2023 18:59
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.

None yet

2 participants