fiqus 2024.7.0__py3-none-any.whl → 2024.12.1__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.
- fiqus/MainFiQuS.py +290 -134
- fiqus/data/DataConductor.py +301 -301
- fiqus/data/DataFiQuS.py +128 -84
- fiqus/data/DataFiQuSCCT.py +150 -150
- fiqus/data/DataFiQuSConductor.py +84 -84
- fiqus/data/DataFiQuSConductorAC_Strand.py +565 -565
- fiqus/data/DataFiQuSMultipole.py +716 -42
- fiqus/data/DataFiQuSPancake3D.py +737 -278
- fiqus/data/DataMultipole.py +180 -15
- fiqus/data/DataRoxieParser.py +90 -51
- fiqus/data/DataSettings.py +121 -0
- fiqus/data/DataWindingsCCT.py +37 -37
- fiqus/data/RegionsModelFiQuS.py +18 -6
- fiqus/geom_generators/GeometryCCT.py +905 -905
- fiqus/geom_generators/GeometryConductorAC_Strand.py +1391 -1391
- fiqus/geom_generators/GeometryMultipole.py +1827 -227
- fiqus/geom_generators/GeometryPancake3D.py +316 -117
- fiqus/geom_generators/GeometryPancake3DUtils.py +549 -0
- fiqus/getdp_runners/RunGetdpCCT.py +4 -4
- fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +201 -201
- fiqus/getdp_runners/RunGetdpMultipole.py +115 -42
- fiqus/getdp_runners/RunGetdpPancake3D.py +28 -6
- fiqus/mains/MainCCT.py +2 -2
- fiqus/mains/MainConductorAC_Strand.py +132 -132
- fiqus/mains/MainMultipole.py +113 -62
- fiqus/mains/MainPancake3D.py +63 -23
- fiqus/mesh_generators/MeshCCT.py +209 -209
- fiqus/mesh_generators/MeshConductorAC_Strand.py +656 -656
- fiqus/mesh_generators/MeshMultipole.py +1243 -181
- fiqus/mesh_generators/MeshPancake3D.py +275 -192
- fiqus/parsers/ParserCOND.py +825 -0
- fiqus/parsers/ParserDAT.py +16 -16
- fiqus/parsers/ParserGetDPOnSection.py +212 -212
- fiqus/parsers/ParserGetDPTimeTable.py +134 -134
- fiqus/parsers/ParserMSH.py +53 -53
- fiqus/parsers/ParserPOS.py +214 -214
- fiqus/parsers/ParserRES.py +142 -142
- fiqus/plotters/PlotPythonCCT.py +133 -133
- fiqus/plotters/PlotPythonConductorAC.py +855 -855
- fiqus/plotters/PlotPythonMultipole.py +18 -18
- fiqus/post_processors/PostProcessCCT.py +440 -440
- fiqus/post_processors/PostProcessConductorAC.py +49 -49
- fiqus/post_processors/PostProcessMultipole.py +353 -229
- fiqus/post_processors/PostProcessPancake3D.py +8 -13
- fiqus/pre_processors/PreProcessCCT.py +175 -175
- fiqus/pro_assemblers/ProAssembler.py +14 -6
- fiqus/pro_material_functions/ironBHcurves.pro +246 -246
- fiqus/pro_templates/combined/CCT_template.pro +274 -274
- fiqus/pro_templates/combined/ConductorAC_template.pro +1025 -1025
- fiqus/pro_templates/combined/Multipole_template.pro +1694 -126
- fiqus/pro_templates/combined/Pancake3D_template.pro +2294 -1103
- fiqus/pro_templates/combined/TSA_materials.pro +162 -0
- fiqus/pro_templates/combined/materials.pro +36 -18
- fiqus/utils/Utils.py +508 -110
- fiqus/utils/update_data_settings.py +33 -0
- fiqus-2024.12.1.dist-info/METADATA +132 -0
- fiqus-2024.12.1.dist-info/RECORD +84 -0
- {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/WHEEL +1 -1
- tests/test_FiQuS.py +1 -1
- tests/test_geometry_generators.py +101 -2
- tests/test_mesh_generators.py +154 -1
- tests/test_solvers.py +115 -21
- tests/utils/fiqus_test_classes.py +85 -21
- tests/utils/generate_reference_files_ConductorAC.py +57 -57
- tests/utils/generate_reference_files_Pancake3D.py +4 -5
- tests/utils/helpers.py +97 -97
- fiqus-2024.7.0.dist-info/METADATA +0 -103
- fiqus-2024.7.0.dist-info/RECORD +0 -79
- {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from ruamel.yaml import YAML
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
def update_data_settings_getdp_path(file_path, env_variable):
|
|
6
|
+
# Load the YAML file
|
|
7
|
+
yaml = YAML()
|
|
8
|
+
|
|
9
|
+
with open(file_path, 'r') as file:
|
|
10
|
+
config = yaml.load(file)
|
|
11
|
+
|
|
12
|
+
# Get the value of the environment variable
|
|
13
|
+
env_value = os.environ.get(env_variable)
|
|
14
|
+
if env_value is None:
|
|
15
|
+
raise ValueError(f"Environment variable '{env_variable}' is not set.")
|
|
16
|
+
|
|
17
|
+
# Update the GetDP_path with the expanded value
|
|
18
|
+
config['GetDP_path'] = "C:/cerngetdp/getdp_" + env_value + ".exe"
|
|
19
|
+
# Save the updated YAML file, preserving formatting
|
|
20
|
+
with open(file_path, 'w') as file:
|
|
21
|
+
yaml.dump(config, file)
|
|
22
|
+
|
|
23
|
+
print(f"Updated 'GetDP_path' to use environment variable: {env_variable}")
|
|
24
|
+
|
|
25
|
+
if __name__ == "__main__":
|
|
26
|
+
# Parse command-line arguments
|
|
27
|
+
parser = argparse.ArgumentParser(description="Update GetDP_path in a YAML file to use an environment variable.")
|
|
28
|
+
parser.add_argument("file", help="Path to the YAML file.")
|
|
29
|
+
parser.add_argument("env_variable", help="Name of the environment variable to use for GetDP_path.")
|
|
30
|
+
args = parser.parse_args()
|
|
31
|
+
|
|
32
|
+
# Call the function with the provided arguments
|
|
33
|
+
update_data_settings_getdp_path(args.file, args.env_variable)
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: fiqus
|
|
3
|
+
Version: 2024.12.1
|
|
4
|
+
Summary: Source code for STEAM FiQuS tool
|
|
5
|
+
Home-page: https://gitlab.cern.ch/steam/fiqus
|
|
6
|
+
Author: STEAM Team
|
|
7
|
+
Author-email: steam-team@cern.ch
|
|
8
|
+
Keywords: STEAM,FiQuS,CERN
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: gmsh ==4.13.1
|
|
13
|
+
Requires-Dist: h5py ==3.10.0
|
|
14
|
+
Requires-Dist: Jinja2 ==3.1.3
|
|
15
|
+
Requires-Dist: matplotlib ==3.8.3
|
|
16
|
+
Requires-Dist: mplcursors ==0.5.3
|
|
17
|
+
Requires-Dist: numpy ==1.26.4
|
|
18
|
+
Requires-Dist: pandas ==2.2.1
|
|
19
|
+
Requires-Dist: pydantic ==2.6.4
|
|
20
|
+
Requires-Dist: ruamel.yaml ==0.18.6
|
|
21
|
+
Requires-Dist: ruamel.yaml.clib ==0.2.8
|
|
22
|
+
Requires-Dist: scipy ==1.14.1
|
|
23
|
+
Requires-Dist: tqdm ==4.66.2
|
|
24
|
+
Requires-Dist: typing-extensions ==4.10.0
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: gmsh ==4.13.1 ; extra == 'all'
|
|
27
|
+
Requires-Dist: h5py ==3.10.0 ; extra == 'all'
|
|
28
|
+
Requires-Dist: Jinja2 ==3.1.3 ; extra == 'all'
|
|
29
|
+
Requires-Dist: matplotlib ==3.8.3 ; extra == 'all'
|
|
30
|
+
Requires-Dist: mplcursors ==0.5.3 ; extra == 'all'
|
|
31
|
+
Requires-Dist: numpy ==1.26.4 ; extra == 'all'
|
|
32
|
+
Requires-Dist: pandas ==2.2.1 ; extra == 'all'
|
|
33
|
+
Requires-Dist: pydantic ==2.6.4 ; extra == 'all'
|
|
34
|
+
Requires-Dist: ruamel.yaml ==0.18.6 ; extra == 'all'
|
|
35
|
+
Requires-Dist: ruamel.yaml.clib ==0.2.8 ; extra == 'all'
|
|
36
|
+
Requires-Dist: scipy ==1.14.1 ; extra == 'all'
|
|
37
|
+
Requires-Dist: tqdm ==4.66.2 ; extra == 'all'
|
|
38
|
+
Requires-Dist: typing-extensions ==4.10.0 ; extra == 'all'
|
|
39
|
+
Requires-Dist: griffe ==0.42.0 ; extra == 'all'
|
|
40
|
+
Requires-Dist: markdown ==3.5.2 ; extra == 'all'
|
|
41
|
+
Requires-Dist: markdown-include ==0.8.1 ; extra == 'all'
|
|
42
|
+
Requires-Dist: mkdocs-git-revision-date-localized-plugin ==1.2.4 ; extra == 'all'
|
|
43
|
+
Requires-Dist: mkdocs-include-markdown-plugin ==6.0.4 ; extra == 'all'
|
|
44
|
+
Requires-Dist: mkdocs-material ==9.5.13 ; extra == 'all'
|
|
45
|
+
Requires-Dist: mkdocstrings-python ==1.9.0 ; extra == 'all'
|
|
46
|
+
Requires-Dist: coverage ==7.4.4 ; extra == 'all'
|
|
47
|
+
Requires-Dist: coverage-badge ==1.1.0 ; extra == 'all'
|
|
48
|
+
Requires-Dist: flake8 ==7.0.0 ; extra == 'all'
|
|
49
|
+
Requires-Dist: mypy ==1.9.0 ; extra == 'all'
|
|
50
|
+
Requires-Dist: pylint ==3.1.0 ; extra == 'all'
|
|
51
|
+
Requires-Dist: pytest ==8.1.1 ; extra == 'all'
|
|
52
|
+
Requires-Dist: pytest-cov ==4.1.0 ; extra == 'all'
|
|
53
|
+
Requires-Dist: pytest-subtests ==0.12.1 ; extra == 'all'
|
|
54
|
+
Requires-Dist: setuptools ==69.2.0 ; extra == 'all'
|
|
55
|
+
Requires-Dist: wheel ==0.45.1 ; extra == 'all'
|
|
56
|
+
Requires-Dist: twine ==6.0.1 ; extra == 'all'
|
|
57
|
+
Provides-Extra: build
|
|
58
|
+
Requires-Dist: setuptools ==69.2.0 ; extra == 'build'
|
|
59
|
+
Requires-Dist: wheel ==0.45.1 ; extra == 'build'
|
|
60
|
+
Requires-Dist: twine ==6.0.1 ; extra == 'build'
|
|
61
|
+
Provides-Extra: docs
|
|
62
|
+
Requires-Dist: griffe ==0.42.0 ; extra == 'docs'
|
|
63
|
+
Requires-Dist: markdown ==3.5.2 ; extra == 'docs'
|
|
64
|
+
Requires-Dist: markdown-include ==0.8.1 ; extra == 'docs'
|
|
65
|
+
Requires-Dist: mkdocs-git-revision-date-localized-plugin ==1.2.4 ; extra == 'docs'
|
|
66
|
+
Requires-Dist: mkdocs-include-markdown-plugin ==6.0.4 ; extra == 'docs'
|
|
67
|
+
Requires-Dist: mkdocs-material ==9.5.13 ; extra == 'docs'
|
|
68
|
+
Requires-Dist: mkdocstrings-python ==1.9.0 ; extra == 'docs'
|
|
69
|
+
Provides-Extra: tests
|
|
70
|
+
Requires-Dist: coverage ==7.4.4 ; extra == 'tests'
|
|
71
|
+
Requires-Dist: coverage-badge ==1.1.0 ; extra == 'tests'
|
|
72
|
+
Requires-Dist: flake8 ==7.0.0 ; extra == 'tests'
|
|
73
|
+
Requires-Dist: mypy ==1.9.0 ; extra == 'tests'
|
|
74
|
+
Requires-Dist: pylint ==3.1.0 ; extra == 'tests'
|
|
75
|
+
Requires-Dist: pytest ==8.1.1 ; extra == 'tests'
|
|
76
|
+
Requires-Dist: pytest-cov ==4.1.0 ; extra == 'tests'
|
|
77
|
+
Requires-Dist: pytest-subtests ==0.12.1 ; extra == 'tests'
|
|
78
|
+
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
# Introduction
|
|
82
|
+
Source code for STEAM **FiQuS** (**Fi**nite Element **Qu**ench **S**imulator).
|
|
83
|
+
|
|
84
|
+
# Publications
|
|
85
|
+
|
|
86
|
+
## Describing FiQuS Modules
|
|
87
|
+
- S. Atalay et al, "An open-source 3D FE quench simulation tool for no-insulation HTS pancake coils", in Superconductor Science and Technology, doi: [10.1088/1361-6668/ad3f83](https://doi.org/10.1088/1361-6668/ad3f83)
|
|
88
|
+
- J. Dular et al, "Coupled Axial and Transverse Currents Method for Finite Element Modelling of Periodic Superconductors", arXiv preprint, doi:[10.48550/arXiv.2404.09775](https://doi.org/10.48550/arXiv.2404.09775).
|
|
89
|
+
- A. Vitrano et al, "An Open-Source Finite Element Quench Simulation Tool for Superconducting Magnets," in IEEE Transactions on Applied Superconductivity, vol. 33, no. 5, pp. 1-6, Aug. 2023, Art no. 4702006, doi: [10.1109/TASC.2023.3259332](https://ieeexplore.ieee.org/abstract/document/10077402).
|
|
90
|
+
|
|
91
|
+
## Using FiQuS
|
|
92
|
+
|
|
93
|
+
- J. Dular et al, "Simulation of Rutherford Cable AC Loss and Magnetization with the Coupled Axial and Transverse Currents Method", accepted for publication in IEEE Transactions on Applied Superconductivity, [arXiv:2411.13347](https://arxiv.org/abs/2411.13347).
|
|
94
|
+
- M. Wozniak et al, "Influence of Critical Current Distribution on Operation, Quench Detection and Protection of HTS Pancake Coils, submitted for publication in IEEE Transactions on Applied Superconductivity, [arXiv:2411.18124](https://arxiv.org/abs/2411.18124).
|
|
95
|
+
- Laura AM D’Angelo et al, "Efficient Reduced Magnetic Vector Potential Formulation for the Magnetic Field Simulation of Accelerator Magnets", in IEEE Transactions on Magnetics, vol. 60, no. 3, pp. 1-8, Jan. 2024, Art no. 7000808, doi: [10.1109/TMAG.2024.3352113](https://ieeexplore.ieee.org/abstract/document/10387412).
|
|
96
|
+
- M. Wozniak et al, "Quench Co-Simulation of Canted Cos-Theta Magnets," in IEEE Transactions on Applied Superconductivity, vol. 34, no. 3, pp. 1-5, Dec. 2023, Art no. 4900105, doi: [10.1109/TASC.2023.3338142](https://ieeexplore.ieee.org/document/10337614).
|
|
97
|
+
- M. Wozniak et al, "Fast Quench Propagation Conductor for Protecting Canted Cos-Theta Magnets," in IEEE Transactions on Applied Superconductivity, vol. 33, no. 5, pp. 1-5, Aug. 2023, Art no. 4701705, doi: [10.1109/TASC.2023.3247997](https://ieeexplore.ieee.org/document/10050158).
|
|
98
|
+
- E. Schnaubelt et al, "Parallel-in-Time Integration of Transient Phenomena in No-Insulation Superconducting Coils Using Parareal", accepted for publication in the proceedings of the
|
|
99
|
+
Scientific Computing in Electrical Engineering (SCEE) 2024 conference, [arXiv:2404.13333](https://arxiv.org/abs/2404.13333).
|
|
100
|
+
|
|
101
|
+
## Mathematical Formulations Forming the Basis of Some FiQuS Modules
|
|
102
|
+
|
|
103
|
+
- E. Schnaubelt et al, "Magneto-Thermal Thin Shell Approximation for 3D Finite Element Analysis of No-Insulation Coils", in IEEE Transactions on Applied Superconductivity, vol. 34, no. 3, pp. 1-6, Dec. 2023, Art no. 4700406, doi: [10.1109/TASC.2023.3340648](https://ieeexplore.ieee.org/document/10349801).
|
|
104
|
+
- E. Schnaubelt et al, "Electromagnetic Simulation of No-Insulation Coils Using H−φ Thin Shell Approximation", in IEEE Transactions on Applied Superconductivity, vol. 33, no. 5, pp. 1-6, Mar. 2023, Art no. 4900906, doi: [10.1109/TASC.2023.3258905](https://ieeexplore.ieee.org/document/10076826).
|
|
105
|
+
- E. Schnaubelt et al, "Thermal thin shell approximation towards finite element quench simulation", in Superconductor Science and Technology, vol. 36, no. 4, Art no. 044004, doi: [10.1088/1361-6668/acbeea](https://iopscience.iop.org/article/10.1088/1361-6668/acbeea).
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# Folder Structure
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
# Installation
|
|
112
|
+
|
|
113
|
+
## Released version:
|
|
114
|
+
```pip install fiqus```
|
|
115
|
+
|
|
116
|
+
# Links
|
|
117
|
+
STEAM website: http://cern.ch/steam
|
|
118
|
+
|
|
119
|
+
STEAM-FiQuS website: https://steam.docs.cern.ch/tools/fiqus/
|
|
120
|
+
|
|
121
|
+
STEAM-FiQuS documentation: https://steam-fiqus.docs.cern.ch/
|
|
122
|
+
|
|
123
|
+
Coverage report: https://steam-fiqus.docs.cern.ch/htmlcov/
|
|
124
|
+
|
|
125
|
+
# Contact
|
|
126
|
+
steam-team@cern.ch
|
|
127
|
+
|
|
128
|
+
# STEAM User Agreement
|
|
129
|
+
By using any software of the STEAM framework, users agree with this document:
|
|
130
|
+
https://edms.cern.ch/document/2024516
|
|
131
|
+
|
|
132
|
+
(Copyright © 2022, CERN, Switzerland. All rights reserved.)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
fiqus/MainFiQuS.py,sha256=k1dPUJMXQs-OHc_CbwuyCH1qMxV_7LnRpy5RKbMlRm8,22011
|
|
2
|
+
fiqus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
fiqus/data/DataConductor.py,sha256=wthDctDDa81GO9TNTHwTTuQ9WK8fmyDmwqeEja8gFFM,13618
|
|
4
|
+
fiqus/data/DataFiQuS.py,sha256=8gT8xGA_kUrOiuAyUbSSc08ECK8tIcBlmVvGF-zWCH4,7808
|
|
5
|
+
fiqus/data/DataFiQuSCCT.py,sha256=pXBYgeuAb10H46nB1oRJjz4uZDMzkgCgjotXc8phfHs,7137
|
|
6
|
+
fiqus/data/DataFiQuSConductor.py,sha256=sa_enAWP3yW0sJwpfmad173ewIv4eFC8G75UPnKnB5w,2626
|
|
7
|
+
fiqus/data/DataFiQuSConductorAC_Strand.py,sha256=kkzcXLHKFScePjJ9tffAjBDbsV1RoCTVodZ-HBTdiO8,27909
|
|
8
|
+
fiqus/data/DataFiQuSMultipole.py,sha256=_rX9zP-xNTZioVmu4NCaFVWF66ipesp8cSiB0pmKsG4,32377
|
|
9
|
+
fiqus/data/DataFiQuSPancake3D.py,sha256=EI3ilF2rSbosUIWVDHeqJgkHZQ71wSujowl7W5I7RVo,136022
|
|
10
|
+
fiqus/data/DataMultipole.py,sha256=RObn5MGoe_Xtk-8mhB1eoil1Jd5DS6BhiLUuNmLbb-E,6793
|
|
11
|
+
fiqus/data/DataRoxieParser.py,sha256=v2F8ytjNnKLrVFizeBELb2dXu-78NH44CDLXO3CAP3I,9157
|
|
12
|
+
fiqus/data/DataSettings.py,sha256=zs5sEYUk4xjeMc_j8gt3PMji7V0yyMYizpXxBKv0aB0,3799
|
|
13
|
+
fiqus/data/DataWindingsCCT.py,sha256=45af8J8iAAiRlhO1eIjHsngNUWgpZAZ_UGL3aF8AJCI,1672
|
|
14
|
+
fiqus/data/RegionsModelFiQuS.py,sha256=xS4GONADNJuy-Vm81bR-RcMa-8m3aMH_WjOXtbDRlsQ,7778
|
|
15
|
+
fiqus/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
fiqus/geom_generators/GeometryCCT.py,sha256=W30vm8qmi_xe6Mkxqj8z3Wjs8nn0C9e2GnghsOxE9Tk,49067
|
|
17
|
+
fiqus/geom_generators/GeometryConductorAC_Strand.py,sha256=SKjzJ5I7D1Fc2UJSaHy_QS1TxHho5pk95v0kgxV7fyk,74625
|
|
18
|
+
fiqus/geom_generators/GeometryMultipole.py,sha256=eaxvzuayuUPc0TWFxScpImIpEze6KWfJ74KvvteldfQ,156572
|
|
19
|
+
fiqus/geom_generators/GeometryPancake3D.py,sha256=8SAWnJfqL888SOEaMV1f_-02iDR6O8-GKrklfQ5g-mM,180145
|
|
20
|
+
fiqus/geom_generators/GeometryPancake3DUtils.py,sha256=nmOEKtqzUWB5xbITFkIiO38FeLeIydFxtLrRyZXVQPg,23679
|
|
21
|
+
fiqus/geom_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
fiqus/getdp_runners/RunGetdpCCT.py,sha256=hXRy90LAFMFl52gV6SrEwW5KYyvF3D0fqTFoN0P017U,3043
|
|
23
|
+
fiqus/getdp_runners/RunGetdpConductorAC_Strand.py,sha256=SjaRNxGs7J1RQWVS_zocHF0rtxtD6UcOf28kxWDHKNo,9997
|
|
24
|
+
fiqus/getdp_runners/RunGetdpMultipole.py,sha256=mYinMVQDJx2zAZIypFbl7bybu7h3TKjlExZ5evZpqYU,8200
|
|
25
|
+
fiqus/getdp_runners/RunGetdpPancake3D.py,sha256=Jd8gI054BhEk4kHXs2--8oa3KUD80pcDfA-vYX8y174,10822
|
|
26
|
+
fiqus/getdp_runners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
fiqus/mains/MainCCT.py,sha256=XpDPlj5n8B70ksOF6AHaeTXB752kN7CMLktISoXqirA,4422
|
|
28
|
+
fiqus/mains/MainConductorAC_Strand.py,sha256=UsZV7t6hRSkwUMwsoWn2m7x-PuVM6yABqBjgLpC_9Qg,5015
|
|
29
|
+
fiqus/mains/MainMultipole.py,sha256=2a6f1q6w4eBK7iME6FSPGc0zX2DEX5aU2y1YehTIXlk,9634
|
|
30
|
+
fiqus/mains/MainPancake3D.py,sha256=FjMltWLzZN0-VqieexqhWMunMujTepM7BbAjlw6ULEg,23589
|
|
31
|
+
fiqus/mains/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
+
fiqus/mesh_generators/MeshCCT.py,sha256=e2oERrb2Vp7W8eAptijFq1vi-cUbYS_T3jCDqH3foIg,11227
|
|
33
|
+
fiqus/mesh_generators/MeshConductorAC_Strand.py,sha256=bz8kzFDd_XnRA892ifuCp11zMTZMQ5NdsNKSslP7gZc,42466
|
|
34
|
+
fiqus/mesh_generators/MeshMultipole.py,sha256=mjdjzw5RGlggoXAVvUqFM43yGXSwDNbta0z1l76c7uc,97181
|
|
35
|
+
fiqus/mesh_generators/MeshPancake3D.py,sha256=dIL-F070C5xlSK6m4kSA8D3OeKuVRoy0Ptz-4KHz4CI,126821
|
|
36
|
+
fiqus/mesh_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
+
fiqus/parsers/ParserCOND.py,sha256=nQyRRZf2Jbvf6ri5rdhq2P6b52Qbp2tTHuDRT4ChxHI,41376
|
|
38
|
+
fiqus/parsers/ParserDAT.py,sha256=SPJHDbPuk1e7F9FZ3i7oRvOvYGO4LIkpy-ROGJBUEQ0,659
|
|
39
|
+
fiqus/parsers/ParserGetDPOnSection.py,sha256=fKDiGJfsVHceZ4ZPnQo3ue2COd7AlbnrkGsX5pXaYqA,8196
|
|
40
|
+
fiqus/parsers/ParserGetDPTimeTable.py,sha256=-OBbvt89lbxkUy8pzOciq9qPs47d_dK_vuMXndfvMmE,4964
|
|
41
|
+
fiqus/parsers/ParserMSH.py,sha256=ZgLQQhEukhvxp2-ccbIQu4uWlSOp3yCa-8thEKi61H8,1859
|
|
42
|
+
fiqus/parsers/ParserPOS.py,sha256=tihug_0UnCP7ELJK0Tl2gGrHxvCC5V4Q7tpv4zd-cVY,9907
|
|
43
|
+
fiqus/parsers/ParserRES.py,sha256=e8M8bsIgkAzr0tDcQSeEgsLVLGOmE_j6ju3fPTPQEU4,5842
|
|
44
|
+
fiqus/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
+
fiqus/plotters/PlotPythonCCT.py,sha256=WITIiKSfHSvGVL52PiMWxo6ydeswe-PBE9Ta-QnMJ9E,6200
|
|
46
|
+
fiqus/plotters/PlotPythonConductorAC.py,sha256=rugT6Czctk4lrZ0NBt23ZFBVZlkZD-zihHcbgoiwP9c,45465
|
|
47
|
+
fiqus/plotters/PlotPythonMultipole.py,sha256=BYbdeEDgB3sqeRR7_uHb2CVm2SQ3pAbvhkLJBcuS-Yg,463
|
|
48
|
+
fiqus/plotters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
+
fiqus/post_processors/PostProcessCCT.py,sha256=csozi3iyW5cRoT97em0F0s_Egd-DG8wRAiWfLnNl6Sk,28003
|
|
50
|
+
fiqus/post_processors/PostProcessConductorAC.py,sha256=Mv3CalGj2_pF383nZHZ-uv1j-3nz8HUjsd1jSd6AY8M,2135
|
|
51
|
+
fiqus/post_processors/PostProcessMultipole.py,sha256=y7WbdDMJx68DVXeokD0chuJitU5j39FWGOIlqKsxELA,25398
|
|
52
|
+
fiqus/post_processors/PostProcessPancake3D.py,sha256=PjGaohIj_oWfqyHH-Fr3CgiOitUpjGjYe2Rm3wqtM1g,12940
|
|
53
|
+
fiqus/post_processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
+
fiqus/pre_processors/PreProcessCCT.py,sha256=z1TWuXNnSK2Jz93P-73XRZZO7GAlyLLEiIYnS39byCE,9042
|
|
55
|
+
fiqus/pre_processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
+
fiqus/pro_assemblers/ProAssembler.py,sha256=DrVd1wiuv-7PIj3G38crBu07aMPyE3FOapODJN7wl9E,3572
|
|
57
|
+
fiqus/pro_assemblers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
+
fiqus/pro_material_functions/ironBHcurves.pro,sha256=-4xfRg4BYefTEoNawPo3nbsrJJmiSxdOTQG4aAzbvLI,17589
|
|
59
|
+
fiqus/pro_templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
+
fiqus/pro_templates/combined/CCT_template.pro,sha256=6r_fz9bH7AReCfDn33lyu472kjB0rkTma9_r4vBqV0U,13558
|
|
61
|
+
fiqus/pro_templates/combined/ConductorAC_template.pro,sha256=8aZwuRveHY2R0bEvC9Ysz_SISPLU7eNvi5szO_RUEtA,60694
|
|
62
|
+
fiqus/pro_templates/combined/Multipole_template.pro,sha256=fKCqZOpc_H_9F4u3se8MQLxe7iMPYFRFacxK7bq6aFw,97045
|
|
63
|
+
fiqus/pro_templates/combined/Pancake3D_template.pro,sha256=hFHr0sjmzL7_kSPCVJ-wAGO94XNx6jlXzCLBLvmsNds,209702
|
|
64
|
+
fiqus/pro_templates/combined/TSA_materials.pro,sha256=Ny_Vqee1oBgb0mt1ESwqOROBh3D9h2KQgz6hFPFAY5Q,10612
|
|
65
|
+
fiqus/pro_templates/combined/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
+
fiqus/pro_templates/combined/materials.pro,sha256=D-cBOIMaQyYffIfoR4yRiK69Z6sxHu2QtyjhDIKFiXc,7038
|
|
67
|
+
fiqus/pro_templates/separated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
+
fiqus/utils/Utils.py,sha256=J8HECe0Yz50nTWtpUb8PGJGrX75wgvUkD30LopHTScw,35462
|
|
69
|
+
fiqus/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
+
fiqus/utils/update_data_settings.py,sha256=Cl_vP-7MXFHG3LiDE8nVtL7CwK9DUvDhxXV7sabP9to,1295
|
|
71
|
+
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
+
tests/test_FiQuS.py,sha256=mlY5eRp-sE_ubaPG7HHAEsC4Q3iQwI76nfOclPg7m-M,15529
|
|
73
|
+
tests/test_geometry_generators.py,sha256=1bk3yYaVIQ_XabaIrqIrwjOSvC0eCtBz7NeIEDlPCq8,8944
|
|
74
|
+
tests/test_mesh_generators.py,sha256=vGFP6AoMpMcpBDXqTS4323RuGhJIJ_xKu39Z7mWnm9I,10699
|
|
75
|
+
tests/test_solvers.py,sha256=-P8Q_HIX3s02e23bk9_SW672v7Vwgs1-e503tenFWoc,10955
|
|
76
|
+
tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
|
+
tests/utils/fiqus_test_classes.py,sha256=i7G0wWA7MNdj-pAnXnGrpnv3KXx9JMDRUbKwFMRgJLQ,30050
|
|
78
|
+
tests/utils/generate_reference_files_ConductorAC.py,sha256=F5KK1AmHg1AmjZL6wRoR4R4kPpQu5KyLZtk1EnDsS1I,1619
|
|
79
|
+
tests/utils/generate_reference_files_Pancake3D.py,sha256=9sULcDOmbotrbYHz8DqGv6Km7ThfltnCHFojHUx193U,3126
|
|
80
|
+
tests/utils/helpers.py,sha256=bX3jz6Cux175TVWMpeaMo1SspQAewCSzKsC4ZwRBRR4,4052
|
|
81
|
+
fiqus-2024.12.1.dist-info/METADATA,sha256=nHd070JacuyInCrVTNi9tUwgE04dwNcZ4UfVCjcv-sw,7884
|
|
82
|
+
fiqus-2024.12.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
83
|
+
fiqus-2024.12.1.dist-info/top_level.txt,sha256=oGzSIyoVc1zYg14o67zI3QFwWsJvqNzNT0-te9WbUQc,12
|
|
84
|
+
fiqus-2024.12.1.dist-info/RECORD,,
|
tests/test_FiQuS.py
CHANGED
|
@@ -26,7 +26,7 @@ class TestFiQuS(unittest.TestCase):
|
|
|
26
26
|
os.chdir(os.path.dirname(__file__)) # move to the directory where this file is located
|
|
27
27
|
print('Test is run from folder: {}'.format(os.getcwd()))
|
|
28
28
|
|
|
29
|
-
self.model_names = ['
|
|
29
|
+
self.model_names = ['MCBRD_2d2a_2n2a_0i']
|
|
30
30
|
|
|
31
31
|
def tearDown(self) -> None:
|
|
32
32
|
"""
|
|
@@ -14,7 +14,8 @@ class TestGeometryGenerators(FiQuSGeometryTests):
|
|
|
14
14
|
"TEST_Pancake3D_REFStructured",
|
|
15
15
|
"TEST_Pancake3D_TSA",
|
|
16
16
|
"TEST_Pancake3D_TSAStructured",
|
|
17
|
-
"TEST_Pancake3D_TSAInsulating"
|
|
17
|
+
"TEST_Pancake3D_TSAInsulating",
|
|
18
|
+
"TEST_Pancake3D_TSAInsulatingJcVsLength"
|
|
18
19
|
]
|
|
19
20
|
|
|
20
21
|
for model_name in model_names:
|
|
@@ -45,7 +46,7 @@ class TestGeometryGenerators(FiQuSGeometryTests):
|
|
|
45
46
|
data_model=data_model, file_name=model_name, file_extension="vi"
|
|
46
47
|
)
|
|
47
48
|
self.compare_json_or_yaml_files(vi_file, reference_vi_file)
|
|
48
|
-
|
|
49
|
+
|
|
49
50
|
def test_ConductorAC_Strand(self):
|
|
50
51
|
"""
|
|
51
52
|
Checks if ConductorAC geometry generators work correctly by comparing the number
|
|
@@ -87,5 +88,103 @@ class TestGeometryGenerators(FiQuSGeometryTests):
|
|
|
87
88
|
)
|
|
88
89
|
self.compare_json_or_yaml_files(geometry_yaml_file, reference_geometry_yaml_file, tolerance=1e-9)
|
|
89
90
|
|
|
91
|
+
def test_Multipole(self):
|
|
92
|
+
"""
|
|
93
|
+
Checks if Multipole geometry generators work correctly by comparing generated
|
|
94
|
+
geometry files to reference files that were checked manually.
|
|
95
|
+
"""
|
|
96
|
+
model_names = [
|
|
97
|
+
"TEST_MULTIPOLE_MBH_1in1_TSA_withQH",
|
|
98
|
+
"TEST_MULTIPOLE_MBH_1in1_TSA",
|
|
99
|
+
"TEST_MULTIPOLE_MBH_1in1_REF",
|
|
100
|
+
"TEST_MULTIPOLE_SMC_TSA_withQH",
|
|
101
|
+
"TEST_MULTIPOLE_SMC_TSA",
|
|
102
|
+
"TEST_MULTIPOLE_SMC_REF",
|
|
103
|
+
"TEST_MULTIPOLE_4COND_TSA",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
for model_name in model_names:
|
|
107
|
+
with self.subTest(model_name=model_name):
|
|
108
|
+
data_model = self.get_data_model(model_name)
|
|
109
|
+
|
|
110
|
+
# data_model can be modified here if necessary
|
|
111
|
+
# Example:
|
|
112
|
+
|
|
113
|
+
# data_model.magnet.geometry.N = 3
|
|
114
|
+
|
|
115
|
+
self.generate_geometry(data_model, model_name)
|
|
116
|
+
|
|
117
|
+
thermal_model_name = f"{model_name}_TH"
|
|
118
|
+
electromagnetic_model_name = f"{model_name}_EM"
|
|
119
|
+
|
|
120
|
+
# Compare the number of entities with the reference file:
|
|
121
|
+
geometry_file_EM = self.get_path_to_generated_file(
|
|
122
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="brep"
|
|
123
|
+
)
|
|
124
|
+
reference_file_EM = self.get_path_to_reference_file(
|
|
125
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="brep"
|
|
126
|
+
)
|
|
127
|
+
self.compare_number_of_entities(geometry_file_EM, reference_file_EM)
|
|
128
|
+
|
|
129
|
+
geometry_file_TH = self.get_path_to_generated_file(
|
|
130
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="brep"
|
|
131
|
+
)
|
|
132
|
+
reference_file_TH = self.get_path_to_reference_file(
|
|
133
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="brep"
|
|
134
|
+
)
|
|
135
|
+
self.compare_number_of_entities(geometry_file_TH, reference_file_TH)
|
|
136
|
+
|
|
137
|
+
# Compare the aux files:
|
|
138
|
+
aux_file_EM = self.get_path_to_generated_file(
|
|
139
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="aux"
|
|
140
|
+
)
|
|
141
|
+
reference_aux_file_EM = self.get_path_to_reference_file(
|
|
142
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="aux"
|
|
143
|
+
)
|
|
144
|
+
self.compare_json_or_yaml_files(aux_file_EM, reference_aux_file_EM)
|
|
145
|
+
|
|
146
|
+
aux_file_TH = self.get_path_to_generated_file(
|
|
147
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="aux"
|
|
148
|
+
)
|
|
149
|
+
reference_aux_file_TH = self.get_path_to_reference_file(
|
|
150
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="aux"
|
|
151
|
+
)
|
|
152
|
+
self.compare_json_or_yaml_files(aux_file_TH, reference_aux_file_TH)
|
|
153
|
+
|
|
154
|
+
# Compare the strs files:
|
|
155
|
+
strs_file_EM = self.get_path_to_generated_file(
|
|
156
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="strs"
|
|
157
|
+
)
|
|
158
|
+
reference_strs_file_EM = self.get_path_to_reference_file(
|
|
159
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="strs"
|
|
160
|
+
)
|
|
161
|
+
self.compare_json_or_yaml_files(strs_file_EM, reference_strs_file_EM)
|
|
162
|
+
|
|
163
|
+
strs_file_TH = self.get_path_to_generated_file(
|
|
164
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="strs"
|
|
165
|
+
)
|
|
166
|
+
reference_strs_file_TH = self.get_path_to_reference_file(
|
|
167
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="strs"
|
|
168
|
+
)
|
|
169
|
+
self.compare_json_or_yaml_files(strs_file_TH, reference_strs_file_TH)
|
|
170
|
+
|
|
171
|
+
# Compare the crns files:
|
|
172
|
+
crns_file = self.get_path_to_generated_file(
|
|
173
|
+
data_model=data_model, file_name=model_name, file_extension="crns"
|
|
174
|
+
)
|
|
175
|
+
reference_crns_file = self.get_path_to_reference_file(
|
|
176
|
+
data_model=data_model, file_name=model_name, file_extension="crns"
|
|
177
|
+
)
|
|
178
|
+
self.compare_json_or_yaml_files(crns_file, reference_crns_file)
|
|
179
|
+
|
|
180
|
+
# Compare the geometry yamls:
|
|
181
|
+
geometry_file = self.get_path_to_generated_file(
|
|
182
|
+
data_model=data_model, file_name="geometry", file_extension="yaml"
|
|
183
|
+
)
|
|
184
|
+
reference_geometry_file = self.get_path_to_reference_file(
|
|
185
|
+
data_model=data_model, file_name="geometry", file_extension="yaml"
|
|
186
|
+
)
|
|
187
|
+
self.compare_json_or_yaml_files(geometry_file, reference_geometry_file, excluded_keys="geom_file_path")
|
|
188
|
+
|
|
90
189
|
if __name__ == "__main__":
|
|
91
190
|
unittest.main()
|
tests/test_mesh_generators.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import unittest
|
|
2
2
|
from tests.utils.fiqus_test_classes import FiQuSMeshTests
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
class TestMeshGenerators(FiQuSMeshTests):
|
|
5
6
|
def test_Pancake3D(self):
|
|
6
7
|
"""
|
|
@@ -13,7 +14,8 @@ class TestMeshGenerators(FiQuSMeshTests):
|
|
|
13
14
|
"TEST_Pancake3D_REFStructured",
|
|
14
15
|
"TEST_Pancake3D_TSA",
|
|
15
16
|
"TEST_Pancake3D_TSAStructured",
|
|
16
|
-
"TEST_Pancake3D_TSAInsulating"
|
|
17
|
+
"TEST_Pancake3D_TSAInsulating",
|
|
18
|
+
"TEST_Pancake3D_TSAInsulatingJcVsLength"
|
|
17
19
|
]
|
|
18
20
|
|
|
19
21
|
for model_name in model_names:
|
|
@@ -94,6 +96,157 @@ class TestMeshGenerators(FiQuSMeshTests):
|
|
|
94
96
|
)
|
|
95
97
|
self.compare_json_or_yaml_files(regions_file, reference_regions_file)
|
|
96
98
|
|
|
99
|
+
# def test_CCT(self):
|
|
100
|
+
# """
|
|
101
|
+
# Checks if CCT geometry generators work correctly by comparing the number
|
|
102
|
+
# of entities in the generated geometry file to the reference file that was
|
|
103
|
+
# checked manually.
|
|
104
|
+
# """
|
|
105
|
+
# model_names = [
|
|
106
|
+
# "MCBRD_2d2a_2n2a_0i",
|
|
107
|
+
# ]
|
|
108
|
+
|
|
109
|
+
# for model_name in model_names:
|
|
110
|
+
# with self.subTest(model_name=model_name):
|
|
111
|
+
# data_model = self.get_data_model(model_name)
|
|
112
|
+
|
|
113
|
+
# # data_model can be modified here if necessary
|
|
114
|
+
# # Example:
|
|
115
|
+
|
|
116
|
+
# # data_model.magnet.mesh.wi.axne = 30
|
|
117
|
+
|
|
118
|
+
# self.generate_mesh(data_model, model_name)
|
|
119
|
+
|
|
120
|
+
# # Compare the number of entities with the reference file:
|
|
121
|
+
# mesh_file = self.get_path_to_generated_file(
|
|
122
|
+
# data_model=data_model, file_name=model_name, file_extension="msh"
|
|
123
|
+
# )
|
|
124
|
+
# reference_file = self.get_path_to_reference_file(
|
|
125
|
+
# data_model=data_model, file_name=model_name, file_extension="msh"
|
|
126
|
+
# )
|
|
127
|
+
# self.compare_mesh_qualities(mesh_file, reference_file)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def test_Multipole(self):
|
|
131
|
+
"""
|
|
132
|
+
Checks if Multipole mesh generators work correctly by comparing against
|
|
133
|
+
reference files that were checked manually.
|
|
134
|
+
"""
|
|
135
|
+
model_names = [
|
|
136
|
+
"TEST_MULTIPOLE_MBH_1in1_TSA_withQH",
|
|
137
|
+
"TEST_MULTIPOLE_MBH_1in1_TSA",
|
|
138
|
+
"TEST_MULTIPOLE_MBH_1in1_REF",
|
|
139
|
+
"TEST_MULTIPOLE_SMC_TSA_withQH",
|
|
140
|
+
"TEST_MULTIPOLE_SMC_TSA",
|
|
141
|
+
"TEST_MULTIPOLE_SMC_REF",
|
|
142
|
+
"TEST_MULTIPOLE_4COND_TSA",
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
for model_name in model_names:
|
|
146
|
+
with self.subTest(model_name=model_name):
|
|
147
|
+
data_model = self.get_data_model(model_name)
|
|
148
|
+
|
|
149
|
+
is_TSA = "TSA" in model_name
|
|
150
|
+
|
|
151
|
+
self.generate_mesh(data_model, model_name)
|
|
152
|
+
|
|
153
|
+
thermal_model_name = f"{model_name}_TH"
|
|
154
|
+
electromagnetic_model_name = f"{model_name}_EM"
|
|
155
|
+
|
|
156
|
+
# Compare mesh qualities with the reference file:
|
|
157
|
+
mesh_file_EM = self.get_path_to_generated_file(
|
|
158
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="msh"
|
|
159
|
+
)
|
|
160
|
+
reference_file_EM = self.get_path_to_reference_file(
|
|
161
|
+
data_model=data_model, file_name=electromagnetic_model_name, file_extension="msh"
|
|
162
|
+
)
|
|
163
|
+
self.compare_mesh_qualities(mesh_file_EM, reference_file_EM)
|
|
164
|
+
|
|
165
|
+
mesh_file_TH = self.get_path_to_generated_file(
|
|
166
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="msh"
|
|
167
|
+
)
|
|
168
|
+
reference_file_TH = self.get_path_to_reference_file(
|
|
169
|
+
data_model=data_model, file_name=thermal_model_name, file_extension="msh"
|
|
170
|
+
)
|
|
171
|
+
self.compare_mesh_qualities(mesh_file_TH, reference_file_TH)
|
|
172
|
+
|
|
173
|
+
# Compare the reg files:
|
|
174
|
+
regions_file_EM = self.get_path_to_generated_file(
|
|
175
|
+
data_model=data_model,
|
|
176
|
+
file_name=electromagnetic_model_name,
|
|
177
|
+
file_extension="reg",
|
|
178
|
+
)
|
|
179
|
+
reference_regions_file_EM = self.get_path_to_reference_file(
|
|
180
|
+
data_model=data_model,
|
|
181
|
+
file_name=electromagnetic_model_name,
|
|
182
|
+
file_extension="reg",
|
|
183
|
+
)
|
|
184
|
+
self.compare_json_or_yaml_files(regions_file_EM, reference_regions_file_EM)
|
|
185
|
+
|
|
186
|
+
regions_file_TH = self.get_path_to_generated_file(
|
|
187
|
+
data_model=data_model,
|
|
188
|
+
file_name=thermal_model_name,
|
|
189
|
+
file_extension="reg",
|
|
190
|
+
)
|
|
191
|
+
reference_regions_file_TH = self.get_path_to_reference_file(
|
|
192
|
+
data_model=data_model,
|
|
193
|
+
file_name=thermal_model_name,
|
|
194
|
+
file_extension="reg",
|
|
195
|
+
)
|
|
196
|
+
self.compare_json_or_yaml_files(regions_file_TH, reference_regions_file_TH)
|
|
197
|
+
|
|
198
|
+
# Compare the aux files:
|
|
199
|
+
aux_file_EM = self.get_path_to_generated_file(
|
|
200
|
+
data_model=data_model,
|
|
201
|
+
file_name=electromagnetic_model_name,
|
|
202
|
+
file_extension="aux",
|
|
203
|
+
)
|
|
204
|
+
reference_aux_file_EM = self.get_path_to_reference_file(
|
|
205
|
+
data_model=data_model,
|
|
206
|
+
file_name=electromagnetic_model_name,
|
|
207
|
+
file_extension="aux",
|
|
208
|
+
)
|
|
209
|
+
self.compare_json_or_yaml_files(aux_file_EM, reference_aux_file_EM)
|
|
210
|
+
|
|
211
|
+
aux_file_TH = self.get_path_to_generated_file(
|
|
212
|
+
data_model=data_model,
|
|
213
|
+
file_name=thermal_model_name,
|
|
214
|
+
file_extension="aux",
|
|
215
|
+
)
|
|
216
|
+
reference_aux_file_TH = self.get_path_to_reference_file(
|
|
217
|
+
data_model=data_model,
|
|
218
|
+
file_name=thermal_model_name,
|
|
219
|
+
file_extension="aux",
|
|
220
|
+
)
|
|
221
|
+
self.compare_json_or_yaml_files(aux_file_TH, reference_aux_file_TH)
|
|
222
|
+
|
|
223
|
+
if is_TSA:
|
|
224
|
+
# Compare the reco file:
|
|
225
|
+
reco_file = self.get_path_to_generated_file(
|
|
226
|
+
data_model=data_model,
|
|
227
|
+
file_name=thermal_model_name,
|
|
228
|
+
file_extension="reco",
|
|
229
|
+
)
|
|
230
|
+
reference_reco_file = self.get_path_to_reference_file(
|
|
231
|
+
data_model=data_model,
|
|
232
|
+
file_name=thermal_model_name,
|
|
233
|
+
file_extension="reco",
|
|
234
|
+
)
|
|
235
|
+
self.compare_json_or_yaml_files(reco_file, reference_reco_file)
|
|
236
|
+
|
|
237
|
+
# Compare the mesh.yaml file:
|
|
238
|
+
mesh_yaml_file = self.get_path_to_generated_file(
|
|
239
|
+
data_model=data_model,
|
|
240
|
+
file_name="mesh",
|
|
241
|
+
file_extension="yaml",
|
|
242
|
+
)
|
|
243
|
+
reference_mesh_yaml_file = self.get_path_to_reference_file(
|
|
244
|
+
data_model=data_model,
|
|
245
|
+
file_name="mesh",
|
|
246
|
+
file_extension="yaml",
|
|
247
|
+
)
|
|
248
|
+
self.compare_json_or_yaml_files(mesh_yaml_file, reference_mesh_yaml_file)
|
|
249
|
+
|
|
97
250
|
|
|
98
251
|
if __name__ == "__main__":
|
|
99
252
|
unittest.main()
|