diff options
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index de7944a7f..869f3b462 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -6,6 +6,7 @@ * * License: BSD-3-Clause-LBNL */ +#include "WarpX.H" #include "WarpXAlgorithmSelection.H" #include <algorithm> @@ -18,9 +19,8 @@ const std::map<std::string, int> maxwell_solver_algo_to_int = { {"yee", MaxwellSolverAlgo::Yee }, -#ifndef WARPX_DIM_RZ // Not available in RZ {"ckc", MaxwellSolverAlgo::CKC }, -#endif + {"psatd", MaxwellSolverAlgo::PSATD }, {"default", MaxwellSolverAlgo::Yee } }; @@ -42,11 +42,7 @@ const std::map<std::string, int> current_deposition_algo_to_int = { {"esirkepov", CurrentDepositionAlgo::Esirkepov }, {"direct", CurrentDepositionAlgo::Direct }, {"vay", CurrentDepositionAlgo::Vay }, -#ifdef WARPX_USE_PSATD - {"default", CurrentDepositionAlgo::Direct } -#else - {"default", CurrentDepositionAlgo::Esirkepov } -#endif + {"default", CurrentDepositionAlgo::Esirkepov } // NOTE: overwritten for PSATD below }; const std::map<std::string, int> charge_deposition_algo_to_int = { @@ -97,6 +93,8 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ algo_to_int = particle_pusher_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "current_deposition")) { algo_to_int = current_deposition_algo_to_int; + if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD) + algo_to_int["default"] = CurrentDepositionAlgo::Direct; } else if (0 == std::strcmp(pp_search_key, "charge_deposition")) { algo_to_int = charge_deposition_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "field_gathering")) { |