blob: 79a2bfdae20e6c9b38e5bb2bb6f8e6f5ac9282eb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env python3
import os
import sys
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]
# check that the maximum chi value is small
fname = 'diags/reducedfiles/ParticleExtrema_beam_p.txt'
chi_max = np.loadtxt(fname)[:,19]
assert np.all(chi_max < 2e-8)
# check that no photons have been produced
fname = 'diags/reducedfiles/ParticleNumber.txt'
pho_num = np.loadtxt(fname)[:,7]
assert(pho_num.all()==0.)
# Checksum regression analysis
test_name = os.path.split(os.getcwd())[1]
checksumAPI.evaluate_checksum(test_name, fn)
|