METHOD
BackwardsRK2 Class Reference

#include <backwardsRK.h>

Inheritance diagram for BackwardsRK2:
Collaboration diagram for BackwardsRK2:

Public Member Functions

 BackwardsRK2 (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod)
 
virtual ~BackwardsRK2 ()
 
void step (double *cons, double *prims, double *aux, double dt=0)
 
- Public Member Functions inherited from RKSplit
 RKSplit (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL)
 
virtual ~RKSplit ()
 
- Public Member Functions inherited from RK2
 RK2 (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL)
 
virtual ~RK2 ()
 
void predictorStep (double *cons, double *prims, double *aux, double dt)
 
void correctorStep (double *cons, double *prims, double *aux, double dt)
 
void step (double *cons, double *prims, double *aux, double dt=0)
 
- Public Member Functions inherited from TimeIntegrator
 TimeIntegrator (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL)
 
virtual ~TimeIntegrator ()
 
void finalise (double *cons, double *prims, double *aux)
 
- Public Member Functions inherited from TimeIntegratorBase
 TimeIntegratorBase (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL)
 
virtual ~TimeIntegratorBase ()
 

Public Attributes

BackRKArguments args
 
- Public Attributes inherited from RK2
double * p1cons
 
double * p1prims
 
double * p1aux
 
double * args1
 
double * args2
 
- Public Attributes inherited from TimeIntegratorBase
Datadata
 
Modelmodel
 
Bcsbcs
 
FluxMethodfluxMethod
 
ModelExtensionmodelExtension
 

Detailed Description

Semi-implicit second order Runge-Kutta time integrator

Integrator deals with the flux contribution explicitly and the source terms implicitly. Soecifically, the explicit step is performed by a second order RK method, and the implicit is a backwards euler formulism.
The form of the forward step is TVD second order RK2. Such that the intermediate state due to the flux contribution is

\begin{align} U^* = RK2(U^n) \end{align}

with the source contribution determined via a backwards Euler step,

\begin{align} U^{n+1} = U^* + \Psi(U^{n+1}) \end{align}

where \(\Psi(U)\) is the source vector due to the conserved vector \(U\).
The backwards step is solved using a multidimensional newton secant method, which we've implemented using the hydr1 rootfinder available here.
See also
RK2

Definition at line 29 of file backwardsRK.h.

Constructor & Destructor Documentation

◆ BackwardsRK2()

BackwardsRK2::BackwardsRK2 ( Data data,
Model model,
Bcs bcs,
FluxMethod fluxMethod 
)

Constructor.

Constructor requires simulation data and the flux and source functions from the model class.

Parameters
[in]*dataPointer to Data class containing global simulation data
[in]*modelpointer to Model object
[in]*bcspointer to Bcs object
[in]*fluxMethodpointer to FluxMethod object
See also
TimeIntegrator::TimeIntegrator
RK2::RK2
RKSplit::RKSplit

◆ ~BackwardsRK2()

virtual BackwardsRK2::~BackwardsRK2 ( )
inlinevirtual

Destructor.

Definition at line 50 of file backwardsRK.h.

Member Function Documentation

◆ step()

void BackwardsRK2::step ( double *  cons,
double *  prims,
double *  aux,
double  dt = 0 
)
virtual

Performs a single time step.

The timestep will use the current values of the conserved, primitive and auxiliary variables at t=t0 and compute the values of all of them at time \(t=t0 + dt\). I.e. the conserved vector is evolved forward, and the corresponding prims and aux vars are found.

Parameters
[in,out]*conspointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\)
[in,out]*primspointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\)
[in,out]*auxpointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\)
[in]dtthe step size desired to move by. Defaults to the value in the Data class
See also
TimeIntegrator::step
RK2::step
RKSplit::step

Implements TimeIntegratorBase.

Member Data Documentation

◆ args

BackRKArguments BackwardsRK2::args

BackRKArguments, additional arguments class.

Definition at line 33 of file backwardsRK.h.


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