diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 908258c43ec..ab11e8ff11f 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1448,7 +1448,7 @@ WarpX::ReadParameters () // Instead, if warpx.grid_type=collocated, the momentum-conserving and // energy conserving field gathering algorithms are equivalent (forces // gathered from the collocated grid) and no fields centering occurs. - if ((WarpX::field_gathering_algo == GatheringAlgo::MomentumConserving + if ((WarpX::field_gathering_algo == GatheringAlgo::MomentumConserving && WarpX::grid_type != GridType::Collocated) || WarpX::electrostatic_solver_id == ElectrostaticSolverAlgo::LabFrameElectroMagnetostatic) {