foamlib 1.1.0__py3-none-any.whl → 1.1.2__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.
- foamlib/__init__.py +1 -1
- foamlib/_cases/_base.py +15 -6
- foamlib/_files/_parsing.py +0 -4
- foamlib/_files/_serialization.py +1 -1
- {foamlib-1.1.0.dist-info → foamlib-1.1.2.dist-info}/METADATA +1 -1
- {foamlib-1.1.0.dist-info → foamlib-1.1.2.dist-info}/RECORD +8 -8
- {foamlib-1.1.0.dist-info → foamlib-1.1.2.dist-info}/WHEEL +0 -0
- {foamlib-1.1.0.dist-info → foamlib-1.1.2.dist-info}/licenses/LICENSE.txt +0 -0
foamlib/__init__.py
CHANGED
foamlib/_cases/_base.py
CHANGED
@@ -174,12 +174,21 @@ class FoamCaseBase(Sequence["FoamCaseBase.TimeDirectory"]):
|
|
174
174
|
|
175
175
|
@property
|
176
176
|
def application(self) -> str:
|
177
|
-
"""The application name
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
177
|
+
"""The application name."""
|
178
|
+
control_dict = self.control_dict
|
179
|
+
try:
|
180
|
+
ret = control_dict["application"]
|
181
|
+
except KeyError:
|
182
|
+
if "solver" in control_dict:
|
183
|
+
return "foamRun"
|
184
|
+
if "regionSolvers" in control_dict:
|
185
|
+
return "foamMultiRun"
|
186
|
+
raise
|
187
|
+
else:
|
188
|
+
if not isinstance(ret, str):
|
189
|
+
msg = f"application in {control_dict} is not a string: {ret}"
|
190
|
+
raise TypeError(msg)
|
191
|
+
return ret
|
183
192
|
|
184
193
|
@property
|
185
194
|
def control_dict(self) -> FoamFile:
|
foamlib/_files/_parsing.py
CHANGED
@@ -334,14 +334,10 @@ _SWITCH = (
|
|
334
334
|
Keyword("yes", _IDENTBODYCHARS)
|
335
335
|
| Keyword("true", _IDENTBODYCHARS)
|
336
336
|
| Keyword("on", _IDENTBODYCHARS)
|
337
|
-
| Keyword("y", _IDENTBODYCHARS)
|
338
|
-
| Keyword("t", _IDENTBODYCHARS)
|
339
337
|
).set_parse_action(lambda: True) | (
|
340
338
|
Keyword("no", _IDENTBODYCHARS)
|
341
339
|
| Keyword("false", _IDENTBODYCHARS)
|
342
340
|
| Keyword("off", _IDENTBODYCHARS)
|
343
|
-
| Keyword("n", _IDENTBODYCHARS)
|
344
|
-
| Keyword("f", _IDENTBODYCHARS)
|
345
341
|
).set_parse_action(lambda: False)
|
346
342
|
_DIMENSIONS = (
|
347
343
|
Literal("[").suppress() + common.number[0, 7] + Literal("]").suppress()
|
foamlib/_files/_serialization.py
CHANGED
@@ -126,7 +126,7 @@ def normalize_data(
|
|
126
126
|
return [normalize_data(d) for d in data] # type: ignore [arg-type, return-value]
|
127
127
|
|
128
128
|
if isinstance(data, tuple) and not isinstance(data, DimensionSet):
|
129
|
-
return tuple(normalize_data(d, keywords=keywords) for d in data) # type: ignore [
|
129
|
+
return tuple(normalize_data(d, keywords=keywords) for d in data) # type: ignore [arg-type]
|
130
130
|
|
131
131
|
if isinstance(data, str):
|
132
132
|
s = loads(data, keywords=keywords)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
foamlib/__init__.py,sha256
|
1
|
+
foamlib/__init__.py,sha256=-38zHYR61nQjgx4P0fPVm1iiqbtZbe7rm4kS9ONHn38,452
|
2
2
|
foamlib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
foamlib/_cases/__init__.py,sha256=_A1TTHuQfS9FH2_33lSEyLtOJZGFHZBco1tWJCVOHks,358
|
4
4
|
foamlib/_cases/_async.py,sha256=1syaHJ_OjB64SntT-rGOeV8IBFYs6ud4ZEcNrCDczIM,11784
|
5
|
-
foamlib/_cases/_base.py,sha256=
|
5
|
+
foamlib/_cases/_base.py,sha256=nYC88JgwJDeStNnwnqWNBPfc3M8tHj22tRQOnqiliMA,7718
|
6
6
|
foamlib/_cases/_run.py,sha256=C5sf-PWE73cqyPVmmWDiZU3V9QYVsrhSXpgil7aIp10,15659
|
7
7
|
foamlib/_cases/_slurm.py,sha256=X8eSL_tDnip3bPHb2Fot-n1yD0FfiVP5sCxHxjKt1f0,2748
|
8
8
|
foamlib/_cases/_subprocess.py,sha256=VHV2SuOLqa711an6kCuvN6UlIkeh4qqFfdrpNoKzQps,5630
|
@@ -11,8 +11,8 @@ foamlib/_cases/_util.py,sha256=QCizfbuJdOCeF9ogU2R-y-iWX5kfaOA4U2W68t6QlOM,2544
|
|
11
11
|
foamlib/_files/__init__.py,sha256=q1vkjXnjnSZvo45jPAICpWeF2LZv5V6xfzAR6S8fS5A,96
|
12
12
|
foamlib/_files/_files.py,sha256=uMCn4kNdVJBbcEl7sTSDn9bpc6JUZtNUBbyio7oMqSg,24346
|
13
13
|
foamlib/_files/_io.py,sha256=BGbbm6HKxL2ka0YMCmHqZQZ1R4PPQlkvWWb4FHMAS8k,2217
|
14
|
-
foamlib/_files/_parsing.py,sha256=
|
15
|
-
foamlib/_files/_serialization.py,sha256=
|
14
|
+
foamlib/_files/_parsing.py,sha256=zYDZohuxjsNjC0LwAVbl7C-Gs6QSJ2f1D0Bp-8tkwkM,20306
|
15
|
+
foamlib/_files/_serialization.py,sha256=4sN0Bx1Nf5uFga871xxIqJlGcL_wl8_oVedPCD_8gsY,8054
|
16
16
|
foamlib/_files/_types.py,sha256=fPoQeWMfFn5VQrCvLNbM1-TKUVUswFLSzIvUQQrro1M,8038
|
17
17
|
foamlib/postprocessing/__init__.py,sha256=fKnBSOOL1wEnx5U1kNGqq6a97yVpwynwUpRQS8X_kW8,154
|
18
18
|
foamlib/postprocessing/load_tables.py,sha256=cXNA2rCH5Lw8KGrZzCUd7vyVRmb5y1fP_pbrtEFW8p4,8580
|
@@ -23,7 +23,7 @@ foamlib/preprocessing/grid_parameter_sweep.py,sha256=1D60KxVzps0xqinDEaA93wcnURY
|
|
23
23
|
foamlib/preprocessing/of_dict.py,sha256=MxdZsFd5yIsS1DHsbRa25eqPGe9IOmNE8EDY8Ok66Xg,1293
|
24
24
|
foamlib/preprocessing/parameter_study.py,sha256=xQEhzOsOqZTpRcOmNWnyi18rus6BcLyDbg3ZXGHEKHQ,4080
|
25
25
|
foamlib/preprocessing/system.py,sha256=EMCobbfg_upGC5-KSeuZagBOePQKcH2itGMjcMOlsFA,1047
|
26
|
-
foamlib-1.1.
|
27
|
-
foamlib-1.1.
|
28
|
-
foamlib-1.1.
|
29
|
-
foamlib-1.1.
|
26
|
+
foamlib-1.1.2.dist-info/METADATA,sha256=H0l5RpfwL82mbG02J9fzVffNbsDXtx46mupfoFQDY9c,9814
|
27
|
+
foamlib-1.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
28
|
+
foamlib-1.1.2.dist-info/licenses/LICENSE.txt,sha256=5Dte9TUnLZzPRs4NQzl-Jc2-Ljd-t_v0ZR5Ng5r0UsY,35131
|
29
|
+
foamlib-1.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|