55 gamma.resize(subSteps);
56 zeta.resize(subSteps);
57 alphaExplicit.resize(subSteps);
58 alphaImplicit.resize(subSteps);
103 alphaExplicit[i] = aE*(gamma[i]+zeta[i]);
104 alphaImplicit[i] = aI*(gamma[i]+zeta[i]);
Specifies the time-integration scheme used.
Definition of custom types required by the code.
double real
Is a float or a double depending on the machine precision.
vecH zeta
coefficient of the convection term in the previous time step
vecH alphaImplicit
coefficient of the implicit diffusion term
implicit Euler method (first order)
timeScheme
Specifies the numerical scheme used for time-integration.
cusp::array1d< real, host_memory > vecH
Cusp 1D array stored in the host.
vecH alphaExplicit
coefficient of the explicit diffusion term
second-order Adams-Bashforth scheme
third-order low storage Runge-Kutta method
Crank-Nicolson scheme (second order)
int subSteps
number of substeps inside each time step
void initialise(timeScheme convScheme, timeScheme diffScheme)
Initializes the coefficients of the time-integration scheme.
vecH gamma
coefficient of the convection term in the current time step
explicit Euler method (first order)