diff options
Diffstat (limited to 'Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py')
-rwxr-xr-x | Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py b/Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py index b970c4933..c325495db 100755 --- a/Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py +++ b/Examples/Modules/ParticleBoundaryScrape/analysis_scrape.py @@ -1,6 +1,7 @@ #! /usr/bin/env python import yt +from pathlib import Path # This test shoots a beam of electrons at cubic embedded boundary geometry # At time step 40, none of the particles have hit the boundary yet. At time @@ -9,11 +10,19 @@ import yt # the problem domain yet. # all particles are still there -ds40 = yt.load("particle_scrape_plt00040") +if Path("particle_scrape_plt00040").is_dir(): + filename = "particle_scrape_plt00040" +else: + filename = "Python_particle_scrape_plt00040" +ds40 = yt.load(filename) np40 = ds40.index.particle_headers['electrons'].num_particles assert(np40 == 612) # all particles have been removed -ds60 = yt.load("particle_scrape_plt00060") +if Path("particle_scrape_plt00060").is_dir(): + filename = "particle_scrape_plt00060" +else: + filename = "Python_particle_scrape_plt00060" +ds60 = yt.load(filename) np60 = ds60.index.particle_headers['electrons'].num_particles assert(np60 == 0) |