From d76baab31230d2dddc061d9e909135ed7c763481 Mon Sep 17 00:00:00 2001 From: David Grote Date: Mon, 30 Nov 2020 09:14:31 -0800 Subject: Electrostatic lab frame (#1531) * Implemented lab frame electrostatic model * Small clean up of ComputeSpaceChargeField * Added ElectrostaticSphereLabFrame regression test --- Source/Utils/WarpXAlgorithmSelection.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp') diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index 2a008563a..de7944a7f 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -24,6 +24,13 @@ const std::map maxwell_solver_algo_to_int = { {"default", MaxwellSolverAlgo::Yee } }; +const std::map electrostatic_solver_algo_to_int = { + {"none", ElectrostaticSolverAlgo::None }, + {"relativistic", ElectrostaticSolverAlgo::Relativistic}, + {"labframe", ElectrostaticSolverAlgo::LabFrame}, + {"default", ElectrostaticSolverAlgo::None } +}; + const std::map particle_pusher_algo_to_int = { {"boris", ParticlePusherAlgo::Boris }, {"vay", ParticlePusherAlgo::Vay }, @@ -84,6 +91,8 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ std::map algo_to_int; if (0 == std::strcmp(pp_search_key, "maxwell_solver")) { algo_to_int = maxwell_solver_algo_to_int; + } else if (0 == std::strcmp(pp_search_key, "do_electrostatic")) { + algo_to_int = electrostatic_solver_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "particle_pusher")) { algo_to_int = particle_pusher_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "current_deposition")) { -- cgit v1.2.3