Block-Structured AMR Software Framework
amrex::IntegratorBase< T > Class Template Referenceabstract

#include <AMReX_IntegratorBase.H>

Inheritance diagram for amrex::IntegratorBase< T >:
amrex::FEIntegrator< T > amrex::RKIntegrator< T > amrex::SundialsIntegrator< T >

Public Member Functions

 IntegratorBase ()=default
 
 IntegratorBase (const T &)
 
virtual ~IntegratorBase ()=default
 
void set_rhs (std::function< void(T &, T &, const amrex::Real)> F)
 
void set_imex_rhs (std::function< void(T &, T &, const amrex::Real)> Fi, std::function< void(T &, T &, const amrex::Real)> Fe)
 
void set_fast_rhs (std::function< void(T &, T &, const amrex::Real)> F)
 
void set_post_stage_action (std::function< void(T &, amrex::Real)> A)
 
void set_post_step_action (std::function< void(T &, amrex::Real)> A)
 
void set_post_fast_stage_action (std::function< void(T &, amrex::Real)> A)
 
void set_post_fast_step_action (std::function< void(T &, amrex::Real)> A)
 
amrex::Real get_time_step ()
 
void set_time_step (amrex::Real dt)
 
void set_adaptive_step ()
 
void set_fast_time_step (amrex::Real dt)
 
void set_adaptive_fast_step ()
 
void set_max_steps (int steps)
 
void set_tolerances (amrex::Real rtol, amrex::Real atol)
 
void set_fast_tolerances (amrex::Real rtol, amrex::Real atol)
 
virtual amrex::Real advance (T &S_old, T &S_new, amrex::Real time, amrex::Real dt)=0
 Take a single time step from (time, S_old) to (time + dt, S_new) with the given step size. More...
 
virtual void evolve (T &S_out, const amrex::Real time_out)=0
 Evolve the current (internal) integrator state to time_out. More...
 
virtual void time_interpolate (const T &S_new, const T &S_old, amrex::Real timestep_fraction, T &data)=0
 
virtual void map_data (std::function< void(T &)> Map)=0
 

Protected Attributes

std::function< void(T &rhs, T &state, const amrex::Real time)> Rhs
 Rhs is the right-hand-side function the integrator will use. More...
 
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. More...
 
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. More...
 
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. More...
 
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 computed. More...
 
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 computed. More...
 
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 computed. More...
 
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 computed. More...
 
bool use_adaptive_time_step = false
 Flag to enable/disable adaptive time stepping in single rate methods or at the slow time scale in multirate methods (bool) More...
 
amrex::Real time_step
 Current integrator time step size (Real) More...
 
amrex::Real previous_time_step
 Step size of the last completed step (Real) More...
 
bool use_adaptive_fast_time_step = false
 Flag to enable/disable adaptive time stepping at the fast time scale in multirate methods (bool) More...
 
amrex::Real fast_time_step
 Current integrator fast time scale time step size with multirate methods (Real) More...
 
amrex::Long num_steps = 0
 Number of integrator time steps (Long) More...
 
int max_steps = 500
 Max number of internal steps before an error is returned (Long) More...
 
amrex::Real rel_tol = 1.0e-4
 Relative tolerance for adaptive time stepping (Real) More...
 
amrex::Real abs_tol = 1.0e-9
 Absolute tolerance for adaptive time stepping (Real) More...
 
amrex::Real fast_rel_tol = 1.0e-4
 Relative tolerance for adaptive time stepping at the fast time scale (Real) More...
 
amrex::Real fast_abs_tol = 1.0e-9
 Absolute tolerance for adaptive time stepping at the fast time scale (Real) More...
 

Constructor & Destructor Documentation

◆ IntegratorBase() [1/2]

template<class T >
amrex::IntegratorBase< T >::IntegratorBase ( )
default

◆ IntegratorBase() [2/2]

