#!/usr/bin/env python3
# Copyright 2019 Andrew Myers
#
#
# This file is part of WarpX.
#
# License: BSD-3-Clause-LBNL
# This script tests the "warpx.refine_plasma=1" option by comparing
# the actual number of electrons at step 200 to the expected value
import os
import sys
import yt
yt.funcs.mylog.setLevel(50)
import numpy as np
sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
import checksumAPI
# this will be the name of the plot file
fn = sys.argv[1]
# Read the file
ds = yt.load(fn)
# count the number of particles
ad = ds.all_data()
np = ad['electrons', 'particle_id'].size
# the number of coarse particle streams
n_coarse = 10
# the number of fine particle streams
n_fine = 64
# num particles per stream at time 0
n_0 = 15
# number of times the moving window moves, calculated as n_move = (c*t)/dz where c is speed of light, t is physical time (nsteps*dt). dz is dz on level 0
n_move = 192
# ref ratio = 2 1
# Refined only transversly. Longitudinal spacing between particles in each stream is the same in both coarse and fine regions
rr_longitudinal = 1
np_expected = (n_coarse + n_fine*rr_longitudinal)*(n_0 + n_move)
assert( np == np_expected )
# Test uniformity of rho, by taking a slice of rho that
# crosses the edge of the refined injection region
# (but is ahead of the mesh refinement patch)
ds.force_periodicity()
ad = ds.covering_grid(level=0, left_edge=ds.domain_left_edge, dims=ds.domain_dimensions)
rho = ad['rho'].to_ndarray().squeeze()
rho_slice = rho[13:51, 475]
# Test uniformity up to 0.5% relative variation
assert( rho_slice.std() < 0.005*abs(rho_slice.mean()) )
test_name = os.path.split(os.getcwd())[1]
checksumAPI.evaluate_checksum(test_name, fn)
go_modules/go-etcd-io-4cb3a346bb'>dependabot/go_modules/go-etcd-io-4cb3a346bb
Unnamed repository; edit this file 'description' to name the repository.
* rewrite readme
* remove breaks
* missed a break
* nits
* show options as optional
* add note to pods insecure
* add minimal configuration example.
* add a note about replacing kube-dns in the summary
* move deployment section into summary.
* Update README.md
* replace options sections with bullets
and indent all sub sections to match bullet indentation.
not sure if this will render in github properly - it doesn't in the in-line editor preview.
* fix indentation
Contrary to various on-line guides and editors, github now requires 2 spaces to indent paragraphs with bulleted sections above (not just 1).
* Update README.md
* Update README.md
* Update README.md
* fix label syntax
It's just a single EXPRESSION. The EXPRESSION itself has its own kubernetes label expression format.
* Update README.md
* Update README.md
* Switches out Unhealthy bool for OkUntil timestamp
* Make sure servers are healthy forever if there are no health checks
* Moves health check off into a go routine to avoid blocking conditions
* Improved logging info
* Fixes initial date
* Fixes health checking; alters tests to adapt to async health checking
* Moves future variable into static upstream and populates it in more places
* Restores silencing of stdout during testing
* Restores silencing of stdout during testing
* keeps check url string once built
* Removes debug message
* uses zero value to signal no checking; reduces in-mutex code to a fetch
This fix disables codecov/patch and codecov/changes status
report as the project has already been well covered by
codecov/project status. The codecov/patch and codecov/changes status
are misleading.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
While adding a parallel performance benchmark I stumbled on a race
condition (another reason to add performance benchmarks!), so this
PR makes sure the msg is created in a race free manor and adds the
parallel benchmark.