diff options
author | 2020-12-11 09:16:54 -0800 | |
---|---|---|
committer | 2020-12-11 09:16:54 -0800 | |
commit | 3fde18912506bbfeeeaacc255f0c8a66ab2e2a05 (patch) | |
tree | 7d330e5ffc1fc8a540fd7d3a3bdee1072b7a1d2e /Source/Utils/WarpXAlgorithmSelection.cpp | |
parent | a7ba409b4cd0ce437d06f39fe6918745bf4407d5 (diff) | |
download | WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.gz WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.zst WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.zip |
PSATD Runtime Control (#1300)
* Docs: PSATD Runtime Option
* Tests: PSATD Runtime Option
Add new runtime option to PSATD regression test matrix.
* PICMI: PSATD runtime option
* Source: PSATD Runtime Option
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")) { |