aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Resampling
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/Resampling')
-rw-r--r--Source/Particles/Resampling/LevelingThinning.cpp8
-rw-r--r--Source/Particles/Resampling/ResamplingTrigger.H4
-rw-r--r--Source/Particles/Resampling/ResamplingTrigger.cpp7
3 files changed, 11 insertions, 8 deletions
diff --git a/Source/Particles/Resampling/LevelingThinning.cpp b/Source/Particles/Resampling/LevelingThinning.cpp
index cf9ca9ba9..2db192f61 100644
--- a/Source/Particles/Resampling/LevelingThinning.cpp
+++ b/Source/Particles/Resampling/LevelingThinning.cpp
@@ -7,9 +7,9 @@
#include "LevelingThinning.H"
#include "Particles/WarpXParticleContainer.H"
+#include "Utils/Parser/ParserUtils.H"
#include "Utils/ParticleUtils.H"
#include "Utils/TextMsg.H"
-#include "Utils/WarpXUtil.H"
#include <ablastr/warn_manager/WarnManager.H>
@@ -34,7 +34,8 @@ LevelingThinning::LevelingThinning (const std::string species_name)
using namespace amrex::literals;
amrex::ParmParse pp_species_name(species_name);
- queryWithParser(pp_species_name, "resampling_algorithm_target_ratio", m_target_ratio);
+ utils::parser::queryWithParser(
+ pp_species_name, "resampling_algorithm_target_ratio", m_target_ratio);
WARPX_ALWAYS_ASSERT_WITH_MESSAGE( m_target_ratio > 0._rt,
"Resampling target ratio should be strictly greater than 0");
if (m_target_ratio <= 1._rt)
@@ -45,7 +46,8 @@ LevelingThinning::LevelingThinning (const std::string species_name)
"It is possible that no particle will be removed during resampling");
}
- queryWithParser(pp_species_name, "resampling_algorithm_min_ppc", m_min_ppc);
+ utils::parser::queryWithParser(
+ pp_species_name, "resampling_algorithm_min_ppc", m_min_ppc);
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(m_min_ppc >= 1,
"Resampling min_ppc should be greater than or equal to 1");
}
diff --git a/Source/Particles/Resampling/ResamplingTrigger.H b/Source/Particles/Resampling/ResamplingTrigger.H
index 03850cf51..ce89adab8 100644
--- a/Source/Particles/Resampling/ResamplingTrigger.H
+++ b/Source/Particles/Resampling/ResamplingTrigger.H
@@ -7,7 +7,7 @@
#ifndef WARPX_RESAMPLING_TRIGGER_H_
#define WARPX_RESAMPLING_TRIGGER_H_
-#include "Utils/IntervalsParser.H"
+#include "Utils/Parser/IntervalsParser.H"
#include <AMReX_REAL.H>
@@ -54,7 +54,7 @@ public:
private:
// Intervals that define predetermined timesteps at which resampling is performed for all
// species.
- IntervalsParser m_resampling_intervals;
+ utils::parser::IntervalsParser m_resampling_intervals;
// Average number of particles per cell above which resampling is performed for a given species
amrex::Real m_max_avg_ppc = std::numeric_limits<amrex::Real>::max();
diff --git a/Source/Particles/Resampling/ResamplingTrigger.cpp b/Source/Particles/Resampling/ResamplingTrigger.cpp
index 220b65f84..53883f1e9 100644
--- a/Source/Particles/Resampling/ResamplingTrigger.cpp
+++ b/Source/Particles/Resampling/ResamplingTrigger.cpp
@@ -6,7 +6,7 @@
*/
#include "ResamplingTrigger.H"
-#include "Utils/WarpXUtil.H"
+#include "Utils/Parser/ParserUtils.H"
#include "WarpX.H"
#include <AMReX_BoxArray.H>
@@ -20,9 +20,10 @@ ResamplingTrigger::ResamplingTrigger (const std::string species_name)
std::vector<std::string> resampling_trigger_int_string_vec = {"0"};
pp_species_name.queryarr("resampling_trigger_intervals", resampling_trigger_int_string_vec);
- m_resampling_intervals = IntervalsParser(resampling_trigger_int_string_vec);
+ m_resampling_intervals = utils::parser::IntervalsParser(resampling_trigger_int_string_vec);
- queryWithParser(pp_species_name, "resampling_trigger_max_avg_ppc", m_max_avg_ppc);
+ utils::parser::queryWithParser(
+ pp_species_name, "resampling_trigger_max_avg_ppc", m_max_avg_ppc);
}
bool ResamplingTrigger::triggered (const int timestep, const amrex::Real global_numparts) const