aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Utils')
-rw-r--r--Source/Utils/WarpXAlgorithmSelection.H14
-rw-r--r--Source/Utils/WarpXAlgorithmSelection.cpp16
2 files changed, 30 insertions, 0 deletions
diff --git a/Source/Utils/WarpXAlgorithmSelection.H b/Source/Utils/WarpXAlgorithmSelection.H
index ba752e012..97dd3b89f 100644
--- a/Source/Utils/WarpXAlgorithmSelection.H
+++ b/Source/Utils/WarpXAlgorithmSelection.H
@@ -83,6 +83,20 @@ struct GatheringAlgo {
};
};
+struct JInTime {
+ enum {
+ Constant = 0,
+ Linear = 1
+ };
+};
+
+struct RhoInTime {
+ enum {
+ Linear = 1,
+ Quadratic = 2
+ };
+};
+
/** Strategy to compute weights for use in load balance.
*/
struct LoadBalanceCostsUpdateAlgo {
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")) {