emerge 1.0.7__py3-none-any.whl → 1.1.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.

Potentially problematic release.


This version of emerge might be problematic. Click here for more details.

Files changed (33) hide show
  1. emerge/__init__.py +15 -3
  2. emerge/_emerge/const.py +2 -1
  3. emerge/_emerge/elements/ned2_interp.py +122 -42
  4. emerge/_emerge/geo/__init__.py +1 -1
  5. emerge/_emerge/geo/operations.py +20 -0
  6. emerge/_emerge/geo/pcb.py +162 -71
  7. emerge/_emerge/geo/shapes.py +12 -7
  8. emerge/_emerge/geo/step.py +177 -41
  9. emerge/_emerge/geometry.py +189 -27
  10. emerge/_emerge/logsettings.py +26 -2
  11. emerge/_emerge/material.py +2 -0
  12. emerge/_emerge/mesh3d.py +6 -8
  13. emerge/_emerge/mesher.py +67 -11
  14. emerge/_emerge/mth/common_functions.py +1 -1
  15. emerge/_emerge/mth/optimized.py +2 -2
  16. emerge/_emerge/physics/microwave/adaptive_mesh.py +549 -116
  17. emerge/_emerge/physics/microwave/assembly/assembler.py +9 -1
  18. emerge/_emerge/physics/microwave/microwave_3d.py +133 -83
  19. emerge/_emerge/physics/microwave/microwave_bc.py +158 -8
  20. emerge/_emerge/physics/microwave/microwave_data.py +94 -5
  21. emerge/_emerge/plot/pyvista/display.py +36 -23
  22. emerge/_emerge/selection.py +17 -2
  23. emerge/_emerge/settings.py +124 -6
  24. emerge/_emerge/simmodel.py +273 -150
  25. emerge/_emerge/simstate.py +106 -0
  26. emerge/_emerge/simulation_data.py +11 -23
  27. emerge/_emerge/solve_interfaces/cudss_interface.py +20 -1
  28. emerge/_emerge/solver.py +4 -4
  29. {emerge-1.0.7.dist-info → emerge-1.1.1.dist-info}/METADATA +7 -3
  30. {emerge-1.0.7.dist-info → emerge-1.1.1.dist-info}/RECORD +33 -32
  31. {emerge-1.0.7.dist-info → emerge-1.1.1.dist-info}/WHEEL +0 -0
  32. {emerge-1.0.7.dist-info → emerge-1.1.1.dist-info}/entry_points.txt +0 -0
  33. {emerge-1.0.7.dist-info → emerge-1.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,12 +1,130 @@
1
+ # EMerge is an open source Python based FEM EM simulation module.
2
+ # Copyright (C) 2025 Robert Fennis.
3
+
4
+ # This program is free software; you can redistribute it and/or
5
+ # modify it under the terms of the GNU General Public License
6
+ # as published by the Free Software Foundation; either version 2
7
+ # of the License, or (at your option) any later version.
8
+
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program; if not, see
16
+ # <https://www.gnu.org/licenses/>.
1
17
 
2
- from typing import Literal
3
18
 
4
19
  class Settings:
5
-
6
20
  def __init__(self):
7
- self.mw_2dbc: bool = True
8
- self.mw_2dbc_lim: float = 10.0
9
- self.mw_2dbc_peclim: float = 1e8
10
- self.mw_3d_peclim: float = 1e7
21
+ self._mw_2dbc: bool = True
22
+ self._mw_2dbc_lim: float = 10.0
23
+ self._mw_2dbc_peclim: float = 1e8
24
+ self._mw_3d_peclim: float = 1e7
25
+ self._mw_cap_sp_single: bool = True
26
+ self._mw_cap_sp_col: bool = True
27
+ self._mw_recip_sp: bool = False
28
+ self._size_check: bool = True
29
+
30
+
31
+
32
+ ############################################################
33
+ # GETTERS #
34
+ ############################################################
35
+
36
+ @property
37
+ def mw_2dbc(self) -> bool:
38
+ """ This variable determines is 2D boundary conditions will be automatically assigned based on material properties.
39
+ """
40
+ return self._mw_2dbc
41
+
42
+ @property
43
+ def mw_2dbc_lim(self) -> float:
44
+ """This variable is the bulk conductivity limit in S/m beyond which a surface material will automatically be assigned as a SurfaceImpedance boundary condition."""
45
+ return self._mw_2dbc_lim
46
+
47
+ @property
48
+ def mw_2dbc_peclim(self) -> float:
49
+ """This variable determines a bulk conductivity limit in S/m beyond which a conductor is assigned PEC instead of a SurfaceImpedance boundary condition."""
50
+ return self._mw_2dbc_peclim
51
+
52
+ @property
53
+ def mw_3d_peclim(self) -> float:
54
+ """This variable determines if bulk conductors with a bulk conductivity beyond a limit (.mw_3d_peclim) are considered PEC.
55
+
56
+ """
57
+ return self._mw_3d_peclim
58
+
59
+ @property
60
+ def size_check(self) -> bool:
61
+ """If a total volume check should be considered (100,000 tetrahedra) to hard crash the simulation assuming that the problem size will be too high to solver.
62
+ 100.000 Tetrahedra would yield approximately 700k Degrees of Freedom
63
+ """
64
+ return self._size_check
65
+
66
+ @property
67
+ def mw_cap_sp_single(self) -> bool:
68
+ """If Single S-parameters should be capped with their magnitude to at most 1.0"""
69
+ return self._mw_cap_sp_single
70
+
71
+ @property
72
+ def mw_cap_sp_col(self) -> bool:
73
+ """If Single S-parameters columns should be power normalized to 1.0"""
74
+ return self._mw_cap_sp_col
75
+
76
+ @property
77
+ def mw_recip_sp(self) -> bool:
78
+ """If reciprodicty should be explicitly enforced"""
79
+ return self._mw_recip_sp
80
+ ############################################################
81
+ # SETTERS #
82
+ ############################################################
83
+
84
+ @mw_2dbc.setter
85
+ def mw_2dbc(self, value: bool) -> None:
86
+ """ This variable determines is 2D boundary conditions will be automatically assigned based on material properties.
87
+ """
88
+ self._mw_2dbc = value
11
89
 
90
+ @mw_2dbc_lim.setter
91
+ def mw_2dbc_lim(self, value: float):
92
+ """This variable is the bulk conductivity limit in S/m beyond which a surface material will automatically be assigned as a SurfaceImpedance boundary condition."""
93
+ self._mw_2dbc_lim = value
94
+
95
+ @mw_2dbc_peclim.setter
96
+ def mw_2dbc_peclim(self, value: float):
97
+ """This variable determines a bulk conductivity limit in S/m beyond which a conductor is assigned PEC instead of a SurfaceImpedance boundary condition."""
98
+
99
+ self._mw_2dbc_peclim = value
100
+
101
+ @mw_3d_peclim.setter
102
+ def mw_3d_peclim(self, value: float):
103
+ """This variable determines if bulk conductors with a bulk conductivity beyond a limit (.mw_3d_peclim) are considered PEC.
104
+
105
+ """
106
+ self._mw_3d_peclim = value
107
+
108
+ @size_check.setter
109
+ def size_check(self, value: bool):
110
+ """If a total volume check should be considered (100,000 tetrahedra) to hard crash the simulation assuming that the problem size will be too high to solver.
111
+ 100.000 Tetrahedra would yield approximately 700k Degrees of Freedom
112
+ """
113
+ self._size_check = value
114
+
115
+ @mw_cap_sp_single.setter
116
+ def mw_cap_sp_single(self, value: bool) -> bool:
117
+ """If Single S-parameters should be capped with their magnitude to at most 1.0"""
118
+ self._mw_cap_sp_single = value
119
+
120
+ @mw_cap_sp_col.setter
121
+ def mw_cap_sp_col(self, value: bool) -> bool:
122
+ """If Single S-parameters columns should be power normalized to 1.0"""
123
+ self._mw_cap_sp_col = value
124
+
125
+ @mw_recip_sp.setter
126
+ def mw_recip_sp(self, value: bool) -> bool:
127
+ """If reciprodicty should be explicitly enforced"""
128
+ self._mw_recip_sp = value
129
+
12
130
  DEFAULT_SETTINGS = Settings()