Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Compile and install 3D Euler with gravity example #723

Merged
merged 7 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
14 changes: 7 additions & 7 deletions examples/euler_gravity_3d/rising_hot_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions examples/euler_gravity_3d/rising_hot_sphere_spherical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/pyclaw/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading