ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
MRISplitIntegrator< T > Class Template Reference

Split integrator for MRI simulations handling slow and fast timescales. More...

#include <ERF_MRI.H>

Collaboration diagram for MRISplitIntegrator< T >:

Public Member Functions

 MRISplitIntegrator ()=default
 
 MRISplitIntegrator (const T &S_data)
 
void initialize (const T &S_data)
 Initialize integrator storage. More...
 
 ~MRISplitIntegrator ()=default
 
 MRISplitIntegrator (MRISplitIntegrator &&) noexcept=default
 
MRISplitIntegrator & operator= (MRISplitIntegrator &&other) noexcept=default
 
 MRISplitIntegrator (const MRISplitIntegrator &other)=delete
 
MRISplitIntegrator & operator= (const MRISplitIntegrator &other)=delete
 
void setNcompCons (int _ncomp_cons)
 Set the number of conservative components. More...
 
void setAnelastic (int _anelastic)
 Set whether to use the anelastic / pseudo-incompressible integrator. More...
 
void setTimesteppingType (TimesteppingType _timestepping_type=TimesteppingType::RK2)
 Set the level's time integrator; the anelastic / pseudo-incompressible integrator uses RK2 or MidPoint. More...
 
void setNoSubstepping (int _no_substepping)
 Set whether acoustic substepping is disabled. More...
 
void setForceFirstStageSingleSubstep (int _force_stage1_single_substep)
 Force the first RK stage to perform only a single substep. More...
 
void set_slow_rhs_pre (std::function< void(T &, T &, T &, const double, const double, const double, const int)> F)
 Set the pre-substepping slow RHS function. More...
 
void set_slow_rhs_post (std::function< void(T &, T &, T &, T &, const double, const double, const double, const int)> F)
 
void set_acoustic_substepping (std::function< void(int, int, int, T &, const T &, T &, T &, const double, const double, const amrex::Real, const double, const double)> F)
 Set the acoustic substepping function. More...
 
void set_slow_fast_timestep_ratio (const int timestep_ratio=1)
 Set the ratio of slow to fast timestep sizes. More...
 
int get_slow_fast_timestep_ratio ()
 Get the current slow-to-fast timestep ratio. More...
 
void set_no_substep (std::function< void(T &, T &, T &, const double, const double, int)> F)
 Set the function to be called when acoustic substepping is disabled. More...
 
std::function< void(T &, const T &, const double, const double)> get_rhs ()
 
double advance (T &S_old, T &S_new, double time, const double time_step)
 Advance the state from time to time + time_step. More...
 
void map_data (std::function< void(T &)> Map)
 Apply a mapping function to all internal stored data. More...
 

Private Member Functions

void initialize_data (const T &S_data)
 Allocate internal storage for integrator variables. More...
 

Private Attributes

std::function< void(T &, const T &, const double, const double)> rhs
 rhs is the right-hand-side function the integrator will use. More...
 
std::function< void(T &, T &, T &, const double, const double, const double, const int)> slow_rhs_pre
 
std::function< void(T &, T &, T &, T &, const double, const double, const double, const int)> slow_rhs_post
 
std::function< void(int, int, int, T &, const T &, T &, T &, const double, const double, const amrex::Real, const double, const double)> acoustic_substepping
 
double timestep = 0.0
 Integrator timestep size (Real) More...
 
int slow_fast_timestep_ratio = 0
 The ratio of slow timestep size / fast timestep size (int) More...
 
int no_substepping = -1
 Should we not do acoustic substepping (-1 until setNoSubstepping is called) More...
 
int anelastic = -1
 Should we use the two-stage integrator of anelastic and pseudo-incompressible levels (-1 until setAnelastic is called) More...
 
TimesteppingType timestepping_type = TimesteppingType::RK2
 Which two-stage scheme the anelastic / pseudo-incompressible integrator uses (RK2 or MidPoint) More...
 
int ncomp_cons = -1
 How many components in the cell-centered MultiFab (-1 until setNcompCons is called) More...
 
int force_stage1_single_substep = -1
 Do we follow the recommendation to only perform a single substep in the first RK stage (-1 until setForceFirstStageSingleSubstep is called) More...
 
std::function< void(T &, T &, T &, const double, const double, int)> no_substep
 The no_substep function is called when we have no acoustic substepping. More...
 
amrex::Vector< std::unique_ptr< T > > T_store
 
T * S_sum = nullptr
 
