diff options
author | 2020-05-29 10:53:33 -0700 | |
---|---|---|
committer | 2020-05-29 10:53:33 -0700 | |
commit | 36c337d1dd00dc4945802a4a4da6e23aee86355e (patch) | |
tree | f206e889dfbd559cbff0aad1b037d84bc5c0ef3d /Source/Utils/WarpXAlgorithmSelection.cpp | |
parent | b75932d3a1439f19d5b6b697c69fbe72cfb60044 (diff) | |
download | WarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.tar.gz WarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.tar.zst WarpX-36c337d1dd00dc4945802a4a4da6e23aee86355e.zip |
Macroscopic EvolveE with constant properties (#991)
* Adding macro-E Push and new file
* Add macroEvolveE, call it, and include algo selection in utils
* fix eol
* Fixing bug in macroE for sigma method 1
* changing MacroEvolveE to MacroscopicEvolveE
* add class for macroscopicproperties and an object in WarpX class
* fix eol
* adding templated ckc call with comment that EvolveE is same for yee and ckc
* add header file pointing to ckc algorithm
* adding obejct m_macroscopic_properties to access sigma,eps,mu
* some cleaning
* Adding comments
* adding documentation
* spelling wandroff to wendroff
* fixing eol
* eol
* const in the right place. Thanks bot!
* profiler for macroscopic evolveE
* re-introduced deleted line when fixing conflict to declare templated EvolveBPMLCartesian function
* fixing if-else statement for RZ in MAcroscopicEvolveE.cpp
* adding suggestions and corrections made in PR review.
* fixing grammar in docs
* fix eol whitespace
* fix typo
Diffstat (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp')
-rw-r--r-- | Source/Utils/WarpXAlgorithmSelection.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index 066353222..9649a20c9 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -58,6 +58,17 @@ const std::map<std::string, int> load_balance_costs_update_algo_to_int = { {"default", LoadBalanceCostsUpdateAlgo::Timers } }; +const std::map<std::string, int> MaxwellSolver_medium_algo_to_int = { + {"vacuum", MediumForEM::Vacuum}, + {"macroscopic", MediumForEM::Macroscopic}, + {"default", MediumForEM::Vacuum} +}; + +const std::map<std::string, int> MacroscopicSolver_algo_to_int = { + {"backwardeuler", MacroscopicSolverAlgo::BackwardEuler}, + {"laxwendroff", MacroscopicSolverAlgo::LaxWendroff}, + {"default", MacroscopicSolverAlgo::BackwardEuler}, +}; int GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ @@ -82,6 +93,10 @@ GetAlgorithmInteger( amrex::ParmParse& pp, const char* pp_search_key ){ algo_to_int = gathering_algo_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")) { + algo_to_int = MaxwellSolver_medium_algo_to_int; + } else if (0 == std::strcmp(pp_search_key, "macroscopic_sigma_method")) { + algo_to_int = MacroscopicSolver_algo_to_int; } else { std::string pp_search_string = pp_search_key; amrex::Abort("Unknown algorithm type: " + pp_search_string); |