plot3d 1.7.4__tar.gz → 1.7.5__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.
- {plot3d-1.7.4 → plot3d-1.7.5}/PKG-INFO +1 -1
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/glennht/export_functions.py +13 -13
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/gridpro/import_functions.py +2 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/pyproject.toml +1 -1
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/__init__.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/block.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/block_merging_mixed_facepairs.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/blockfunctions.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/connectivity.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/differencing.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/face.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/facefunctions.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/glennht/__init__.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/glennht/class_definitions.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/glennht/import_functions.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/graph.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/gridpro/__init__.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/listfunctions.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/periodicity.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/point_match.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/read.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/split_block.py +0 -0
- {plot3d-1.7.4 → plot3d-1.7.5}/plot3d/write.py +0 -0
|
@@ -161,8 +161,8 @@ def _write_bsurf_spec(w, bc):
|
|
|
161
161
|
# GIF + Volume Zone writers (dict inputs supported)
|
|
162
162
|
# ============================================================
|
|
163
163
|
def _write_gif_from_dict(w, gdict: Dict[str, Any]) -> None:
|
|
164
|
-
sid1 = int(gdict.get("
|
|
165
|
-
sid2 = int(gdict.get("
|
|
164
|
+
sid1 = int(gdict.get("a", 0))
|
|
165
|
+
sid2 = int(gdict.get("b", 0))
|
|
166
166
|
name1 = f"surface {sid1}"
|
|
167
167
|
name2 = f"surface {sid2}"
|
|
168
168
|
bctype = 4 # GIF
|
|
@@ -312,7 +312,7 @@ def export_to_boundary_condition(
|
|
|
312
312
|
file_path_to_write: str,
|
|
313
313
|
job_settings: Job,
|
|
314
314
|
bc_group: BCGroup,
|
|
315
|
-
|
|
315
|
+
gif_pairs: List[GIF] | List[Dict[str,Any]],
|
|
316
316
|
volume_zones: List[VolumeZone] | List[Dict[str,Any]],
|
|
317
317
|
):
|
|
318
318
|
file_path_to_write = ensure_extension(file_path_to_write, '.bcs')
|
|
@@ -326,10 +326,10 @@ def export_to_boundary_condition(
|
|
|
326
326
|
"slips": [_asdict_soft(x) for x in bc_group.SymmetricSlips],
|
|
327
327
|
"walls": [_asdict_soft(x) for x in bc_group.Walls],
|
|
328
328
|
"volume_zones": [x for x in volume_zones],
|
|
329
|
-
"
|
|
329
|
+
"gif_pairs": [_asdict_soft(x) for x in gif_pairs],
|
|
330
330
|
"job_settings": _asdict_soft(job_settings),
|
|
331
331
|
}
|
|
332
|
-
json_path.write_text(json.dumps(json_payload, indent=
|
|
332
|
+
json_path.write_text(json.dumps(json_payload, indent=4))
|
|
333
333
|
|
|
334
334
|
# ---- Robust reference defaults (use inlet values if missing)
|
|
335
335
|
ref = job_settings.ReferenceCondFull
|
|
@@ -383,21 +383,21 @@ def export_to_boundary_condition(
|
|
|
383
383
|
_write_bsurf_spec(w, wall)
|
|
384
384
|
|
|
385
385
|
# GIFS (dicts or dataclasses)
|
|
386
|
-
for
|
|
387
|
-
if isinstance(
|
|
388
|
-
_write_gif_from_dict(w,
|
|
386
|
+
for pair in gif_pairs:
|
|
387
|
+
if isinstance(pair, dict):
|
|
388
|
+
_write_gif_from_dict(w, pair)
|
|
389
389
|
else:
|
|
390
|
-
name1 = getattr(
|
|
391
|
-
name2 = getattr(
|
|
390
|
+
name1 = getattr(pair, "Name1", f"surface {pair.GIFSurface1}")
|
|
391
|
+
name2 = getattr(pair, "Name2", f"surface {pair.GIFSurface2}")
|
|
392
392
|
w.write(
|
|
393
|
-
f" &BSurf_Spec\nBSurfID={
|
|
393
|
+
f" &BSurf_Spec\nBSurfID={pair.GIFSurface1}, BCType={int(pair.BCType)}, "
|
|
394
394
|
f"BSurfName='{name1}'\n &END\n\n"
|
|
395
395
|
)
|
|
396
396
|
w.write(
|
|
397
|
-
f" &BSurf_Spec\nBSurfID={
|
|
397
|
+
f" &BSurf_Spec\nBSurfID={pair.GIFSurface2}, BCType={int(pair.BCType)}, "
|
|
398
398
|
f"BSurfName='{name2}'\n &END\n\n"
|
|
399
399
|
)
|
|
400
|
-
w.write(f" &GIF_Spec\nSurfID_1={
|
|
400
|
+
w.write(f" &GIF_Spec\nSurfID_1={pair.GIFSurface1}, SurfID2={pair.GIFSurface2}\n &END\n\n")
|
|
401
401
|
|
|
402
402
|
# VZConditions (dict templates)
|
|
403
403
|
volume_zone_unique = {d["contiguous_index"]: d for d in volume_zones}.values()
|
|
@@ -234,6 +234,8 @@ def read_gridpro_connectivity(
|
|
|
234
234
|
# GIF faces grouped by sf1 for pty in 12..21 or == 1000
|
|
235
235
|
gif_faces: List[Dict[str, int]] = []
|
|
236
236
|
for p in patches:
|
|
237
|
+
#? This is how we identify gifs inside of a grid pro connectivity file.
|
|
238
|
+
#? If the PTY is between 12 and 21 these are gifs
|
|
237
239
|
if (12 <= p["pty"] <= 21) or (p["pty"] == 1000): # type: ignore
|
|
238
240
|
face_temp = face_dict(p["sb1"], p["L1i"], p["L1j"], p["L1k"], p["H1i"], p["H1j"], p["H1k"]) # type: ignore
|
|
239
241
|
face_temp["id"] = p["pty"] # type: ignore
|
|
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
|
|
File without changes
|