diff options
author | 2020-11-30 09:14:31 -0800 | |
---|---|---|
committer | 2020-11-30 09:14:31 -0800 | |
commit | d76baab31230d2dddc061d9e909135ed7c763481 (patch) | |
tree | 9807fdc478aa12d7aadc19462beb556d96392ff7 /Source/Utils/WarpXAlgorithmSelection.cpp | |
parent | 8f3ccb17b31d0b26fedebb3c095700f2014f315c (diff) | |
download | WarpX-d76baab31230d2dddc061d9e909135ed7c763481.tar.gz WarpX-d76baab31230d2dddc061d9e909135ed7c763481.tar.zst WarpX-d76baab31230d2dddc061d9e909135ed7c763481.zip |
Electrostatic lab frame (#1531)
* Implemented lab frame electrostatic model
* Small clean up of ComputeSpaceChargeField
* Added ElectrostaticSphereLabFrame regression test
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<std::string, int> maxwell_solver_algo_to_int = { {"default", MaxwellSolverAlgo::Yee } }; +const std::map<std::string, int> electrostatic_solver_algo_to_int = { + {"none", ElectrostaticSolverAlgo::None }, + {"relativistic", ElectrostaticSolverAlgo::Relativistic}, + {"labframe", ElectrostaticSolverAlgo::LabFrame}, + {"default", ElectrostaticSolverAlgo::None } +}; + const std::map<std::string, int> 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<std::string, int> 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")) { |