1#ifndef AMREX_SUNDIALS_INTEGRATOR_H
2#define AMREX_SUNDIALS_INTEGRATOR_H
7#include <AMReX_Config.H>
15#include <nvector/nvector_manyvector.h>
16#include <sunnonlinsol/sunnonlinsol_fixedpoint.h>
17#include <sunlinsol/sunlinsol_spgmr.h>
18#include <arkode/arkode_arkstep.h>
19#include <arkode/arkode_mristep.h>
23#if defined(SUNDIALS_VERSION_MAJOR) && \
24 ((SUNDIALS_VERSION_MAJOR > 7) || (SUNDIALS_VERSION_MAJOR == 7 && SUNDIALS_VERSION_MINOR >= 1))
25# define AMREX_SUNDIALS_ARKODE_API 1
26# define AMREX_ARKSTEP(f) ARKode##f
27# define AMREX_MRISTEP(f) ARKode##f
29# define AMREX_SUNDIALS_ARKODE_API 0
30# define AMREX_ARKSTEP(f) ARKStep##f
31# define AMREX_MRISTEP(f) MRIStep##f
60namespace SundialsUserFun {
61 static int f (
amrex::Real t, N_Vector y_data, N_Vector y_rhs,
void *user_data) {
63 return udata->
f(t, y_data, y_rhs, user_data);
66 static int fi (
amrex::Real t, N_Vector y_data, N_Vector y_rhs,
void *user_data) {
68 return udata->
fi(t, y_data, y_rhs, user_data);
71 static int fe (
amrex::Real t, N_Vector y_data, N_Vector y_rhs,
void *user_data) {
73 return udata->
fe(t, y_data, y_rhs, user_data);
76 static int ff (
amrex::Real t, N_Vector y_data, N_Vector y_rhs,
void *user_data) {
78 return udata->
ff(t, y_data, y_rhs, user_data);
83 return udata->
post_stage(t, y_data, user_data);
88 return udata->
post_step(t, y_data, user_data);
114 std::string type =
"ERK";
117 std::string method =
"DEFAULT";
118 std::string method_e =
"DEFAULT";
119 std::string method_i =
"DEFAULT";
122 std::string fast_type =
"ERK";
123 std::string fast_method =
"DEFAULT";
126 std::string nonlinear_solver =
"Newton";
127 int max_nonlinear_iters = 0;
129 std::string fast_nonlinear_solver =
"Newton";
130 int fast_max_nonlinear_iters = 0;
133 std::string linear_solver =
"GMRES";
134 int max_linear_iters = 0;
136 std::string fast_linear_solver =
"GMRES";
137 int fast_max_linear_iters = 0;
140 bool use_ark =
false;
141 bool use_mri =
false;
150 ::sundials::Context sunctx;
153 void *arkode_mem =
nullptr;
154 SUNLinearSolver LS =
nullptr;
155 SUNNonlinearSolver NLS =
nullptr;
161 void *arkode_fast_mem =
nullptr;
165 MRIStepInnerStepper fast_stepper =
nullptr;
166 SUNLinearSolver fast_LS =
nullptr;
167 SUNNonlinearSolver fast_NLS =
nullptr;
170 bool set_stop_time =
false;
180 MRIStepInnerStepper_Free(&fast_stepper);
183 }
else if (use_ark) {
188 SUNLinSolFree(fast_LS);
190 SUNNonlinSolFree(NLS);
192 SUNNonlinSolFree(fast_NLS);
198 void initialize_parameters ()
204 pp.
query(
"method_e", method_e);
205 pp.
query(
"method_i", method_i);
207 pp.
query(
"fast_type", fast_type);
208 pp.
query(
"fast_method", fast_method);
210 if (type ==
"ERK" || type ==
"DIRK" || type ==
"IMEX-RK") {
213 else if (type ==
"EX-MRI" || type ==
"IM-MRI" || type ==
"IMEX-MRI") {
217 std::string msg(
"Unknown method type: ");
222 pp.
query(
"nonlinear_solver", nonlinear_solver);
223 pp.
query(
"max_nonlinear_iters", max_nonlinear_iters);
225 pp.
query(
"fast_nonlinear_solver", fast_nonlinear_solver);
226 pp.
query(
"fast_max_nonlinear_iters", fast_max_nonlinear_iters);
228 pp.
query(
"linear_solver", linear_solver);
229 pp.
query(
"max_linear_iters", max_linear_iters);
231 pp.
query(
"fast_linear_solver", fast_linear_solver);
232 pp.
query(
"fast_max_linear_iters", fast_max_linear_iters);
234 set_stop_time =
pp.
query(
"stop_time", stop_time);
236 pp.
query(
"max_num_steps", max_num_steps);
252 if (method !=
"DEFAULT") {
253 flag = ARKStepSetTableName(arkode_mem,
"ARKODE_DIRK_NONE", method.c_str());
257 else if (type ==
"DIRK") {
261 if (method !=
"DEFAULT") {
262 flag = ARKStepSetTableName(arkode_mem, method.c_str(),
"ARKODE_ERK_NONE");
266 else if (type ==
"IMEX-RK") {
268 << method_e <<
"\n"; }
271 if (method_e !=
"DEFAULT" && method_i !=
"DEFAULT")
273 flag = ARKStepSetTableName(arkode_mem, method_i.c_str(), method_e.c_str());
295 if (type ==
"DIRK" || type ==
"IMEX-RK") {
297 amrex::Print() <<
"Nonlinear solver: " << nonlinear_solver <<
"\n";
298 amrex::Print() <<
"Max nonlinear iters: " << max_nonlinear_iters <<
"\n";
300 if (nonlinear_solver ==
"fixed-point") {
301 NLS = SUNNonlinSol_FixedPoint(y_data, 0, sunctx);
306 flag =
AMREX_ARKSTEP(SetMaxNonlinIters)(arkode_mem, max_nonlinear_iters);
309 if (nonlinear_solver ==
"Newton") {
311 amrex::Print() <<
"Linear solver: " << linear_solver <<
"\n";
312 amrex::Print() <<
"Max linear iters: " << max_linear_iters <<
"\n";
314 LS = SUNLinSol_SPGMR(y_data, SUN_PREC_NONE, max_linear_iters, sunctx);
316 flag =
AMREX_ARKSTEP(SetLinearSolver)(arkode_mem, LS,
nullptr);
335 flag =
AMREX_ARKSTEP(SetMaxNumSteps)(arkode_mem, max_num_steps);
340 void apply_tolerances ()
343 type ==
"IM-MRI" || type ==
"IMEX-MRI") &&
346#if AMREX_SUNDIALS_ARKODE_API
361 if (h != step_applied) {
362#if AMREX_SUNDIALS_ARKODE_API
363 int flag = ARKodeSetFixedStep(arkode_mem, h);
365 int flag = use_mri ? MRIStepSetFixedStep(arkode_mem, h)
366 : ARKStepSetFixedStep(arkode_mem, h);
374 void apply_fast_step ()
385 if (h != fast_step_applied) {
387 fast_step_applied = h;
396 fast_step_applied = 0;
397 fast_rtol_applied = -1;
398 fast_atol_applied = -1;
403 if (fast_type ==
"ERK") {
407 if (fast_method !=
"DEFAULT") {
408 flag = ARKStepSetTableName(arkode_fast_mem,
"ARKODE_DIRK_NONE", fast_method.c_str());
412 else if (fast_type ==
"DIRK") {
416 if (fast_method !=
"DEFAULT") {
417 flag = ARKStepSetTableName(arkode_fast_mem, fast_method.c_str(),
"ARKODE_ERK_NONE");
422 amrex::Print() <<
"Fast nonlinear solver: " << fast_nonlinear_solver <<
"\n";
423 amrex::Print() <<
"Fast max nonlinear iters: " << fast_max_nonlinear_iters <<
"\n";
425 if (fast_nonlinear_solver ==
"fixed-point") {
426 fast_NLS = SUNNonlinSol_FixedPoint(y_data, 0, sunctx);
428 flag =
AMREX_ARKSTEP(SetNonlinearSolver)(arkode_fast_mem, fast_NLS);
431 flag =
AMREX_ARKSTEP(SetMaxNonlinIters)(arkode_fast_mem, fast_max_nonlinear_iters);
434 if (fast_nonlinear_solver ==
"Newton") {
436 amrex::Print() <<
"Linear solver: " << fast_linear_solver <<
"\n";
437 amrex::Print() <<
"Max linear iters: " << fast_max_linear_iters <<
"\n";
439 fast_LS = SUNLinSol_SPGMR(y_data, SUN_PREC_NONE, fast_max_linear_iters, sunctx);
441 flag =
AMREX_ARKSTEP(SetLinearSolver)(arkode_fast_mem, fast_LS,
nullptr);
469 flag =
AMREX_ARKSTEP(SetMaxNumSteps)(arkode_fast_mem, max_num_steps);
473#if defined(SUNDIALS_VERSION_MAJOR) && \
474 ((SUNDIALS_VERSION_MAJOR > 7) || (SUNDIALS_VERSION_MAJOR == 7 && SUNDIALS_VERSION_MINOR >= 2))
475 flag = ARKodeCreateMRIStepInnerStepper(arkode_fast_mem, &fast_stepper);
477 flag = ARKStepCreateMRIStepInnerStepper(arkode_fast_mem, &fast_stepper);
482 if (type ==
"EX-MRI") {
485 fast_stepper, sunctx);
488 else if (type ==
"IM-MRI") {
491 fast_stepper, sunctx);
494 else if (type ==
"IMEX-MRI") {
497 time, y_data, fast_stepper, sunctx);
502 if (method !=
"DEFAULT") {
503 MRIStepCoupling MRIC = MRIStepCoupling_LoadTableByName(method.c_str());
505 flag = MRIStepSetCoupling(arkode_mem, MRIC);
507 MRIStepCoupling_Free(MRIC);
527 if (type ==
"IM-MRI" || type ==
"IMEX-MRI") {
529 amrex::Print() <<
"Nonlinear solver: " << nonlinear_solver <<
"\n";
530 amrex::Print() <<
"Max nonlinear iters: " << max_nonlinear_iters <<
"\n";
532 if (nonlinear_solver ==
"fixed-point") {
533 NLS = SUNNonlinSol_FixedPoint(y_data, 0, sunctx);
538 flag =
AMREX_MRISTEP(SetMaxNonlinIters)(arkode_mem, max_nonlinear_iters);
541 if (nonlinear_solver ==
"Newton") {
543 amrex::Print() <<
"Linear solver: " << linear_solver <<
"\n";
544 amrex::Print() <<
"Max linear iters: " << max_linear_iters <<
"\n";
546 LS = SUNLinSol_SPGMR(y_data, SUN_PREC_NONE, max_linear_iters, sunctx);
548 flag =
AMREX_MRISTEP(SetLinearSolver)(arkode_mem, LS,
nullptr);
567 flag =
AMREX_MRISTEP(SetMaxNumSteps)(arkode_mem, max_num_steps);
578 const int num_vecs = N_VGetNumSubvectors_ManyVector(y_data);
579 S_data.resize(num_vecs);
581 for(
int i = 0; i < num_vecs; i++)
593 auto get_length = [&](
int index) -> sunindextype {
594 auto* p_mf = &S_data[index];
595 return p_mf->nComp() * (p_mf->boxArray()).numPts();
598 sunindextype NV_len = S_data.
size();
599 N_Vector* NV_array =
new N_Vector[NV_len];
601 for (
int i = 0; i < NV_len; ++i) {
603 &S_data[i], &sunctx);
606 N_Vector y_data = N_VNew_ManyVector(NV_len, NV_array, sunctx);
616 auto get_length = [&](
int index) -> sunindextype {
617 auto* p_mf = &S_data[index];
618 return p_mf->nComp() * (p_mf->boxArray()).numPts();
621 sunindextype NV_len = S_data.
size();
622 N_Vector* NV_array =
new N_Vector[NV_len];
624 for (
int i = 0; i < NV_len; ++i) {
640 N_Vector y_data = N_VNew_ManyVector(NV_len, NV_array, sunctx);
716 ::sundials::Context old_sunctx = std::move(sunctx);
719 initialize_parameters();
723#if defined(SUNDIALS_VERSION_MAJOR) && (SUNDIALS_VERSION_MAJOR < 7)
725 sunctx = ::sundials::Context(&mpi_comm);
727 sunctx = ::sundials::Context(
nullptr);
731 sunctx = ::sundials::Context(mpi_comm);
733 sunctx = ::sundials::Context(SUN_COMM_NULL);
738 udata.
f = [&](
amrex::Real rhs_time, N_Vector y_data, N_Vector y_rhs,
742 unpack_vector(y_data, state);
745 unpack_vector(y_rhs, S_rhs);
752 udata.
fi = [&](
amrex::Real rhs_time, N_Vector y_data, N_Vector y_rhs,
756 unpack_vector(y_data, state);
759 unpack_vector(y_rhs, S_rhs);
766 udata.
fe = [&](
amrex::Real rhs_time, N_Vector y_data, N_Vector y_rhs,
770 unpack_vector(y_data, state);
773 unpack_vector(y_rhs, S_rhs);
780 udata.
ff = [&](
amrex::Real rhs_time, N_Vector y_data, N_Vector y_rhs,
784 unpack_vector(y_data, state);
787 unpack_vector(y_rhs, S_rhs);
798 unpack_vector(y_data, state);
809 unpack_vector(y_data, state);
820 unpack_vector(y_data, state);
831 unpack_vector(y_data, state);
838 N_Vector y_data = copy_data(S_data);
841 SetupRK(time, y_data);
845 SetupMRI(time, y_data);
857 if (type ==
"EX-MRI" || type ==
"IM-MRI" || type ==
"IMEX-MRI") {
860 AMREX_MRISTEP(PrintAllStats)(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE);
864 AMREX_ARKSTEP(PrintAllStats)(arkode_fast_mem, stdout, SUN_OUTPUTFORMAT_TABLE);
869 AMREX_ARKSTEP(PrintAllStats)(arkode_mem, stdout, SUN_OUTPUTFORMAT_TABLE);
892 N_Vector y_old = wrap_data(S_old);
893 N_Vector y_new = wrap_data(S_new);
900 int flag =
AMREX_ARKSTEP(Evolve)(arkode_mem, tout, y_new, &tret, ARK_ONE_STEP);
909 int flag =
AMREX_MRISTEP(Evolve)(arkode_mem, tout, y_new, &tret, ARK_ONE_STEP);
912 Error(
"SUNDIALS integrator type not specified.");
932 N_Vector y_out = wrap_data(S_out);
937 flag =
AMREX_ARKSTEP(Evolve)(arkode_mem, time_out, y_out, &time_ret, ARK_NORMAL);
941#if defined(SUNDIALS_VERSION_MAJOR) && \
942 ((SUNDIALS_VERSION_MAJOR < 7) || (SUNDIALS_VERSION_MAJOR == 7 && SUNDIALS_VERSION_MINOR < 2))
944 amrex::Abort(
"SundialsIntegrator: adaptive slow time steps with MRI methods need SUNDIALS 7.2 or later");
953 flag =
AMREX_MRISTEP(Evolve)(arkode_mem, time_out, y_out, &time_ret, ARK_NORMAL);
956 Error(
"SUNDIALS integrator type not specified.");
970 void map_data (std::function<
void(T&)> )
override {}
975#undef AMREX_SUNDIALS_ARKODE_API
#define AMREX_ALWAYS_ASSERT(EX)
Definition AMReX_BLassert.H:50
amrex::ParmParse pp
Input file parser instance for the given namespace.
Definition AMReX_HypreIJIface.cpp:18
#define AMREX_MRISTEP(f)
Definition AMReX_SundialsIntegrator.H:31
#define AMREX_ARKSTEP(f)
Definition AMReX_SundialsIntegrator.H:30
Long numPts() const noexcept
Returns the total number of cells contained in all boxes in the BoxArray.
Definition AMReX_BoxArray.cpp:394
int nGrow(int direction=0) const noexcept
Return the grow factor that defines the region of definition.
Definition AMReX_FabArrayBase.H:83
const DistributionMapping & DistributionMap() const noexcept
Return constant reference to associated DistributionMapping.
Definition AMReX_FabArrayBase.H:135
int nComp() const noexcept
Return number of variables (aka components) associated with each point.
Definition AMReX_FabArrayBase.H:88
const BoxArray & boxArray() const noexcept
Return a constant reference to the BoxArray that defines the valid region associated with this FabArr...
Definition AMReX_FabArrayBase.H:100
Definition AMReX_IntegratorBase.H:167
bool use_adaptive_fast_time_step
Flag to enable/disable adaptive time stepping at the fast time scale in multirate methods (bool)
Definition AMReX_IntegratorBase.H:249
amrex::Real fast_rel_tol
Relative tolerance for adaptive time stepping at the fast time scale (Real)
Definition AMReX_IntegratorBase.H:285
amrex::Real rel_tol
Relative tolerance for adaptive time stepping (Real)
Definition AMReX_IntegratorBase.H:270
std::function< void(T &, amrex::Real)> post_fast_stage_action
The post_stage_action function is called by the integrator on the computed stage just after it is com...
Definition AMReX_IntegratorBase.H:221
amrex::Real fast_abs_tol
Absolute tolerance for adaptive time stepping at the fast time scale (Real)
Definition AMReX_IntegratorBase.H:294
amrex::Real fast_time_step
Current integrator fast time scale time step size with multirate methods (Real)
Definition AMReX_IntegratorBase.H:255
std::function< void(T &rhs, T &state, const amrex::Real time)> RhsEx
RhsEx is the explicit right-hand-side function an ImEx integrator will use.
Definition AMReX_IntegratorBase.H:197
std::function< void(T &, amrex::Real)> post_step_action
The post_step_action function is called by the integrator on the computed state just after it is comp...
Definition AMReX_IntegratorBase.H:215
std::function< void(T &, amrex::Real)> post_fast_step_action
The post_step_action function is called by the integrator on the computed state just after it is comp...
Definition AMReX_IntegratorBase.H:227
std::function< void(T &rhs, T &state, const amrex::Real time)> RhsIm
RhsIm is the implicit right-hand-side function an ImEx integrator will use.
Definition AMReX_IntegratorBase.H:191
std::function< void(T &rhs, T &state, const amrex::Real time)> Rhs
Rhs is the right-hand-side function the integrator will use.
Definition AMReX_IntegratorBase.H:185
bool use_adaptive_time_step
Flag to enable/disable adaptive time stepping in single rate methods or at the slow time scale in mul...
Definition AMReX_IntegratorBase.H:233
std::function< void(T &, amrex::Real)> post_stage_action
The post_stage_action function is called by the integrator on the computed stage just after it is com...
Definition AMReX_IntegratorBase.H:209
amrex::Real time_step
Current integrator time step size (Real)
Definition AMReX_IntegratorBase.H:238
std::function< void(T &rhs, T &state, const amrex::Real time)> RhsFast
RhsFast is the fast timescale right-hand-side function a multirate integrator will use.
Definition AMReX_IntegratorBase.H:203
amrex::Real abs_tol
Absolute tolerance for adaptive time stepping (Real)
Definition AMReX_IntegratorBase.H:278
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
static void Copy(MultiFab &dst, const MultiFab &src, int srccomp, int dstcomp, int numcomp, int nghost)
Copy from src to dst including nghost ghost cells. The two MultiFabs MUST have the same underlying Bo...
Definition AMReX_MultiFab.cpp:193
Parse Parameters From Command Line and Input Files.
Definition AMReX_ParmParse.H:354
int query(std::string_view name, bool &ref, int ival=FIRST) const
Same as querykth() but searches for the last occurrence of name.
Definition AMReX_ParmParse.cpp:2010
This class provides the user with a few print options.
Definition AMReX_Print.H:35
IntegratorBase implementation powered by SUNDIALS ARKStep/MRIStep.
Definition AMReX_SundialsIntegrator.H:109
void time_interpolate(const T &, const T &, amrex::Real, T &) override
Interpolate between SUNDIALS stages (not yet implemented for this integrator).
Definition AMReX_SundialsIntegrator.H:965
SundialsIntegrator()
Construct an uninitialized integrator; call initialize() before use.
Definition AMReX_SundialsIntegrator.H:691
void initialize(const T &S_data, const amrex::Real time=0.0)
Configure (or reconfigure) the SUNDIALS integrator for the provided state.
Definition AMReX_SundialsIntegrator.H:710
amrex::Real advance(T &S_old, T &S_new, amrex::Real time, const amrex::Real dt) override
Take a single time step of size dt starting from S_old.
Definition AMReX_SundialsIntegrator.H:887
void evolve(T &S_out, const amrex::Real time_out) override
Evolve the solution in S_out up to time_out using ARKStep/MRIStep.
Definition AMReX_SundialsIntegrator.H:927
virtual ~SundialsIntegrator()
Destroy the integrator, printing summary statistics when verbose.
Definition AMReX_SundialsIntegrator.H:854
SundialsIntegrator(const T &S_data, const amrex::Real time=0.0)
Construct and immediately configure the integrator with S_data at time time.
Definition AMReX_SundialsIntegrator.H:699
void map_data(std::function< void(T &)>) override
Apply a user-supplied mapping to every MultiFab in the integrator (unused placeholder).
Definition AMReX_SundialsIntegrator.H:970
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:29
Long size() const noexcept
Definition AMReX_Vector.H:54
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:80
amrex_long Long
Definition AMReX_INT.H:30
bool IOProcessor() noexcept
Is this CPU the I/O Processor? To get the rank number, call IOProcessorNumber()
Definition AMReX_ParallelDescriptor.H:289
MPI_Comm CommunicatorSub() noexcept
sub-communicator for current frame
Definition AMReX_ParallelContext.H:70
static int fi(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition AMReX_SundialsIntegrator.H:66
static int fe(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition AMReX_SundialsIntegrator.H:71
static int post_fast_step(amrex::Real t, N_Vector y_data, void *user_data)
Definition AMReX_SundialsIntegrator.H:96
static int f(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition AMReX_SundialsIntegrator.H:61
static int post_step(amrex::Real t, N_Vector y_data, void *user_data)
Definition AMReX_SundialsIntegrator.H:86
static int ff(amrex::Real t, N_Vector y_data, N_Vector y_rhs, void *user_data)
Definition AMReX_SundialsIntegrator.H:76
static int post_stage(amrex::Real t, N_Vector y_data, void *user_data)
Definition AMReX_SundialsIntegrator.H:81
static int post_fast_stage(amrex::Real t, N_Vector y_data, void *user_data)
Definition AMReX_SundialsIntegrator.H:91
int MPI_Comm
Definition AMReX_ccse-mpi.H:51
N_Vector N_VMake_MultiFab(sunindextype length, amrex::MultiFab *v_mf, ::sundials::Context *sunctx)
Wrap an existing MultiFab mf as an N_Vector without copying.
Definition AMReX_NVector_MultiFab.cpp:105
amrex::MultiFab *& getMFptr(N_Vector v)
Access the MultiFab pointer stored inside v (non-const).
Definition AMReX_NVector_MultiFab.cpp:233
N_Vector N_VNew_MultiFab(sunindextype length, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, sunindextype nComp, sunindextype nGhost, ::sundials::Context *sunctx)
Allocate a MultiFab-backed N_Vector of length vec_length.
Definition AMReX_NVector_MultiFab.cpp:80
Definition AMReX_Amr.cpp:50
@ make_alias
Definition AMReX_MakeType.H:7
BoxArray const & boxArray(FabArrayBase const &fa)
Convenience wrapper that forwards to fa.boxArray().
Definition AMReX_FabArrayBase.cpp:2949
DistributionMapping const & DistributionMap(FabArrayBase const &fa)
Convenience wrapper that forwards to fa.DistributionMap().
Definition AMReX_FabArrayBase.cpp:2954
int nComp(FabArrayBase const &fa)
Convenience wrapper that forwards to fa.nComp().
Definition AMReX_FabArrayBase.cpp:2939
void Error(const std::string &msg)
Print a message to stderr and abort the program.
Definition AMReX.cpp:238
int Verbose() noexcept
Return the verbosity level configured via ParmParse or SetVerbose().
Definition AMReX.cpp:184
void Abort(const std::string &msg)
Print a fatal-error message to stderr and abort execution.
Definition AMReX.cpp:244
const int[]
Definition AMReX_BLProfiler.cpp:1665
User-supplied callbacks consumed by the AMReX/SUNDIALS bridge.
Definition AMReX_SundialsIntegrator.H:49
std::function< int(amrex::Real, N_Vector, N_Vector, void *)> fi
Implicit RHS for ImEx schemes.
Definition AMReX_SundialsIntegrator.H:51
std::function< int(amrex::Real, N_Vector, void *)> post_fast_stage
Hook for MRI fast stages.
Definition AMReX_SundialsIntegrator.H:56
std::function< int(amrex::Real, N_Vector, void *)> post_step
Hook invoked after each time step.
Definition AMReX_SundialsIntegrator.H:55
std::function< int(amrex::Real, N_Vector, N_Vector, void *)> f
ERK/DIRK RHS or MRI slow RHS.
Definition AMReX_SundialsIntegrator.H:50
std::function< int(amrex::Real, N_Vector, void *)> post_stage
Hook invoked after each stage.
Definition AMReX_SundialsIntegrator.H:54
std::function< int(amrex::Real, N_Vector, N_Vector, void *)> ff
MRI fast-scale RHS.
Definition AMReX_SundialsIntegrator.H:53
std::function< int(amrex::Real, N_Vector, void *)> post_fast_step
Hook for MRI fast steps.
Definition AMReX_SundialsIntegrator.H:57
std::function< int(amrex::Real, N_Vector, N_Vector, void *)> fe
Explicit RHS for ImEx schemes.
Definition AMReX_SundialsIntegrator.H:52