Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
time_integrator.h File Reference

Time integrator class declarations. More...

#include <functional>
#include <string>
#include <unordered_map>
#include <vector>
#include <Kokkos_Core.hpp>
#include "common.h"
#include "state.h"

Go to the source code of this file.

Classes

class  TimeIntegrator
 
class  FE
 
class  RK4
 
class  SSPRK3
 Three-stage, third-order strong-stability-preserving Runge-Kutta (Shu & Osher 1988). More...
 

Typedefs

using RHSFunction = std::function< void(State solution, State rhs, rtype t)>
 

Enumerations

enum class  TimeIntegratorType { FE , RK4 , SSPRK3 }
 
enum  DtScale {
  DT = 0 , DT_HALF = 1 , DT_SIXTH = 2 , DT_THIRD = 3 ,
  N_DT_SCALES = 4
}
 Index of each multiple of dt in the device array of take_step's dt_scales. More...
 

Functions

void axpby (const rtype a, const State &x, const rtype b, const State &y, const rtype *a_device=nullptr)
 y = a * x + b * y, on both blocks of the state.
 
KOKKOS_INLINE_FUNCTION void dt_scales (const rtype dt, rtype *scales)
 The multiples of dt that the integrators use, as take_step's device dt_scales holds them.
 
void lerp (const rtype a, const State &x, const State &y)
 y = (1 - a) y + a x as y + a (x - y), on both blocks of the state: unlike axpby with rounded weights a and 1 - a, it leaves y unchanged where x == y.
 

Detailed Description

Time integrator class declarations.

Author
Matthew Bonanni(mbona.nosp@m.nni0.nosp@m.01@gm.nosp@m.ail..nosp@m.com)
Version
0.2
Date
2023-12-22

Typedef Documentation

◆ RHSFunction

Enumeration Type Documentation

◆ DtScale

Index of each multiple of dt in the device array of take_step's dt_scales.

Enumerator
DT 
DT_HALF 
DT_SIXTH 
DT_THIRD 
N_DT_SCALES 

◆ TimeIntegratorType

Enumerator
FE 
RK4 
SSPRK3 

Function Documentation

◆ axpby()

void axpby ( const rtype  a,
const State &  x,
const rtype  b,
const State &  y,
const rtype *  a_device = nullptr 
)

y = a * x + b * y, on both blocks of the state.

y = a x + b y, with a read from device memory instead when a_device is given (graph-captured steps, whose dt lives on the device).

◆ dt_scales()

KOKKOS_INLINE_FUNCTION void dt_scales ( const rtype  dt,
rtype *  scales 
)

The multiples of dt that the integrators use, as take_step's device dt_scales holds them.

◆ lerp()

void lerp ( const rtype  a,
const State &  x,
const State &  y 
)

y = (1 - a) y + a x as y + a (x - y), on both blocks of the state: unlike axpby with rounded weights a and 1 - a, it leaves y unchanged where x == y.