Skip to content

Commit

Permalink
Update ES EB RZ Tests
Browse files Browse the repository at this point in the history
- slightly relaxed Phi
- better selection of r outside cutcells
  • Loading branch information
ax3l committed May 3, 2023
1 parent df9b73c commit 6ddc165
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Examples/Tests/electrostatic_sphere_eb/analysis_rz.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
import sys

import numpy as np
from unyt import m
import yt

sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
import checksumAPI

tolerance = 0.004
tolerance = 0.0041

fn = sys.argv[1]
ds = yt.load( fn )
Expand All @@ -47,7 +48,8 @@
errmax_phi = 0.0
errmax_Er = 0.0
for i in range(len(r)):
if r[i]>=0.1:
# outside EB and last cutcell
if r[i] > 0.1*m + dr:
phi_theory = A+B*np.log(r[i])
Er_theory = -B/float(r[i])
err = abs( phi_theory - phi[i,:] ).max() / phi_theory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lev=0": {
"Er": 8497.669853722688,
"phi": 2035.6618484435153
"Er": 8487.661571728835,
"phi": 2036.0428085209824
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lev=0": {
"Er": 8497.669853733625,
"phi": 2035.6618484451055
"Er": 8487.661571739109,
"phi": 2036.0428085225362
},
"lev=1": {
"Er": 19546.08010855407,
"phi": 3290.7266050322164
"Er": 19519.172334977942,
"phi": 3291.0262856782897
}
}
}

0 comments on commit 6ddc165

Please sign in to comment.