Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::numflux::NumericalFlux Class Referenceabstract

#include <alsfvm/numflux/NumericalFlux.hpp>

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

Public Member Functions

virtual ~NumericalFlux ()
 
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})=0
 
virtual size_t getNumberOfGhostCells ()=0
 

Detailed Description

Base class for all numerical fluxes.

Constructor & Destructor Documentation

◆ ~NumericalFlux()

virtual alsfvm::numflux::NumericalFlux::~NumericalFlux ( )
inlinevirtual

Member Function Documentation

◆ computeFlux()

virtual void alsfvm::numflux::NumericalFlux::computeFlux ( const volume::Volume conservedVariables,
rvec3 waveSpeed,
bool  computeWaveSpeed,
volume::Volume output,
const ivec3 start = {0, 0, 0},
const ivec3 end = {0, 0, 0} 
)
pure 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.

Implemented in alsfvm::numflux::NumericalFluxCPU< Flux, Equation, dimension >, and alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >.

◆ getNumberOfGhostCells()

virtual size_t alsfvm::numflux::NumericalFlux::getNumberOfGhostCells ( )
pure virtual
Returns
the number of ghost cells this specific flux requires

Implemented in alsfvm::numflux::NumericalFluxCPU< Flux, Equation, dimension >, and alsfvm::numflux::NumericalFluxCUDA< Flux, Equation, dimension >.


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