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

Fix to incorrect PolyhedralPrismCurrentSource behaviour when inputted XS is in global not local coordinates #3188

Conversation

kj5248
Copy link
Contributor

@kj5248 kj5248 commented Apr 16, 2024

Linked Issues

Closes #3187

Description

When XS coords were given that were not local ie centered around (0, 0, 0) the _calculate_points function tried to transform it to global resulting in incorrect geometry.

Fix

Made a change to behaviour such that XS centroid is calculated and if it doesn't match up with origin the XS is translated so it is. This means that the length of the shape is now measured from centroid rather than the midpoint. Additionally means it isn't possible to create a prism or circuit that is displaced from the origin, so if that is desired the origin has to be displaced instead.

Checklist

I confirm that I have completed the following checks:

  • Tests run locally and pass pytest tests --reactor
  • Code quality checks run locally and pass pre-commit run --from-ref develop --to-ref HEAD
  • Documentation built locally and checked sphinx-build -W documentation/source documentation/build

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (cf5c5ec) to head (93b43c8).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3188   +/-   ##
========================================
  Coverage    80.45%   80.46%           
========================================
  Files          222      222           
  Lines        24640    24646    +6     
========================================
+ Hits         19825    19831    +6     
  Misses        4815     4815           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kj5248 kj5248 force-pushed the jmatthews/3187-irregular-behaviour-of-polyhedralprismcurrentsource-cross-section-when-used-with-tf-pictureframe-circuits branch from c7ea959 to 93b43c8 Compare April 25, 2024 07:47
Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kj5248 kj5248 marked this pull request as ready for review April 25, 2024 08:04
@kj5248 kj5248 requested a review from a team as a code owner April 25, 2024 08:04
@je-cook je-cook self-assigned this Apr 25, 2024
@je-cook je-cook added magnetostatics Tasks relating to the magnetostatics module bug Something isn't working labels Apr 25, 2024
@je-cook je-cook merged commit 3bb908d into develop Apr 25, 2024
6 of 7 checks passed
@je-cook je-cook deleted the jmatthews/3187-irregular-behaviour-of-polyhedralprismcurrentsource-cross-section-when-used-with-tf-pictureframe-circuits branch April 25, 2024 13:40
OceanNuclear pushed a commit that referenced this pull request Jun 17, 2024
… XS is in global not local coordinates (#3188)

* fix to polycurrentsource XS when not local coords

* updating of tests and adding new test

* XS fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working magnetostatics Tasks relating to the magnetostatics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Irregular behaviour of polyhedralprismcurrentsource cross section when used with TF PictureFrame circuits
2 participants