|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Split integrator for MRI simulations handling slow and fast timescales. More...
#include <ERF_MRI.H>

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 integrator. 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 |
| 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 |
| Should we not do acoustic substepping. More... | |
| int | anelastic |
| Should we use the anelastic integrator. More... | |
| int | ncomp_cons |
| How many components in the cell-centered MultiFab. More... | |
| int | force_stage1_single_substep |
| Do we follow the recommendation to only perform a single substep in the first RK stage. 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 |
| T * | F_slow |
Split integrator for MRI simulations handling slow and fast timescales.
| T | State type. |
|
default |
|
inline |

|
default |
|
defaultnoexcept |
|
delete |
|
inline |
Advance the state from time to time + time_step.
| [in,out] | S_old | Current state. |
| [in,out] | S_new | State to be updated. |
| [in] | time | Current simulation time. |
| [in] | time_step | Timestep size. |
Referenced by ERF::advance_dycore().


|
inline |
|
inline |
Get the current slow-to-fast timestep ratio.
Referenced by MRISplitIntegrator< T >::advance().

|
inline |
Initialize integrator storage.
| [in] | S_data | Reference state used to determine storage size. |

|
inlineprivate |
Allocate internal storage for integrator variables.
| [in] | S_data | Reference state used to determine storage size. |
Referenced by MRISplitIntegrator< T >::initialize(), and MRISplitIntegrator< T >::MRISplitIntegrator().


|
inline |
Apply a mapping function to all internal stored data.
| [in] | Map | Mapping function to apply to each stored state object. |
|
delete |
|
defaultnoexcept |
|
inline |
Set the acoustic substepping function.
| [in] | F | Function to perform the acoustic substepping update. |
Referenced by ERF::advance_dycore().

|
inline |
Set the function to be called when acoustic substepping is disabled.
| [in] | F | Function to use in place of substepping. |
Referenced by ERF::advance_dycore().

|
inline |
Set the ratio of slow to fast timestep sizes.
| [in] | timestep_ratio | Ratio of slow/fast timesteps. |
Referenced by ERF::advance_dycore().

|
inline |
|
inline |
Set the pre-substepping slow RHS function.
| [in] | F | Function to compute the pre-substepping slow RHS. |
Referenced by ERF::advance_dycore().

|
inline |
Set whether to use the anelastic integrator.
| [in] | _anelastic | Integer flag (1 for anelastic, 0 for compressible). |
|
inline |
Force the first RK stage to perform only a single substep.
| [in] | _force_stage1_single_substep | Integer flag to enable this behavior. |
|
inline |
Set the number of conservative components.
| [in] | _ncomp_cons | Number of conservative components. |
|
inline |
Set whether acoustic substepping is disabled.
| [in] | _no_substepping | Integer flag (1 to disable substepping). |
|
private |
|
private |
Should we use the anelastic integrator.
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setAnelastic().
|
private |
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::initialize_data().
|
private |
Do we follow the recommendation to only perform a single substep in the first RK stage.
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setForceFirstStageSingleSubstep().
|
private |
How many components in the cell-centered MultiFab.
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setNcompCons().
|
private |
The no_substep function is called when we have no acoustic substepping.
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::set_no_substep().
|
private |
Should we not do acoustic substepping.
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::setNoSubstepping().
|
private |
rhs is the right-hand-side function the integrator will use.
Referenced by MRISplitIntegrator< T >::get_rhs().
|
private |
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::initialize_data().
|
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().
|
private |
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::set_slow_rhs_post().
|
private |
Referenced by MRISplitIntegrator< T >::advance(), and MRISplitIntegrator< T >::set_slow_rhs_pre().
|
private |
Referenced by MRISplitIntegrator< T >::initialize_data(), and MRISplitIntegrator< T >::map_data().
|
private |
Integrator timestep size (Real)
Referenced by MRISplitIntegrator< T >::advance().