From f1a081943952d8ffb844ec68be50f18a9aa09f84 Mon Sep 17 00:00:00 2001 From: Piyush Sharda <34922596+psharda@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:38:52 +0200 Subject: [PATCH 1/3] Add VODE_MAXORD as a runtime param --- integration/VODE/_parameters | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/integration/VODE/_parameters b/integration/VODE/_parameters index 7bfebf611a..1b2165b851 100644 --- a/integration/VODE/_parameters +++ b/integration/VODE/_parameters @@ -3,3 +3,8 @@ # for the step rejection logic on mass fractions, we only consider # species that are > X_reject_buffer * atol_spec X_reject_buffer real 1.0 + +# set the max integration order for VODE +# For the backward differentiation formula (BDF) integration +# the maximum order should be no greater than 5. +VODE_MAXORD int 5 From fb7f74ae8979b7455dc0c9a5877e86cc3b537d6a Mon Sep 17 00:00:00 2001 From: Piyush Sharda <34922596+psharda@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:40:04 +0200 Subject: [PATCH 2/3] access VODE_MAXORD using integrator namespace --- integration/VODE/vode_type.H | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/integration/VODE/vode_type.H b/integration/VODE/vode_type.H index 3c246bfb50..099f204485 100644 --- a/integration/VODE/vode_type.H +++ b/integration/VODE/vode_type.H @@ -22,10 +22,7 @@ constexpr amrex::Real HMIN = 0.0_rt; constexpr amrex::Real vode_increase_change_factor = 4.0_rt; constexpr amrex::Real vode_decrease_change_factor = 0.25_rt; -// For the backward differentiation formula (BDF) integration -// the maximum order should be no greater than 5. -constexpr int VODE_MAXORD = 5; -constexpr int VODE_LMAX = VODE_MAXORD + 1; +constexpr int VODE_LMAX = integrator_rp::VODE_MAXORD + 1; // How many timesteps should pass before refreshing the Jacobian constexpr int max_steps_between_jacobian_evals = 50; From 9175c98e81173305f85c46d1c569974811401df9 Mon Sep 17 00:00:00 2001 From: Piyush Sharda <34922596+psharda@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:43:06 +0200 Subject: [PATCH 3/3] VODE_LMAX cannot be a constexpr anymore --- integration/VODE/vode_type.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/VODE/vode_type.H b/integration/VODE/vode_type.H index 099f204485..15218e4958 100644 --- a/integration/VODE/vode_type.H +++ b/integration/VODE/vode_type.H @@ -22,7 +22,7 @@ constexpr amrex::Real HMIN = 0.0_rt; constexpr amrex::Real vode_increase_change_factor = 4.0_rt; constexpr amrex::Real vode_decrease_change_factor = 0.25_rt; -constexpr int VODE_LMAX = integrator_rp::VODE_MAXORD + 1; +int VODE_LMAX = integrator_rp::VODE_MAXORD + 1; // How many timesteps should pass before refreshing the Jacobian constexpr int max_steps_between_jacobian_evals = 50;