aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> 2020-05-29 10:53:33 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-29 10:53:33 -0700
commit36c337d1dd00dc4945802a4a4da6e23aee86355e (patch)
treef206e889dfbd559cbff0aad1b037d84bc5c0ef3d /Source/WarpX.cpp
parentb75932d3a1439f19d5b6b697c69fbe72cfb60044 (diff)
downloadWarpX-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/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 951f566ba..85dfe9333 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -69,6 +69,8 @@ long WarpX::particle_pusher_algo;
int WarpX::maxwell_fdtd_solver_id;
long WarpX::load_balance_costs_update_algo;
int WarpX::do_dive_cleaning = 0;
+int WarpX::em_solver_medium;
+int WarpX::macroscopic_solver_algo;
long WarpX::n_rz_azimuthal_modes = 1;
long WarpX::ncomps = 1;
@@ -212,6 +214,13 @@ WarpX::WarpX ()
pml.resize(nlevs_max);
costs.resize(nlevs_max);
+
+ if (em_solver_medium == MediumForEM::Macroscopic) {
+ // create object for macroscopic solver
+ m_macroscopic_properties = std::unique_ptr<MacroscopicProperties> (new MacroscopicProperties());
+ }
+
+
// Set default values for particle and cell weights for costs update;
// Default values listed here for the case AMREX_USE_GPU are determined
// from single-GPU tests on Summit.
@@ -618,6 +627,10 @@ WarpX::ReadParameters ()
l_lower_order_in_v = false;
}
load_balance_costs_update_algo = GetAlgorithmInteger(pp, "load_balance_costs_update");
+ em_solver_medium = GetAlgorithmInteger(pp, "em_solver_medium");
+ if (em_solver_medium == MediumForEM::Macroscopic ) {
+ macroscopic_solver_algo = GetAlgorithmInteger(pp,"macroscopic_sigma_method");
+ }
pp.query("costs_heuristic_cells_wt", costs_heuristic_cells_wt);
pp.query("costs_heuristic_particles_wt", costs_heuristic_particles_wt);
}