From 36c337d1dd00dc4945802a4a4da6e23aee86355e Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Fri, 29 May 2020 10:53:33 -0700 Subject: 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 --- Source/Utils/WarpXAlgorithmSelection.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Source/Utils/WarpXAlgorithmSelection.cpp') 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 load_balance_costs_update_algo_to_int = { {"default", LoadBalanceCostsUpdateAlgo::Timers } }; +const std::map MaxwellSolver_medium_algo_to_int = { + {"vacuum", MediumForEM::Vacuum}, + {"macroscopic", MediumForEM::Macroscopic}, + {"default", MediumForEM::Vacuum} +}; + +const std::map 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); -- cgit v1.2.3