foamlib 0.3.12__tar.gz → 0.3.14__tar.gz
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-0.3.12 → foamlib-0.3.14}/PKG-INFO +1 -1
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/__init__.py +1 -1
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_cases/_base.py +11 -6
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/_parsing.py +1 -1
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib.egg-info/PKG-INFO +1 -1
- {foamlib-0.3.12 → foamlib-0.3.14}/LICENSE.txt +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/README.md +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_cases/__init__.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_cases/_async.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_cases/_sync.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/__init__.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/_base.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/_files.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/_io.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_files/_serialization.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/_util.py +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib/py.typed +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib.egg-info/SOURCES.txt +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib.egg-info/dependency_links.txt +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib.egg-info/requires.txt +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/foamlib.egg-info/top_level.txt +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/pyproject.toml +0 -0
- {foamlib-0.3.12 → foamlib-0.3.14}/setup.cfg +0 -0
@@ -183,12 +183,14 @@ class FoamCaseBase(Sequence["FoamCaseBase.TimeDirectory"]):
|
|
183
183
|
all_clean = self.path / "Allclean"
|
184
184
|
|
185
185
|
if clean.is_file():
|
186
|
-
|
186
|
+
file = clean
|
187
187
|
elif all_clean.is_file():
|
188
|
-
|
188
|
+
file = all_clean
|
189
189
|
else:
|
190
190
|
return None
|
191
191
|
|
192
|
+
return file if Path(__file__).absolute() != file.absolute() else None
|
193
|
+
|
192
194
|
def _run_script(self, *, parallel: Optional[bool] = None) -> Optional[Path]:
|
193
195
|
"""Return the path to the (All)run script, or None if no run script is found."""
|
194
196
|
run = self.path / "run"
|
@@ -199,21 +201,24 @@ class FoamCaseBase(Sequence["FoamCaseBase.TimeDirectory"]):
|
|
199
201
|
if run.is_file() or all_run.is_file():
|
200
202
|
if run_parallel.is_file() or all_run_parallel.is_file():
|
201
203
|
if parallel:
|
202
|
-
|
204
|
+
file = run_parallel if run_parallel.is_file() else all_run_parallel
|
203
205
|
elif parallel is False:
|
204
|
-
|
206
|
+
file = run if run.is_file() else all_run
|
205
207
|
else:
|
206
208
|
raise ValueError(
|
207
209
|
"Both (All)run and (All)run-parallel scripts are present. Please specify parallel argument."
|
208
210
|
)
|
209
|
-
|
211
|
+
else:
|
212
|
+
file = run if run.is_file() else all_run
|
210
213
|
elif parallel is not False and (
|
211
214
|
run_parallel.is_file() or all_run_parallel.is_file()
|
212
215
|
):
|
213
|
-
|
216
|
+
file = run_parallel if run_parallel.is_file() else all_run_parallel
|
214
217
|
else:
|
215
218
|
return None
|
216
219
|
|
220
|
+
return file if Path(__file__).absolute() != file.absolute() else None
|
221
|
+
|
217
222
|
def _run_cmds(
|
218
223
|
self,
|
219
224
|
cmd: Optional[Union[Sequence[Union[str, Path]], str, Path]] = None,
|
@@ -134,7 +134,7 @@ _DIMENSIONS = (
|
|
134
134
|
Literal("[").suppress() + common.number * 7 + Literal("]").suppress()
|
135
135
|
).set_parse_action(lambda tks: FoamDict.DimensionSet(*tks))
|
136
136
|
_TENSOR = _list_of(common.number) | common.number
|
137
|
-
_IDENTIFIER = Word(identchars + "$", printables, exclude_chars=";")
|
137
|
+
_IDENTIFIER = Word(identchars + "$", printables, exclude_chars="{;}")
|
138
138
|
_DIMENSIONED = (Opt(_IDENTIFIER) + _DIMENSIONS + _TENSOR).set_parse_action(
|
139
139
|
lambda tks: FoamDict.Dimensioned(*reversed(tks.as_list()))
|
140
140
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|