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

#include <alsfvm/numflux/NumericalFluxCPU.hpp>

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

Public Member Functions

 NumericalFluxCPU (const grid::Grid &grid, alsfvm::shared_ptr< reconstruction::Reconstruction > &reconstruction, const alsfvm::shared_ptr< simulator::SimulatorParameters > &simulatorParameters, 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 ()
 

Detailed Description

template<class Flux, class Equation, size_t dimension>
class alsfvm::numflux::NumericalFluxCPU< Flux, Equation, dimension >

The class to compute numerical flux on the CPU The template argument Flux is used to choose the concrete flux The template argument dimension is to choose the correct dimension (1 up to and including 3 is supported).

Constructor & Destructor Documentation

◆ NumericalFluxCPU()

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

Member Function Documentation

◆ computeFlux()

template<class Flux , class Equation , size_t dimension>
void alsfvm::numflux::NumericalFluxCPU< 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>
size_t alsfvm::numflux::NumericalFluxCPU< 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 files: