Skip to content

Commit

Permalink
Adding small flash
Browse files Browse the repository at this point in the history
--HG--
branch : yt
  • Loading branch information
matthewturk committed Feb 8, 2015
1 parent 9b0df7b commit b12cac4
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 8 deletions.
16 changes: 8 additions & 8 deletions benchmarks/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
// package (in PyPI) and the values are version numbers. An empty
// list indicates to just test against the default (latest)
// version.
//"matrix": {
// "numpy": ["1.9.1"],
// "cython": ["0.21.2"],
// "h5py": ["2.4.0"],
// "ipython": ["2.2.0"],
// "matplotlib": ["1.4.0"],
// "sympy": ["0.7.6"],
//},
"matrix": {
"numpy": ["1.9.1"],
"cython": ["0.21.2"],
//"h5py": ["2.4.0"],
"ipython": ["2.2.0"],
"matplotlib": ["1.4.0"],
"sympy": ["0.7.6"],
},

// The directory (relative to the current directory) that benchmarks are
// stored in. If not provided, defaults to "benchmarks"
Expand Down
46 changes: 46 additions & 0 deletions benchmarks/benchmarks/small_flash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import numpy as np
import yt

class SmallEnzoSuite:
dsname = "GasSloshingLowRes/sloshing_low_res_hdf5_plt_cnt_0690"
def setup(self):
self.ds = yt.load(self.dsname)

def time_all_particles(self):
dd = self.ds.all_data()
dd["all", "particle_velocity_x"]
dd["all", "particle_velocity_y"]
dd["all", "particle_velocity_z"]

def time_all_particles_derived(self):
dd = self.ds.all_data()
dd["all", "particle_velocity_magnitude"]

def time_gas_read(self):
dd = self.ds.all_data()
dd["gas", "density"]

def time_gas_derived(self):
dd = self.ds.all_data()
dd["gas", "velocity_magnitude"]

def time_project_unweight(self):
proj = self.ds.proj("density", 0)

def time_project_weight(self):
proj = self.ds.proj("density", 0, "density")

def time_ghostzones(self):
dd = self.ds.all_data()
dd["velocity_divergence"]

def time_particle_quantities(self):
dd = self.ds.all_data()
dd.quantities.extrema("particle_mass")
dd.quantities.extrema("particle_velocity_magnitude")
dd.quantities.extrema(["particle_velocity_%s" % ax for ax in 'xyz'])

def time_gas_quantites(self):
dd = self.ds.all_data()
dd.quantities.extrema("density")
dd.quantities.extrema(["velocity_x", "velocity_y", "velocity_z"])

0 comments on commit b12cac4

Please sign in to comment.