Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension > Class Template Reference

#include <alsfvm/numflux/NumericalFluxCUDA.hpp>

Inheritance diagram for alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >:
alsfvm::numflux::NumericalFlux

Public Member Functions

 NumericalFluxCUDA (const grid::Grid &grid, alsfvm::shared_ptr< reconstruction::Reconstruction > &reconstruction, const simulator::SimulatorParameters &parameters, alsfvm::shared_ptr< DeviceConfiguration > &deviceConfiguration)
 
virtual void computeFlux (const volume::Volume &conservedVariables, rvec3 &waveSpeed, bool computeWaveSpeed, volume::Volume &output, const ivec3 &start={0, 0, 0}, const ivec3 &end={0, 0, 0})
 
virtual size_t getNumberOfGhostCells ()
 
- Public Member Functions inherited from alsfvm::numflux::NumericalFlux
virtual ~NumericalFlux ()
 

Constructor & Destructor Documentation

◆ NumericalFluxCUDA()

template<class Flux , class Equation , size_t dimension>
alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >::NumericalFluxCUDA ( const grid::Grid grid,
alsfvm::shared_ptr< reconstruction::Reconstruction > &  reconstruction,
const simulator::SimulatorParameters parameters,
alsfvm::shared_ptr< DeviceConfiguration > &  deviceConfiguration 
)

Member Function Documentation

◆ computeFlux()

template<class Flux , class Equation , size_t dimension>
virtual void alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >::computeFlux ( const volume::Volume conservedVariables,
rvec3 waveSpeed,
bool  computeWaveSpeed,
volume::Volume output,
const ivec3 start = {0, 0, 0},
const ivec3 end = {0, 0, 0} 
)
virtual

Computes the numerical flux at each cell. This will compute the net flux in the cell, ie.

\[ \mathrm{output}_{i,j,k}=\frac{\Delta t}{\Delta x}\left(F(u_{i+1,j,k}, u_{i,j,k})-F(u_{i,j,k}, u_{i-1,j,k})\right)+ \frac{\Delta t}{\Delta y}\left(F(u_{i,j+1,k}, u_{i,j,k})-F(u_{i,j,k}, u_{i,j-1,k})\right)+ \frac{\Delta t}{\Delta z}\left((F(u_{i,j,k+1}, u_{i,j,k})-F(u_{i,j,k}, u_{i,j,k-1})\right) \]

Parameters
[in]conservedVariablesthe conservedVariables to read from (eg. for Euler: $\rho,\; \vec{m},\; E$)
[out]waveSpeedthe maximum wave speed in each direction
[in]computeWaveSpeedshould we compute the wave speeds?
[out]outputthe output to write to
[in]start(positive) the first index to compute the flux for
[in]end(negative) the offset to on the upper part of the grid
Note
this will calculate the extra variables on the fly.

Implements alsfvm::numflux::NumericalFlux.

◆ getNumberOfGhostCells()

template<class Flux , class Equation , size_t dimension>
virtual size_t alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >::getNumberOfGhostCells ( )
virtual
Returns
the number of ghost cells this specific flux requires

Implements alsfvm::numflux::NumericalFlux.


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