METHOD
SSP2322 Class Reference

#include <SSP2322.h>

Inheritance diagram for SSP2322:
Collaboration diagram for SSP2322:

Public Member Functions

 SSP2322 (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod)
 
virtual ~SSP2322 ()
 
void step (double *cons, double *prims, double *aux, double dt=0)
 
- Public Member Functions inherited from SSP2
 SSP2 (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod)
 
virtual ~SSP2 ()
 
- 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

IMEX2Arguments args
 
double * x
 
double * fvec
 
double * wa
 
double * U1
 
double * U2
 
double * U3
 
double * U2guess
 
double * U3guess
 
double * source1
 
double * flux1
 
double * source2
 
double * flux2
 
double * source3
 
double * flux3
 
double * tempprims
 
double * tempaux
 
- Public Attributes inherited from SSP2
IMEX2Arguments args
 
double * x
 
double * fvec
 
double * wa
 
double * U1
 
double * U2
 
double * source1
 
double * flux1
 
double * source2
 
double * flux2
 
- Public Attributes inherited from TimeIntegratorBase
Datadata
 
Modelmodel
 
Bcsbcs
 
FluxMethodfluxMethod
 
ModelExtensionmodelExtension
 

Detailed Description

Implicit-Explicit Runge-Kutta second order SSP2(322) time integrator

Integrator is second order, solves the non-stiff fluxes explicitly and the (possibly) stiff sources implicitly. Values for the constants and general methods are from Pareschi & Russo 2004.
What follows is a brief description of the method. For a system of conservation equations, given in general by

\begin{align} \partial_t U = F(U) + \psi(U) \end{align}

the second order SSP2(322) IMEX scheme takes the following form:

\begin{align} U^{(1)} &= U^n + \frac{dt}{2} \psi(U^{(1)}) \\ U^{(2)} &= U^n - \frac{dt}{2} \psi(U^{(1)}) + \frac{dt}{2} \psi(U^{(2)}) \\ U^{(3)} &= U^n + dt F(U^{(2)}) + \frac{dt}{2} \big[\psi(U^{(2)}) + \psi(U^{(3)})\big] \\ U^{n+1} &= U^n + \frac{dt}{2} \big[F(U^{(2)}) + F(U^{(3)}) + \psi{U^{(2)}} + \psi(U^{(3)})\big] \end{align}

.
The sources are necessarily solved via an implicit rootfind, using a multidimensional Newton-Secant method found here.

Definition at line 34 of file SSP2322.h.

Constructor & Destructor Documentation

◆ SSP2322()

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

Constructor.

Constructor requires simulation data and the flux and source functions from the model class.
Parameters
*dataPointer to Data class containing global simulation data
*modelpointer to Model object
*bcspointer to Bcs object
*fluxMethodpointer to FluxMethod object
See also
TimeIntegrator::TimeIntegrator
SSP2::SSP2
SSP3::SSP3

◆ ~SSP2322()

virtual SSP2322::~SSP2322 ( )
virtual

Destructor.

Member Function Documentation

◆ step()

void SSP2322::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
*conspointer to conserved vector work array. Size is Ncons*Nx*Ny*Nz
*primspointer to primitive vector work array. Size is Nprims*Nx*Ny*Nz
*auxpointer to auxiliary vector work array. Size is Naux*Nx*Ny*Nz
dtthe step size desired to move by. Defaults to the value in the Data class
See also
TimeIntegrator::step
SSP2::step
SSP3::step

Reimplemented from SSP2.

Member Data Documentation

◆ args

IMEX2Arguments SSP2322::args

IMEX2Arguments, additional arguments class, stores single cell data for hydrb rootfinder.

Definition at line 38 of file SSP2322.h.

◆ flux1

double * SSP2322::flux1

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ flux2

double * SSP2322::flux2

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ flux3

double * SSP2322::flux3

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ fvec

double * SSP2322::fvec

Work array for the hybrd rootfinder.

Definition at line 44 of file SSP2322.h.

◆ source1

double * SSP2322::source1

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ source2

double * SSP2322::source2

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ source3

double * SSP2322::source3

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ tempaux

double * SSP2322::tempaux

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ tempprims

double * SSP2322::tempprims

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ U1

double * SSP2322::U1

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ U2

double * SSP2322::U2

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ U2guess

double * SSP2322::U2guess

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ U3

double * SSP2322::U3

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ U3guess

double * SSP2322::U3guess

Work array for specified variable. Size is \(N_{cons}*N_x*N_y*N_z\).

Definition at line 44 of file SSP2322.h.

◆ wa

double * SSP2322::wa

Work array for the hybrd rootfinder.

Definition at line 44 of file SSP2322.h.

◆ x

double* SSP2322::x

Work array for the hybrd rootfinder.

Definition at line 44 of file SSP2322.h.


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