T * F_slow = nullptr
 

Detailed Description

template<class T>
class MRISplitIntegrator< T >

Split integrator for MRI simulations handling slow and fast timescales.

Template Parameters
TState type.

Constructor & Destructor Documentation

◆ MRISplitIntegrator() [1/4]

template<class T >
MRISplitIntegrator< T >::MRISplitIntegrator ( )
default

◆ MRISplitIntegrator() [2/4]

template<class T >
MRISplitIntegrator< T >::MRISplitIntegrator ( const T &  S_data)
inline
104  {
105  initialize_data(S_data);
106  }
void initialize_data(const T &S_data)
Allocate internal storage for integrator variables.
Definition: ERF_MRI.H:83
Here is the call graph for this function:

◆ ~MRISplitIntegrator()

template<class T >
MRISplitIntegrator< T >::~MRISplitIntegrator ( )
default

◆ MRISplitIntegrator() [3/4]

template<class T >
MRISplitIntegrator< T >::MRISplitIntegrator ( MRISplitIntegrator< T > &&  )
defaultnoexcept

◆ MRISplitIntegrator() [4/4]

template<class T >
MRISplitIntegrator< T >::MRISplitIntegrator ( const MRISplitIntegrator< T > &  other)
delete

Member Function Documentation

◆ advance()

template<class T >
double MRISplitIntegrator< T >::advance ( T &  S_old,
T &  S_new,
double  time,
const double  time_step 
)
inline

Advance the state from time to time + time_step.

