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

Bug in calculation of ShiftAngle (qloop) #1626

Merged
merged 2 commits into from
Mar 6, 2019
Merged

Conversation

bendudson
Copy link
Contributor

When the integral of the field line pitch (qinty, qloop) is calculated
in my_int_y, the values of the loop integral were set in all
regions. There are multiple surfaces for each xi index (PF regions,
and core) so this variable would be overwritten multiple times.

In practice it seems that the value it ended up with was the value in
the core, at least for the MAST double null g014220.00200 case I
tried. Hopefully this means that the bug didn't actually have any
effect on the resulting grids.

To try to catch bugs where qloop (->ShiftAngle) is used, the values
are set to NaN if they do not correspond to closed field-line regions.

When the integral of the field line pitch (qinty, qloop) is calculated
in `my_int_y`, the values of the loop integral were set in all
regions. There are multiple surfaces for each xi index (PF regions,
and core) so this variable would be overwritten multiple times.

In practice it seems that the value it ended up with was the value in
the core, at least for the MAST double null g014220.00200 case I
tried. Hopefully this means that the bug didn't actually have any
effect on the resulting grids.

To try to catch bugs where qloop (->ShiftAngle) is used, the values
are set to NaN if they do not correspond to closed field-line regions.
johnomotani
johnomotani previously approved these changes Mar 6, 2019
@johnomotani
Copy link
Contributor

I think we should also bump the patch_number in hypnotoad_version.pro and add a comment what the bug fixed was (or maybe just note the PR #).

@ZedThree
Copy link
Member

ZedThree commented Mar 6, 2019

Tests are failing due to the netcdf pip thing. Seeing as this only touches hypnotoad, it should be fine.

I'll get the netcdf pip fix into master now

Copy link
Contributor

@johnomotani johnomotani left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks @bendudson!

@bendudson bendudson merged commit 1a6be1f into master Mar 6, 2019
@bendudson bendudson deleted the bugfix-hypnotoad-qloop branch March 6, 2019 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants