aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py')
-rwxr-xr-xExamples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py b/Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py
index c718c1a42..cbb424ffe 100755
--- a/Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py
+++ b/Examples/Tests/electrostatic_sphere/analysis_electrostatic_sphere.py
@@ -84,11 +84,12 @@ data = ds.covering_grid(level=0,
dims=ds.domain_dimensions)
# Extract the E field along the axes
-if ndims == 2:
- Ex = data[('mesh','Ex')].to_ndarray()
+# if ndims == 2:
+if ds.parameters['geometry.dims'] == 'RZ':
+ Ex = data[('boxlib','Er')].to_ndarray()
Ex_axis = Ex[:,iz0,0]
Ey_axis = Ex_axis
- Ez = data[('mesh','Ez')].to_ndarray()
+ Ez = data[('boxlib','Ez')].to_ndarray()
Ez_axis = Ez[ix0,:,0]
else:
Ex = data[('mesh','Ex')].to_ndarray()