Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions integration/ROS2S/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CEXE_headers += ros2s_type.H
CEXE_headers += ros2s_integrator.H
ifeq ($(USE_ALL_SDC), TRUE)
CEXE_headers += actual_integrator_sdc.H
else
CEXE_headers += actual_integrator.H
endif
21 changes: 21 additions & 0 deletions integration/ROS2S/_parameters
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@namespace: integrator

# 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

# Rosenbrock tableau selector:
# 0 = existing 3-stage ROS2S tableau
# 1 = Verwer et al. (1999) 2-stage ROS2 tableau
# 2 = Sandu (2000) positivity-favoring method A
# 3 = Sandu (2000) positivity-favoring method B
# 4 = Sandu (2000) positivity-favoring method C
# 5 = Sandu (2000) positivity-favoring method D
rosenbrock_tableau int 0

# H211b timestep controller parameters
h211b_b real 4.0
h211b_k real 2.5
h211b_fac_min real 0.2
h211b_fac_max real 6.0
h211b_reduction_fac real 0.5
28 changes: 28 additions & 0 deletions integration/ROS2S/actual_integrator.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef actual_integrator_H
#define actual_integrator_H

#include <AMReX_REAL.H>

#include <network.H>
#include <burn_type.H>

#include <integrator_data.H>
#include <integrator_setup_strang.H>
#include <ros2s_integrator.H>
#include <ros2s_type.H>

template <typename BurnT>
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void actual_integrator (BurnT& state, amrex::Real dt, bool is_retry=false)
{
constexpr int int_neqs = integrator_neqs<BurnT>();

auto ros2s_state = integrator_setup<BurnT, ros2s_t<int_neqs>>(state, dt, is_retry);
auto state_save = integrator_backup(state);

int istate = ros2s_integrator(state, ros2s_state);

integrator_cleanup(ros2s_state, state, istate, state_save, dt);
}

#endif
28 changes: 28 additions & 0 deletions integration/ROS2S/actual_integrator_sdc.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef actual_integrator_H
#define actual_integrator_H

#include <AMReX_REAL.H>

#include <network.H>
#include <burn_type.H>

#include <integrator_data.H>
#include <integrator_setup_sdc.H>
#include <ros2s_integrator.H>
#include <ros2s_type.H>

template <typename BurnT>
AMREX_GPU_HOST_DEVICE AMREX_INLINE
void actual_integrator (BurnT& state, amrex::Real dt, bool is_retry=false)
{
constexpr int int_neqs = integrator_neqs<BurnT>();

auto ros2s_state = integrator_setup<BurnT, ros2s_t<int_neqs>>(state, dt, is_retry);
auto state_save = integrator_backup(state);

int istate = ros2s_integrator(state, ros2s_state);

integrator_cleanup(ros2s_state, state, istate, state_save, dt);
}

#endif
Loading
Loading