Skip to content

Commit

Permalink
Allow multiple boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed May 10, 2022
1 parent 75eab27 commit 4a3ddc1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions combozzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

from meshmode.mesh import BTAG_ALL, BTAG_NONE # noqa
from grudge.eager import EagerDGDiscretization
from grudge.dof_desc import DTAG_BOUNDARY
from grudge.shortcuts import make_visualizer

from logpyle import IntervalTimer, set_dt
Expand Down Expand Up @@ -224,6 +225,7 @@ def main(ctx_factory=cl.create_some_context, use_logmgr=True,
sponge_on = 1
adiabatic_boundary = 0
periodic_boundary = 1
multiple_boundaries = False
grid_only = 0
discr_only = 0
inviscid_only = 0
Expand Down Expand Up @@ -336,6 +338,10 @@ def main(ctx_factory=cl.create_some_context, use_logmgr=True,
adiabatic_boundary = int(input_data["adiabatic_boundary"])
except KeyError:
pass
try:
multiple_boundaries = bool(input_data["multiple_boundaries"])
except KeyError:
pass
try:
periodic_boundary = int(input_data["periodic_boundary"])
except KeyError:
Expand Down Expand Up @@ -816,10 +822,14 @@ def get_fluid_state(cv, tseed):
else:
wall = isothermal_wall

if periodic_boundary:
boundaries = {} # For periodic, also set above in meshgen
else:
boundaries = {BTAG_ALL: wall}
boundaries = {} # periodic-compatible
if not periodic:
if multiple_boundaries:
for idir in range(dim):
boundaries[DTAG_BOUNDARY(f"+{idir}")] = wall
boundaries[DTAG_BOUNDARY(f"-{idir}")] = wall
else:
boundaries = {BTAG_ALL: wall}

if boundary_report:
from mirgecom.simutil import boundary_report
Expand Down

0 comments on commit 4a3ddc1

Please sign in to comment.