template<class T >
amrex::IntegratorBase< T >::IntegratorBase ( const T &  )
inline

◆ ~IntegratorBase()

template<class T >
virtual amrex::IntegratorBase< T >::~IntegratorBase ( )
virtualdefault

Member Function Documentation

◆ advance()

template<class T >
virtual amrex::Real amrex::IntegratorBase< T >::advance ( T &  S_old,
T &  S_new,
amrex::Real  time,
amrex::Real  dt 
)
pure virtual

Take a single time step from (time, S_old) to (time + dt, S_new) with the given step size.

Implemented in amrex::SundialsIntegrator< T >, amrex::RKIntegrator< T >, and amrex::FEIntegrator< T >.

◆ evolve()

template<class T >
virtual void amrex::IntegratorBase< T >::evolve ( T &  S_out,
const amrex::Real  time_out 
)
pure virtual

Evolve the current (internal) integrator state to time_out.

Implemented in amrex::SundialsIntegrator< T >, amrex::RKIntegrator< T >, and amrex::FEIntegrator< T >.

◆ get_time_step()

template<class T >
amrex::Real amrex::IntegratorBase< T >::get_time_step ( )
inline

◆ map_data()

template<class T >
virtual void amrex::IntegratorBase< T >::map_data ( std::function< void(T &)>  Map)
pure virtual

◆ set_adaptive_fast_step()

template<class T >
void amrex::IntegratorBase< T >::set_adaptive_fast_step ( )
inline

◆ set_adaptive_step()

template<class T >
void amrex::IntegratorBase< T >::set_adaptive_step ( )
inline

◆ set_fast_rhs()

template<class T >
void amrex::IntegratorBase< T >::set_fast_rhs ( std::function< void(T &, T &, const amrex::Real)>  F)
inline

◆ set_fast_time_step()

template<class T >
void amrex::IntegratorBase< T >::set_fast_time_step ( amrex::Real  dt)
inline

◆ set_fast_tolerances()

template<class T >
void amrex::IntegratorBase< T >::set_fast_tolerances ( amrex::Real  rtol,
amrex::Real  atol 
)
inline

◆ set_imex_rhs()

template<class T >
void amrex::IntegratorBase< T >::set_imex_rhs ( std::function< void(T &, T &, const amrex::Real)>  Fi,
std::function< void(T &, T &, const amrex::Real)>  Fe 
)
inline

◆ set_max_steps()

template<class T >
void amrex::IntegratorBase< T >::set_max_steps ( int  steps)
inline

◆ set_post_fast_stage_action()

template<class T >
void amrex::IntegratorBase< T >::set_post_fast_stage_action ( std::function< void(T &, amrex::Real)>  A)
inline

◆ set_post_fast_step_action()

template<class T >
void amrex::IntegratorBase< T >::set_post_fast_step_action ( std::function< void(T &, amrex::Real)>  A)
inline

◆ set_post_stage_action()

template<class T >
void amrex::IntegratorBase< T >::set_post_stage_action ( std::function< void(T &, amrex::Real)>  A)
inline

◆ set_post_step_action()

template<class T >
void amrex::IntegratorBase< T >::set_post_step_action ( std::function< void(T &, amrex::Real)>  A)
inline

◆ set_rhs()

template<class T >
void amrex::IntegratorBase< T >::set_rhs ( std::function< void(T &, T &, const amrex::Real)>  F)
inline

◆ set_time_step()

template<class T >
void amrex::IntegratorBase< T >::set_time_step ( amrex::Real  dt)
inline

◆ set_tolerances()

template<class T >
void amrex::IntegratorBase< T >::set_tolerances ( amrex::Real  rtol,
amrex::Real  atol 
)
inline

◆ time_interpolate()

template<class T >
virtual void amrex::IntegratorBase< T >::time_interpolate ( const T &  S_new,
const T &  S_old,
amrex::Real  timestep_fraction,
T &  data 
)
pure virtual

