From 59ef806e3c6ad9c4898df6cc0cb0d8752822ca26 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Mon, 16 Dec 2024 10:06:03 -0800 Subject: [PATCH] Fix non-EB --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 348e0c95fcf..afe625efbe4 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1451,8 +1451,8 @@ PhysicalParticleContainer::AddPlasmaFlux (PlasmaInjector const& plasma_injector, } #ifdef AMREX_USE_EB - auto const& eb_flag_arr = eb_flag->const_array(mfi); - auto const& eb_data = eb_factory->getEBData(mfi); + auto eb_flag_arr = eb_flag ? eb_flag->const_array(mfi) : Array4{}; + auto eb_data = eb_factory ? eb_factory->getEBData(mfi) : EBData{}; #endif amrex::ParallelForRNG(overlap_box, [=] AMREX_GPU_DEVICE (int i, int j, int k, amrex::RandomEngine const& engine) noexcept