diff options
author | 2020-05-15 17:12:57 -0700 | |
---|---|---|
committer | 2020-05-15 17:12:57 -0700 | |
commit | f79552b57a061605a1d62b0481d97df77c8f3b66 (patch) | |
tree | 822a7f8dde8fb1f55cd147bfe525150ec43f0518 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | fb3d84ca23c6fce8f654d8fcfef23519387762b1 (diff) | |
download | WarpX-f79552b57a061605a1d62b0481d97df77c8f3b66.tar.gz WarpX-f79552b57a061605a1d62b0481d97df77c8f3b66.tar.zst WarpX-f79552b57a061605a1d62b0481d97df77c8f3b66.zip |
Crash if deprecated input parameters are used. (#981)
* crash for deprecated input parameters
* typo
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 55c41427d..5fd6f8d4f 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -47,6 +47,8 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp : WarpXParticleContainer(amr_core, ispecies), species_name(name) { + BackwardCompatibility(); + plasma_injector.reset(new PlasmaInjector(species_id, species_name)); physical_species = plasma_injector->getPhysicalSpecies(); charge = plasma_injector->getCharge(); @@ -139,6 +141,23 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core) plasma_injector.reset(new PlasmaInjector()); } +void +PhysicalParticleContainer::BackwardCompatibility () +{ + ParmParse pps(species_name); + std::vector<std::string> backward_strings; + if (pps.queryarr("plot_vars", backward_strings)){ + amrex::Abort("<species>.plot_vars is not supported anymore. " + "Please use the new syntax for diagnostics, see documentation."); + } + + int backward_int; + if (pps.query("plot_species", backward_int)){ + amrex::Abort("<species>.plot_species is not supported anymore. " + "Please use the new syntax for diagnostics, see documentation."); + } +} + void PhysicalParticleContainer::InitData () { // Init ionization module here instead of in the PhysicalParticleContainer |