diff options
-rw-r--r-- | Docs/source/building/building.rst | 2 | ||||
-rw-r--r-- | Docs/source/visualization/yt.rst | 17 | ||||
-rwxr-xr-x | Examples/Tests/reduced_diags/analysis_reduced_diags.py | 10 | ||||
-rw-r--r-- | Regression/WarpX-tests.ini | 1 | ||||
-rw-r--r-- | Source/Diagnostics/BackTransformedDiagnostic.cpp | 4 |
5 files changed, 10 insertions, 24 deletions
diff --git a/Docs/source/building/building.rst b/Docs/source/building/building.rst index d07cfaecd..70c5ab7a9 100644 --- a/Docs/source/building/building.rst +++ b/Docs/source/building/building.rst @@ -42,7 +42,7 @@ options are set in the file ``GNUmakefile``. The default options correspond to an optimized code for 3D geometry. The main compile-time options are: - * ``DIM=3D`` or ``2D``: Geometry of the simulation (note that running an executable compiled for 3D with a 2D input file will crash). + * ``DIM=3`` or ``2``: Geometry of the simulation (note that running an executable compiled for 3D with a 2D input file will crash). * ``DEBUG=FALSE`` or ``TRUE``: Compiling in ``DEBUG`` mode can help tremendously during code development. * ``USE_PSATD=FALSE`` or ``TRUE``: Compile the Pseudo-Spectral Analytical Time Domain Maxwell solver. Requires an FFT library. * ``USE_RZ=FALSE`` or ``TRUE``: Compile for 2D axisymmetric geometry. diff --git a/Docs/source/visualization/yt.rst b/Docs/source/visualization/yt.rst index a9e4fb964..1f20f502c 100644 --- a/Docs/source/visualization/yt.rst +++ b/Docs/source/visualization/yt.rst @@ -8,25 +8,14 @@ to use yt within a `Jupyter notebook <http://jupyter.org/>`__. Installation ------------ -From the terminal: - -:: - - pip install yt jupyter - -or with the `Anaconda distribution <https://anaconda.org/>`__ of python (recommended): - -:: - - conda install -c conda-forge yt - -The latest version of `yt` can be required for advanced options (e.g., rigid -injection for particles). To built `yt` directly from source, you can use +From the terminal, install the latest version of yt: :: + pip install cython pip install git+https://github.com/yt-project/yt.git +Alternatively, yt can be installed via their installation script, see `yt installation web page <https://yt-project.org/doc/installing.html>`__, which can be particularly useful to setup a post-processing workflow on supercomputers. Visualizing the data -------------------- diff --git a/Examples/Tests/reduced_diags/analysis_reduced_diags.py b/Examples/Tests/reduced_diags/analysis_reduced_diags.py index 2623d48ce..3d3191561 100755 --- a/Examples/Tests/reduced_diags/analysis_reduced_diags.py +++ b/Examples/Tests/reduced_diags/analysis_reduced_diags.py @@ -23,7 +23,6 @@ import sys import yt import numpy as np import scipy.constants as scc -from read_raw_data import read_reduced_diags fn = sys.argv[1] @@ -61,11 +60,10 @@ EFyt = 0.5*Es*scc.epsilon_0*dV + 0.5*Bs/scc.mu_0*dV # PART2: get results from reduced diagnostics -metadata, data = read_reduced_diags( './diags/reducedfiles/EF.txt' ) -EF = data['total_lev0'][-1] # last iteration - -metadata, data = read_reduced_diags( './diags/reducedfiles/EP.txt' ) -EP = data['total'][-1] # last iteration +EFdata = np.genfromtxt("./diags/reducedfiles/EF.txt") +EPdata = np.genfromtxt("./diags/reducedfiles/EP.txt") +EF = EFdata[1][2] +EP = EPdata[1][2] # PART3: print and assert diff --git a/Regression/WarpX-tests.ini b/Regression/WarpX-tests.ini index c94ba2536..3865f0e12 100644 --- a/Regression/WarpX-tests.ini +++ b/Regression/WarpX-tests.ini @@ -1114,4 +1114,3 @@ compileTest = 0 doVis = 0 compareParticles = 0 analysisRoutine = Examples/Tests/reduced_diags/analysis_reduced_diags.py -aux1File = Tools/read_raw_data.py diff --git a/Source/Diagnostics/BackTransformedDiagnostic.cpp b/Source/Diagnostics/BackTransformedDiagnostic.cpp index 2f50dda21..e458ee167 100644 --- a/Source/Diagnostics/BackTransformedDiagnostic.cpp +++ b/Source/Diagnostics/BackTransformedDiagnostic.cpp @@ -1377,7 +1377,7 @@ AddPartDataToParticleBuffer( int nspeciesBoostedFrame) { for (int isp = 0; isp < nspeciesBoostedFrame; ++isp) { auto np = tmp_particle_buffer[isp].GetRealData(DiagIdx::w).size(); - if (np == 0) return; + if (np == 0) continue; // allocate size of particle buffer array to np // This is a growing array. Each time we add np elements @@ -1442,7 +1442,7 @@ AddPartDataToParticleBuffer( for (int isp = 0; isp < nSpeciesBackTransformedDiagnostics; ++isp) { auto np = tmp_particle_buffer[isp].GetRealData(DiagIdx::w).size(); - if (np == 0) return; + if (np == 0) continue; Real const* const AMREX_RESTRICT wp_temp = tmp_particle_buffer[isp].GetRealData(DiagIdx::w).data(); |