foamlib 0.1.8__tar.gz → 0.1.9__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.1.8 → foamlib-0.1.9}/PKG-INFO +1 -1
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib/__init__.py +1 -1
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib/_dictionaries.py +17 -9
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib.egg-info/PKG-INFO +1 -1
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_dictionaries.py +8 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/LICENSE.txt +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/README.md +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib/_cases.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib/_subprocesses.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib/py.typed +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib.egg-info/SOURCES.txt +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib.egg-info/dependency_links.txt +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib.egg-info/requires.txt +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/foamlib.egg-info/top_level.txt +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/pyproject.toml +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/setup.cfg +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_basic.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_flange.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_flange_async.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_pitz.py +0 -0
- {foamlib-0.1.8 → foamlib-0.1.9}/tests/test_pitz_async.py +0 -0
@@ -23,7 +23,19 @@ except ModuleNotFoundError:
|
|
23
23
|
else:
|
24
24
|
numpy = True
|
25
25
|
|
26
|
-
from pyparsing import
|
26
|
+
from pyparsing import (
|
27
|
+
Forward,
|
28
|
+
Group,
|
29
|
+
Keyword,
|
30
|
+
Literal,
|
31
|
+
OneOrMore,
|
32
|
+
Opt,
|
33
|
+
Word,
|
34
|
+
ZeroOrMore,
|
35
|
+
common,
|
36
|
+
identchars,
|
37
|
+
identbodychars,
|
38
|
+
)
|
27
39
|
|
28
40
|
FoamDimensionSet = namedtuple(
|
29
41
|
"FoamDimensionSet",
|
@@ -66,6 +78,9 @@ A value that can be stored in an OpenFOAM dictionary.
|
|
66
78
|
|
67
79
|
_YES = Keyword("yes").set_parse_action(lambda s, loc, tks: True)
|
68
80
|
_NO = Keyword("no").set_parse_action(lambda s, loc, tks: False)
|
81
|
+
_WORDS = OneOrMore(Word(identchars, identbodychars + "(),")).set_parse_action(
|
82
|
+
lambda s, loc, tks: " ".join(tks)
|
83
|
+
)
|
69
84
|
_VALUE = Forward()
|
70
85
|
_LIST = Opt(
|
71
86
|
Literal("List") + Literal("<") + common.identifier + Literal(">")
|
@@ -91,14 +106,7 @@ _DIMENSIONED = (common.identifier + _DIMENSIONS + _VALUE).set_parse_action(
|
|
91
106
|
)
|
92
107
|
|
93
108
|
_VALUE << (
|
94
|
-
_FIELD
|
95
|
-
| _LIST
|
96
|
-
| _DIMENSIONED
|
97
|
-
| _DIMENSIONS
|
98
|
-
| common.number
|
99
|
-
| _YES
|
100
|
-
| _NO
|
101
|
-
| common.identifier
|
109
|
+
_FIELD | _LIST | _DIMENSIONED | _DIMENSIONS | common.number | _YES | _NO | _WORDS
|
102
110
|
)
|
103
111
|
|
104
112
|
|
@@ -162,3 +162,11 @@ def test_internal_field(pitz: FoamCase) -> None:
|
|
162
162
|
assert u == pytest.approx(u_arr)
|
163
163
|
|
164
164
|
pitz.run()
|
165
|
+
|
166
|
+
|
167
|
+
def test_fv_schemes(pitz: FoamCase) -> None:
|
168
|
+
div_schemes = pitz.fv_schemes["divSchemes"]
|
169
|
+
assert isinstance(div_schemes, FoamDictionary)
|
170
|
+
scheme = div_schemes["div(phi,U)"]
|
171
|
+
assert isinstance(scheme, str)
|
172
|
+
assert scheme == "bounded Gauss linearUpwind grad(U)"
|
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
|