diff options
author | 2020-02-11 09:50:09 -0800 | |
---|---|---|
committer | 2020-02-11 09:50:09 -0800 | |
commit | 5ea3c7b9183fe57c1939574bdedc36cf79927536 (patch) | |
tree | 411739f8c986b888a9bf04c2e9820590e670c908 /Source/Initialization/PlasmaInjector.cpp | |
parent | 4db955d68f4d886882a9681df9df5e22bc1d8af2 (diff) | |
parent | 20daedf07493ec7c180a6ecfb2abb0986b7e5479 (diff) | |
download | WarpX-5ea3c7b9183fe57c1939574bdedc36cf79927536.tar.gz WarpX-5ea3c7b9183fe57c1939574bdedc36cf79927536.tar.zst WarpX-5ea3c7b9183fe57c1939574bdedc36cf79927536.zip |
Merge pull request #696 from WeiqunZhang/parser_var
template Parser so that it works for any number of variables
Diffstat (limited to 'Source/Initialization/PlasmaInjector.cpp')
-rw-r--r-- | Source/Initialization/PlasmaInjector.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Initialization/PlasmaInjector.cpp b/Source/Initialization/PlasmaInjector.cpp index cacbaab75..5fa82e48f 100644 --- a/Source/Initialization/PlasmaInjector.cpp +++ b/Source/Initialization/PlasmaInjector.cpp @@ -201,7 +201,7 @@ void PlasmaInjector::parseDensity (ParmParse& pp) Store_parserString(pp, "density_function(x,y,z)", str_density_function); // Construct InjectorDensity with InjectorDensityParser. inj_rho.reset(new InjectorDensity((InjectorDensityParser*)nullptr, - makeParser(str_density_function))); + makeParser(str_density_function,{"x","y","z"}))); } else { StringParseAbortMessage("Density profile type", rho_prof_s); } @@ -324,9 +324,9 @@ void PlasmaInjector::parseMomentum (ParmParse& pp) str_momentum_function_uz); // Construct InjectorMomentum with InjectorMomentumParser. inj_mom.reset(new InjectorMomentum((InjectorMomentumParser*)nullptr, - makeParser(str_momentum_function_ux), - makeParser(str_momentum_function_uy), - makeParser(str_momentum_function_uz))); + makeParser(str_momentum_function_ux,{"x","y","z"}), + makeParser(str_momentum_function_uy,{"x","y","z"}), + makeParser(str_momentum_function_uz,{"x","y","z"}))); } else { StringParseAbortMessage("Momentum distribution type", mom_dist_s); } |