fiqus 2025.2.0__py3-none-any.whl → 2025.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. fiqus/MainFiQuS.py +24 -28
  2. fiqus/data/DataConductor.py +350 -301
  3. fiqus/data/DataFiQuS.py +42 -115
  4. fiqus/data/DataFiQuSCCT.py +150 -150
  5. fiqus/data/DataFiQuSConductor.py +97 -84
  6. fiqus/data/DataFiQuSConductorAC_Strand.py +701 -565
  7. fiqus/data/DataModelCommon.py +439 -0
  8. fiqus/data/DataMultipole.py +0 -13
  9. fiqus/data/DataRoxieParser.py +7 -0
  10. fiqus/data/DataWindingsCCT.py +37 -37
  11. fiqus/data/RegionsModelFiQuS.py +61 -104
  12. fiqus/geom_generators/GeometryCCT.py +904 -905
  13. fiqus/geom_generators/GeometryConductorAC_Strand.py +1863 -1391
  14. fiqus/geom_generators/GeometryMultipole.py +5 -4
  15. fiqus/geom_generators/GeometryPancake3D.py +1 -1
  16. fiqus/getdp_runners/RunGetdpCCT.py +13 -4
  17. fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +341 -201
  18. fiqus/getdp_runners/RunGetdpPancake3D.py +2 -2
  19. fiqus/mains/MainConductorAC_Strand.py +141 -133
  20. fiqus/mains/MainMultipole.py +6 -5
  21. fiqus/mains/MainPancake3D.py +3 -4
  22. fiqus/mesh_generators/MeshCCT.py +209 -209
  23. fiqus/mesh_generators/MeshConductorAC_Strand.py +709 -656
  24. fiqus/mesh_generators/MeshMultipole.py +43 -46
  25. fiqus/parsers/ParserDAT.py +16 -16
  26. fiqus/parsers/ParserGetDPOnSection.py +212 -212
  27. fiqus/parsers/ParserGetDPTimeTable.py +134 -134
  28. fiqus/parsers/ParserMSH.py +53 -53
  29. fiqus/parsers/ParserPOS.py +214 -214
  30. fiqus/parsers/ParserRES.py +142 -142
  31. fiqus/plotters/PlotPythonCCT.py +133 -133
  32. fiqus/plotters/PlotPythonConductorAC.py +1079 -855
  33. fiqus/plotters/PlotPythonMultipole.py +18 -18
  34. fiqus/post_processors/PostProcessCCT.py +444 -440
  35. fiqus/post_processors/PostProcessConductorAC.py +997 -49
  36. fiqus/post_processors/PostProcessMultipole.py +19 -19
  37. fiqus/pre_processors/PreProcessCCT.py +175 -175
  38. fiqus/pro_material_functions/ironBHcurves.pro +246 -246
  39. fiqus/pro_templates/combined/CCT_template.pro +275 -274
  40. fiqus/pro_templates/combined/ConductorAC_template.pro +1474 -1025
  41. fiqus/pro_templates/combined/Multipole_template.pro +5 -5
  42. fiqus/utils/Utils.py +12 -7
  43. {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/METADATA +65 -63
  44. fiqus-2025.11.0.dist-info/RECORD +86 -0
  45. {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/WHEEL +1 -1
  46. tests/test_geometry_generators.py +4 -0
  47. tests/test_mesh_generators.py +5 -0
  48. tests/test_solvers.py +41 -4
  49. tests/utils/fiqus_test_classes.py +15 -6
  50. tests/utils/generate_reference_files_ConductorAC.py +57 -57
  51. tests/utils/helpers.py +97 -97
  52. fiqus-2025.2.0.dist-info/RECORD +0 -85
  53. {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/LICENSE.txt +0 -0
  54. {fiqus-2025.2.0.dist-info → fiqus-2025.11.0.dist-info}/top_level.txt +0 -0
@@ -214,7 +214,7 @@ Group {
214
214
  {% endif %}
215
215
 
216
216
  {% if dm.magnet.geometry.electromagnetics.with_iron_yoke %}
217
- {% for name, number in zip(rm_EM.iron.vol.names, rm_EM.iron.vol.numbers) %}
217
+ {% for name, number in zip(rm_EM.iron_yoke.vol.names, rm_EM.iron_yoke.vol.numbers) %}
218
218
  <<name>> = Region[ <<number>> ];
219
219
  {% endfor %}
220
220
  {% endif %}
@@ -231,7 +231,7 @@ Group {
231
231
  {% if rm_EM.powered['r2_a2'].vol.names %}, <<rm_EM.powered['r2_a2'].vol.names|join(', ')>>{% endif %}} ];
232
232
 
233
233
  {% if dm.magnet.geometry.electromagnetics.with_iron_yoke %}
234
- <<nc.omega>><<nc.iron>>_EM = Region[ {<<rm_EM.iron.vol.names|join(', ')>>} ];
234
+ <<nc.omega>><<nc.iron>>_EM = Region[ {<<rm_EM.iron_yoke.vol.names|join(', ')>>} ];
235
235
  {% endif %}
236
236
 
237
237
  {% if dm.magnet.geometry.electromagnetics.with_wedges %}
@@ -317,7 +317,7 @@ Group {
317
317
  {% endif %}
318
318
 
319
319
  {% if dm.magnet.geometry.thermal.with_iron_yoke %}
320
- {% for name, number in zip(rm_TH.iron.vol.names, rm_TH.iron.vol.numbers) %}
320
+ {% for name, number in zip(rm_TH.iron_yoke.vol.names, rm_TH.iron_yoke.vol.numbers) %}
321
321
  <<name>> = Region[ <<number>> ];
322
322
  {% endfor %}
323
323
  {% endif %}
@@ -340,7 +340,7 @@ Group {
340
340
  {% endfor %}
341
341
  <<nc.omega>><<nc.powered>>_TH = Region[ {<<nc.omega>><<nc.powered>>_<<dm.conductors.keys()|join('_TH, ' + nc.omega + nc.powered + '_')>>_TH} ];
342
342
  {% if dm.magnet.geometry.thermal.with_iron_yoke %}
343
- <<nc.omega>><<nc.iron>>_TH = Region[ {<<rm_TH.iron.vol.names|join(', ')>>} ];
343
+ <<nc.omega>><<nc.iron>>_TH = Region[ {<<rm_TH.iron_yoke.vol.names|join(', ')>>} ];
344
344
  {% endif %}
345
345
  {% if dm.magnet.geometry.thermal.with_wedges %}
346
346
  <<nc.omega>><<nc.induced>>_TH = Region[ {
@@ -491,7 +491,7 @@ Function {
491
491
  nu [ Region[{<<rm_EM.air.vol.name>>, <<nc.omega>><<nc.powered>>_EM, <<rm_EM.air_far_field.vol.names[0]>>{% if dm.magnet.geometry.electromagnetics.with_wedges %}, <<nc.omega>><<nc.induced>>_EM{% endif %}}] ] = 1. / mu0;
492
492
 
493
493
  {% if dm.magnet.geometry.electromagnetics.with_iron_yoke %}
494
- {% for name in rm_EM.iron.vol.names %}
494
+ {% for name in rm_EM.iron_yoke.vol.names %}
495
495
  nu [ <<name>> ] = nu<<name>>[$1];
496
496
  dnuIronYoke [ <<name>> ] = dnu<<name>>[$1];
497
497
  {% endfor %}
fiqus/utils/Utils.py CHANGED
@@ -131,7 +131,7 @@ class FilesAndFolders:
131
131
  os.remove(dummy_yaml_file_to_create_ruamel_object)
132
132
 
133
133
  def iterate_fields(model, ruamel_yaml_object):
134
- for currentPydanticKey, value in model.__fields__.items():
134
+ for currentPydanticKey, value in model.model_fields.items():
135
135
  if value.alias and by_alias:
136
136
  currentDictionaryKey = value.alias
137
137
  else:
@@ -143,7 +143,7 @@ class FilesAndFolders:
143
143
  currentDictionaryKey,
144
144
  )
145
145
 
146
- if hasattr(getattr(model, currentPydanticKey), "__fields__"):
146
+ if hasattr(getattr(model, currentPydanticKey), "model_fields"):
147
147
  new_ruamel_yaml_object = iterate_fields(
148
148
  getattr(model, currentPydanticKey),
149
149
  ruamel_yaml_object[currentDictionaryKey],
@@ -153,7 +153,7 @@ class FilesAndFolders:
153
153
 
154
154
  elif isinstance(getattr(model, currentPydanticKey), list):
155
155
  for i, item in enumerate(getattr(model, currentPydanticKey)):
156
- if hasattr(item, "__fields__"):
156
+ if hasattr(item, "model_fields"):
157
157
  new_ruamel_yaml_object = iterate_fields(
158
158
  item,
159
159
  ruamel_yaml_object[currentDictionaryKey][i],
@@ -164,13 +164,13 @@ class FilesAndFolders:
164
164
  return ruamel_yaml_object
165
165
 
166
166
  iterate_fields(data_model, ruamel_yaml_object)
167
- for currentPydanticKey, value in data_model.__fields__.items():
167
+ for currentPydanticKey, value in data_model.model_fields.items():
168
168
  if value.alias and by_alias:
169
169
  currentDictionaryKey = value.alias
170
170
  else:
171
171
  currentDictionaryKey = currentPydanticKey
172
172
 
173
- if hasattr(getattr(data_model, currentPydanticKey), "__fields__"):
173
+ if hasattr(getattr(data_model, currentPydanticKey), "model_fields"):
174
174
  ruamel_yaml_object[currentDictionaryKey] = iterate_fields(
175
175
  getattr(data_model, currentPydanticKey),
176
176
  ruamel_yaml_object[currentDictionaryKey],
@@ -726,7 +726,9 @@ def initialize_logger(work_folder: str = None, time_stamp: str = None, verbose:
726
726
  logger = logging.getLogger()
727
727
 
728
728
  while logger.hasHandlers():
729
- logger.removeHandler(logger.handlers[0])
729
+ handler = logger.handlers[0]
730
+ logger.removeHandler(handler)
731
+ handler.close()
730
732
 
731
733
  if verbose:
732
734
  logger.setLevel(logging.INFO)
@@ -805,7 +807,10 @@ def get_data_settings(GetDP_path=None, settings=None):
805
807
  if GetDP_path:
806
808
  settings.GetDP_path = GetDP_path
807
809
  elif platform.system() == 'Linux':
808
- settings.GetDP_path = 'getdp'
810
+ if GetDP_path:
811
+ settings.GetDP_path = GetDP_path
812
+ else:
813
+ settings.GetDP_path = 'getdp'
809
814
  elif platform.system() == 'Darwin':
810
815
  if GetDP_path:
811
816
  settings.GetDP_path = GetDP_path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fiqus
3
- Version: 2025.2.0
3
+ Version: 2025.11.0
4
4
  Summary: Source code for STEAM FiQuS tool
5
5
  Home-page: https://gitlab.cern.ch/steam/fiqus
6
6
  Author: STEAM Team
@@ -10,72 +10,74 @@ Classifier: Programming Language :: Python :: 3.11
10
10
  Requires-Python: >=3.11
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE.txt
13
- Requires-Dist: gmsh==4.13.1
14
- Requires-Dist: h5py==3.10.0
15
- Requires-Dist: Jinja2==3.1.3
16
- Requires-Dist: matplotlib==3.8.3
17
- Requires-Dist: mplcursors==0.5.3
18
- Requires-Dist: numpy==1.26.4
19
- Requires-Dist: pandas==2.2.1
20
- Requires-Dist: pydantic==2.6.4
21
- Requires-Dist: ruamel.yaml==0.18.6
22
- Requires-Dist: ruamel.yaml.clib==0.2.8
23
- Requires-Dist: scipy==1.14.1
24
- Requires-Dist: tqdm==4.66.2
25
- Requires-Dist: typing-extensions==4.10.0
13
+ Requires-Dist: gmsh ==4.13.1
14
+ Requires-Dist: h5py ==3.10.0
15
+ Requires-Dist: Jinja2 ==3.1.3
16
+ Requires-Dist: matplotlib ==3.8.3
17
+ Requires-Dist: mplcursors ==0.5.3
18
+ Requires-Dist: numpy ==1.26.4
19
+ Requires-Dist: pandas ==2.2.1
20
+ Requires-Dist: pydantic ==2.6.4
21
+ Requires-Dist: ruamel.yaml ==0.18.6
22
+ Requires-Dist: ruamel.yaml.clib ==0.2.8
23
+ Requires-Dist: scipy ==1.14.1
24
+ Requires-Dist: tqdm ==4.66.2
25
+ Requires-Dist: typing-extensions ==4.10.0
26
26
  Provides-Extra: all
27
- Requires-Dist: gmsh==4.13.1; extra == "all"
28
- Requires-Dist: h5py==3.10.0; extra == "all"
29
- Requires-Dist: Jinja2==3.1.3; extra == "all"
30
- Requires-Dist: matplotlib==3.8.3; extra == "all"
31
- Requires-Dist: mplcursors==0.5.3; extra == "all"
32
- Requires-Dist: numpy==1.26.4; extra == "all"
33
- Requires-Dist: pandas==2.2.1; extra == "all"
34
- Requires-Dist: pydantic==2.6.4; extra == "all"
35
- Requires-Dist: ruamel.yaml==0.18.6; extra == "all"
36
- Requires-Dist: ruamel.yaml.clib==0.2.8; extra == "all"
37
- Requires-Dist: scipy==1.14.1; extra == "all"
38
- Requires-Dist: tqdm==4.66.2; extra == "all"
39
- Requires-Dist: typing-extensions==4.10.0; extra == "all"
40
- Requires-Dist: griffe==0.42.0; extra == "all"
41
- Requires-Dist: markdown==3.5.2; extra == "all"
42
- Requires-Dist: markdown-include==0.8.1; extra == "all"
43
- Requires-Dist: mkdocs-git-revision-date-localized-plugin==1.2.4; extra == "all"
44
- Requires-Dist: mkdocs-include-markdown-plugin==6.0.4; extra == "all"
45
- Requires-Dist: mkdocs-material==9.5.13; extra == "all"
46
- Requires-Dist: mkdocstrings-python==1.9.0; extra == "all"
47
- Requires-Dist: coverage==7.4.4; extra == "all"
48
- Requires-Dist: coverage-badge==1.1.0; extra == "all"
49
- Requires-Dist: flake8==7.0.0; extra == "all"
50
- Requires-Dist: mypy==1.9.0; extra == "all"
51
- Requires-Dist: pylint==3.1.0; extra == "all"
52
- Requires-Dist: pytest==8.1.1; extra == "all"
53
- Requires-Dist: pytest-cov==4.1.0; extra == "all"
54
- Requires-Dist: pytest-subtests==0.12.1; extra == "all"
55
- Requires-Dist: setuptools==69.2.0; extra == "all"
56
- Requires-Dist: wheel==0.45.1; extra == "all"
57
- Requires-Dist: twine==6.0.1; extra == "all"
27
+ Requires-Dist: gmsh ==4.13.1 ; extra == 'all'
28
+ Requires-Dist: h5py ==3.10.0 ; extra == 'all'
29
+ Requires-Dist: Jinja2 ==3.1.3 ; extra == 'all'
30
+ Requires-Dist: matplotlib ==3.8.3 ; extra == 'all'
31
+ Requires-Dist: mplcursors ==0.5.3 ; extra == 'all'
32
+ Requires-Dist: numpy ==1.26.4 ; extra == 'all'
33
+ Requires-Dist: pandas ==2.2.1 ; extra == 'all'
34
+ Requires-Dist: pydantic ==2.6.4 ; extra == 'all'
35
+ Requires-Dist: ruamel.yaml ==0.18.6 ; extra == 'all'
36
+ Requires-Dist: ruamel.yaml.clib ==0.2.8 ; extra == 'all'
37
+ Requires-Dist: scipy ==1.14.1 ; extra == 'all'
38
+ Requires-Dist: tqdm ==4.66.2 ; extra == 'all'
39
+ Requires-Dist: typing-extensions ==4.10.0 ; extra == 'all'
40
+ Requires-Dist: griffe ==0.42.0 ; extra == 'all'
41
+ Requires-Dist: markdown ==3.5.2 ; extra == 'all'
42
+ Requires-Dist: markdown-include ==0.8.1 ; extra == 'all'
43
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin ==1.2.4 ; extra == 'all'
44
+ Requires-Dist: mkdocs-include-markdown-plugin ==6.0.4 ; extra == 'all'
45
+ Requires-Dist: mkdocs-material ==9.5.13 ; extra == 'all'
46
+ Requires-Dist: mkdocstrings-python ==1.9.0 ; extra == 'all'
47
+ Requires-Dist: mkdocs-autorefs ==1.3.1 ; extra == 'all'
48
+ Requires-Dist: coverage ==7.4.4 ; extra == 'all'
49
+ Requires-Dist: coverage-badge ==1.1.0 ; extra == 'all'
50
+ Requires-Dist: flake8 ==7.0.0 ; extra == 'all'
51
+ Requires-Dist: mypy ==1.9.0 ; extra == 'all'
52
+ Requires-Dist: pylint ==3.1.0 ; extra == 'all'
53
+ Requires-Dist: pytest ==8.1.1 ; extra == 'all'
54
+ Requires-Dist: pytest-cov ==4.1.0 ; extra == 'all'
55
+ Requires-Dist: pytest-subtests ==0.12.1 ; extra == 'all'
56
+ Requires-Dist: setuptools ==69.2.0 ; extra == 'all'
57
+ Requires-Dist: wheel ==0.45.1 ; extra == 'all'
58
+ Requires-Dist: twine ==6.0.1 ; extra == 'all'
58
59
  Provides-Extra: build
59
- Requires-Dist: setuptools==69.2.0; extra == "build"
60
- Requires-Dist: wheel==0.45.1; extra == "build"
61
- Requires-Dist: twine==6.0.1; extra == "build"
60
+ Requires-Dist: setuptools ==69.2.0 ; extra == 'build'
61
+ Requires-Dist: wheel ==0.45.1 ; extra == 'build'
62
+ Requires-Dist: twine ==6.0.1 ; extra == 'build'
62
63
  Provides-Extra: docs
63
- Requires-Dist: griffe==0.42.0; extra == "docs"
64
- Requires-Dist: markdown==3.5.2; extra == "docs"
65
- Requires-Dist: markdown-include==0.8.1; extra == "docs"
66
- Requires-Dist: mkdocs-git-revision-date-localized-plugin==1.2.4; extra == "docs"
67
- Requires-Dist: mkdocs-include-markdown-plugin==6.0.4; extra == "docs"
68
- Requires-Dist: mkdocs-material==9.5.13; extra == "docs"
69
- Requires-Dist: mkdocstrings-python==1.9.0; extra == "docs"
64
+ Requires-Dist: griffe ==0.42.0 ; extra == 'docs'
65
+ Requires-Dist: markdown ==3.5.2 ; extra == 'docs'
66
+ Requires-Dist: markdown-include ==0.8.1 ; extra == 'docs'
67
+ Requires-Dist: mkdocs-git-revision-date-localized-plugin ==1.2.4 ; extra == 'docs'
68
+ Requires-Dist: mkdocs-include-markdown-plugin ==6.0.4 ; extra == 'docs'
69
+ Requires-Dist: mkdocs-material ==9.5.13 ; extra == 'docs'
70
+ Requires-Dist: mkdocstrings-python ==1.9.0 ; extra == 'docs'
71
+ Requires-Dist: mkdocs-autorefs ==1.3.1 ; extra == 'docs'
70
72
  Provides-Extra: tests
71
- Requires-Dist: coverage==7.4.4; extra == "tests"
72
- Requires-Dist: coverage-badge==1.1.0; extra == "tests"
73
- Requires-Dist: flake8==7.0.0; extra == "tests"
74
- Requires-Dist: mypy==1.9.0; extra == "tests"
75
- Requires-Dist: pylint==3.1.0; extra == "tests"
76
- Requires-Dist: pytest==8.1.1; extra == "tests"
77
- Requires-Dist: pytest-cov==4.1.0; extra == "tests"
78
- Requires-Dist: pytest-subtests==0.12.1; extra == "tests"
73
+ Requires-Dist: coverage ==7.4.4 ; extra == 'tests'
74
+ Requires-Dist: coverage-badge ==1.1.0 ; extra == 'tests'
75
+ Requires-Dist: flake8 ==7.0.0 ; extra == 'tests'
76
+ Requires-Dist: mypy ==1.9.0 ; extra == 'tests'
77
+ Requires-Dist: pylint ==3.1.0 ; extra == 'tests'
78
+ Requires-Dist: pytest ==8.1.1 ; extra == 'tests'
79
+ Requires-Dist: pytest-cov ==4.1.0 ; extra == 'tests'
80
+ Requires-Dist: pytest-subtests ==0.12.1 ; extra == 'tests'
79
81
 
80
82
  ![FiQuS logo](https://gitlab.cern.ch/steam/fiqus/-/raw/master/docs/images/FiQuS_name_logo.svg)
81
83
 
@@ -0,0 +1,86 @@
1
+ fiqus/MainFiQuS.py,sha256=dyhSz6VZQrZ2zbaATanfKeqDtHw1hkc8SJ0XbA_IojA,21069
2
+ fiqus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ fiqus/data/DataConductor.py,sha256=MUrGvH9I_rs7iHuVNUP-FFrtA7KE7i-Cagocfq7_lQo,17653
4
+ fiqus/data/DataFiQuS.py,sha256=rOxuYzVk1Gsscnrf1hoyQ8RRRhPOAgGG7xjKWlsOLKQ,5728
5
+ fiqus/data/DataFiQuSCCT.py,sha256=__3AEMvalYm_YgCV9RK-hr9T7e_Dvvx3fBcqbToQWUw,7285
6
+ fiqus/data/DataFiQuSConductor.py,sha256=HpPelDwQsGbgNoX3SdwHQYcTMCHq8vMmi0C-EGpxWeA,3392
7
+ fiqus/data/DataFiQuSConductorAC_Strand.py,sha256=SLERW3APmEiwt0U5DQfqneTaktGetzW5eML3pLQWVGE,38184
8
+ fiqus/data/DataFiQuSMultipole.py,sha256=_rX9zP-xNTZioVmu4NCaFVWF66ipesp8cSiB0pmKsG4,32377
9
+ fiqus/data/DataFiQuSPancake3D.py,sha256=czgDU-h_XBq3OLqFOllr8zLx_MxQoCiWo84DsyOhhbo,136611
10
+ fiqus/data/DataModelCommon.py,sha256=UoMdZSaHTghal0X9DeNiGUzMNdjolwMy9IRNaQQh38s,23491
11
+ fiqus/data/DataMultipole.py,sha256=-UUxtgdn32NKxZt3-p-3p5lDcdxlGN9uPlVeLJB9u2E,6323
12
+ fiqus/data/DataRoxieParser.py,sha256=2qlyUmrFOJw7CT2CDs3psv_B7GNtpkTcJoRwpVHr_C0,9277
13
+ fiqus/data/DataSettings.py,sha256=zs5sEYUk4xjeMc_j8gt3PMji7V0yyMYizpXxBKv0aB0,3799
14
+ fiqus/data/DataWindingsCCT.py,sha256=qqqxO4VG6rsKpNEImkA1hjrUMyS4UFNfVG_ioQd4ML8,1709
15
+ fiqus/data/RegionsModelFiQuS.py,sha256=6FTJBE0D4snVivMnKpS4NPJFFrdoZjmpR4KmMNF74R4,6795
16
+ fiqus/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ fiqus/geom_generators/GeometryCCT.py,sha256=t-b4M3XQ7cZlB-_gR59A5sC6qXIldsfBCDqvxSSS9gs,49902
18
+ fiqus/geom_generators/GeometryConductorAC_Strand.py,sha256=0MXKxyodC4Q6Ie4ryiIqgdRmyFsEZrFAc_Tu9yW5wuA,100610
19
+ fiqus/geom_generators/GeometryMultipole.py,sha256=NXJXZY6WCf37kkjUa3mJG85zX5-uDPSz26HM_z7P7Nw,156639
20
+ fiqus/geom_generators/GeometryPancake3D.py,sha256=mefxCg7It69jSMqV4y1-dniy2rwjs0phcXH0Ly-9myQ,180157
21
+ fiqus/geom_generators/GeometryPancake3DUtils.py,sha256=nmOEKtqzUWB5xbITFkIiO38FeLeIydFxtLrRyZXVQPg,23679
22
+ fiqus/geom_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ fiqus/getdp_runners/RunGetdpCCT.py,sha256=tZVJYxL6Knx_6JIbJmjibG6MGkAGU3EmzIMu6ekrYnM,3682
24
+ fiqus/getdp_runners/RunGetdpConductorAC_Strand.py,sha256=VUMMu6qmx8zYhRp1tqZac8tjJbsVhrJmW2EvxP9NcHc,23043
25
+ fiqus/getdp_runners/RunGetdpMultipole.py,sha256=mYinMVQDJx2zAZIypFbl7bybu7h3TKjlExZ5evZpqYU,8200
26
+ fiqus/getdp_runners/RunGetdpPancake3D.py,sha256=bXqd8hRbH-XFmZ50i4q9cE7slNAiiNz2zi3hGI1RLYY,10876
27
+ fiqus/getdp_runners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ fiqus/mains/MainCCT.py,sha256=XpDPlj5n8B70ksOF6AHaeTXB752kN7CMLktISoXqirA,4422
29
+ fiqus/mains/MainConductorAC_Strand.py,sha256=taZ10hr-c3Mmn83WwsKtar6Ezm3DvODwvmkem5_XZI4,5511
30
+ fiqus/mains/MainMultipole.py,sha256=2f1AyYjKikxg5vEknHLsDFBhbL1eOhpPx_YO1Rf_2uk,9700
31
+ fiqus/mains/MainPancake3D.py,sha256=JgmKqcjUOGmodxZoWXfLxKpp-w6_bX1r6XIhqNTQduU,23561
32
+ fiqus/mains/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ fiqus/mesh_generators/MeshCCT.py,sha256=j2Qj69tdFb-weQnNgv5zi6dkL3ZJxGRdzKqzjlYdIy8,11436
34
+ fiqus/mesh_generators/MeshConductorAC_Strand.py,sha256=EvQ_adA1lUEcgfOQ9-m2G6FuWTioFRQrC0en-Nn_ztg,48041
35
+ fiqus/mesh_generators/MeshMultipole.py,sha256=vxFdVphkpqOCWx5725oGmYHrK6RfB8RoW3bWLsALc78,97227
36
+ fiqus/mesh_generators/MeshPancake3D.py,sha256=u31glrOUPGityJ5S0z4n3SvI_Vqqyh62jv7OXIq3-lY,126975
37
+ fiqus/mesh_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
+ fiqus/parsers/ParserCOND.py,sha256=nQyRRZf2Jbvf6ri5rdhq2P6b52Qbp2tTHuDRT4ChxHI,41376
39
+ fiqus/parsers/ParserDAT.py,sha256=eLbpr74BDoSw6UAeP_qkM55ZLRYPdk8t-RhTXU_oHE4,675
40
+ fiqus/parsers/ParserGetDPOnSection.py,sha256=pTk2EqO1sitoNIztekyEtIy5xpFKou_L3KGsIjJV3R0,8408
41
+ fiqus/parsers/ParserGetDPTimeTable.py,sha256=hAITcOQNJdG_bEUQoQ4VJEamc83BT8zCVp98jlhp1Ug,5098
42
+ fiqus/parsers/ParserMSH.py,sha256=ijLmPPsiy2azo9fN9iZ2aSc_MjueXwZG3GMqruYeucc,1912
43
+ fiqus/parsers/ParserPOS.py,sha256=XtUhuOJJC-OSGY12YefJ-eFafhdQpLbPY4mHwGAtb9U,10162
44
+ fiqus/parsers/ParserRES.py,sha256=782GouJaw0j5u1RLGag6FauSUTuKV7gKa1G4EowSKBE,5984
45
+ fiqus/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ fiqus/plotters/PlotPythonCCT.py,sha256=YgphOuiTk0klqZh4d4u81hahtiDp-tx149EpBjyKH-Y,6333
47
+ fiqus/plotters/PlotPythonConductorAC.py,sha256=_7ygaz5WVVGuc4RkgOcZ2NUbqWbowtJMmseAeQ49XbQ,59383
48
+ fiqus/plotters/PlotPythonMultipole.py,sha256=SjJQKHX5mUoMW3yli97W6Kja0Hux8C16YE1U22hQRHY,481
49
+ fiqus/plotters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ fiqus/post_processors/PostProcessCCT.py,sha256=C4BU7IHHWm2CbbLunEmHaHN_iW6y9mlisIed3lKfs_A,28633
51
+ fiqus/post_processors/PostProcessConductorAC.py,sha256=qMtxsmBGRMZVKiDynzfzWh4q6ttOAA2bGPmOzciAgXo,58804
52
+ fiqus/post_processors/PostProcessMultipole.py,sha256=ONYqw0mxY0QKXWB51xw-e6_jelzzKD39vMcBR8J4JXs,25512
53
+ fiqus/post_processors/PostProcessPancake3D.py,sha256=PjGaohIj_oWfqyHH-Fr3CgiOitUpjGjYe2Rm3wqtM1g,12940
54
+ fiqus/post_processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ fiqus/pre_processors/PreProcessCCT.py,sha256=BDRei7uLdOHxNnsg-r17HcjtvvrST8HUj_lQ1GSmVZo,9217
56
+ fiqus/pre_processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
+ fiqus/pro_assemblers/ProAssembler.py,sha256=DrVd1wiuv-7PIj3G38crBu07aMPyE3FOapODJN7wl9E,3572
58
+ fiqus/pro_assemblers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
+ fiqus/pro_material_functions/ironBHcurves.pro,sha256=0Tz1KzZ63G_zaS6dYQ5NYwa9EAtJna0jR61OxsM9J_E,17835
60
+ fiqus/pro_templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
+ fiqus/pro_templates/combined/CCT_template.pro,sha256=gZKoLj6ZefuSzM7dYkEJW49qlzfiUqEwmifaJP4kOzc,13878
62
+ fiqus/pro_templates/combined/ConductorAC_template.pro,sha256=RN69ycY4vGGPp8YmCHICVGRNfvuEHGB50FxmEeEzrXA,94008
63
+ fiqus/pro_templates/combined/Multipole_template.pro,sha256=H0H_R7sa69EL2lHtIQ0kmz-0Ov0MbZZIpnu1L0pAhPM,97994
64
+ fiqus/pro_templates/combined/Pancake3D_template.pro,sha256=OjWWWAZel5Yk_k4FEFFNkkSFkCv1N0rM2-DRvilH6dc,215797
65
+ fiqus/pro_templates/combined/TSA_materials.pro,sha256=I8zVOP2ZEFqR0y3JcpSQJWaE6I4UeeMU22PtSD8ExCc,12244
66
+ fiqus/pro_templates/combined/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
+ fiqus/pro_templates/combined/materials.pro,sha256=D-cBOIMaQyYffIfoR4yRiK69Z6sxHu2QtyjhDIKFiXc,7038
68
+ fiqus/pro_templates/separated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
+ fiqus/utils/Utils.py,sha256=HPEN92OxtMxk_xrMD4nfvBsA2BuKuk9_x1Yoy2bF2tw,35613
70
+ fiqus/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
+ fiqus/utils/update_data_settings.py,sha256=Cl_vP-7MXFHG3LiDE8nVtL7CwK9DUvDhxXV7sabP9to,1295
72
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
+ tests/test_FiQuS.py,sha256=mlY5eRp-sE_ubaPG7HHAEsC4Q3iQwI76nfOclPg7m-M,15529
74
+ tests/test_geometry_generators.py,sha256=CknRmySOjTbOfmTm4nC_X7K0FJRytjq2HKzQVKTKD2c,9116
75
+ tests/test_mesh_generators.py,sha256=Qa1wJ8-0vCInkt300iM_tGVkioBHi4jVBKid9LAKfAM,10881
76
+ tests/test_solvers.py,sha256=k2VX19GV2yTCec01ieW-6Z2NAMyMqB9rk5CAp9Ye0Ow,12815
77
+ tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
+ tests/utils/fiqus_test_classes.py,sha256=ynCjYknWGI_pa-lRWQ01aL2SjHz0GTrN4bICW5GlR34,30395
79
+ tests/utils/generate_reference_files_ConductorAC.py,sha256=_jEE6xcqiz52bnmY6Is11QmG-bZ2vdH0k99p733t4N4,1676
80
+ tests/utils/generate_reference_files_Pancake3D.py,sha256=9sULcDOmbotrbYHz8DqGv6Km7ThfltnCHFojHUx193U,3126
81
+ tests/utils/helpers.py,sha256=BQxdHr8N4rGXc2C_YNEeOXxTIDJSUeRyyxLkvWfhiJY,4149
82
+ fiqus-2025.11.0.dist-info/LICENSE.txt,sha256=gcuuhKKc5-dwvyvHsXjlC9oM6N5gZ6umYbC8ewW1Yvg,35821
83
+ fiqus-2025.11.0.dist-info/METADATA,sha256=68b71oEsx-HfExyCFDOMeEywFZOheUalzKGvrF5yvFQ,8370
84
+ fiqus-2025.11.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
85
+ fiqus-2025.11.0.dist-info/top_level.txt,sha256=oGzSIyoVc1zYg14o67zI3QFwWsJvqNzNT0-te9WbUQc,12
86
+ fiqus-2025.11.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.45.1)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -86,6 +86,10 @@ class TestGeometryGenerators(FiQuSGeometryTests):
86
86
  reference_geometry_yaml_file = self.get_path_to_reference_file(
87
87
  data_model=data_model, file_name='GeometryModel', file_extension="yaml"
88
88
  )
89
+ print('Comparing:'
90
+ f'{geometry_yaml_file}'
91
+ ' with'
92
+ f'{reference_geometry_yaml_file}')
89
93
  self.compare_json_or_yaml_files(geometry_yaml_file, reference_geometry_yaml_file, tolerance=1e-9)
90
94
 
91
95
  def test_Multipole(self):
@@ -94,6 +94,11 @@ class TestMeshGenerators(FiQuSMeshTests):
94
94
  file_name=model_name,
95
95
  file_extension="regions",
96
96
  )
97
+ print('Comparing'
98
+ f'{regions_file}'
99
+ 'with'
100
+ f'{reference_regions_file}'
101
+ )
97
102
  self.compare_json_or_yaml_files(regions_file, reference_regions_file)
98
103
 
99
104
  # def test_CCT(self):
tests/test_solvers.py CHANGED
@@ -2,6 +2,12 @@ import unittest
2
2
  from tests.utils.fiqus_test_classes import FiQuSSolverTests
3
3
  from fiqus.data.DataFiQuS import FDM
4
4
  import fiqus.data.DataFiQuSPancake3D as Pancake3D
5
+ import os
6
+ import platform
7
+ from pathlib import Path
8
+
9
+ linux_getdp_prefix_path = Path("/bin/cerngetdp/")
10
+ windows_getdp_prefix_path = Path("C:/cerngetdp/")
5
11
 
6
12
 
7
13
  class TestSolvers(FiQuSSolverTests):
@@ -10,6 +16,16 @@ class TestSolvers(FiQuSSolverTests):
10
16
  Checks if Pancake3D solvers work correctly by comparing the results to the
11
17
  reference results that were checked manually.
12
18
  """
19
+ if os.getenv("CERNGETDP_VERSION_PANCAKE3D") is not None:
20
+ os_name = platform.system()
21
+
22
+ if os_name == "Linux":
23
+ self.getdp_path = linux_getdp_prefix_path / Path(f"pancake3d/bin/getdp_{os.getenv('CERNGETDP_VERSION_PANCAKE3D')}")
24
+ else:
25
+ self.getdp_path = windows_getdp_prefix_path / Path(f"pancake3d/getdp_{os.getenv('CERNGETDP_VERSION_PANCAKE3D')}.exe")
26
+ else:
27
+ print("CERNGETDP_VERSION_PANCAKE3D is not set. Using default getdp path from data settings.")
28
+
13
29
  model_names = [
14
30
  "TEST_Pancake3D_REF",
15
31
  "TEST_Pancake3D_REFStructured",
@@ -111,6 +127,17 @@ class TestSolvers(FiQuSSolverTests):
111
127
  Checks if CACStrand solvers work correctly by comparing the results to the
112
128
  reference results that were checked manually.
113
129
  """
130
+ if os.getenv("CERNGETDP_VERSION_CAC_STRAND") is not None:
131
+ os_name = platform.system()
132
+
133
+ if os_name == "Linux":
134
+ self.getdp_path = linux_getdp_prefix_path / Path(f"cac_strand/bin/getdp_{os.getenv('CERNGETDP_VERSION_CAC_STRAND')}")
135
+ else:
136
+ self.getdp_path = windows_getdp_prefix_path / Path(f"cac_strand/getdp_{os.getenv('CERNGETDP_VERSION_CAC_STRAND')}.exe")
137
+ else:
138
+ print("CERNGETDP_VERSION_CAC_STRAND is not set. Using default getdp path from data settings.")
139
+
140
+
114
141
  model_names = [
115
142
  "TEST_CAC_Strand_hexFilaments",
116
143
  "TEST_CAC_Strand_adaptiveMesh",
@@ -140,12 +167,12 @@ class TestSolvers(FiQuSSolverTests):
140
167
  # Compare the magnetic flux density files:
141
168
  pos_file = self.get_path_to_generated_file(
142
169
  data_model=data_model,
143
- file_name="b",
170
+ file_name="b_Omega",
144
171
  file_extension="pos",
145
172
  )
146
173
  reference_pos_file = self.get_path_to_reference_file(
147
174
  data_model=data_model,
148
- file_name="b",
175
+ file_name="b_Omega",
149
176
  file_extension="pos",
150
177
  )
151
178
  self.compare_pos_files(pos_file, reference_pos_file, rel_tolerance=1e-3, abs_tolerance=1e-10)
@@ -153,12 +180,12 @@ class TestSolvers(FiQuSSolverTests):
153
180
  # Compare the current density files:
154
181
  pos_file = self.get_path_to_generated_file(
155
182
  data_model=data_model,
156
- file_name="j",
183
+ file_name="j_OmegaC",
157
184
  file_extension="pos",
158
185
  )
159
186
  reference_pos_file = self.get_path_to_reference_file(
160
187
  data_model=data_model,
161
- file_name="j",
188
+ file_name="j_OmegaC",
162
189
  file_extension="pos",
163
190
  )
164
191
  self.compare_pos_files(pos_file, reference_pos_file, rel_tolerance=1e-3, abs_tolerance=1e-10)
@@ -169,6 +196,16 @@ class TestSolvers(FiQuSSolverTests):
169
196
  Checks if Multipole solvers work correctly by comparing the results to the
170
197
  reference results that were checked manually.
171
198
  """
199
+ if os.getenv("CERNGETDP_VERSION_MULTIPOLE") is not None:
200
+ os_name = platform.system()
201
+
202
+ if os_name == "Linux":
203
+ self.getdp_path = linux_getdp_prefix_path / Path(f"multipole/bin/getdp_{os.getenv('CERNGETDP_VERSION_MULTIPOLE')}")
204
+ else:
205
+ self.getdp_path = windows_getdp_prefix_path / Path(f"multipole/getdp_{os.getenv('CERNGETDP_VERSION_MULTIPOLE')}.exe")
206
+ else:
207
+ print("CERNGETDP_VERSION_MULTIPOLE is not set. Using default getdp path from data settings.")
208
+
172
209
  model_names = [
173
210
  "TEST_MULTIPOLE_MBH_1in1_TSA_withQH",
174
211
  "TEST_MULTIPOLE_MBH_1in1_TSA",
@@ -155,12 +155,21 @@ class BaseClassesForTests(unittest.TestCase):
155
155
  )
156
156
 
157
157
  # Run FiQuS:
158
- MainFiQuS(
159
- model_folder=model_folder,
160
- input_file_path=self.get_input_file_path(model_name),
161
- fdm=data_model,
162
- # verbose=False,
163
- )
158
+ if hasattr(self, "getdp_path"):
159
+ MainFiQuS(
160
+ model_folder=model_folder,
161
+ input_file_path=self.get_input_file_path(model_name),
162
+ fdm=data_model,
163
+ GetDP_path=self.getdp_path
164
+ # verbose=False,
165
+ )
166
+ else:
167
+ MainFiQuS(
168
+ model_folder=model_folder,
169
+ input_file_path=self.get_input_file_path(model_name),
170
+ fdm=data_model,
171
+ # verbose=False,
172
+ )
164
173
 
165
174
  def get_path_to_generated_file(
166
175
  self,
@@ -1,57 +1,57 @@
1
- import os
2
- import shutil
3
- import sys
4
- sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))) # Add the path to the fiqus package to the system path
5
- from fiqus.data.DataFiQuS import FDM
6
- from fiqus.utils.Utils import FilesAndFolders as Util
7
- from fiqus import MainFiQuS as mf
8
-
9
-
10
- # Generate reference files for the models below:
11
- model_names = [
12
- "TEST_CAC_Strand_adaptiveMesh",
13
- "TEST_CAC_Strand_hexFilaments",
14
- "TEST_CAC_wireInChannel",
15
- ]
16
- # The run types for the models above:
17
- run_types = [
18
- 'geometry_and_mesh',
19
- 'start_from_yaml',
20
- 'start_from_yaml',
21
- ]
22
-
23
- for model_name, run_type in zip(model_names, run_types):
24
- # get path to the input file:
25
- input_file = os.path.join(
26
- os.path.dirname(os.path.dirname(__file__)),
27
- "_inputs",
28
- model_name,
29
- f"{model_name}.yaml",
30
- )
31
-
32
- # select _references folder as the output folder:
33
- output_folder = os.path.join(
34
- os.path.dirname(os.path.dirname(__file__)), "_references", model_name
35
- )
36
-
37
- # if the output folder exists, remove it:
38
- if os.path.exists(output_folder):
39
- shutil.rmtree(output_folder)
40
-
41
- # Create the output folder:
42
- os.makedirs(output_folder)
43
-
44
- # Cast input yaml file to FDM
45
- data_model: FDM = Util.read_data_from_yaml(input_file, FDM)
46
-
47
- data_model.run.overwrite = True
48
-
49
- # Make the run type start_from_yaml:
50
- data_model.run.type = run_type
51
-
52
- fiqus_instance = mf.MainFiQuS(
53
- fdm=data_model, model_folder=output_folder, input_file_path=input_file
54
- )
55
-
56
- # remove fiqus_instance to avoid memory issues:
57
- del fiqus_instance
1
+ import os
2
+ import shutil
3
+ import sys
4
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../'))) # Add the path to the fiqus package to the system path
5
+ from fiqus.data.DataFiQuS import FDM
6
+ from fiqus.utils.Utils import FilesAndFolders as Util
7
+ from fiqus import MainFiQuS as mf
8
+
9
+
10
+ # Generate reference files for the models below:
11
+ model_names = [
12
+ "TEST_CAC_Strand_adaptiveMesh",
13
+ "TEST_CAC_Strand_hexFilaments",
14
+ "TEST_CAC_wireInChannel",
15
+ ]
16
+ # The run types for the models above:
17
+ run_types = [
18
+ 'geometry_and_mesh',
19
+ 'start_from_yaml',
20
+ 'start_from_yaml',
21
+ ]
22
+
23
+ for model_name, run_type in zip(model_names, run_types):
24
+ # get path to the input file:
25
+ input_file = os.path.join(
26
+ os.path.dirname(os.path.dirname(__file__)),
27
+ "_inputs",
28
+ model_name,
29
+ f"{model_name}.yaml",
30
+ )
31
+
32
+ # select _references folder as the output folder:
33
+ output_folder = os.path.join(
34
+ os.path.dirname(os.path.dirname(__file__)), "_references", model_name
35
+ )
36
+
37
+ # if the output folder exists, remove it:
38
+ if os.path.exists(output_folder):
39
+ shutil.rmtree(output_folder)
40
+
41
+ # Create the output folder:
42
+ os.makedirs(output_folder)
43
+
44
+ # Cast input yaml file to FDM
45
+ data_model: FDM = Util.read_data_from_yaml(input_file, FDM)
46
+
47
+ data_model.run.overwrite = True
48
+
49
+ # Make the run type start_from_yaml:
50
+ data_model.run.type = run_type
51
+
52
+ fiqus_instance = mf.MainFiQuS(
53
+ fdm=data_model, model_folder=output_folder, input_file_path=input_file
54
+ )
55
+
56
+ # remove fiqus_instance to avoid memory issues:
57
+ del fiqus_instance