Skip to content

Commit

Permalink
Tweak, modernize wave-min example
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Apr 26, 2024
1 parent d75ceb6 commit c2be523
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/wave/wave-min-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from grudge.array_context import MPIPyOpenCLArrayContext

from grudge.shortcuts import set_up_rk4
from grudge import DiscretizationCollection
from grudge import make_discretization_collection

from mpi4py import MPI

Expand All @@ -47,7 +47,7 @@ class WaveTag:
pass


def main(ctx_factory, dim=2, order=4, visualize=False):
def main(dim=2, order=4, visualize=True):
comm = MPI.COMM_WORLD
num_parts = comm.size

Expand Down Expand Up @@ -83,7 +83,7 @@ def main(ctx_factory, dim=2, order=4, visualize=False):
else:
local_mesh = comm.scatter(None)

dcoll = DiscretizationCollection(actx, local_mesh, order=order)
dcoll = make_discretization_collection(actx, local_mesh, order=order)

def source_f(actx, dcoll, t=0):
source_center = np.array([0.1, 0.22, 0.33])[:dcoll.dim]
Expand Down Expand Up @@ -196,7 +196,7 @@ def norm(u):
args = parser.parse_args()

logging.basicConfig(level=logging.INFO)
main(cl.create_some_context,
main(
dim=args.dim,
order=args.order,
visualize=args.visualize)

0 comments on commit c2be523

Please sign in to comment.