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

Add functionality for uneven endcaps polyhedral current source #3153

Conversation

kj5248
Copy link
Contributor

@kj5248 kj5248 commented Apr 4, 2024

Description

Adding functionality to allow for ArbitraryPlanarPolyhedralXSCircuit to work when PolyhedralPrismCurrentSource has non equal end cap angles. Ideally a way to do it such that it is obvious when done and has to be intentional. Likely add a warning when used for this effect and to point out that there is reduction in accuracy of result when doing this. For use in STEP bluemira so can have TF coils with non-rectangular cross sections.

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
Contributor

github-actions bot commented Apr 8, 2024

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (6)

On runtest

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/expr.py:275: DeprecationWarning: Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:23: DeprecationWarning: Use of elements created by UFL is deprecated. You should create elements directly using Basix.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.14.3 when it was built against 1.14.2, this may cause problems
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/basix/ufl.py:1909: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:26: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead

On collect

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/ufl_type.py:56: DeprecationWarning: attach_operators_from_hash_data deprecated, please use UFLObject instead.

Copy link

codecov bot commented Apr 9, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 80.49%. Comparing base (3bb908d) to head (a327055).

Files Patch % Lines
bluemira/magnetostatics/polyhedral_prism.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3153      +/-   ##
===========================================
+ Coverage    80.46%   80.49%   +0.03%     
===========================================
  Files          222      222              
  Lines        24644    24661      +17     
===========================================
+ Hits         19829    19851      +22     
+ Misses        4815     4810       -5     

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

@kj5248 kj5248 force-pushed the jmatthews/add-functionality-for-uneven-endcaps-polyhedral-current-source branch from f850710 to e3b4e65 Compare April 25, 2024 07:46
@kj5248 kj5248 force-pushed the jmatthews/add-functionality-for-uneven-endcaps-polyhedral-current-source branch from e3b4e65 to c6ad8c6 Compare April 25, 2024 14:28
Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
3 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 15:13
@kj5248 kj5248 requested a review from a team as a code owner April 25, 2024 15:13
@je-cook je-cook added this to the Version 2.0.0 milestone May 9, 2024
@je-cook je-cook self-assigned this May 9, 2024
Copy link
Contributor

@je-cook je-cook left a comment

Choose a reason for hiding this comment

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

Happy for now hopefully in future we can get rid of these qualifiers

@je-cook je-cook merged commit 121684b into develop May 9, 2024
7 checks passed
@je-cook je-cook deleted the jmatthews/add-functionality-for-uneven-endcaps-polyhedral-current-source branch May 9, 2024 14:43
@je-cook je-cook added the magnetostatics Tasks relating to the magnetostatics module label May 9, 2024
OceanNuclear pushed a commit that referenced this pull request Jun 17, 2024
* initial changes, needs refinement

* added singular warning when using circuits

* small fix of var name

* fix to attribute error

* comment out section

* change to warning calling method

* made bool inputs optional for polyhedralprismcurrentsource

* added and changed tests that involve polyhedralprismcurrentsource end cap angles

* discretize to discretise fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
magnetostatics Tasks relating to the magnetostatics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants