From 8f4db400e202661b8553f6398fc29ebea374c98b Mon Sep 17 00:00:00 2001 From: "S. Eric Clark" <25495882+clarkse@users.noreply.github.com> Date: Wed, 21 Aug 2024 11:23:34 -0700 Subject: [PATCH] Disabling projection div cleaner when diffusion div cleaner is enabled for Yee algorithm. --- Source/WarpX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 3d9ba736ddc..ccc472ba579 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1132,7 +1132,8 @@ WarpX::ReadParameters () // Update default to external projection divb cleaner if external fields are loaded, // the grids are staggered, and the solver is compatible with the cleaner - if (m_p_ext_field_params->B_ext_grid_type != ExternalFieldType::default_zero + if (!do_divb_cleaning + && m_p_ext_field_params->B_ext_grid_type != ExternalFieldType::default_zero && m_p_ext_field_params->B_ext_grid_type != ExternalFieldType::constant && grid_type != GridType::Collocated && (WarpX::electromagnetic_solver_id == ElectromagneticSolverAlgo::Yee