diff --git a/examples/wave/wave-eager-mpi.py b/examples/wave/wave-eager-mpi.py index 10e1301375ae0d569bf61f50ce6db41422c0275c..40ddbb7b1fb2049f54e173e0c5696a8a5a2d19e3 100644 --- a/examples/wave/wave-eager-mpi.py +++ b/examples/wave/wave-eager-mpi.py @@ -106,7 +106,7 @@ def rk4_step(y, t, h, f): return y + h/6*(k1 + 2*k2 + 2*k3 + k4) -def bump(discr, actx, t=0): +def bump(actx, discr, t=0): source_center = np.array([0.2, 0.35, 0.1])[:discr.dim] source_width = 0.05 source_omega = 3 @@ -171,7 +171,7 @@ def main(): raise ValueError("don't have a stable time step guesstimate") fields = flat_obj_array( - bump(discr, actx), + bump(actx, discr), [discr.zeros(actx) for i in range(discr.dim)] ) diff --git a/examples/wave/wave-eager.py b/examples/wave/wave-eager.py index 9da04373ec759fac3c001730d7bc57e1942086cc..52ab08244d480ccfe6d58a4476e440fe4ad0e100 100644 --- a/examples/wave/wave-eager.py +++ b/examples/wave/wave-eager.py @@ -100,7 +100,7 @@ def rk4_step(y, t, h, f): return y + h/6*(k1 + 2*k2 + 2*k3 + k4) -def bump(discr, actx, t=0): +def bump(actx, discr, t=0): source_center = np.array([0.2, 0.35, 0.1])[:discr.dim] source_width = 0.05 source_omega = 3 @@ -147,7 +147,7 @@ def main(): discr = EagerDGDiscretization(actx, mesh, order=order) fields = flat_obj_array( - bump(discr, actx), + bump(actx, discr), [discr.zeros(actx) for i in range(discr.dim)] ) diff --git a/grudge/eager.py b/grudge/eager.py index 71a01873001d56883d49754bd4264f18c3c20935..a67f2b46a9c4f1ecfa9341343666a2b3070f7a08 100644 --- a/grudge/eager.py +++ b/grudge/eager.py @@ -38,6 +38,8 @@ from grudge.symbolic.primitives import TracePair __doc__ = """ .. autoclass:: EagerDGDiscretization +.. autofunction:: interior_trace_pair +.. autofunction:: cross_rank_trace_pairs """ @@ -198,7 +200,7 @@ def interior_trace_pair(discrwb, vec): return TracePair("int_faces", i, e) -class RankBoundaryCommunication: +class _RankBoundaryCommunication: base_tag = 1273 def __init__(self, discrwb, remote_rank, vol_field, tag=None): @@ -241,7 +243,7 @@ class RankBoundaryCommunication: def _cross_rank_trace_pairs_scalar_field(discrwb, vec, tag=None): - rbcomms = [RankBoundaryCommunication(discrwb, remote_rank, vec, tag=tag) + rbcomms = [_RankBoundaryCommunication(discrwb, remote_rank, vec, tag=tag) for remote_rank in discrwb.connected_ranks()] return [rbcomm.finish() for rbcomm in rbcomms]