Member Data Documentation

◆ abs_tol

template<class T >
amrex::Real amrex::IntegratorBase< T >::abs_tol = 1.0e-9
protected

Absolute tolerance for adaptive time stepping (Real)

◆ fast_abs_tol

template<class T >
amrex::Real amrex::IntegratorBase< T >::fast_abs_tol = 1.0e-9
protected

Absolute tolerance for adaptive time stepping at the fast time scale (Real)

◆ fast_rel_tol

template<class T >
amrex::Real amrex::IntegratorBase< T >::fast_rel_tol = 1.0e-4
protected

Relative tolerance for adaptive time stepping at the fast time scale (Real)

◆ fast_time_step

template<class T >
amrex::Real amrex::IntegratorBase< T >::fast_time_step
protected

Current integrator fast time scale time step size with multirate methods (Real)

◆ max_steps

template<class T >
int amrex::IntegratorBase< T >::max_steps = 500
protected

Max number of internal steps before an error is returned (Long)

◆ num_steps

template<class T >
amrex::Long amrex::IntegratorBase< T >::num_steps = 0
protected

Number of integrator time steps (Long)

◆ post_fast_stage_action

template<class T >
std::function<void (T&, amrex::Real)> amrex::IntegratorBase< T >::post_fast_stage_action
protected

The post_stage_action function is called by the integrator on the computed stage just after it is computed.

◆ post_fast_step_action

template<class T >
std::function<void (T&, amrex::Real)> amrex::IntegratorBase< T >::post_fast_step_action
protected

The post_step_action function is called by the integrator on the computed state just after it is computed.

◆ post_stage_action

template<class T >
std::function<void (T&, amrex::Real)> amrex::IntegratorBase< T >::post_stage_action
protected

The post_stage_action function is called by the integrator on the computed stage just after it is computed.

◆ post_step_action

template<class T >
std::function<void (T&, amrex::Real)> amrex::IntegratorBase< T >::post_step_action
protected

The post_step_action function is called by the integrator on the computed state just after it is computed.

◆ previous_time_step

template<class T >
amrex::Real amrex::IntegratorBase< T >::previous_time_step
protected

Step size of the last completed step (Real)

◆ rel_tol

template<class T >
amrex::Real amrex::IntegratorBase< T >::rel_tol = 1.0e-4
protected

Relative tolerance for adaptive time stepping (Real)

◆ Rhs

template<class T >
std::function<void(T& rhs, T& state, const amrex::Real time)> amrex::IntegratorBase< T >::Rhs
protected

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

◆ RhsEx

template<class T >
std::function<void(T& rhs, T& state, const amrex::Real time)> amrex::IntegratorBase< T >::RhsEx
protected

RhsEx is the explicit right-hand-side function an ImEx integrator will use.

◆ RhsFast

template<class T >
std::function<void(T& rhs, T& state, const amrex::Real time)> amrex::IntegratorBase< T >::RhsFast
protected

RhsFast is the fast timescale right-hand-side function a multirate integrator will use.

◆ RhsIm

template<class T >
std::function<void(T& rhs, T& state, const amrex::Real time)> amrex::IntegratorBase< T >::RhsIm
protected

RhsIm is the implicit right-hand-side function an ImEx integrator will use.

◆ time_step

template<class T >
amrex::Real amrex::IntegratorBase< T >::time_step
protected

Current integrator time step size (Real)

◆ use_adaptive_fast_time_step

template<class T >
bool amrex::IntegratorBase< T >::use_adaptive_fast_time_step = false
protected

Flag to enable/disable adaptive time stepping at the fast time scale in multirate methods (bool)

◆ use_adaptive_time_step

template<class T >
bool amrex::IntegratorBase< T >::use_adaptive_time_step = false
protected

Flag to enable/disable adaptive time stepping in single rate methods or at the slow time scale in multirate methods (bool)


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