Contract: name the in-EDGE half-cell projection; repair DFG runner current-checkout Jet path
- No NODE<->EDGE input conversion still leaves the root-edge -> fine-local half-cell projection (prepare_fine_boundary, fine_hits_to_edge_frame); say so. - run_refined_dfg.py (jet_scenario != none, current checkout only): pass level=1 to FixedPatchStepper.set_jet_amplitude on reversal; use blocked_coarse_tables there. jet_scenario=none keeps the pinned source's blocked_base_tables; manifests and results unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
358bed1962
commit
ae53fade13
3 files changed
+19
-8
No files matched your search
@@ -81,7 +81,7 @@ def public_jets(center, radius, scenario):
|
||||
)
|
||||
|
||||
|
||||
def jet_interval(handle, scenario, begin, n, diameter):
|
||||
def jet_interval(handle, scenario, begin, n, diameter, level=None):
|
||||
"""Apply a reversal only at a completed interval boundary, before advancing."""
|
||||
if scenario != "none":
|
||||
boundaries = [round(t * diameter / SPEED) for t in (250, 260, 270, 280, 290, 300, 305)]
|
||||
@@ -92,8 +92,10 @@ def jet_interval(handle, scenario, begin, n, diameter):
|
||||
if begin < switch:
|
||||
return min(n, switch - begin), None
|
||||
if begin == switch:
|
||||
handle.set_jet_amplitude(0, -JET_PEAK)
|
||||
handle.set_jet_amplitude(1, JET_PEAK)
|
||||
# FixedPatchStepper needs an explicit Jet level; Simulation has one level.
|
||||
kw = {} if level is None else {"level": level}
|
||||
handle.set_jet_amplitude(0, -JET_PEAK, **kw)
|
||||
handle.set_jet_amplitude(1, JET_PEAK, **kw)
|
||||
return n, dict(step=begin, tstar=300.0, amplitudes=[-JET_PEAK, JET_PEAK])
|
||||
return n, None
|
||||
|
||||
@@ -256,7 +258,7 @@ def host_geometry(source, h, collision="SRT", jet_scenario="none", placement="wi
|
||||
validate_channel_config,
|
||||
validate_channel_transfers,
|
||||
)
|
||||
from CelerisLab.lbm.refinement_tables import blocked_base_tables
|
||||
from CelerisLab.lbm import refinement_tables
|
||||
from CelerisLab.body.geometry.circle import CircleGeometry
|
||||
from CelerisLab.body.objects import SimObject
|
||||
|
||||
@@ -268,7 +270,11 @@ def host_geometry(source, h, collision="SRT", jet_scenario="none", placement="wi
|
||||
pair = FixedPatch2D.from_config(cfg, PLACEMENTS[placement])
|
||||
layout = BlockLayout2D.build(cfg.ny, cfg.nx, *BASE_BLOCK)
|
||||
validate_channel_config(cfg, [BASE_BLOCK, FINE_BLOCK])
|
||||
targets = blocked_base_tables(pair, layout, np.argsort(pair.coalesce_coarse))[1]
|
||||
# Historical pinned source (jet_scenario none) names it blocked_base_tables;
|
||||
# the current checkout (public Jet scenarios) names it blocked_coarse_tables.
|
||||
coarse_tables = (refinement_tables.blocked_base_tables if jet_scenario == "none"
|
||||
else refinement_tables.blocked_coarse_tables)
|
||||
targets = coarse_tables(pair, layout, np.argsort(pair.coalesce_coarse))[1]
|
||||
validate_channel_transfers(pair, layout, targets)
|
||||
BlockLayout2D.build(*pair.fine_shape, *FINE_BLOCK, periodic=(False, False))
|
||||
body = SimObject(
|
||||
@@ -448,7 +454,7 @@ def run_case(a, h, periodic, case):
|
||||
)
|
||||
n = min(max(1, round(width * p["diameter"] / SPEED)), max_steps - begin)
|
||||
n, change = jet_interval(backend if refined else sim, a.jet_scenario,
|
||||
begin, n, p["diameter"])
|
||||
begin, n, p["diameter"], level=1 if refined else None)
|
||||
if change is not None:
|
||||
amplitude_changes.append(change)
|
||||
impulse = np.zeros(2)
|
||||
|
||||
Reference in new issue
Block a user