diff --git a/examples/euler_gravity_3d/__init__.py b/examples/euler_gravity_3d/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/examples/euler_gravity_3d/rising_hot_sphere.py b/examples/euler_gravity_3d/rising_hot_sphere.py index d8d07923..4c1f8942 100755 --- a/examples/euler_gravity_3d/rising_hot_sphere.py +++ b/examples/euler_gravity_3d/rising_hot_sphere.py @@ -11,13 +11,14 @@ density (rho), x,y, and z momentum (rho*u,rho*v,rho*w), and energy. """ import numpy as np -from mappedGrid import euler3d_mappedgrid as mg +from clawpack.riemann.mappedGrid import euler3d_mappedgrid as mg try: from mpi4py import MPI mpiAvailable = True except ImportError: - raise ImportError('mpi4py is not available') + import warnings + warnings.warn('mpi4py is not available') mpiAvailable = False if mpiAvailable: @@ -154,7 +155,7 @@ def euler3d(kernel_language='Fortran',solver_type='classic',\ use_petsc=False,outdir='./_output',\ output_format='hdf5',file_prefix='equil',disable_output=False,\ mx=mxyz[0],my=mxyz[1],mz=mxyz[2],\ - tfinal=64.0,num_output_times=1): + tfinal=64.0,num_output_times=1,keep_copy=False): if use_petsc: import clawpack.petclaw as pyclaw @@ -175,9 +176,8 @@ def euler3d(kernel_language='Fortran',solver_type='classic',\ import logging solver.logger.setLevel(logging.DEBUG) - - import euler_3d_gmap - solver.rp = euler_3d_gmap + from clawpack import riemann + solver.rp = riemann.euler_mapgrid_3D solver.num_eqn = 5 solver.num_waves = 3 solver.cfl_max = 0.6 @@ -340,7 +340,7 @@ def euler3d(kernel_language='Fortran',solver_type='classic',\ claw.solver = solver claw.output_format = output_format claw.output_file_prefix = file_prefix - claw.keep_copy = False + claw.keep_copy = keep_copy if disable_output: claw.output_format = None claw.tfinal = tfinal diff --git a/examples/euler_gravity_3d/rising_hot_sphere_spherical.py b/examples/euler_gravity_3d/rising_hot_sphere_spherical.py index 88e7ac3a..b9604a6e 100755 --- a/examples/euler_gravity_3d/rising_hot_sphere_spherical.py +++ b/examples/euler_gravity_3d/rising_hot_sphere_spherical.py @@ -11,14 +11,15 @@ density (rho), x,y, and z momentum (rho*u,rho*v,rho*w), and energy. """ import numpy as np -from mappedGrid import euler3d_mappedgrid as mg +from clawpack.riemann.mappedGrid import euler3d_mappedgrid as mg # Test for MPI, and set sizes accordingly try: from mpi4py import MPI mpiAvailable = True except ImportError: - raise ImportError('mpi4py is not available') + import warnings + warnings.warn('mpi4py is not available') mpiAvailable = False if mpiAvailable: @@ -172,9 +173,8 @@ def euler3d(kernel_language='Fortran',solver_type='classic',\ import logging solver.logger.setLevel(logging.DEBUG) - - import euler_3d_gmap - solver.rp = euler_3d_gmap + from clawpack import riemann + solver.rp = riemann.euler_mapgrid_3D solver.num_eqn = 5 solver.num_waves = 3 solver.cfl_max = 0.6 diff --git a/src/pyclaw/meson.build b/src/pyclaw/meson.build index f99edd2e..d7381d88 100644 --- a/src/pyclaw/meson.build +++ b/src/pyclaw/meson.build @@ -147,6 +147,7 @@ examples = { 'test_sedov_and_hdf.py', ], 'euler_gravity_3d' : [ + '__init__.py', 'plotCreateVisitXDMF.py', 'rising_hot_sphere.py', 'rising_hot_sphere_spherical.py',