From bf535730cb6c170394da8375887b3ae57ad6ecf5 Mon Sep 17 00:00:00 2001 From: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:30:31 -0800 Subject: Allow `None` for Maxwell solver (#3504) * Add "None" as an option for the Maxwell solver * fixed some of the reasons for failing CI tests * no longer pass `do_electrostatic` to `GuardCellManager` * renamed `MaxwellSolverAlgo` to `ElectromagneticSolverAlgo` * rename `do_electrostatic` to `electrostatic_solver_id` * rename `maxwell_solver_id` to `electromagnetic_solver_id` * changes requested during PR review * remove `do_no_deposit` from tests without field evolution * Fix doc-string in `GuardCellManager.H` Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> --- Source/Utils/WarpXUtil.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Utils/WarpXUtil.cpp') diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp index a36d31e93..42b2308b9 100644 --- a/Source/Utils/WarpXUtil.cpp +++ b/Source/Utils/WarpXUtil.cpp @@ -74,8 +74,8 @@ void ParseGeometryInput() #ifdef WARPX_DIM_RZ ParmParse pp_algo("algo"); - int maxwell_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); - if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) + int electromagnetic_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); + if (electromagnetic_solver_id == ElectromagneticSolverAlgo::PSATD) { WARPX_ALWAYS_ASSERT_WITH_MESSAGE(prob_lo[0] == 0., "Lower bound of radial coordinate (prob_lo[0]) with RZ PSATD solver must be zero"); @@ -302,10 +302,10 @@ void CheckGriddingForRZSpectral () CheckDims(); ParmParse pp_algo("algo"); - int maxwell_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); + int electromagnetic_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); // only check for PSATD in RZ - if (maxwell_solver_id != MaxwellSolverAlgo::PSATD) + if (electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD) return; int max_level; @@ -393,7 +393,7 @@ void ReadBCParams () ParmParse pp_geometry("geometry"); ParmParse pp_warpx("warpx"); ParmParse pp_algo("algo"); - int maxwell_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); + int electromagnetic_solver_id = GetAlgorithmInteger(pp_algo, "maxwell_solver"); WARPX_ALWAYS_ASSERT_WITH_MESSAGE( !pp_geometry.queryarr("is_periodic", geom_periodicity), @@ -448,7 +448,7 @@ void ReadBCParams () } WARPX_ALWAYS_ASSERT_WITH_MESSAGE( - (maxwell_solver_id != MaxwellSolverAlgo::PSATD) || + (electromagnetic_solver_id != ElectromagneticSolverAlgo::PSATD) || ( WarpX::field_boundary_lo[idim] != FieldBoundaryType::PEC && WarpX::field_boundary_hi[idim] != FieldBoundaryType::PEC -- cgit v1.2.3