From e90af8435b64228c4f1d8c83c971a266b668304c Mon Sep 17 00:00:00 2001 From: Ryan Sandberg Date: Wed, 22 Feb 2023 11:27:31 -0800 Subject: Add option to increase `max_step` or `stop_time` to fill BTD (#3693) * add option to increase max_step to fill BTD * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * make sure code compiles locally * allow for unspecified max step if setting by BTD * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * clarify docs, match default max_step value * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review shortening flag name * add example input script, fix bugf * check stop_time and max_step * account for stop time * Fix logic, improve documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- Source/WarpX.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/WarpX.cpp') diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 48037eaa1..cf5892f15 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -114,6 +114,7 @@ Real WarpX::gamma_boost = 1._rt; Real WarpX::beta_boost = 0._rt; Vector WarpX::boost_direction = {0,0,0}; bool WarpX::do_compute_max_step_from_zmax = false; +bool WarpX::compute_max_step_from_btd = false; Real WarpX::zmax_plasma_to_compute_max_step = 0._rt; short WarpX::current_deposition_algo; @@ -622,6 +623,9 @@ WarpX::ReadParameters () pp_warpx, "zmax_plasma_to_compute_max_step", zmax_plasma_to_compute_max_step); + pp_warpx.query("compute_max_step_from_btd", + compute_max_step_from_btd); + pp_warpx.query("do_moving_window", do_moving_window); if (do_moving_window) { -- cgit v1.2.3