diff options
author | 2022-09-20 16:28:39 -0700 | |
---|---|---|
committer | 2022-09-20 16:28:39 -0700 | |
commit | 5761b4bf998eab84ea0f7e4b132026593f3ddf9f (patch) | |
tree | 39a60a20ac3fac7368231b66f49fad063321f624 /Source/Utils/WarpXAlgorithmSelection.cpp | |
parent | 2fed2828933831ee464f0ca5d02a23dd2df54aad (diff) | |
download | WarpX-5761b4bf998eab84ea0f7e4b132026593f3ddf9f.tar.gz WarpX-5761b4bf998eab84ea0f7e4b132026593f3ddf9f.tar.zst WarpX-5761b4bf998eab84ea0f7e4b132026593f3ddf9f.zip |
PSATD: More Options for Time Dependency of J, Rho (#3242)
* Rename PsatdAlgorithm as PsatdAlgorithmJConstantInTime
* Add New Inputs: psatd.J_in_time, psatd.rho_in_time
* Update PSATD Classes
* Fix Bug for FDTD Build
* Fix Warning for RZ PSATD Build
* Fix Multi-J Loop w/ J Constant in Time
* Clean up
* Fix Error Message
* Fix Time of Charge Deposition for Rho Linear
* Add 3D Langmuir CI Tests w/ Multi-J Algo
* Fix Checksums of New CI Tests
* Remove Extra CI Tests (added in #3363)
* Fix CI Tests w/ Multi-J PSATD
* Add Docs for New Input Parameters
* Galilean/Comoving PSATD Not Compatible w/ J Linear
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index d0db13e12..088d5322f 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -62,6 +62,18 @@ const std::map<std::string, int> gathering_algo_to_int = { {"default", GatheringAlgo::EnergyConserving } }; +const std::map<std::string, int> J_in_time_to_int = { + {"constant", JInTime::Constant}, + {"linear", JInTime::Linear}, + {"default", JInTime::Constant} +}; + +const std::map<std::string, int> rho_in_time_to_int = { + {"linear", RhoInTime::Linear}, + {"quadratic", RhoInTime::Quadratic}, + {"default", RhoInTime::Linear} +}; + const std::map<std::string, int> load_balance_costs_update_algo_to_int = { {"timers", LoadBalanceCostsUpdateAlgo::Timers }, {"gpuclock", LoadBalanceCostsUpdateAlgo::GpuClock }, @@ -131,6 +143,10 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ algo_to_int = charge_deposition_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "field_gathering")) { algo_to_int = gathering_algo_to_int; + } else if (0 == std::strcmp(pp_search_key, "J_in_time")) { + algo_to_int = J_in_time_to_int; + } else if (0 == std::strcmp(pp_search_key, "rho_in_time")) { + algo_to_int = rho_in_time_to_int; } else if (0 == std::strcmp(pp_search_key, "load_balance_costs_update")) { algo_to_int = load_balance_costs_update_algo_to_int; } else if (0 == std::strcmp(pp_search_key, "em_solver_medium")) { |