9.2
general documentation
runge_kutta_integrator Class Reference

Generic Runge-Kutta integrator class. More...

#include <cs_runge_kutta_integrator.h>

+ Collaboration diagram for runge_kutta_integrator:

Public Member Functions

CS_F_HOST runge_kutta_integrator ()
 Default constructor method. More...
 
CS_F_HOST runge_kutta_integrator (cs_runge_kutta_scheme_t scheme, const char *name, const cs_real_t *dt, int dim, cs_lnum_t n_elts)
 Constructor method with input arguments. More...
 
CS_F_HOST ~runge_kutta_integrator ()
 Destructor method. More...
 
CS_F_HOST void init_state (cs_dispatch_context &ctx, const cs_real_t *rho, const cs_real_t *vol, cs_real_t *pvara)
 IDefault constructor method. More...
 
CS_F_HOST void solve_stage (cs_dispatch_context &ctx, cs_real_t *pvar_stage)
 Perform one Runge-Kutta staging. More...
 
CS_F_HOST void stage_projection_rhs (cs_dispatch_context &ctx, cs_real_t *grad_dp)
 Perform one Runge-Kutta staging for the potential in the NS system. More...
 
CS_F_HOST void stage_set_initial_rhs (cs_dispatch_context &ctx, cs_real_t *rhs_pvar)
 Set initial rhs per stage for Runge-Kutta integrator. Align with legacy equations' building sequence. 1) Collect initial rhs done in cs_solve_navier_stokes/cs_solve_equation_scalar 2) Complete rhs with adding explicit part of the convection/diffusion balance. More...
 
CS_F_HOST_DEVICE bool is_active () const
 Check if integrator is active. More...
 
CS_F_HOST_DEVICE bool is_staging () const
 Check if integrator is still in the staging process. More...
 
CS_F_HOST_DEVICE cs_runge_kutta_scheme_t scheme () const
 Get scheme used by integrator. More...
 
CS_F_HOST_DEVICE cs_lnum_t n_elts () const
 Get number of elements used for resolution. More...
 
CS_F_HOST_DEVICE int i_stage () const
 Get current stage of RK resolution. More...
 
CS_F_HOST_DEVICE int stride () const
 Get solved variable stride. More...
 
CS_F_HOST cs_real_tget_rhs_stage_sub_array (int stage_id)
 Get raw pointer to rhs of a given stage. More...
 
CS_F_HOST cs_span< cs_real_tget_stage_coeff_a (int i)
 Get "a" coefficients for a given stage. More...
 

Detailed Description

Generic Runge-Kutta integrator class.

Constructor & Destructor Documentation

◆ runge_kutta_integrator() [1/2]

Default constructor method.

◆ runge_kutta_integrator() [2/2]

CS_F_HOST runge_kutta_integrator ( cs_runge_kutta_scheme_t  scheme,
const char *  name,
const cs_real_t dt,
int  dim,
cs_lnum_t  n_elts 
)
inline

Constructor method with input arguments.

Parameters
[in]schemeSelected RK scheme
[in]nameAssociated equation or field's name
[in]dttime step array (ptr)
[in]dimField's dimension
[in]n_eltsNumber of computational elements

◆ ~runge_kutta_integrator()

Destructor method.

Member Function Documentation

◆ get_rhs_stage_sub_array()

CS_F_HOST cs_real_t * get_rhs_stage_sub_array ( int  stage_id)
inline

Get raw pointer to rhs of a given stage.

Returns
raw pointer (cs_real_t *)
Parameters
[in]stage_idstage id

◆ get_stage_coeff_a()

CS_F_HOST cs_span< cs_real_t > get_stage_coeff_a ( int  i)
inline

Get "a" coefficients for a given stage.

Returns
1D span (cs_span<cs_real_t>) of the coefficients
Parameters
[in]istage id

◆ i_stage()

CS_F_HOST_DEVICE int i_stage ( ) const
inline

Get current stage of RK resolution.

Returns
current stage id (int)

◆ init_state()

CS_F_HOST void init_state ( cs_dispatch_context ctx,
const cs_real_t rho,
const cs_real_t vol,
cs_real_t pvara 
)
inline

IDefault constructor method.

Parameters
[in]ctxReference to dispatch context
[in]rhomass density within the geometry support
[in]volmeasure of the geometry support
[in]pvarahigh level variable array at the begining of a time step

◆ is_active()

CS_F_HOST_DEVICE bool is_active ( ) const
inline

Check if integrator is active.

Returns
true if active, false otherwise.

◆ is_staging()

CS_F_HOST_DEVICE bool is_staging ( ) const
inline

Check if integrator is still in the staging process.

Returns
true if staging, false otherwise

◆ n_elts()

CS_F_HOST_DEVICE cs_lnum_t n_elts ( ) const
inline

Get number of elements used for resolution.

Returns
number of elements (cs_lnum_t)

◆ scheme()

CS_F_HOST_DEVICE cs_runge_kutta_scheme_t scheme ( ) const
inline

Get scheme used by integrator.

Returns
sheme type of the integrator (cs_runge_kutta_scheme_t)

◆ solve_stage()

CS_F_HOST void solve_stage ( cs_dispatch_context ctx,
cs_real_t pvar_stage 
)
inline

Perform one Runge-Kutta staging.

Parameters
[in]ctxReference to dispatch context
[in]pvar_stagehigh level variable array along stages

◆ stage_projection_rhs()

CS_F_HOST void stage_projection_rhs ( cs_dispatch_context ctx,
cs_real_t grad_dp 
)
inline

Perform one Runge-Kutta staging for the potential in the NS system.

Parameters
[in]ctxReference to dispatch context
[in]grad_dppressure increment gradient

◆ stage_set_initial_rhs()

CS_F_HOST void stage_set_initial_rhs ( cs_dispatch_context ctx,
cs_real_t rhs_pvar 
)
inline

Set initial rhs per stage for Runge-Kutta integrator. Align with legacy equations' building sequence. 1) Collect initial rhs done in cs_solve_navier_stokes/cs_solve_equation_scalar 2) Complete rhs with adding explicit part of the convection/diffusion balance.

Parameters
[in]ctxReference to dispatch context
[in]rhs_pvarpointer to high level rhs array

◆ stride()

CS_F_HOST_DEVICE int stride ( ) const
inline

Get solved variable stride.

Returns
variable stride (int)

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