Parameters
[in,out]S_oldCurrent state.
[in,out]S_newState to be updated.
[in]timeCurrent simulation time.
[in]time_stepTimestep size.
Returns
The actual timestep taken.
248  {
249  BL_PROFILE_REGION("MRI_advance");
250  using namespace amrex;
251 
252  // *******************************************************************************
253  // !no_substepping: we only update the fast variables every fast timestep, then update
254  // the slow variables after the acoustic sub-stepping. This has
255  // 2 calls to slow_rhs so that we can update the slow variables
256  // with the velocity field after the acoustic substepping using
257  // the time-averaged velocity from the substepping
258  // no_substepping: we don't do any acoustic subcycling so we only make one call per RK
259  // stage to slow_rhs
260  // *******************************************************************************
263  "MRISplitIntegrator::advance: setNoSubstepping, setAnelastic, "
264  "setForceFirstStageSingleSubstep and setNcompCons must be called before advance");
265  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(S_sum != nullptr && F_slow != nullptr,
266  "MRISplitIntegrator::advance: integrator storage must be initialized before advance");
267 
268  timestep = time_step;
269 
270  const int substep_ratio = get_slow_fast_timestep_ratio();
271 
272  if (!no_substepping) {
273  AMREX_ALWAYS_ASSERT(substep_ratio > 1 && substep_ratio % 2 == 0);
274  }
275 
276  // Assume before advance() that S_old is valid data at the current time ("time" argument)
277  // And that if data is a MultiFab, both S_old and S_new contain ghost cells for evaluating a stencil based RHS
278  // We need this from S_old. This is convenient for S_new to have so we can use it
279  // as scratch space for stage values without creating a new scratch MultiFab with ghost cells.
280 
281  // NOTE: In the following, we use S_new to hold S*, S**, and finally, S^(n+1) at the new time
282  // DEFINITIONS:
283  // S_old = S^n
284  // S_sum = S(t)
285  // F_slow = F(S_stage)
286 
287  int n_data = IntVars::NumTypes;
288 
289  /**********************************************/
290  /* RK3 Integration with Acoustic Sub-stepping */
291  /**********************************************/
292  Vector<int> num_vars = {ncomp_cons, 1, 1, 1};
293  for (int i(0); i<n_data; ++i)
294  {
295  // Copy old -> new
296  MultiFab::Copy(S_new[i],S_old[i],0,0,num_vars[i],S_old[i].nGrowVect());
297  }
298 
299  // Timestep taken by the fast integrator
300  double dtau;
301 
302  // How many timesteps taken by the fast integrator
303  int nsubsteps;
304 
305  // This is the final time of the full timestep (also the 3rd RK stage)
306  // Real new_time = time + timestep;
307 
308  double time_stage = time;
309  double old_time_stage;
310 
311  if (!anelastic) {
312  // RK3 for compressible integrator
313  for (int nrk = 0; nrk < 3; nrk++)
314  {
315  // Capture the time we got to in the previous RK step
316  old_time_stage = time_stage;
317 
318  if (nrk == 0) {
320  nsubsteps = 1;
321  dtau = timestep / three;
322  } else {
323  // Clamp to 1: substep_ratio is only required to be even, so a ratio of 2
324  // would otherwise give zero substeps and leave S_sum stale in this stage
325  nsubsteps = std::max(substep_ratio/3, 1);
326  dtau = (timestep / three) / static_cast<double>(nsubsteps);
327  }
328  time_stage = time + timestep / three;
329  }
330  if (nrk == 1) {
331  if (no_substepping) {
332  nsubsteps = 1;
333  dtau = myhalf * timestep;
334  } else {
335  nsubsteps = std::max(substep_ratio/2, 1);
336  dtau = (myhalf * timestep) / static_cast<double>(nsubsteps);
337  }
338  time_stage = time + timestep / two;
339  }
340  if (nrk == 2) {
341  if (no_substepping) {
342  nsubsteps = 1;
343  dtau = timestep;
344  } else {
345  nsubsteps = substep_ratio;
346  dtau = timestep / static_cast<double>(nsubsteps);
347  }
348  time_stage = time + timestep;
349  }
350 
351  // step 1 starts with S_stage = S^n and we always start substepping at the old time
352  // step 2 starts with S_stage = S^* and we always start substepping at the old time
353  // step 3 starts with S_stage = S^** and we always start substepping at the old time
354 
355  slow_rhs_pre(*F_slow, S_old, S_new, time, old_time_stage, time_stage, nrk);
356 
357  amrex::Real inv_fac = one / static_cast<amrex::Real>(nsubsteps);
358 
359  // ****************************************************
360  // Acoustic substepping
361  // ****************************************************
362  if (!no_substepping)
363  {
364  // *******************************************************************************
365  // Update the fast variables
366  // *******************************************************************************
367  for (int ks = 0; ks < nsubsteps; ++ks)
368  {
369  acoustic_substepping(ks, nsubsteps, nrk, *F_slow, S_old, S_new, *S_sum, dtau, timestep, inv_fac,
370  time + ks*dtau, time + (ks+1) * dtau);
371 
372  } // ks
373 
374  } else {
375  no_substep(*S_sum, S_old, *F_slow, time + nsubsteps*dtau, nsubsteps*dtau, nrk);
376  }
377 
378  // ****************************************************
379  // Evaluate F_slow(S_stage) only for the slow variables
380  // Note that we are using the current stage versions (in S_new) of the slow variables
381  // (because we didn't update the slow variables in the substepping)
382  // and the momenta slow_rhs_pre set from the same stage, plus the average of
383  // the acoustic substep updates when substepping, to advect them
384  // (the mass fluxes that advance rho over the stage)
385  // ****************************************************
386  slow_rhs_post(*F_slow, S_old, S_new, *S_sum, time, old_time_stage, time_stage, nrk);
387  } // nrk
388 
389  } else {
390  // Two-stage integrator for the anelastic and pseudo-incompressible equations, which get
391  // their pressure from a projection at the end of each stage.
392  //
393  // SSP-RK2 (Heun): both stages advance a full timestep from S^n, and the
394  // second stage averages the slow source with the one from the first,
395  // which erf_slow_rhs_{pre,post} do when (timestepping_type == RK2 && nrk == 1).
396  //
397  // MidPoint: the first stage advances only a half timestep,
398  // S^* = S^n + (dt/2) F(S^n)
399  // S^n+1 = S^n + dt F(S^*)
400  // and the second stage takes no average. The vertical diffusion
401  // is second order in time with a tridiagonal solve in the first
402  // stage only and none in the second.
403  const bool l_midpoint = (timestepping_type == TimesteppingType::MidPoint);
404 
405  for (int nrk = 0; nrk < 2; nrk++)
406  {
407  // Capture the time we got to in the previous RK step
408  old_time_stage = time_stage;
409 
410  // Set the timestep for this stage -- both stages advance from the old time
411  nsubsteps = 1;
412  dtau = (l_midpoint && (nrk == 0)) ? myhalf * timestep : timestep;
413  time_stage = time + nsubsteps * dtau;
414 
415  slow_rhs_pre(*F_slow, S_old, S_new, time, old_time_stage, time_stage, nrk);
416 
417  no_substep(*S_sum, S_old, *F_slow, time + nsubsteps*dtau, nsubsteps*dtau, nrk);
418 
419  // ****************************************************
420  // Evaluate F_slow(S_stage) only for the slow variables
421  // Note that we are using the current stage versions (in S_new) of the slow variables
422  // and the momenta slow_rhs_pre took from the same stage to advect them;
423  // S_sum holds the projected state at the end of the stage
424  // ****************************************************
425  slow_rhs_post(*F_slow, S_old, S_new, *S_sum, time, old_time_stage, time_stage, nrk);
426  } // nrk
427  }
428 
429  // Return timestep
430  return timestep;
431  }
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(axis >=0 &&axis< AMREX_SPACEDIM, "prob.axis must be 0, 1 or 2")
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
constexpr amrex::Real three
Definition: ERF_NumericalConstants.H:39
constexpr amrex::Real two
Definition: ERF_NumericalConstants.H:38
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
T * F_slow
Definition: ERF_MRI.H:77
int anelastic
Should we use the two-stage integrator of anelastic and pseudo-incompressible levels (-1 until setAne...
Definition: ERF_MRI.H:51
int force_stage1_single_substep
Do we follow the recommendation to only perform a single substep in the first RK stage (-1 until setF...
Definition: ERF_MRI.H:67
int ncomp_cons
How many components in the cell-centered MultiFab (-1 until setNcompCons is called)
Definition: ERF_MRI.H:61
double timestep
Integrator timestep size (Real)
Definition: ERF_MRI.H:35
TimesteppingType timestepping_type
Which two-stage scheme the anelastic / pseudo-incompressible integrator uses (RK2 or MidPoint)
Definition: ERF_MRI.H:56
std::function< void(T &, T &, T &, const double, const double, const double, const int)> slow_rhs_pre
Definition: ERF_MRI.H:26
std::function< void(T &, T &, T &, T &, const double, const double, const double, const int)> slow_rhs_post
Definition: ERF_MRI.H:27
std::function< void(T &, T &, T &, const double, const double, int)> no_substep
The no_substep function is called when we have no acoustic substepping.
Definition: ERF_MRI.H:72
int get_slow_fast_timestep_ratio()
Get the current slow-to-fast timestep ratio.
Definition: ERF_MRI.H:220
T * S_sum
Definition: ERF_MRI.H:76
std::function< void(int, int, int, T &, const T &, T &, T &, const double, const double, const amrex::Real, const double, const double)> acoustic_substepping
Definition: ERF_MRI.H:30
int no_substepping
Should we not do acoustic substepping (-1 until setNoSubstepping is called)
Definition: ERF_MRI.H:45
@ NumTypes
Definition: ERF_IndexDefines.H:253
@ ks
Definition: ERF_SLM.H:76
Definition: ERF_ConsoleIO.cpp:17

Referenced by ERF::advance_dycore().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_rhs()

template<class T >
std::function<void(T&, const T&, const double, const double)> MRISplitIntegrator< T >::get_rhs ( )
inline
235  {
236  return rhs;
237  }
std::function< void(T &, const T &, const double, const double)> rhs
rhs is the right-hand-side function the integrator will use.
Definition: ERF_MRI.H:25

◆ get_slow_fast_timestep_ratio()

template<class T >
int MRISplitIntegrator< T >::get_slow_fast_timestep_ratio ( )
inline

Get the current slow-to-fast timestep ratio.

Returns
The slow/fast timestep ratio.
221  {
223  }
int slow_fast_timestep_ratio
The ratio of slow timestep size / fast timestep size (int)
Definition: ERF_MRI.H:40

Referenced by MRISplitIntegrator< T >::advance().

Here is the caller graph for this function:

◆ initialize()

template<class T >
void MRISplitIntegrator< T >::initialize ( const T &  S_data)
inline

Initialize integrator storage.

Parameters
[in]S_dataReference state used to determine storage size.
113  {
114  initialize_data(S_data);
115  }
Here is the call graph for this function:

◆ initialize_data()

template<class T >
void MRISplitIntegrator< T >::initialize_data ( const T &  S_data)
inlineprivate

Allocate internal storage for integrator variables.

Parameters
[in]S_dataReference state used to determine storage size.
84  {
85  // TODO: We can optimize memory by making the cell-centered part of S_sum
86  // have only 2 components, not ncomp_cons components
87  const bool include_ghost = true;
88  // CreateLike appends to T_store, so drop any storage from a previous
89  // initialization before S_sum and F_slow are taken from entries 0 and 1
90  T_store.clear();
91  amrex::IntegratorOps<T>::CreateLike(T_store, S_data, include_ghost);
92  S_sum = T_store[0].get();
93  amrex::IntegratorOps<T>::CreateLike(T_store, S_data, include_ghost);
94  F_slow = T_store[1].get();
95  // initializing to zero
96  for (long idx = 0; idx < S_sum->size(); idx++) { (*S_sum)[idx].setVal(0); }
97  for (long idx = 0; idx < F_slow->size(); idx++) { (*F_slow)[idx].setVal(0); }
98  }
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int idx(int i, int j, int k, int nx, int ny)
Definition: ERF_InitForEnsemble.cpp:404
amrex::Vector< std::unique_ptr< T > > T_store
Definition: ERF_MRI.H:75

Referenced by MRISplitIntegrator< T >::initialize(), and MRISplitIntegrator< T >::MRISplitIntegrator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_data()

template<class T >
void MRISplitIntegrator< T >::map_data ( std::function< void(T &)>  Map)
inline

Apply a mapping function to all internal stored data.

Parameters
[in]MapMapping function to apply to each stored state object.
438  {
439  for (auto& F : T_store) {
440  Map(*F);
441  }
442  }

◆ operator=() [1/2]

template<class T >
MRISplitIntegrator& MRISplitIntegrator< T >::operator= ( const MRISplitIntegrator< T > &  other)
delete

◆ operator=() [2/2]

template<class T >
MRISplitIntegrator& MRISplitIntegrator< T >::operator= ( MRISplitIntegrator< T > &&  other)
defaultnoexcept

◆ set_acoustic_substepping()

template<class T >
void MRISplitIntegrator< T >::set_acoustic_substepping ( std::function< void(int, int, int, T &, const T &, T &, T &, const double, const double, const amrex::Real, const double, const double)>  F)
inline

Set the acoustic substepping function.

Parameters
[in]FFunction to perform the acoustic substepping update.
203  {
205  }

Referenced by ERF::advance_dycore().

Here is the caller graph for this function:

◆ set_no_substep()

template<class T >
void MRISplitIntegrator< T >::set_no_substep ( std::function< void(T &, T &, T &, const double, const double, int)>  F)
inline

Set the function to be called when acoustic substepping is disabled.

Parameters
[in]FFunction to use in place of substepping.
230  {
231  no_substep = F;
232  }

Referenced by ERF::advance_dycore().

Here is the caller graph for this function:

◆ set_slow_fast_timestep_ratio()

template<class T >
void MRISplitIntegrator< T >::set_slow_fast_timestep_ratio ( const int  timestep_ratio = 1)
inline

Set the ratio of slow to fast timestep sizes.

Parameters
[in]timestep_ratioRatio of slow/fast timesteps.
212  {
213  slow_fast_timestep_ratio = timestep_ratio;
214  }

Referenced by ERF::advance_dycore().

Here is the caller graph for this function:

◆ set_slow_rhs_post()

template<class T >
void MRISplitIntegrator< T >::set_slow_rhs_post ( std::function< void(T &, T &, T &, T &, const double, const double, const double, const int)>  F)
inline
191  {
192  slow_rhs_post = F;
193  }

Referenced by ERF::advance_dycore().

Here is the caller graph for this function:

◆ set_slow_rhs_pre()

template<class T >
void MRISplitIntegrator< T >::set_slow_rhs_pre ( std::function< void(T &, T &, T &, const double, const double, const double, const int)>  F)
inline

Set the pre-substepping slow RHS function.

Parameters
[in]FFunction to compute the pre-substepping slow RHS.
187  {
188  slow_rhs_pre = F;
189  }

Referenced by ERF::advance_dycore().

Here is the caller graph for this function:

◆ setAnelastic()

template<class T >
void MRISplitIntegrator< T >::setAnelastic ( int  _anelastic)
inline

Set whether to use the anelastic / pseudo-incompressible integrator.

Parameters
[in]_anelasticInteger flag (1 for anelastic or pseudo-incompressible, 0 for compressible).
150  {
151  anelastic = _anelastic;
152  }

◆ setForceFirstStageSingleSubstep()

template<class T >
void MRISplitIntegrator< T >::setForceFirstStageSingleSubstep ( int  _force_stage1_single_substep)
inline

Force the first RK stage to perform only a single substep.

Parameters
[in]_force_stage1_single_substepInteger flag to enable this behavior.
178  {
179  force_stage1_single_substep = _force_stage1_single_substep;
180  }

◆ setNcompCons()

template<class T >
void MRISplitIntegrator< T >::setNcompCons ( int  _ncomp_cons)
inline

Set the number of conservative components.

Parameters
[in]_ncomp_consNumber of conservative components.
141  {
142  ncomp_cons = _ncomp_cons;
143  }

◆ setNoSubstepping()

template<class T >
void MRISplitIntegrator< T >::setNoSubstepping ( int  _no_substepping)
inline

Set whether acoustic substepping is disabled.

Parameters
[in]_no_substeppingInteger flag (1 to disable substepping).
169  {
170  no_substepping = _no_substepping;
171  }

◆ setTimesteppingType()

template<class T >
void MRISplitIntegrator< T >::setTimesteppingType ( TimesteppingType  _timestepping_type = TimesteppingType::RK2)
inline

Set the level's time integrator; the anelastic / pseudo-incompressible integrator uses RK2 or MidPoint.

Parameters
[in]_timestepping_typeThe level's TimesteppingType.
160  {
161  timestepping_type = _timestepping_type;
162  }

Member Data Documentation

◆ acoustic_substepping

template<class T >
std::function<void(int, int, int, T&, const T&, T&, T&, const double, const double, const amrex::Real, const double, const double)> MRISplitIntegrator< T >::acoustic_substepping
private

◆ anelastic

template<class T >
int MRISplitIntegrator< T >::anelastic = -1
private

Should we use the two-stage integrator of anelastic and pseudo-incompressible levels (-1 until setAnelastic is called)

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setAnelastic().

◆ F_slow

template<class T >
T* MRISplitIntegrator< T >::F_slow = nullptr
private

◆ force_stage1_single_substep

template<class T >
int MRISplitIntegrator< T >::force_stage1_single_substep = -1
private

Do we follow the recommendation to only perform a single substep in the first RK stage (-1 until setForceFirstStageSingleSubstep is called)

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setForceFirstStageSingleSubstep().

◆ ncomp_cons

template<class T >
int MRISplitIntegrator< T >::ncomp_cons = -1
private

How many components in the cell-centered MultiFab (-1 until setNcompCons is called)

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setNcompCons().

◆ no_substep

template<class T >
std::function<void (T&, T&, T&, const double, const double, int)> MRISplitIntegrator< T >::no_substep
private

The no_substep function is called when we have no acoustic substepping.

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::set_no_substep().

◆ no_substepping

template<class T >
int MRISplitIntegrator< T >::no_substepping = -1
private

Should we not do acoustic substepping (-1 until setNoSubstepping is called)

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setNoSubstepping().

◆ rhs

template<class T >
std::function<void(T&, const T&, const double, const double)> MRISplitIntegrator< T >::rhs
private

rhs is the right-hand-side function the integrator will use.

Referenced by MRISplitIntegrator< T >::get_rhs().

◆ S_sum

template<class T >
T* MRISplitIntegrator< T >::S_sum = nullptr
private

◆ slow_fast_timestep_ratio

template<class T >
int MRISplitIntegrator< T >::slow_fast_timestep_ratio = 0
private

The ratio of slow timestep size / fast timestep size (int)

Referenced by MRISplitIntegrator< T >::get_slow_fast_timestep_ratio(), and MRISplitIntegrator< T >::set_slow_fast_timestep_ratio().

◆ slow_rhs_post

template<class T >
std::function<void(T&, T&, T&, T&, const double, const double, const double, const int)> MRISplitIntegrator< T >::slow_rhs_post
private

◆ slow_rhs_pre

template<class T >
std::function<void(T&, T&, T&, const double, const double, const double, const int)> MRISplitIntegrator< T >::slow_rhs_pre
private

◆ T_store

template<class T >
amrex::Vector<std::unique_ptr<T> > MRISplitIntegrator< T >::T_store
private

◆ timestep

template<class T >
double MRISplitIntegrator< T >::timestep = 0.0
private

Integrator timestep size (Real)

Referenced by MRISplitIntegrator< T >::advance().

◆ timestepping_type

template<class T >
TimesteppingType MRISplitIntegrator< T >::timestepping_type = TimesteppingType::RK2
private

Which two-stage scheme the anelastic / pseudo-incompressible integrator uses (RK2 or MidPoint)

Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setTimesteppingType().


The documentation for this class was generated from the following file: