Skip to content

Commit

Permalink
compressible_fv4 does not need to reimplement evolve (#332)
Browse files Browse the repository at this point in the history
we can use the version we inherit
  • Loading branch information
zingale authored Jan 24, 2025
1 parent ab26c9c commit 6c55374
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions pyro/compressible_fv4/simulation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pyro.compressible_fv4.fluxes as flx
from pyro import compressible_rk
from pyro.compressible import get_external_sources, get_sponge_factor
from pyro.mesh import fv, integration
from pyro.mesh import fv


class Simulation(compressible_rk.Simulation):
Expand Down Expand Up @@ -66,37 +66,3 @@ def preevolve(self):
# we just initialized cell-centers, but we need to store averages
for var in self.cc_data.names:
self.cc_data.from_centers(var)

def evolve(self):

"""
Evolve the equations of compressible hydrodynamics through a
timestep dt.
"""

tm_evolve = self.tc.timer("evolve")
tm_evolve.begin()

myd = self.cc_data

method = self.rp.get_param("compressible.temporal_method")

rk = integration.RKIntegrator(myd.t, self.dt, method=method)
rk.set_start(myd)

for s in range(rk.nstages()):
ytmp = rk.get_stage_start(s)
ytmp.fill_BC_all()
k = self.substep(ytmp)
rk.store_increment(s, k)

rk.compute_final_update()

if self.particles is not None:
self.particles.update_particles(self.dt)

# increment the time
myd.t += self.dt
self.n += 1

tm_evolve.end()

0 comments on commit 6c55374

Please sign in to comment.