From f79552b57a061605a1d62b0481d97df77c8f3b66 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Fri, 15 May 2020 17:12:57 -0700 Subject: Crash if deprecated input parameters are used. (#981) * crash for deprecated input parameters * typo --- Source/Particles/PhysicalParticleContainer.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') 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 backward_strings; + if (pps.queryarr("plot_vars", backward_strings)){ + amrex::Abort(".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(".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 -- cgit v1.2.3