aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/ReducedDiags/FieldProbe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Diagnostics/ReducedDiags/FieldProbe.cpp')
-rw-r--r--Source/Diagnostics/ReducedDiags/FieldProbe.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Diagnostics/ReducedDiags/FieldProbe.cpp b/Source/Diagnostics/ReducedDiags/FieldProbe.cpp
index 648617719..adaa3d722 100644
--- a/Source/Diagnostics/ReducedDiags/FieldProbe.cpp
+++ b/Source/Diagnostics/ReducedDiags/FieldProbe.cpp
@@ -189,7 +189,9 @@ bool FieldProbe::ProbeInDomain () const
* value in a position array will be the y value, but in the case of 2D, prob_lo[1]
* and prob_hi[1] refer to z. This is a result of warpx.Geom(lev).
*/
-#if (AMREX_SPACEDIM == 2)
+#if (AMREX_SPACEDIM == 1)
+ return z_probe >= prob_lo[1] && z_probe < prob_hi[1];
+#elif (AMREX_SPACEDIM == 2)
return x_probe >= prob_lo[0] && x_probe < prob_hi[0] &&
z_probe >= prob_lo[1] && z_probe < prob_hi[1];
#else
@@ -251,7 +253,10 @@ void FieldProbe::ComputeDiags (int step)
{
const auto cell_size = gm.CellSizeArray();
const int i_probe = static_cast<int>(amrex::Math::floor((x_probe - prob_lo[0]) / cell_size[0]));
-#if (AMREX_SPACEDIM == 2)
+#if (AMREX_SPACEDIM == 1)
+ const int j_probe = 0;
+ const int k_probe = 0;
+#elif (AMREX_SPACEDIM == 2)
const int j_probe = static_cast<int>(amrex::Math::floor((z_probe - prob_lo[1]) / cell_size[1]));
const int k_probe = 0;
#elif(AMREX_SPACEDIM == 3)